Skip to main content
aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-12-26Merge branch 'stable-1.2'Matthias Sohn2-0/+100
* stable-1.2: JGit v1.2.0.201112221803-r Expose unmerged paths when revert fails Enforce the use of Java5 API:s only (with a few exceptions) Change-Id: Ib18d41a65e68cc47fb63114fcce27a16820d0692 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-12-22JGit v1.2.0.201112221803-rv1.2.0.201112221803-rstable-1.2Matthias Sohn2-2/+2
Change-Id: Icc0b09324f205d93929af8cf522a99ad00cf7591 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-12-16Enforce the use of Java5 API:s only (with a few exceptions)Robin Rosenberg2-0/+100
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>
2011-12-10Prepare 1.3.0 buildsMatthias Sohn2-16/+16
Change-Id: I7a1ae73783c95041b59f047a7330e62e7f642149 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-12-02Ensure all smart HTTP errors are sent to clientsShawn O. Pearce1-0/+188
Error messages are typically short, below the 32 KiB in-memory buffer size of the SmartOutputStream. When an error is queued up for sending to a client and an exception is thrown up into the servlet handler we discarded the message and sent nothing to the client, as the messages were stuck inside of the SmartOutputStream buffer. Hoist the creation of the output stream above the invocation of try block of the service, and use close() in the few catch blocks that assume there are buffered messages ready for transmission. This will ensure errors from unpacking a stream in ReceivePack are sent off to a client correctly, as previously these were causing no status report to arrive at the client side as the data was stuck in the buffer. Change-Id: I5534b560697731121f48979ae077aa7c95b8e39c
2011-12-01Fix HTTP unit testsShawn O. Pearce1-2/+1
I modified the way errors are returned, and this particular test is now getting a different access denied response. The new text happens to be what I intended to have here, so update the test. Change-Id: I53f8410ca0a52755d80473cd5cbcdb4d8502febf
2011-09-15Prepare 1.2.0 buildsMatthias Sohn2-16/+16
Change-Id: I9ec247135d93ef28d732e94f18d0ec1d0e2e6d44 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-09-15Prepare post v1.1.0.201109151100-r buildstable-1.1Matthias Sohn2-2/+2
Change-Id: Ib099ec93d8243b238641d79328216874532ab5eb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-09-15JGit v1.1.0.201109151100-rv1.1.0.201109151100-rMatthias Sohn2-2/+2
Change-Id: Iadcec7e5973600e005cbdeb837fa197d3ae2ea86 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-09-07Prepare post v1.1.0.201109071825-rc3 buildsMatthias Sohn2-2/+2
Change-Id: I1244f6639263d156a6f9e4530167e5eb1826a535 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-09-07JGit v1.1.0.201109071825-rc3v1.1.0.201109071825-rc3Matthias Sohn2-2/+2
Change-Id: I1b989d3101272632eacabe25a0b111ad0ff5bb3b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-09-05Use commit message best practices for Mylyn Commit templateMatthias Sohn2-0/+7
We should use a template for Mylyn commit messages that matches with our guidelines for commit messages. http://wiki.eclipse.org/EGit/Contributor_Guide#Commit_message_guidelines Bug: 337401 Change-Id: I05812abf0eb0651d22c439142640f173fc2f2ba0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-09-01Prepare post-v1.1.0.201109011030-rc2 buildsMatthias Sohn2-2/+2
Change-Id: I8dda83cdbe88beba4a480df9846848bf3aceb9e2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-09-01JGit v1.1.0.201109011030-rc2v1.1.0.201109011030-rc2Matthias Sohn2-2/+2
Change-Id: Ie6d65fe45ad92c813ce3a227729aa43681922249 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-06-20Refactor out ReflogEntryChris Aniszczyk1-1/+2
It's useful to have ReflogEntry refactored out so it can be used by clients via the JGit API. Change-Id: I03044df9af9f9547777545b7c9b93bdf5f8b7cb5 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
2011-06-05Prepare 1.1.0 buildsMatthias Sohn2-16/+16
Change-Id: I4cf017cd567543846839612ab3ace6d26233e01d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-06-01Prepare post v1.0.0.201106011211-rc3 buildsMatthias Sohn2-2/+2
Change-Id: I4dec8eba7e35858aef65fcc10f91fad3fe5b52b9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-06-01JGit v1.0.0.201106011211-rc3v1.0.0.201106011211-rc3Matthias Sohn2-2/+2
Change-Id: I574a05200471c431b3a02ac6ff208dc6aa90f539 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-05-31Remove incubation markerMatthias Sohn1-1/+1
Change-Id: I6018ce0cd3b7c8137e137848fe1f04551b257538 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-05-02Qualify post-0.12 buildsMatthias Sohn2-16/+16
Change-Id: I70fe2671321efb5c3d271121ce00299533d1b388 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-05-02Merge branch 'stable-0.12'Matthias Sohn2-16/+16
* stable-0.12: JGit 0.12.1
2011-05-02JGit 0.12.1v0.12.1stable-0.12Matthias Sohn2-16/+16
Change-Id: Ia6e58b466fa3ef7ddd61b40f2ad44141fe8786c4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-04-21Merge branch 'stable-0.12'Shawn O. Pearce1-3/+64
* stable-0.12: Implement the no-done capability
2011-04-21Implement the no-done capabilityShawn O. Pearce1-3/+64
Smart HTTP clients may request both multi_ack_detailed and no-done in the same request to prevent the client from needing to send a "done" line to the server in response to a server's "ACK %s ready". For smart HTTP, this can save 1 full HTTP RPC in the fetch exchange, improving overall latency when incrementally updating a client that has not diverged very far from the remote repository. Unfortuantely this capability cannot be enabled for the traditional bi-directional connections. multi_ack_detailed has the client sending more "have" lines at the same time that the server is creating the "ACK %s ready" and writing out the PACK stream, resulting in some race conditions and/or deadlock, depending on how the pipe buffers are implemented. For very small updates, a server might actually be able to send "ACK %s ready", then the PACK, and disconnect before the client even finishes sending its first batch of "have" lines. This may cause the client to fail with a broken pipe exception. To avoid all of these potential problems, "no-done" is restricted only to the smart HTTP variant of the protocol. Change-Id: Ie0d0a39320202bc096fec2e97cb58e9efd061b2d Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2011-04-21Enabled unit tests in HttpClientTestsChristian Halstrick1-0/+13
Change-Id: I92ae117f1dcfc569e27c66c191e090a60fbe2bb6 Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
2011-04-01smart HTTP: Return errors inside payloadShawn O. Pearce1-0/+32
When the client is clearly making a smart HTTP request to our smart HTTP server, return any errors like RepositoryNotFoundException or ServiceNotEnabledException inside of the payload as a Git level ERR message, rather than an HTTP error code. This prevents the C Git command line client from retrying a failed "$URL/info/refs?service=git-upload-pack" request without the smart service URL, only to fail again with "403 Forbidden" when the dumb as-is service has been disabled by the server configuration, or is unavailable because the repository is not on the local filesystem. Change-Id: I57e8756d5026e885e0ca615979bfcd729703be6c Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2011-02-16smart-http: Fix recognition of gzip encodingShawn O. Pearce1-0/+64
Some clients coming through proxies may advertise a different Accept-Encoding, for example "Accept-Encoding: gzip(proxy)". Matching by substring causes us to identify this as a false positive; that the client understands gzip encoding and will inflate the response before reading it. In this particular case however it doesn't. Its the reverse proxy server in front of JGit letting us know the proxy<->JGit link can be gzip compressed, while the client<->proxy part of the link is not: client <-- no gzip --> proxy <-- gzip --> JGit Use a more standard method of parsing by splitting the value into tokens, and only using gzip if one of the tokens is exactly the string "gzip". Add a unit test to make sure this isn't broken in the future. Change-Id: I30cda8a6d11ad235b56457adf54a2d27095d964e Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2011-02-16http.test: Delete badly named JUnit configurationsShawn O. Pearce2-40/+0
We also have org.eclipse.jgit.http--All-Tests, which matches the style of the org.eclipse.jgit.core--All-Tests name. Drop the others as these are just redundant duplicates. Change-Id: I8600a343f6a85d21dc07bda68a8cb834c82946b5 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2011-02-15daemon: Use HTTP's resolver and factory patternShawn O. Pearce10-27/+28
Using a resolver and factory pattern for the anonymous git:// Daemon class makes transport.Daemon more useful on non-file storage systems, or in embedded applications where the caller wants more precise control over the work tasks constructed within the daemon. Rather than defining new interfaces, move the existing HTTP ones into transport.resolver and make them generic on the connection handle type. For HTTP, continue to use HttpServletRequest, and for transport.Daemon use DaemonClient. To remain compatible with transport.Daemon, FileResolver needs to learn how to use multiple base directories, and how to export any Repository instance at a fixed name. Change-Id: I1efa6b2bd7c6567e983fbbf346947238ea2e847e Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2011-02-12Qualify post 0.11 buildsMatthias Sohn2-15/+15
Change-Id: Ibcef4fc4c986c2cda01e943d16aa1c53eff99f25 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-02-11JGit 0.11.1v0.11.1Matthias Sohn2-15/+15
Change-Id: I9ac2fdfb4326536502964ba614d37d0bd103f524 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-01-28[findbugs] Do not ignore exceptional return value of createNewFile()Matthias Sohn1-3/+2
Properly handle return value of java.io.File.createNewFile(). Change-Id: I3a74cc84cd126ca1a0eaccc77b2944d783ff0747 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-01-01Require the hamcrest packaging that comes with EclipseRobin Rosenberg1-2/+2
The other one gets installed with SWTBot, but you do not need it if you do not hack EGit. Using import-package instead of require-bundle fixes the dependency. Actually we do not need hamcrest at this time, but JUnit wants it. Change-Id: I59873618f86d02e8439d40c1f322ea8e5c4fe3fc Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
2010-12-31Convert all JGit unit tests to JUnit 4Robin Rosenberg16-23/+142
Eclipse has some problem re-running single JUnit tests if the tests are in Junit 3 format, but the JUnit 4 launcher is used. This was quite unnecessary and the move was not completed. We still have no JUnit4 test. This completes the extermination of JUnit3. Most of the work was global searce/replace using regular expression, followed by numerous invocarions of quick-fix and organize imports and verification that we had the same number of tests before and after. - Annotations were introduced. - All references to JUnit3 classes removed - Half-good replacement for getting the test name. This was needed to make the TestRngs work. The initialization of TestRngs was also made lazily since we can not longer find out the test name in runtime in the @Before methods. - Renamed test classes to end with Test, with the exception of TestTranslateBundle, which fails from Maven - Moved JGitTestUtil to the junit support bundle Change-Id: Iddcd3da6ca927a7be773a9c63ebf8bb2147e2d13 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-12-30Add launchers for the JGit HTTP package testRobin Rosenberg2-0/+40
Change-Id: I8bb5cb5342ab86fbc586d879dc56f70f4c0e6ace Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
2010-12-30Enable JUnit4 in the jgit.http package tooRobin Rosenberg1-2/+4
There are currently no JUnit4 tests here, but since we made JUnit4 the default for maven, it should be for Eclipse builds too. Change-Id: Ic910df1705fa8d6ac26e97a41947cb8e5526d334 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
2010-12-17Qualify post 0.10 buildsMatthias Sohn2-15/+15
Change-Id: Ifcb8fdea95286779c8aea6bf4d7647e8c1c98d63 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-12-17Merge branch 'stable-0.10'Matthias Sohn2-15/+15
2010-12-17Qualify post 0.10.1 buildsstable-0.10Matthias Sohn2-15/+15
Change-Id: I320f1f739f3689daf11d532a55ae1133785aec8e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-12-17JGit 0.10.1v0.10.1Matthias Sohn2-15/+15
Change-Id: I4a46d35d354193e5d4f28ef7dfae75944be8ffcf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-12-15Save StoredConfig after modificationsShawn O. Pearce4-10/+33
When the Config is changed, it should be saved back to its local file. This ensure that a future call to getConfig() won't wipe out the edits that were just made. Change-Id: Id46d3f85d1c9b377f63ef861b72824e1aa060eee Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-12-15Reduce calls to Repository.getConfigShawn O. Pearce1-3/+4
Each time getConfig() is called on FileRepository, it checks the last modified time of both ~/.gitconfig and $GIT_DIR?config. If $GIT_DIR/config appears to have been modified, it is read back in from disk and the current config is wiped out. When mutating a configuration file, this may cause in-memory edits to disappear. To avoid that callers need to avoid calling getConfig until after the configuration has been saved to disk. Unfortunately the API is still horribly broken. Configuration should be modified only while a lock is held on the configuration file, very similar to the way a ref is updated via its locking protocol. But our existing API is really broken for that so we'll have to defer cleaning up the edit path for a future change. Change-Id: I5888dd97bac20ddf60456c81ffc1eb8df04ef410 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-12-09JGit Build: use jetty 7.1.6Jens Baumgart1-13/+13
Jetty 7.1.6 is used because this version is also available in P2. Change-Id: I410fbca8592cac6e58c651c4d086573820e777a5 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
2010-12-08Introduce http test bundleJens Baumgart16-1059/+25
Introduce a http test bundle to make this functionality available for EGit tests. A simple http server class is provided. The jetty version was updated to a version that is also available via p2 (needed in EGit UI tests). Change-Id: I13bfc4c6c47e27d8f97d3e9752347d6d23e553d4 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-11-10Enable providing credentials for HTTP authenticationShawn O. Pearce1-0/+27
This change is based on http://egit.eclipse.org/r/#change,1652 by David Green. The change adds the concept of a CredentialsProvider which can be registered for git transports and which is responsible to return credential-related data like passwords and usernames. Whenenver the transports detects that an authentication with certain credentials has to be done it will ask the CredentialsProvider for this data. Foreseen implementations for such a Provider may be a EGitCredentialsProvider (caching credential data entered e.g. in the Clone-Wizzard) or a NetRcProvider (gathering data out of ~/.netrc file). Bug: 296201 Change-Id: Ibe13e546b45eed3e193c09ecb414bbec2971d362 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Christian Halstrick <christian.halstrick@sap.com> Signed-off-by: Stefan Lay <stefan.lay@sap.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> CC: David Green <dgreen99@gmail.com>
2010-11-10Fix WWW-Authenticate auth-scheme comparisonStefan Lay1-2/+2
The auth-scheme token (like "Basic" or "Digest") is not specified in a case sensitive way. RFC2617 (http://tools.ietf.org/html/rfc2617) specifies in section 1.2 the use of a "case-insensitive token to identify the authentication scheme". Jetty, for example, uses "basic" as token. Change-Id: I635a94eb0a741abcb3e68195da6913753bdbd889 Signed-off-by: Stefan Lay <stefan.lay@sap.com>
2010-10-07Externalize strings in TransportHttpMatthias Sohn3-6/+10
Some strings were not externalized. Also use them in HTTP tests to ensure that they will also succeed when message bundles are translated. Change-Id: Id02717176557e7d57e676e1339cd89f2be88d330 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-10-07Fix HTTP testsMatthias Sohn2-3/+3
Since 858b2c92 we have a HTTP authentication implementation hence we now get different exception messages when required authentication headers are not available. This broke the HTTP tests. Change-Id: Ie08c1ec37e497c2a6f70a75f7c59f0805812a5cc Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-09-17Qualify builds as 0.10.0Shawn O. Pearce2-12/+12
Change-Id: I54815c85b32b9492c059064b39f48677e68c5e90 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-09-15Qualify post-0.9.3 buildsstable-0.9Matthias Sohn2-12/+12
Change-Id: Ideab4923a5d8055f0e8a36ddcf0bc8adbf71c329 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>

Back to the top