When run under Buck the repository paths may be relative. Request
an absolute path to construct the URI, as relative paths are not
supported in file:// style URIs.
Change-Id: I85470d1db2f4e80cba30f1559c0d99bdfa8ac410
Necessary to get tests to pass when running under Buck.
Has no impact on Maven based invocation of tests.
Change-Id: I437114863df0bac346c94ef13796def47333d916
Avoid depending on AutoCRLFOutputStreamTest from within another
test such as AutoCRLFInputStreamTest. Breaking the dependency up
allows the test classes to be built and executed in parallel.
Change-Id: Ic9ab2b6ec74ac87ff4adda8a802ae343dd2a6235
Buck does not create a target directory for the build output, this
is Maven specific and the project unit tests should not rely on it.
Instead follow the pattern used by org.eclipse.jgit.test which is to
create a temporary directory in the system temporary folder, and
configure the Maven surefire plugin to use the target directory.
Change-Id: Iebe5093332343a90f51080614e083aac0d29c26d
Move the set constructor function to a Sets utility class,
allowing the tests to compile in parallel.
Change-Id: Id6fac2533fab8d423f949c892f199af2491a450b
Reference the resource from the root of the CLASSPATH, allowing the
test classes to be compiled in parallel with no dependencies.
Change-Id: Ia6becf30ccfe93b8585b82293d9a4863b0cf837e
Add Operation.PROCESS_STEPS to RebaseCommand to enable starting
interactive rebase explicitly after rebase steps have been configured.
Change-Id: I2d6f0de82010ea6523fbce6fb4501e847bdcdddc
Signed-off-by: Tobias Pfeifer <to.pfeifer@web.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Checking of spaces at the end of the file name caused the
test to fail for Windows only.
Bug: 396662
Change-Id: I47bcccb0fa32ce606276c3f30d454851d115ca11
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
A rebase todo file consists of regular non-comment action lines and
comment lines. In case that a regular action line has been commented out
(i.e. prefixed with a hash '#'), the RebaseTodoLine that is representing
this line should hold the values for commitId and shortMessage even
though it's a comment line. This allows to switch between comment and
non-comment easily even after the file has been persisted and reread.
Change-Id: I56ec2ba08eaf3772e2d74d937dd496209a744d4b
Signed-off-by: Tobias Pfeifer <to.pfeifer@web.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Reading and writing files formatted like the git-rebase-todo files was
hidden in the RebaseCommand. Certain constructs (like leading tabs and
spaces) have not been handled as in native git. Also the upcoming
rebase interactive feature in EGit needs reading/writing these files
independently from a RebaseCommand.
Therefore reading and writing those files has been moved to the
Repository class. RebaseCommand gets smaller because of that and doesn't
have to deal with reading/writing files.
Additional tests for empty todo-list files, or files containing comments
have been added.
Change-Id: I323f3619952fecdf28ddf50139a88e0bea34f5ba
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Also-by: Tobias Pfeifer <to.pfeifer@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This allows subclasses to configure the HTTP connection (for example,
to add headers to the request).
Bug: 400724
Change-Id: I6f9d699e158a7b9d813c8fa8d273992a28994e41
Signed-off-by: Michael Nelson <michael.nelson@tasktop.com>
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Otherwise the MockSystemReader from the test setup is active for other
tests.
Change-Id: I7caf693bd692d06936e29efd4dc4aabb48c1c39b
Signed-off-by: Robin Stocker <robin@nibor.org>
On Mac OS X /tmp is by default a symbolic link.
Change-Id: I0913ee5ee8db5c5918a9e41abbbfe125b6c70783
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
If the version command cannot read the Implementation-Version of the
containing JAR fall back to read the Bundle-Version header in
MANIFEST.MF. This makes the command working also from the
org.eclipse.jgit.pgm bundle and during development in a host IDE.
Bug: 419087
Change-Id: I4269d1cbd9bf9fd8be6fb4463aecc1c434aa387b
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This allows correct export of org.eclipse.jgit.pgm via the PDE Export
wizard.
Bug: 419089
Change-Id: I98765208edd7df59e262001dd01ed2b43e4475a9
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
IOException did not add a (String, Throwable) constructor until 1.5.
Instead use the String super constructor and initCause to initialize
the exception.
Fixes bug 418889
Change-Id: Ide735ecfc7d04884981b79b57a4275863ce17006
ServiceMayNotContinueException usually wraps an underlying exception.
Add convenience constructors that take Throwable. In the case a
string is not provided, the message defaults to "internal server error",
since it may be reported to the client.
Change-Id: I15dc20306826c352f69e88afb7ed6927c12b6c1f
Currently, Repository.getAllRefs() and Repository.getTags() silently
ignores an IOException and instead returns an empty map. Repository
is a public API and as such cannot be changed until the next major
revision change. Where possible, update the internal jgit APIs to
use the RefDatabase directly, since it propagates the error.
Change-Id: I4e4537d8bd0fa772f388262684c5c4ca1929dc4c
* stable-3.1:
Prepare post 3.1.0 builds
JGit v3.1.0.201310021548-r
Fix order of commits in rebase todo file header
Prepare post 3.1.0 RC1 builds
JGit v3.1.0.201309270735-rc1
Attempt to fix graph layout when new heads are introduced
Prepare re-signing pgm's ueberjar to avoid SecurityException
Use full branch name when getting ref in BranchTrackingStatus
Change-Id: Ida30175d0c058048cbe4b563aae7f85cd008db29
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Sometime the new commit is no allocated onto a new lane leading to
the commit being drawn on the wrong branch and something that looks
like a merge.
The drawback is that this also changes existing valid graphs.
Bug: 368927
Change-Id: Ic8a8247c8a53be802c1be83850ed766b902ca646
Since we now sign all build artifacts immediately after creating them
we need to re-sign the ueberjar created for jgit command line tool
because the signatures of the individual jars are invalidated when
repacking them into the ueberjar. Hence we need to exclude the
signatures of the individual jars when using maven-shade-plugin to
create the ueberjar.
Also install the shaded plugin into maven repository and exclude osgi
framework sources which were included unintentionally.
See http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg02277.html
Change-Id: Ia302e68a4b2a9399cb18025274574e31d3d3e407
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This reverts commit 75d9b31f14.
Now that we do not try to close the ArchiveOutputStream in the error
path, there is no need to artificially close partial entries from
before the error.
Change-Id: I1f1cb08ec4e9b14c79bf4621f3fa959463034b82
Signed-off-by: Jonathan Nieder <jrn@google.com>
If we encounter an I/O error while writing an archive (for example due
to the reader of an HTTP stream closing the connection), the result is
an archive with unclosed entries, causing
TarArchiveOutputStream.finish() to throw IOException("This archives
contains unclosed entries"), hiding the IOException that caused the
early termination.
The unclosed entries are fine: the same exception that occured in the
first place will probably prevent closing the entries before finishing
this partial archive that should be discarded anyway.
It would be nicer to call TarArchiveOutputStream.finish and leave the
underlying OutputStream unclosed --- all callers close it already ---
but that would be a more invasive change so we hold off for now.
Change-Id: I328ced19aa8a1888e5353cdbb6106a85fd72d5d7
Signed-off-by: Jonathan Nieder <jrn@google.com>