summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'stable-1.2'Matthias Sohn2011-12-2632-32/+1532
|\ | | | | | | | | | | | | | | | | | | * 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>
| * JGit v1.2.0.201112221803-rv1.2.0.201112221803-rstable-1.2Matthias Sohn2011-12-2340-50/+50
| | | | | | | | | | Change-Id: Icc0b09324f205d93929af8cf522a99ad00cf7591 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Expose unmerged paths when revert failsKevin Sawicki2011-12-191-0/+10
| | | | | | | | Change-Id: I02678aeb31a62668ae2b0342a6dae721e043dc5e
| * Enforce the use of Java5 API:s only (with a few exceptions)Robin Rosenberg2011-12-1631-32/+1522
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge "Limit the number of commits in LogCommand output"Robin Rosenberg2011-12-236-0/+226
|\ \
| * | Limit the number of commits in LogCommand outputTomasz Zarna2011-12-236-0/+226
| | | | | | | | | | | | | | | Bug: 316680 Change-Id: I88cf7aac6b5763cc94421433dd4bbd42f81e0e69
* | | DiffFormatter#format(List) fails unless #scan(ATI, ATI) is called firstTomasz Zarna2011-12-233-16/+129
|/ / | | | | | | | | Bug: 354919 Change-Id: I710394fe6675e0e5aa66d9118c5b10d433aa30ea
* | Merge "Support getting specific entry number in reflog"Robin Rosenberg2011-12-224-9/+73
|\ \
| * | Support getting specific entry number in reflogKevin Sawicki2011-12-194-9/+73
| | | | | | | | | | | | | | | | | | | | | The number specified is interpreted as relative to the last entry in the reflog. Change-Id: Ie4dd03370bb0d475a0e89d3015113ca98920100f
* | | Refactor ResolveMergerChristian Halstrick2011-12-201-59/+96
|/ / | | | | | | | | | | | | | | | | | | | | 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>
* | Add exception class for when locking a file failsKevin Sawicki2011-12-187-8/+100
| | | | | | | | | | | | | | | | 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. Change-Id: I95bc59e1330a7af71ae3b0485c4516299193f504
* | Allow to amend commits with JGit CLITomasz Zarna2011-12-182-0/+5
| | | | | | | | Change-Id: I0e8d365b56e079ac4ccece7fcf80ea140c319c78
* | Support resolving integer-based reflog revisionsKevin Sawicki2011-12-164-7/+162
| | | | | | | | | | | | | | | | | | | | | | 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}'. Change-Id: I6162777d6510e083565a77cac4545cda5a9aefb3
* | Merge "Report diff entries for files that only change mode"Robin Rosenberg2011-12-163-0/+48
|\ \
| * | Report diff entries for files that only change modeKevin Sawicki2011-12-143-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | This also updates DiffFormatter to not write path lines for entries that have the same object id Bug: 361570 Change-Id: I830a78e2babf472503630a7aa020ebfd5c7e69c6
* | | Merge branch 'stable-1.2'Matthias Sohn2011-12-168-7/+273
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | * 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>
| * Merge "Fix MergeCommandTest to pass if File.executable is not supported" ↵Matthias Sohn2011-12-151-4/+12
| |\ | | | | | | | | | into stable-1.2
| | * Fix MergeCommandTest to pass if File.executable is not supportedRobin Rosenberg2011-12-151-4/+12
| | | | | | | | | | | | Change-Id: If11080ed6e53d9df88a1ae42f48ee8914d54669b
| * | Add API checking using clirrMatthias Sohn2011-12-156-0/+115
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to generate API reports run: mvn clirr:clirr The reports are generated to the folder target/site/clirr-report.html under the respective project. In order to check API compatibility and fail the build on incompatible changes run: mvn clirr:check For now we compare the API against the latest release 1.1.0.201109151100-r. Bug: 336849 Change-Id: I21baaf3a6883c5b4db263f712705cc7b8ab6d888 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Kevin Sawicki <kevin@github.com>
| * Fix ResolveMerger not to add paths with FileMode 0Christian Halstrick2011-12-112-7/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When ResolveMerger finds a path where it has to do a content merge it will try the content merge and if that succeeds it'll add the newly produced content to the index. For the FileMode of this new index entry it blindly copies the FileMode it finds for that path in the common base tree. If by chance the common base tree does not contain this path it'll try to add FileMode 0 (MISSING) to the index. One could argue that this can't happen: how can the ResolveMerger successfully (with no conflicts) merge two contents if there is no common base? This was due to another bug in ResolveMerger. It failed to find out that for two files which differ only in the FileMode (e.g. 644 vs. 755) it should not try a content merge. Change-Id: I7a00fe1a6c610679be475cab8a3f8aa4c08811a1 Signed-off-by: Christian Halstrick <christian.halstrick@sap.com> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* | Fire DfsPacksChangedEvents when committing packs.Dave Borowitz2011-12-132-2/+24
| | | | | | | | | | | | | | Once a pack has been committed with commitPack(), we know that the pack list has changed but we don't re-scan the underlying storage. Change-Id: Ia7b35df4442a5f5dfe7e817edcc77b44b5410d08
* | StatusCommand#setWorkingTreeIt should return 'this'Tomasz Zarna2011-12-121-1/+4
| | | | | | | | | | | | | | All setters for JGit API commands return the command instance, follow the builder pattern. Change-Id: Id2bbc3f1300bb179887c4d2d6dd72925bde55f24 Signed-off-by: Kevin Sawicki <kevin@github.com>
* | Prepare 1.3.0 buildsMatthias Sohn2011-12-1040-242/+242
| | | | | | | | | | Change-Id: I7a1ae73783c95041b59f047a7330e62e7f642149 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge branch 'stable-1.2'Matthias Sohn2011-12-105-4/+57
|\| | | | | | | | | | | | | | | | | | | | | * stable-1.2: Fix version.sh Throw API exception when MergeCommand hits checkout conflicts Add methods for configuring platform emulation Fix history rendering not to occupy too many lanes Fix History rendering Change-Id: If71cc760423ae2b76c7435ca4830edc1745556de Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Fix version.shMatthias Sohn2011-12-101-1/+1
| | | | | | | | | | Change-Id: Icdf5d9ea3ca62839cbf7de13dfee9682056b7cef Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Throw API exception when MergeCommand hits checkout conflicts Matthias Sohn2011-12-082-3/+24
| | | | | | | | | | | | | | | | | | | | | | When MergeCommand hit checkout conflicts it did throw an internal JGit exception org.eclipse.jgit.errors.CheckoutConflictException instead of org.eclipse.jgit.api.errors.CheckoutConflictException which it declares to throw. Hence translate the internal exception to the exception declared in the API. Bug: 327573 Change-Id: I1efcd93a43ecbf4a40583e0fc9d8d53cffc98cae Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Add methods for configuring platform emulationRobin Rosenberg2011-12-071-0/+30
| | | | | | | | | | | | | | Specifically we support setting system properties for Windows, generic Unix and current test platform. Change-Id: Ib02be417c4915350dfec64fda3face1138552871
| * Fix history rendering not to occupy too many lanesChristian Halstrick2011-12-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | There was a bug in history rendering which caused jgit to use too many lanes in case lanes get repositioned. Looking at commit 90c11cbaeb83ee9b02238cbd2c0e5bcf68068772 in JGit was one example. Vadim Dmitriev found the problem and the solution. Bug: 365460 Change-Id: I6024265b7a593dcfd4fc612d0baf6652a0092ff4 Also-by: Vadim Dmitriev <dmgloss@mail.ru> Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
| * Fix History renderingChristian Halstrick2011-12-041-30/+42
| | | | | | | | | | | | | | | | | | There was the possibility that during history rendering we draw a lane "trough" a passed commit. Vadim Dmitriev found that out in bug 335818. I added the needed check to that block of code where it was missing. Bug: 335818 Change-Id: Ic944193b2aca55ff3eb0235d46afa60b7896aa0f Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
* | Merge "Add simple chain implementations of transport hooks and loggers"Shawn Pearce2011-12-094-0/+384
|\ \
| * | Add simple chain implementations of transport hooks and loggersDave Borowitz2011-12-094-0/+384
| | | | | | | | | | | | | | | | | | | | | Allows callers to effectively run multiple hooks and loggers without modifying the UploadPack/ReceivePack interface. Change-Id: I5b388816b63036ffff08ef3a9b857ccb764cb8c4
* | | Merge "Force jgit.sh to use UTF-8 encoding on Mac"Shawn Pearce2011-12-091-0/+1
|\ \ \
| * | | Force jgit.sh to use UTF-8 encoding on MacRobin Rosenberg2011-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some obscure reason the platform encodng in Java on Macs is MacRoman. OS X used UTF-8 as the default encoding so set the encoding property in jgit.sh. Change-Id: I08182c2f8512f799178cee70bcc28d6ee2b9c2b0
* | | | Merge changes I9f1842c2,Ie139133bShawn Pearce2011-12-093-4/+13
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Throw invalid ref exception instead of invalid remote exception Use constant for logs directory
| * | | | Throw invalid ref exception instead of invalid remote exceptionKevin Sawicki2011-12-082-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ReflogCommand command was throwing an incorrect exception type when an IOException was wrapped and rethrown from the underlying ReflogReader. The IOException cause is now provided to the thrown exception as well. Change-Id: I9f1842c2d414d3e9c658843f9b448bc18891748e
| * | | | Use constant for logs directoryKevin Sawicki2011-12-081-1/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: Ie139133bcbe1ca61c85e86b3484f858bc065821f
* | | | | Merge "Add a no-op UploadPackLogger and use it by default"Shawn Pearce2011-12-082-2/+14
|\ \ \ \ \ | |/ / / / |/| | / / | | |/ / | |/| |
| * | | Add a no-op UploadPackLogger and use it by defaultDave Borowitz2011-12-082-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | This matches the behavior of the hooks in UploadPack. Change-Id: I21277e52ee9452237d87084f06bb140dfa6bf608
* | | | Merge "Set expected old object id to all zeros when head id is null"Shawn Pearce2011-12-081-1/+4
|\ \ \ \
| * | | | Set expected old object id to all zeros when head id is nullKevin Sawicki2011-12-061-1/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | This will be the case on the initial commit to a repository and the ref update should expect a non-existent ref Change-Id: Iaa06e47e6e8cc4a0281c7683b367d4806dd980ea
* | | | Merge "Use System.arraycopy to copy parent object id array"Shawn Pearce2011-12-081-2/+1
|\ \ \ \
| * | | | Use System.arraycopy to copy parent object id arrayKevin Sawicki2011-12-071-2/+1
| |/ / / | | | | | | | | | | | | Change-Id: Iee475584f0a65b8b77610cd277f15295b68dfe80
* | | | Merge "[findBugs] Implement Serializable interface in PlotLane"Shawn Pearce2011-12-081-1/+5
|\ \ \ \
| * | | | [findBugs] Implement Serializable interface in PlotLaneKevin Sawicki2011-12-081-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This class is referenced by PlotCommit which is Serializable Change-Id: If79b6a593dc53fbb7c4f0a69a9d0dca02a8cb63c
* | | | | Add toString() to HunkHeaderTomasz Zarna2011-12-081-0/+13
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Since FileHeader provides toString() method (via DiffEntry) we could add a similar method to HunkHeader. Change-Id: I7886e5b8f775fa8e8478ac5af37d90b6ef677d8b
* / / / Stream left open in WorkingTreeIterator#filterCleanTomasz Zarna2011-12-061-1/+5
|/ / / | | | | | | | | | Change-Id: I17c2709f2613536c02c9ea2977d936b87029ac0d
* | | Merge changes I5381e110,I5534b560Shawn O. Pearce2011-12-055-22/+268
|\ \ \ | | | | | | | | | | | | | | | | | | | | * changes: Discard request HTTP bodies for status code <400 Ensure all smart HTTP errors are sent to clients
| * | | Discard request HTTP bodies for status code <400Shawn O. Pearce2011-12-014-7/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HTTP RFCs require a server to fully consume the request body before it can return a non-error status code, which is any code below 400. JGit returns most Git level errors inside of an HTTP 200 OK response, and sometimes this happens before the entire request was consumed from the servlet container. In such cases the body must be skipped or read until EOF is reached, ensuring the HTTP keep-alive semantics will work for the next request on the same TCP connection. HTTP status codes >= 400 may be returned without consuming the body, and a servlet container must set "Connection: close" in the response headers when this happens, since the state of the request body is not well defined with an early abort. With the introduction of sendError() in GitSmartHttpTools there are only a handful of locations that need to worry about the request body being consumed, so sprinkle the call in as necessary. Change-Id: I5381e110585f780c01a764df8e27c80aacf5146e
| * | | Ensure all smart HTTP errors are sent to clientsShawn O. Pearce2011-12-013-15/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge "Always close the GZIPOutputStream to release Deflater"Robin Rosenberg2011-12-021-2/+5
|\| | |