summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update 4.4 target to use Luna M7 orbit repositoryMatthias Sohn2014-05-041-5/+5
| | | | | Change-Id: I9a19d5584deef970cc00a7b58beae84d55b20ddf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* AbstractPlotRenderer: Make private methods static where applicableKonrad Kügler2014-05-031-3/+3
| | | | Change-Id: Iaf02502b02b2420c059f04bbe09254941301c727 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
* PlotLane: Use identity hashCode and equalsKonrad Kügler2014-05-033-18/+0
| | | | | | | Using the lane position and other data for equals/hashCode is not useful. Change-Id: I7af151d8a84544a77a486474c8ac71dd80090c66 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
* Fix push to repo with non-fetched refsJean-Jacques Lafay2014-04-302-3/+76
| | | | | | | | | | | | | | | | | When JGit uses bitmaps (which is the case after a gc), the push command doesn't go through the code where MissingObjectExceptions are caught for remote objects not found locally. Fixed by removing earlier non-locally-found remote objects. This was seen withing gerrit, see: https://code.google.com/p/gerrit/issues/detail?id=2025 Bug: 426044 Change-Id: Ieda718a0530e3680036edfa0963ab88fdd1362c0 Signed-off-by: Jean-Jacques Lafay <jeanjacques.lafay@gmail.com> Signed-off-by: Doug Kelly <dougk.ff7@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Make org.eclipse.jgit.packaging a general projectRobin Rosenberg2014-04-281-0/+40
| | | | | | This makes it easy to edit the pom.xml from within Eclipse. Change-Id: I4718217caadbfe892b7cbb557e0d3d6b40d48321 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge changes I2515a6ed,Ib6b24035Matthias Sohn2014-04-273-6/+94
|\ | | | | | | | | | | * changes: Fix ArrayIndexOutOfBoundsException in CreateBranchCommand Add methods to Repository to handle remote names
| * Fix ArrayIndexOutOfBoundsException in CreateBranchCommandRobin Rosenberg2014-04-271-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If remote name contains / or there was a branch directly under the refs/remotes namespace (wrong) the computation of remote name and suggested local branch name would fail. Fix this by looking at the configured remotes. A ref under refs/remotes that does not match a remote configuration is not considered a remote tracking branch anymore. This patch does not fix all similar errors in EGit/JGit. Bug: 411002 Bug: 400414 Change-Id: I2515a6ed05f9104c387ce4e43b24dae942ae2473
| * Add methods to Repository to handle remote namesRobin Rosenberg2014-04-272-0/+89
| | | | | | | | | | | | | | | | | | | | Instead of requiring the caller to know how to list remote names or parse remote branch names, add a few utilities for that. Change-Id: Ib6b2403532f4abbce594a03c0b9da49d30b19f70 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* | Fix BlameResult.computeRange JavaDoc to exclude end indexKonrad Kügler2014-04-261-2/+2
|/ | | | Change-Id: Ifd7dd86e3848eb7a522ba5c49d5c216777484f3b Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
* Add API to permit the setting of additional HTTP headersBogdan Gheorghe2014-04-252-0/+157
| | | | | Signed-off-by: Bogdan Gheorghe <gheorghe@ca.ibm.com> Change-Id: I1047f318bb5c63850f45ba85d73c97fe8bf70a6c
* cleanup: remove some unused importsRobin Rosenberg2014-04-251-4/+0
| | | | Change-Id: I549b934b86753acc362364c8986bfe6457affd12
* Making ArchiveFormats breaks the API, but that's okRobin Rosenberg2014-04-251-0/+38
| | | | | | Add compatibility filters to hide the breakage. Change-Id: Icc1fdc29f15d734d488e49c9c37a18f5ac937903
* Add jacoco instrumentation for code coverage reportsMatthias Sohn2014-04-261-0/+31
| | | | | | | See http://mickaelistria.wordpress.com/2012/10/08/sonar-at-eclipse-org/ Change-Id: Idd7df8125e0792e9bba924eadbc1320230cfa624 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge changes Ia4df9808,I83e8a321,Id0e7663b,Ib809b00c,I88a6ee07Shawn Pearce2014-04-2511-0/+942
|\ | | | | | | | | | | | | | | | | * changes: Commit changes generated during repo command Added implementation of copyfile rule. Added groups support to repo subcommand. Added the command line of jgit repo. Implemented first part of the repo sub-command.
| * Commit changes generated during repo commandYuxuan 'fishy' Wang2014-04-253-5/+16
| | | | | | | | Change-Id: Ia4df9808294d2069dcc5973bcb69b4499c7dcacd Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
| * Added implementation of copyfile rule.Yuxuan 'fishy' Wang2014-04-234-5/+111
| | | | | | | | | | Change-Id: I83e8a3218be2984321342039fda507fdb1aa5f30 Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
| * Added groups support to repo subcommand.Yuxuan 'fishy' Wang2014-04-235-33/+279
| | | | | | | | | | Change-Id: Id0e7663b6ac4f6938fdcacaf2158107b6285fc25 Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
| * Added the command line of jgit repo.Yuxuan 'fishy' Wang2014-04-236-0/+169
| | | | | | | | | | Change-Id: Ib809b00c236a9c44422a872ae801b060f5b26808 Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
| * Implemented first part of the repo sub-command.Yuxuan 'fishy' Wang2014-04-235-0/+410
| | | | | | | | | | | | | | | | Currently the repo sub-command only "works", but the submodules will have .git directories themselves, and lacks group support. Change-Id: I88a6ee07109187c6c9bfd92a044775fcfb5befa6 Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* | Merge "Automatically reload known_hosts file"Shawn Pearce2014-04-251-0/+3
|\ \
| * | Automatically reload known_hosts fileDoug Kelly2014-04-241-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | JGit caches the contents of the known_hosts file within JSch when first started, and never attempts to re-read it. If the contents change (such as when using Gerrit replication), the new host will never be found. On failures, try reloading the knonwn_hosts and retry the connection, in addition to reloading the credentials. Change-Id: I980c4f4003f2a48c71b9b47c51e640d1e7742f58 Signed-off-by: Doug Kelly <dougk.ff7@gmail.com>
* / Remove streaming delta support from JGitDoug Kelly2014-04-246-1000/+75
|/ | | | | | | | | | | | Streaming packed deltas is so slow that it never feasibly completes (it will take hours for it to stream a few hundred megabytes on relatively fast systems with a large amount of storage). This was indicated as a "failed experiment" by Shawn in the following mailing list post: http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg01674.html Change-Id: Idc12f59e37b122f13856d7b533a5af9d8867a8a5 Signed-off-by: Doug Kelly <dougk.ff7@gmail.com>
* Merge "blame: Format commit and author only once per range"Shawn Pearce2014-04-231-13/+23
|\
| * blame: Format commit and author only once per rangeShawn Pearce2014-04-211-13/+23
| | | | | | | | | | | | | | | | | | | | | | | | When a commit is blamed for multiple lines of the result file the command line interface prints the same text before each line in that span. Format these strings once and reuse them as the line prefix. For long files (e.g. 2425 lines of ReceiveCommits.java in Gerrit) this can save as much as 20ms during the output phase of the command line blame program. Change-Id: Ie42787d77c8d0cbca7ccbf59c795120494a2a891
* | Merge changes Icb1d49e5,I8bcab447,I3fa19b86,I2cda031b,I8b2dbf63Shawn Pearce2014-04-223-28/+42
|\| | | | | | | | | | | | | | | | | * changes: blame: Reuse existing blameEntireRegionOnParent method blame: Remove unnecessary curly braces around single statement if blame: Allow candidate to manage its setup before output blame: Do not update candidate regionList during output blame: Only use computeRange if -L was requested
| * blame: Reuse existing blameEntireRegionOnParent methodShawn Pearce2014-04-211-3/+1
| | | | | | | | | | | | | | | | Skipping directly to the parent is already possible with an existing helper method. Update the source path (to follow the rename) and then use the existing code path to push the parent inside the current entry. Change-Id: Icb1d49e53d14b599efc478990613625a9e058e09
| * blame: Remove unnecessary curly braces around single statement ifShawn Pearce2014-04-211-2/+1
| | | | | | | | Change-Id: I8bcab44785fe08bbf3519c634e57ebfea8d3f0f9
| * blame: Allow candidate to manage its setup before outputShawn Pearce2014-04-212-2/+12
| | | | | | | | | | | | | | | | Pass in the RevWalk and let the candidate decide how to prepare itself for output. This removes the conditional for the missing sourceCommit, as candidates missing a commit can override the method with a no-op. Change-Id: I3fa19b8676dfd3c177583f8f42593b5000b5350d
| * blame: Do not update candidate regionList during outputShawn Pearce2014-04-211-21/+24
| | | | | | | | | | | | | | | | Instead of updating the candidate's regionList field to iterate through the linked list of regions, use a special purpose field in the BlameGenerator. This allows the candidate to be unmodified. Change-Id: I2cda031b59220ab603ef82050e741ecbbaa1953f
| * blame: Only use computeRange if -L was requestedShawn Pearce2014-04-211-0/+4
| | | | | | | | | | | | | | The computeRange method is inefficient for computing the entire file. If the entire file was selected ask for the entire file. Change-Id: I8b2dbf635e875cc125443dac50be121208646540
* | pgm: Flush stderr during shutdownShawn Pearce2014-04-211-0/+2
|/ | | | | | | | If an error occurs in command line option parsing the error message may be stuck in a Java level buffer. Flush the stream to ensure everything is made available to the calling process or terminal. Change-Id: I55b16e43aa96fc81c1197121032f5cdd901d412c
* Expose ReceiveCommand version of TrackingRefUpdateShawn Pearce2014-04-181-2/+9
| | | | | | | | | If the caller uses a BatchRefUpdate to execute these (e.g. fetch) there may be more detailed status information inside of the command that was used to execute it. Allow the caller to obtain that status data from the ReceiveCommand version of the TrackingRefUpdate. Change-Id: I47209377fb8fcef0346d7678f1ab27f4790b49bc
* Merge changes I483c40e8,Ib16d684d,I9fb25229,I5f7c4855,I36905959Shawn Pearce2014-04-186-50/+251
|\ | | | | | | | | | | | | | | | | * changes: diff: Optimize single line edits blame: Reduce running time ~4.5% by skipping common subtrees blame: Micro optimize blob lookup in tree blame: Automatically increase commit abbreviation length Blame correctly in the presence of conflicting merges
| * diff: Optimize single line editsShawn Pearce2014-04-182-1/+7
| | | | | | | | | | | | | | | | If the header and trailer are identical up to a single line on both sides, return that REPLACE edit as the only result. No algorithm can break down a REPLACE with height of 1. Change-Id: I483c40e8790cc3e8b322ef6dfce2299491fd0ac7
| * blame: Reduce running time ~4.5% by skipping common subtreesShawn Pearce2014-04-172-17/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this commit running blame on render_view_impl.cc[1] saves about 644 ms over prior versions, reducing the time about 4.5%. Large projects often contain strands of commits where no changes are made to a particular subtree. Blame used to dive recursively into these subtrees to look for the blob and check if its SHA-1 was changed. In chromium/src[1] only 20% of the commits modify the content/renderer subtree relevant for the file. The recursivePath is necessary to check for '/' and remember if common subtree elimination should be attempted. When a file lives within a subtree the extra cost to check for unmodified subtrees saves time. However for files in the root tree the extra work incurred by TreeWalk is not worthwhile and would significantly increase overall running time. Now typical running times from an otherwise idle desktop: real 0m13.387s 0m13.341s 0m13.443s user 0m15.410s 0m15.220s 0m15.350s previously: real 0m14.085s 0m14.049s 0m13.968s user 0m15.730s 0m15.820s 0m15.770s [1] https://chromium.googlesource.com/chromium/src/+show/34d6e5c5b4248b1b199405af7ad00f961921f347/content/renderer/render_view_impl.cc Change-Id: Ib16d684df7ffa034ee28def3fb22c797998d5b7b
| * blame: Micro optimize blob lookup in treeShawn Pearce2014-04-171-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Avoid converting the raw mode to FileMode. This is an expensive if-else-if sort of test to just check if the thing is a blob. Instead test the bit mask directly, which is at least a few instructions shorter. The TreeWalk is already recursive and will auto-dive into any subtrees found. isSubtree check is unnecessary, as is the loop, as only one result will ever be returned by next(). Change-Id: I9fb25229ebed857469427bfbdf74aedebfddfac8
| * blame: Automatically increase commit abbreviation lengthShawn Pearce2014-04-172-3/+29
| | | | | | | | | | | | | | | | | | Ensure commit object names are unique by extending the default abbreviation as long as necessary. This allows `jgit blame` to more closely match the formatted output of `git blame` on large histories like Gerrit Code Review's ReceiveCommits.java file. Change-Id: I5f7c4855769ee9dcba973389df9e109005dcdb5b
| * Blame correctly in the presence of conflicting mergesKonrad Kügler2014-04-173-19/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The BlameGenerator used the RevFlag SEEN to mark commits it had already looked at (but not necessarily processed), to prevent processing a commit multiple times. If a commit is a conflicting merge that contains lines of the merge base, that have been deleted in its first parent, either these lines or the lines untouched since the merge base would not be blamed properly. This happens for example if a file is modified on a main branch in an earlier commit M and on a side branch in a later commit S. For this example, M deletes some lines relative to the common base commit B, and S modifies a subset of these lines, leaving some other of these lines untouched. Then side is merged into main, creating a conflict for these lines. The merge resolution shall carry over some unmodified lines from B that would otherwise be deleted by M. The route to blame these lines is via S to B. They can't be blamed via M, as they don't exist there anymore. Q |\ | \ | S | | M | | / |/ B Blaming the merged file first blames via S, because that is the most recent commit. Doing so, it also looks at B to blame the unmodified lines of B carried over by S into the merge result. In the course of this, B is submitted for later processing and marked SEEN. Later M is blamed. It notices that its parent commit B has been SEEN and aborts processing for M. B is blamed after that, but only for the lines that survived via S. As a result, only the lines contributed by S or by B via S are blamed. All the other lines that were unchanges by both M and S, which should have been blamed to B via M, are not blamed. Solution: Don't abort processing when encountering a SEEN commit. Rather add the new region list of lines to be blamed to those of the already SEEN and enqueued commit's region list. This way when the B commit of the above example is processed, it will blame both the lines of M and S, yielding a complete blame result. Bug: 374382 Change-Id: I369059597608022948009ea7708cc8190f05a8d3 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de> Signed-off-by: Shawn Pearce <spearce@spearce.org>
* | Merge branch 'stable-3.3'Matthias Sohn2014-04-181-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.3: JGit v3.3.2.201404171909-r Fix version.sh to update Eclipse-SourceBundle version Change-Id: Ic4f5d5c73f18775ca4449bb79d46e3b807a46ab2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v3.3.2.201404171909-rv3.3.2.201404171909-rstable-3.3Matthias Sohn2014-04-1855-59/+59
| | | | | | | | | | | | | | | Change-Id: I1d7e40156d0b6e30bd5f3a40f18c836b7d1ba78f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Fix version.sh to update Eclipse-SourceBundle versionMatthias Sohn2014-04-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The version attribute of Eclipse-SourceBundle must match the bundle version. Change-Id: Ic629ccae1d89c9070e4ec80420a0e2ed7d403922 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Allow ArchiveCommand.registerFormat to be called twiceJonathan Nieder2014-04-163-22/+91
| | | | | | | | | | | | | | | | | | | | | | | | This should make it possible for the gitiles plugin to register its archive formats after gerrit has already registered them. Signed-off-by: Jonathan Nieder <jrn@google.com> Change-Id: Icb80a446e583961a7278b707d572d6fe456c372c
* | | Merge "Make ArchiveFormats final and implement equals()"Dave Borowitz2014-04-145-5/+55
|\ \ \
| * | | Make ArchiveFormats final and implement equals()Jonathan Nieder2014-04-115-5/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should make it easier to modify ArchiveCommand to allow an archive format to be registered twice while still noticing if different callers try to register different implementations for the same format. Change-Id: I32261bc8dc1877a853b49e0da0a6e78921791812 Signed-off-by: Jonathan Nieder <jrn@google.com>
* | | | Merge branch 'stable-3.3'Matthias Sohn2014-04-141-2/+2
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | * stable-3.3: Ensure that stored credentials aren't reset too early Change-Id: Idcd57e12f5fe905952be49edb4f82db6b7ed469f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | Ensure that stored credentials aren't reset too earlyMatthias Sohn2014-04-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some commands are started without showing a dialog allowing to enter credentials if needed. Hence we need to tolerate one failing HTTP authentication to trigger loading credentials from the secure store. Hence we should not immediately reset the stored credentials if the first attempt to authenticate fails. Bug: 431209 Change-Id: I1b9fa34c3d70be226bb1c59c9ebe995998d29bc8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Update Software User AgreementMatthias Sohn2014-04-1415-197/+285
| |_|/ |/| | | | | | | | | | | Bug: 431255 Change-Id: I8a44028d8c48ddd1b9d2f9ef4af4d417c5454881
* | | Merge changes Id9a641dd,If2ee1f42Robin Rosenberg2014-04-092-1/+86
|\ \ \ | | | | | | | | | | | | | | | | | | | | * changes: Added TestCase for 7d5e1f Fixed RevWalk.isMergedInto() Fixed RevWalk.isMergedInto() returning wrong results
| * | | Added TestCase for 7d5e1f Fixed RevWalk.isMergedInto()Sven Selberg2014-04-091-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id9a641dd67c4182bb3a0dc83a6864fee43e7653f Signed-off-by: Gustaf Lundh <gustaf.lundh@sonymobile.com> Signed-off-by: Sven Selberg <sven.selberg@sonymobile.com>
| * | | Fixed RevWalk.isMergedInto() returning wrong resultsGustaf Lundh2014-03-241-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under certain circumstances isMergedInto() returned false even though base is reachable from the tip. This will hinder pushes and receives by falsely detecting "non fast forward" merges. o---o---o---o---o / \ / o---o---A---o---M / / ---2---1- if M (tip) was compared to 1 (base), the method isMergedInto() could still return false, since two mergeBases will be detected and the return statement will only look at one of them: return next() == base; In most cases this would pass, but if "A" is a commit with an old timestamp, the Generator would walk down to "2" before completing the walk pass "A" and first finding the other merge base "1". In this case, the first call to next() returns 2, which compared to base evaluates as false. This is fixed by iterating merge bases and returning true if base is found among them. Change-Id: If2ee1f4270f5ea4bee73ecb0e9c933f8234818da Signed-off-by: Gustaf Lundh <gustaf.lundh@sonymobile.com> Signed-off-by: Sven Selberg <sven.selberg@sonymobile.com>