Commit Graph

4426 Commits

Author SHA1 Message Date
David Pursehouse 3a6ed050a4 Merge branch 'stable-4.1' into stable-4.2
* stable-4.1:
  JGit v4.1.2.201602141800-r

Change-Id: I4156fd539da989c989aabce68d20dd9f8b5ad47c
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-15 10:25:58 +09:00
Matthias Sohn 29159f1171 JGit v4.1.2.201602141800-r
Change-Id: If0721109f389835a3a00b1a97559fd8f8c156556
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-02-14 23:58:51 +01:00
David Ostrovsky 2d0fc6124d Buck: Simplify root build file
Remove all proxy rules, that were introduced to allow to build Gerrit
with hijacked JGit cell. New approach suggested in: [1], that emulates
real JGit project structure in its own cell, makes them unnecessary.

Add :all rule, that build all artifacts and packages them in zip file.
Add shell binary :jgit_bin rule, that allows to execute JGit binary
from with buck run command, e.g.:

  $ buck run jgit_bin status
  $ buck run jgit_bin -- --version

* [1] https://gerrit-review.googlesource.com/74859

Change-Id: Idf9ecb783cbd2b9984d4118047968f1f5204d642
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
2016-02-14 11:45:30 +01:00
Saša Živkov dcfcbfd8bf Add Buck build aliases
Change-Id: I6aa2a8f094d36ef04dd12c81dfba8328e4a3bee9
2016-02-12 17:10:34 +01:00
Saša Živkov ed6c8669eb Update Buck version to the same version used in Gerrit master
Change-Id: I3de69bfe2afc5c58aef704b72d6531aea826e179
2016-02-12 17:10:34 +01:00
Saša Živkov fdeaf26f54 Fix buck classpath for tests
Change-Id: Idd2c22bbd2c81311c87a205fe707770300ec8f0c
2016-02-12 17:10:34 +01:00
Matthias Sohn 4dcf34eddf Merge branch 'stable-4.2'
* stable-4.2:
  NoteMapTest: Open TreeWalk instances in try-with-resource
  ObjectDirectoryTest: Fix warnings about variable hiding
  PackWriterTest: Open RevWalk in try-with-resource
  PatchIdDiffFormatterTest: Open Git and PatchIdDiffFormatter in try-with-resource
  PathSuffixFilterTest: Open TreeWalk in try-with-resource
  PostOrderTreeWalkTest: Open TreeWalk in try-with-resource
  PullCommandWithRebaseTest: Open RevWalk in try-with-resource
  PushCommandTest: Open Git instances in try-with-resource
  RacyGitTests: Open NameConflictTreeWalk in try-with-resource
  RecursiveMergerTest: Open TreeWalk and BufferedReader in try-with-resource
  ReflogConfigTest: refactor commit method to avoid variable hiding
  Update .mailmap
  RefDirectoryTest: Fix warning about member variable hiding
  ReflogResolveTest: Open Git instances in try-with-resource
  ReflogTest: Open Git instances in try-with-resource
  RepoCommandTest: Open Git instances in try-with-resource

Change-Id: I7964b699396629e31a9cc5600aedcf4be4e659a8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-02-12 11:15:33 +01:00
David Pursehouse 61bb701eeb MergeCommandTest: Use JUnit's assume to check preconditions
Using the assume method, instead of just returning, will cause the
test to be marked as skipped rather than passed on systems where
the precondition is not satisfied.

Change-Id: I13672371f6cd3c481a0a6247e0eaed3aac6d766e
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-12 14:41:44 +09:00
David Pursehouse 03987f980b MergeCommandTest: Open Git instances in try-with-resource
Change-Id: I95074358cec6fef6b5ced7bb7b117c33fee08a7a
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-12 14:39:08 +09:00
David Pursehouse 50e21322de NoteMapTest: Open TreeWalk instances in try-with-resource
Change-Id: I70da0140fe087e7e69c28e9ddd125495d916ec1b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-12 14:12:25 +09:00
David Pursehouse 35ba741cd4 ObjectDirectoryTest: Fix warnings about variable hiding
The variable and parameter named 'db' were hiding class members
with the same name.

Change-Id: I27017afdc5f49c38c6f5be494e7a21239ea601a7
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-12 14:10:12 +09:00
David Pursehouse 101ac16e8d PackWriterTest: Open RevWalk in try-with-resource
Change-Id: Ic8ed941d096718e81c7ffeb166bcf7faaa2ff57d
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-12 14:09:02 +09:00
David Pursehouse 53b6bb9cca PatchIdDiffFormatterTest: Open Git and PatchIdDiffFormatter in try-with-resource
Change-Id: I39e898e52c3d9dffaba9dabf11c085503fbc1acf
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-12 14:07:53 +09:00
David Pursehouse f7a3643fb8 PathSuffixFilterTest: Open TreeWalk in try-with-resource
Change-Id: If0ee71f09a5464e27f0496dac364f8f9bb015eb6
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-12 14:02:49 +09:00
David Pursehouse a3923f6b95 PostOrderTreeWalkTest: Open TreeWalk in try-with-resource
Also remove unnecessary nesting in test methods.

Change-Id: Id59f8403c0a7b38ebb6b3a24814257cd59ea575d
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-12 14:01:30 +09:00
David Pursehouse ad9b326e3f PullCommandWithRebaseTest: Open RevWalk in try-with-resource
Change-Id: I16f4d219e8b103d30149b2a94d3484424f3de84b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-12 13:57:34 +09:00
David Pursehouse f3c250bd08 PushCommandTest: Open Git instances in try-with-resource
Change-Id: I3a8e28a4097e868a34ee1b23256c7f28d570cd75
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-12 13:55:40 +09:00
David Pursehouse 83f1f8fc7c RacyGitTests: Open NameConflictTreeWalk in try-with-resource
Change-Id: Ic17b05fd7d056761b352168de97efb607a289276
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-12 13:50:54 +09:00
David Pursehouse 3adea9ac7f RecursiveMergerTest: Open TreeWalk and BufferedReader in try-with-resource
Change-Id: I381d535eb4ed7535ba8541c5320f81ce11d5b173
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-12 13:48:54 +09:00
David Pursehouse 964da41d52 ReflogConfigTest: refactor commit method to avoid variable hiding
The author and committer parameters were hiding class members of
the same name.

Since the passed in PersonIdent instances were being created from
the class members anyway, remove the parameters and instead create
the PersonIdent instances inline in the method.

Change-Id: I66b057df388835d57f332fdcbadb8a9f4e1094a4
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-12 13:43:56 +09:00
David Pursehouse 767d5f4e59 Update .mailmap
- List names alphabetically by Firstname Surname
- Replace tabs with spaces
- Add missing name

Change-Id: Ib320dad316e0f6e3e95363c4d6a64744032db857
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-12 12:39:06 +09:00
David Pursehouse 615280ba07 RefDirectoryTest: Fix warning about member variable hiding
The parameter name 'totalWork' was hiding a class member variable
of the same name.

Change-Id: I646525e82900e23ffabfc756bcf5052ef873656a
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-12 12:30:46 +09:00
David Pursehouse 952f381981 ReflogResolveTest: Open Git instances in try-with-resource
Change-Id: I11ee38bfcf4951bf05a1632df08b1d074d38338b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-12 12:29:44 +09:00
David Pursehouse 77887b49f9 ReflogTest: Open Git instances in try-with-resource
Change-Id: I950b6f16148cfe11de729b04904f88d6e4c28b9a
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-12 12:26:58 +09:00
David Pursehouse 5ca9aaa172 RepoCommandTest: Open Git instances in try-with-resource
Change-Id: I171e84eeb7862e74761ba6c961f14c86beaba9e7
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-12 12:25:20 +09:00
Matthias Sohn 363fc1ff5b Fix packaging of lfs bundles
- pgm feature needs to include the lfs feature
- add the lfs feature to the jgit p2 repository

Change-Id: I6781d4e9d131b373c9f191d785495e88b906c671
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-02-12 02:13:13 +01:00
Ivan Motsch 975aa88685 Add Attribute Macro Expansion
Attributes MacroExpander implements macros used in git attributes. This
is implemented inside the TreeWalk using a lazy created MacroExpander.
In addition, the macro expander caches the global and info attributes
node in order to provide fast merge of attributes.

Change-Id: I2e69c9fc84e9d7fb8df0a05817d688fc456d8f00
Signed-off-by: Ivan Motsch <ivan.motsch@bsiag.com>
2016-02-11 17:08:49 +01:00
Matthias Sohn 28e2fed761 Merge branch 'stable-4.2'
* stable-4.2:
  RepoProject: Fix warnings about variable hiding
  RepoTest: Open Git in try-with-resources
  RepositoryResolveTest: Open Git in try-with-resource
  RepositoryTestCase: Open autocloseable types in try-with-resource
  ResetCommandTest: Use Git member in testHardResetAfterSquashMerge
  ResolveMergerTest: Open Git in try-with-resource
  RevCommitListTest: Open Git and RevWalk in try-with-resource
  RevCommitParseTest: Open ObjectInserter.Formatter in try-with-resource
  RevObjectTest: Open RevWalk in try-with-resource
  RevTagParseTest: Open ObjectInserter.Formatter in try-with-resource
  RevertCommandTest: Open Git in try-with-resource
  SquashMessageFormatterTest: Open git in try-with-resource
  StatusCommandTest: Open Git in try-with-resource
  SubmoduleAddTest: Open Git in try-with-resource
  SymlinksTest: Open git and TreeWalk in try-with-resource
  T0003_BasicTest: Open autocloseable types in try-with-resource
  TextHashFunctions: Fix warnings about variable hiding
  TreeFilterTest: Open TreeWalk in try-with-resource
  TreeWalkJava7Test: Open TreeWalk in try-with-resource
  Fix diff for added and removed submodule

Change-Id: If3ecc63f6dfac55474d3c1dd2f4105371f3d24fb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-02-10 00:51:01 +01:00
Matthias Sohn 26012958a3 Merge branch 'stable-4.1' into stable-4.2
* stable-4.1:
  Fix diff for added and removed submodule

Change-Id: I37dd71ed19b06e9bbcffe37370081ab875c6d8d4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-02-10 00:45:18 +01:00
David Pursehouse 4e5255c59a RepoProject: Fix warnings about variable hiding
Method parameter names were hiding class members of the same
name.

Change-Id: I182f2715894ac4259b09a371cb4e0eb24f52518a
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 18:22:58 +09:00
David Pursehouse ef471b0861 RepoTest: Open Git in try-with-resources
Allocate a new Git for each part of the test, rather than
reassigning to the same variable.

Change-Id: Ic83778bbff0b2f57d37b95aef70324859d42cd58
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 18:17:02 +09:00
David Pursehouse 143ba06cd6 RepositoryResolveTest: Open Git in try-with-resource
Change-Id: Ibb612f3d8fd0f9913291430474311d9da62f4e6f
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 18:14:26 +09:00
David Pursehouse b85e93046c RepositoryTestCase: Open autocloseable types in try-with-resource
ObjectInserter.Formatter and Git are autocloseable and can be
opened in try-with-resource to prevent a resource leak warning.

Change-Id: I48c4001aaa7d9c1e36369e9799bfbb7c3bb46d8b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 18:12:05 +09:00
David Pursehouse a176c6055a ResetCommandTest: Use Git member in testHardResetAfterSquashMerge
Use the class member instance of the Git rather than creating
a new one in the test. This makes it consistent with the other
tests in the module.

Change-Id: Ibe822ded76a80b94922e92bbc6f5d90bcc52f8a3
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 17:36:05 +09:00
David Pursehouse 8074f50b58 ResolveMergerTest: Open Git in try-with-resource
Change-Id: Ic378ec25c4a3ea4354ee643029f87e46b6449ed4
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 17:31:11 +09:00
David Pursehouse 3c4e7c08a7 RevCommitListTest: Open Git and RevWalk in try-with-resource
Change-Id: I4ba273a364a12f82a3b3b06ba050bc633411daf6
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 17:26:03 +09:00
David Pursehouse 5bfdc3341c RevCommitParseTest: Open ObjectInserter.Formatter in try-with-resource
Change-Id: Iaa87c51bc19b4fa832393c11db20b69865d30d48
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 17:20:51 +09:00
David Pursehouse f0ef7748b4 RevObjectTest: Open RevWalk in try-with-resource
Change-Id: I19bcbb2f12036c5043436f3d544ccefbb7385b8d
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 17:17:12 +09:00
David Pursehouse 44f64de091 RevTagParseTest: Open ObjectInserter.Formatter in try-with-resource
Change-Id: I2341977223be1dc5252492f4775626122f56496b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 17:15:19 +09:00
David Pursehouse 895510fc48 RevertCommandTest: Open Git in try-with-resource
Change-Id: I659adbb0a6f741c4c6f615c8a24b4603c3f6681e
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 17:12:57 +09:00
David Pursehouse d882bf8c4d SquashMessageFormatterTest: Open git in try-with-resource
Change-Id: Ife94d1f0279ed3671a9bca79fb26c0403549fa17
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 17:05:05 +09:00
David Pursehouse 6aa619ec5c StatusCommandTest: Open Git in try-with-resource
Change-Id: Id13ad9fa3157d0479da12fb8184437be3ca8c948
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 17:03:44 +09:00
David Pursehouse 96ff311049 SubmoduleAddTest: Open Git in try-with-resource
Change-Id: I1276ce206e891729adfa681e00952ca0ba6ffc53
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 14:11:54 +09:00
David Pursehouse 3742946a03 SymlinksTest: Open git and TreeWalk in try-with-resource
Change-Id: I0fd1933e843375029fa795447b688f23a893f84b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 14:05:22 +09:00
David Pursehouse d0d3773763 T0003_BasicTest: Open autocloseable types in try-with-resource
FileRepository and ObjectInserter.Formatter are autocloseable, so
use try-with-resource for these.

Remove suppression of unused variable warning that is no longer
necessary.

Change-Id: I270829f0a4030083c9599eb5785b0145dc590ed8
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 11:51:27 +09:00
David Pursehouse 84ae3f4991 TextHashFunctions: Fix warnings about variable hiding
The local variables/arguments named 'db' were hiding the member
variable of the same name in the superclass TextBuiltin.

Change-Id: Ic49dcb7cc2a1b3fb46ad78450042c8c8fb464a80
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 11:46:45 +09:00
David Pursehouse a82f5c7425 TreeFilterTest: Open TreeWalk in try-with-resource
Change-Id: If100a66e544926bcffe9a9a0b31bfd4806902864
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 11:44:12 +09:00
David Pursehouse 62637584d8 TreeWalkJava7Test: Open TreeWalk in try-with-resource
Change-Id: I99a483c482b5395653b0d57b368ec1b5fdba450c
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-05 11:42:44 +09:00
Matthias Sohn c901cd89d3 Add support for HEAD requests to HttpClientConnection
Change-Id: I501f37e06b686a3a0bb5fd857dd72e424da91d3e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-02-04 17:49:43 +01:00
Saša Živkov a0e1374e22 Allow to reuse disableSslVerify method, move it to HttpSupport
The disableSslVerify method will be used in the follow up change.

Change-Id: Ie00b5e14244a9a036cbdef94768007f1c25aa8d3
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-02-04 17:49:43 +01:00