Matthias Sohn [Fri, 2 Mar 2012 08:09:39 +0000 (09:09 +0100)]
Exclude org.eclipse.jgit from pack200 packing
It seems pack200 became unable to correctly pack the bundle
org.eclipse.jgit (see bug 372845). Hence mark it to be excluded from
this packing step following the workaround which worked for
org.eclipse.jst.jsf.core (bug 335806).
Bug: 372845
Change-Id: I2e3d20645ac49125472ddc235afbe9f3c7480caf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Dave Borowitz [Wed, 8 Feb 2012 22:30:04 +0000 (14:30 -0800)]
Modify refs in UploadPack/ReceivePack using a hook interface
This is intended to replace the RefFilter interface (but does not yet,
for backwards compatibility). That interface required lots of extra
scanning and copying in filter cases such as only advertising a subtree
of the refs directory. Instead, provide a hook that can be executed
right before ref advertisement, using the public methods on
UploadPack/ReceivePack to explicitly set the map of advertised refs.
Dave Borowitz [Mon, 27 Feb 2012 19:54:19 +0000 (11:54 -0800)]
Expose an OutputStream from ReceivePack for sending client messages
Callers may want to format and flush their own output, for example in a
PreReceiveHook that creates its own TextProgressMonitor. The actual
underlying msgOut can change over the lifetime of ReceivePack, so we
implement a small wrapper.
Dave Borowitz [Wed, 15 Feb 2012 19:10:52 +0000 (11:10 -0800)]
Allow creating ReceiveCommands with a specified type
This allows callers who know in advance whether a command is UPDATE or
UPDATE_NONFASTFORWARD to specify this in the constructor rather than
with a separate method call.
Dave Borowitz [Tue, 7 Feb 2012 23:16:40 +0000 (15:16 -0800)]
Execute ReceiveCommands via a method rather than in ReceivePack
This allows a PreReceiveHook to easily "take over" all of the
ReceiveCommands passed to it, preventing any of them from being handled
within the ReceivePack core.
Kevin Sawicki [Wed, 29 Feb 2012 23:07:37 +0000 (15:07 -0800)]
Reuse existing modes and ids
This change replaces calls to getEntryObjectId and getEntryFileMode
with the existing method local variables for the index, merge, and
head tree iterators.
There are a few situations where you want to delete files or folders but
where you are not interested in getting exceptions if this doesn't
succeed. E.g. if you delete garbage in the GC class you want that if
certain files can't be deleted the command succeeds. Maybe the next
garbage collector run has more luck not to interfere with a virus
scanner run on Windows. Therefore an option is added to
FileUtils.delete() not to report errors in such cases.
Change-Id: I58994d8c481e591dcbb0f2be7dfa562e125f0f08 Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Matthias Sohn [Mon, 13 Feb 2012 06:33:43 +0000 (07:33 +0100)]
Merge branch 'stable-1.3'
* stable-1.3:
Prepare post 1.3.0.201202121842-rc4 builds
JGit 1.3.0.201202121842-rc4
Support gitdir references in working tree .git file
Support committing submodule updates
Update iplog tool's README
Change-Id: Id70f4d4b059b03d4fa6fbd9137b81a337e9c48e8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Kevin Sawicki [Wed, 8 Feb 2012 22:10:28 +0000 (23:10 +0100)]
Support gitdir references in working tree .git file
A '.git' file in a repository's working tree root is now parsed
as a ref to a folder located elsewhere. This supports submodules
having their repository location outside of the parent repository's
working directory such as in the parent repository's '.git/modules'
directory.
This adds support to BaseRepositoryBuilder for repositories created
with the '--separate-git-dir' option specified to 'git init'.
Change-Id: I73c538f6d845bdbc0c4e2bce5a77f900cf36e1a9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Tomasz Zarna [Fri, 20 Jan 2012 23:15:03 +0000 (00:15 +0100)]
Workaround incompatible refactoring in Jetty 7.6.0
In Jetty 7.6 package org.eclipse.jetty.http.security was renamed to
org.eclipse.jetty.util.security [1] breaking compatibility.
Compare docs for the package in 7.5.4 [2] and missing part in 7.6.0 [3].
To fix until we switch to Jetty 8, restrict the maximum version to 7.6.0
exclusive.
Kevin Sawicki [Tue, 17 Jan 2012 17:35:29 +0000 (09:35 -0800)]
Support relative submodule URLs on init/add/sync
Interpret submodule URLs that start with './' or '../' as
relative to either the configured remote for the HEAD branch,
or 'origin', or the parent repository working directory if no
remote URL is configured
Robin Stocker [Mon, 16 Jan 2012 21:33:03 +0000 (22:33 +0100)]
Add BranchTrackingStatus for getting remote tracking status
This is used by EGit change I1e1caca561d1b0a0c194bfc42e64b698f42c6e6a to
show branch status in decoration.
It can also be used for providing the same output as C Git in "git
status".
Change-Id: I8d2b108c89905c3f0496f3d517879596740787c0 Signed-off-by: Robin Stocker <robin@nibor.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Robin Stocker [Mon, 16 Jan 2012 21:18:54 +0000 (22:18 +0100)]
Add BranchConfig helper for access to branch config section
Getting the name of the remote-tracking branch given a branch is not so
easy to get right. This class provides a way to do that and could be
used for more branch config related things (e.g. in PullCommand).
Change-Id: I896a2384217936c8b672df8b81c9599f5c350458 Signed-off-by: Robin Stocker <robin@nibor.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Robin Stocker [Mon, 16 Jan 2012 21:05:20 +0000 (22:05 +0100)]
Add RevWalkUtils with count(start, end) method
It returns the number of commits that are in start and not in end.
Useful for calculating how much a branch is ahead of another one.
Change-Id: I09f7d9b049beea417da7ff32c9f8bf0d4ed46a7f Signed-off-by: Robin Stocker <robin@nibor.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Robin Rosenberg [Mon, 31 Oct 2011 22:30:11 +0000 (23:30 +0100)]
Support more of AutoCRLF
This patch introduces CRLF handling to the DirCacheCheckout and
WorkingTreeIterator supporting the AutoCRLF for add, checkout
reset and status and hopefully some other places that depende
on the underlying logic of the affected API's.
The patch includes test cases for the Status command provided by
Tomasz Zarna for bug 353867.
The core.eol and core.safecrlf options are not yet supported.
Kevin Sawicki [Mon, 9 Jan 2012 16:46:13 +0000 (08:46 -0800)]
Provide helper for unlocking a file
This will allow recovery from a LockFailedException where
the file associated with an exception is passed to FileUtils.unlock
to attempt an unlock on the file so the operation can be retried
Matthias Sohn [Sun, 8 Jan 2012 21:08:08 +0000 (13:08 -0800)]
Narrow exceptions declared by LsRemoteCommand
API commands either throw GitAPIException or JGitInternalException.
Also add missing javadoc and reduce nesting of catch blocks.
Change-Id: I9a3b302e1b3f373ee11a977a0e3d6213bfbd3cdf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Kevin Sawicki <kevin@github.com>
Kevin Sawicki [Tue, 3 Jan 2012 23:07:02 +0000 (15:07 -0800)]
Retain executable mode of existing files on Windows
Currently files in a repository marked as executable will have
that mode unset when modified and committed on systems that
do not support detection of this mode since the working tree
iterator will never report this mode for any entries.
This change updates WorkingTreeIterator to be able
to determine the target file mode to be used for the index
through consideration of the configured WorkingTreeOptions.
The places where ResolveMerger was doing content merges have been
refactored. The goal was to have one single method where content merge
was done and to factor out other topics (updating the index, updating
the working tree) into own methods. This was done to allow adding
pluggable content mergers in change
I7817e2123d254f3eeb315b47a61d2c55bd202c12
Change-Id: I8529697b197372a284bcd5ab2c9ba1adb925a520 Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Kevin Sawicki [Tue, 13 Dec 2011 01:49:09 +0000 (17:49 -0800)]
Add exception class for when locking a file fails
This will allows calling classes to handle lock failures
without checking against the message and will also provide
access to the file that could not be locked.
Kevin Sawicki [Sat, 17 Dec 2011 01:05:42 +0000 (17:05 -0800)]
Support resolving integer-based reflog revisions
Revision strings such as 'master@{0}' can now be resolved
by Repository.resolve by reading the reflog for the ref and
returning the commit for the entry number specified.
This still throws an exception for cases not supported
such as 'master@{yesterday}'.
Matthias Sohn [Fri, 16 Dec 2011 07:49:59 +0000 (08:49 +0100)]
Merge branch 'stable-1.2'
* stable-1.2:
Add API checking using clirr
Fix MergeCommandTest to pass if File.executable is not supported
Fix ResolveMerger not to add paths with FileMode 0
Change-Id: I86e7194a40acd6dfa3d433f1d17c01bdf5bb0d9c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Robin Rosenberg [Fri, 16 Dec 2011 00:01:36 +0000 (01:01 +0100)]
Enforce the use of Java5 API:s only (with a few exceptions)
This only works with Eclipse 3.6 and newer and requires installation
of new package. Documentation is not very good, but there is a blog
about it here:
http://eclipseandjazz.blogspot.com/2011/10/of-invalid-references-to-system.html
API checking is especially useful on OS X where Java5 is not readily
available.
Change-Id: I3c0ad460874a21c073f5ac047146cbf5d31992b4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>