Commit Graph

3449 Commits

Author SHA1 Message Date
Mike Williams fd527a2cd7 Prune UNREACHABLE_GARBAGE packs when they expire
DfsGarbageCollector will now enforce a maximum time to live (TTL) for
UNREACHABLE_GARBAGE packs.  The default TTL is 1 day, which should be
enough time to avoid races with other processes that are inserting
data into the repository.

Change-Id: Id719e6e2a03cfc9a0c0aef8ed71d261dda14bd0c
Signed-off-by: Mike Williams <miwilliams@google.com>
2016-06-27 08:38:11 -07:00
Hugo Arès 7a6582c09c Align include.path max depth with native git
Change-Id: I52f059816e1d94b2d60d096e3013bf4095cd0fc4
Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
2016-06-27 08:59:17 -04:00
Hugo Arès 80cd855443 Config load should not fail on unsupported or nonexistent include path
1f86350 added initial support for include.path. Relative path and path
with tilde are not yet supported but config load was failing if one of
those 2 unsupported options was encountered. Another problem was that
config load was failing if the include.path file did not exist.

Change the behavior to be consistent with native git. Ignore unsupported
or nonexistent include.path.

Bug: 495505
Bug: 496732
Change-Id: I7285d0e7abb6389ba6983e9c46021bea4344af68
Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
2016-06-27 08:59:03 -04:00
Shawn Pearce a1ca13e09c Use try-with-resources in DfsGarbageCollector.writePack
Change-Id: I9a73125581b4d760b733fd045c3436c2aaaab730
2016-06-26 11:28:29 -07:00
Shawn Pearce d8603446a2 Fix lastModified to be consistent in DfsGarbageCollector
Set all packs written by the DfsGarbageCollector to use the same
starting timestamp as lastModified. This makes it easier to see
which packs came from the same DfsGarbageCollector run, as they
share the same timestamp.

Change-Id: Id633573fbc3f0f360887b4745cacf33d6fc09320
2016-06-26 11:18:59 -07:00
Shawn Pearce 30eb6423a2 Add GC_REST PackSource to better order DFS packs
Force reads to use a search ordering of:

  INSERT / RECEIVE
  COMPACT
  GC (heads)
  GC_REST (non-heads)
  GC_TXN (refs/txn)
  UNREACHABLE_GARBAGE

This has provided decent performance for object lookups.  Starting
from an arbitrary reference may find the content in a newer pack
created by DfsObjectInserter or a ReceivePack server.  Compaction of
recent packs also contains newer content, and then most interesting
data is in the "main" GC pack.  As the GC pack is self-contained (has
no edges leading outside) readers typically do not need to go further.

Adding a new GC_REST PackSource allows the DfsGarbageCollector to
identify to the pack ordering code which pack is which, so the
non-heads are scanned second during reads.  This removes a hack that
was unique to Google's implementation that enforced this behavior by
fixing up the lastModified timestamp.

Renumber the PackSource's categories to reflect this search ordering.

Change-Id: I19fdaab8a8d6687cbe8c88488e6daa0630bf189a
2016-06-26 11:04:47 -07:00
Christian Halstrick e7df61ef4d Fix TreeWalk to reset attributes cache for each entry
Treewalk has a member 'attr' which caches the attributes for the current
entry. We did not reset the cache always when moving to next entry. The
effect was that when there are no attributes for an entry 'a' but 'a'
was skipped by a Treewalk filter then Treewalk stopped looking for
attributes until TreeWalk.next() was called again.

Change-Id: Ied39b7fb5f56afe7a237da17801003d0abe6b1c7
2016-06-23 17:11:47 +02:00
Christian Halstrick 5fe44ed3ee Fix DirCacheCheckout to return CheckoutConflictException
Problem occurs when the checkout wants to create a file 'd/f' but
the workingtree contains a dirty file 'd'. In order to create d/f the
file 'd' would have to be deleted and since the file is dirty that
content would be lost. This should lead to a CheckoutConflictException
for d/f when failOnConflict was set to true.

This fix also changes jgit checkout semantics to be more like native
gits checkout semantics. If during a checkout jgit wants to delete a
folder but finds that the working tree contains a dirty file at this
path then JGit will now throw an exception instead of silently keeping
the dirty file. Like in this example:

	git init
	touch b
	git add b
	git commit -m addB
	mkdir a
	touch a/c
	git add a/c
	git commit -m addAC
	rm -fr a
	touch a
	git checkout HEAD~

Change-Id: I9089123179e09dd565285d50b0caa308d290cccd
Signed-off-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de>
Also-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de>
2016-06-23 09:34:22 +02:00
Shawn Pearce 2ec3accb3b Optimize RefAdvertiser for wire protocol
The native wire protocol sends ref advertisements in the pkt-line
format, which requires encoding the ObjectId and ref name onto a byte
sequence.  Busy servers show this is a very high source of garbage,
which pushes the garbage collector harder when there are many refs in
the repository (e.g.  70k, in a Gerrit managed repository).

Optimize the side band advertiser by retaining the CharsetEncoder,
minimizing the amount of temporary garbage built during encoding.

Change-Id: I406c654bf82c1eb94b38862da2425e98396134cb
2016-06-18 21:41:07 -07:00
Matthias Sohn 48cb5ffba6 Merge branch 'stable-4.4'
* stable-4.4:
  Prepare 4.4.1-SNAPSHOT builds
  JGit v4.4.0.201606070830-r
  Prepare 4.4.0-SNAPSHOT builds
  JGit v4.4.0.201606011500-rc2
  Prepare 4.4.0-SNAPSHOT builds
  JGit v4.4.0.201605250940-rc1
  Update Orbit repository for Neon to R20160520211859
  Fix computation of id in WorkingTreeIterator with autocrlf and 
    smudging
  Prepare 4.3.2-SNAPSHOT builds
  JGit v4.3.1.201605051710-r
  Prepare 4.4.0-SNAPSHOT builds
  JGit v4.4.0.201605041135-m1
  Run Maven build in release.sh concurrently to speedup release

Change-Id: I25ef0497a4455b8229b453e1023abb4631d4b6d3
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-06-14 00:11:37 +02:00
Marco Miller 734d5bb3c9 RefDirectory: remove ref lock file for following ref dir removal
Before this fix, ref directory removal did not work. That was because
the ref lock file was still in the leaf directory at deletion time.
Hence no deep ref directories were ever deleted, which negatively
impacted performance under large directory structure circumstances.

This fix removes the ref lock file before attempting to delete the ref
directory (which includes it). The other deep parent directories are
therefore now successfully deleted in turn, since leaf's content
(lock file) gets removed first.

So, given a structure such as refs/any/directory[/**], this fix now
deletes all empty directories up to -and including- 'directory'. The
'any' directory (e.g.) does not get deleted even if empty, as before.

The ref lock file is still also removed in the calling block's finally
clause, just in case, as before. Such double-unlock brought by this
fix is harmless (a no-op).

A new (private) RefDirectory#delete method is introduced to support
this #pack-specific case; other RefDirectory#delete callers remain
untouched.

Change-Id: I47ba1eeb9bcf0cb93d2ed105d84fea2dac756a5a
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
2016-06-10 08:49:53 -04:00
Shawn Pearce 7e8637658c Merge "Add method to read time unit from config" 2016-06-10 00:26:46 -04:00
Matthias Sohn 26862bb834 Extract work queue to allow reusing it
Change-Id: I28f7800030a3b9db48e315061509af0746feffcc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-06-08 14:36:24 +02:00
Matthias Sohn 0900dc08f5 Prepare 4.4.1-SNAPSHOT builds
Change-Id: I4fe1c84b1418126f5b245b8a4f72bb7e37f48eae
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-06-07 17:30:33 +02:00
Matthias Sohn 399d2929ee JGit v4.4.0.201606070830-r
Change-Id: I5c771a62ac0420424a655a4025c62a4bc28dc44e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-06-07 13:51:02 +02:00
Christian Pontesegger ac3d3af632 http transport does not use authentication fallback
Git servers supporting HTTP transport can send multiple WWW-Authenticate
challenges [1] for different authentication schemes the server supports.
If authentication fails now retry all authentication types proposed by
the server.

[1] https://tools.ietf.org/html/rfc2617#page-3

Bug: 492057
Change-Id: I01d438a5896f9b1008bd6b751ad9c7cbf780af1a
Signed-off-by: Christian Pontesegger <christian.pontesegger@web.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-06-06 16:45:49 +02:00
Hugo Arès f379688aad Add method to read time unit from config
Time units supported:

-milliseconds (1 ms, 2 milliseconds)
-seconds (1 s, 1 sec, 1 second, 2 seconds)
-minutes (1 m, 1 min, 1 minute, 2 minutes)
-hours (1 h, 1 hr, 1 hour, 2 hours)
-days (1 d, 1 day, 2 days)
-weeks (1 w, 1 week, 2 weeks)
-months (1 mon, 1 month, 2 months)
-years (1 y, 1 year, 2 years)

This functionality is implemented in Gerrit ConfigUtil class. Add it to
JGit so it can eventually be remove from Gerrit.

Change-Id: I2d6564ff656b6ab9424a9360624061c94fd5f413
Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
2016-06-06 10:08:37 -04:00
Hugo Arès 534fcb1479 Add $NON-NLS to suppress "Non-externalized string literal" warnings
Change-Id: I1643775c6b200a5963ac1a6ca9b4d6e807e0b45a
Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
2016-06-03 15:57:18 -04:00
Dave Borowitz ba8eb93173 BatchRefUpdate: Include command message in toString()
Change-Id: I359f33af5aa84af77c3628e6cd9a5ee3f7f38d49
2016-06-02 13:24:59 -04:00
Shawn Pearce 28b17afae5 DfsBlock: throw DataFormatException on 0 bytes
setInput should always push at least 1 byte into the Inflater.  If 0
bytes (or negative!) are being sent the DfsBlock is inconsistent with
the position passed in.  This indicates a severe programming problem
in the caller, and may cause an infinite loop in DfsReader.

Today we saw a handful of live examples of this but don't know what
the cause is.  Guard against this error condition and throw with a
more verbose failure, which may prevent an infinite loop.  Callers
will eventually catch DataFormatException and rethrow with more detail
about the object that cannot be inflated, with the DFE in the chain.

Change-Id: I64ed2a471520e48283675c6210c6db8a60634635
2016-06-01 21:48:21 -07:00
Matthias Sohn 34626614a8 Merge "Prepare 4.5.0-SNAPSHOT builds" 2016-06-01 18:13:35 -04:00
Dave Borowitz 0d6ba84065 DfsInserter: Optionally disable existing object check
When using a DfsInserter for high-throughput insertion of many
objects (analogous to git-fast-import), we don't necessarily want to
do a random object lookup for each. It'll be faster from the
inserter's perspective to insert the duplicate objects and let a later
GC handle the deduplication.

Change-Id: Ic97f5f01657b4525f157e6df66023f1f07fc1851
2016-06-01 17:21:33 -04:00
Matthias Sohn 75b3301939 Prepare 4.5.0-SNAPSHOT builds
Change-Id: I572fe9fea0e5ca0bec4648c916ae95a5b1ccf125
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-06-01 23:04:07 +02:00
Matthias Sohn 831c811f61 Prepare 4.4.0-SNAPSHOT builds
Change-Id: Ib41dfe4103f013ba87a1ce62ee24bc9e10300eff
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-06-01 22:36:51 +02:00
Matthias Sohn f3b8653021 JGit v4.4.0.201606011500-rc2
Change-Id: Ifd7b7baba7d676a630e2f742d369c4186ea450a6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-06-01 20:37:53 +02:00
Matthias Sohn dfb33e699c Merge branch 'master' into stable-4.4
* master:
  Fix javadoc errors and unused imports introduced by ddd0fe25
  RepoCommand: record manifest shallow recommendation in .gitmodules
  RepoCommand: record manifest groups as submodule labels
  Remove the deprecated TestRepository.getClock() method
  Replace use of deprecated method Repository.getRef()
  [findBugs] Prevent potential NPE in
    FileLfsRepository.getOutputStream()
  Better report on client side if push failed due to too large object
  [findBugs] Prevent potential NPE in CloneCommand.init()
  RepoCommand: remove --record-remote-branches
  RepoCommandTest: Improve assertion message for remote branch recording

Change-Id: I4fbce4f84925a933fcc9a48058ed6793f5821b97
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-06-01 16:10:11 +02:00
Matthias Sohn 525baa1213 Fix javadoc errors and unused imports introduced by ddd0fe25
Change-Id: I2d17115843e453c71febd4a58527effe658b48fd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-06-01 10:17:29 +02:00
Stefan Beller 6ae4ed0f7d RepoCommand: record manifest shallow recommendation in .gitmodules
Git core learned about the submodule.<name>.shallow option in
.gitmodules files, which is a recommendation to clone a submodule
shallow. A repo manifest may record a clone depth recommendation as
an optional field, which contains more information than a binary
shallow/nonshallow recommendation, so any attempted conversion may be
lossy. In practice the clone depth recommendation is either '1' or doesn't
exist, which is the binary behavior we have in Git core.

Change-Id: I51aa9cb6d1d9660dae6ab6d21ad7bae9bc5325e6
Signed-off-by: Stefan Beller <sbeller@google.com>
2016-05-31 15:19:52 -07:00
Stefan Beller ddd0fe257b RepoCommand: record manifest groups as submodule labels
Git core learned about attributes in pathspecs:

    pathspec: allow querying for attributes

    The pathspec mechanism is extended via the new
    ":(attr:eol=input)pattern/to/match" syntax to filter paths so that it
    requires paths to not just match the given pattern but also have the
    specified attrs attached for them to be chosen.

(177161a5f7, 2016-05-20)

We intend to use these pathspec attribute patterns for submodule
grouping, similar to the grouping in repo. So the RepoCommand which
translates repo manifest files into submodules should propagate this
information along. This requires writing information to the
.gitattributes file instead of the .gitmodules file. For now we just
overwrite any existing .gitattributes file and do not care about prior
attributes set. If this becomes an issue we need to figure out how to
correctly amend the grouping information to an existing .gitattributes
file.

Change-Id: I0f55b45786b6b8fc3d5be62d7f6aab9ac00ed60e
Signed-off-by: Stefan Beller <sbeller@google.com>
2016-05-31 15:18:20 -07:00
Matthias Sohn 4c236ff4bb Replace use of deprecated method Repository.getRef()
Change-Id: Iecf2b8deafc4991cc3333702fb9fa0638be7b914
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-31 00:11:11 +02:00
Matthias Sohn 5b104a7275 Better report on client side if push failed due to too large object
JGits PushCommand and BasePackPushConnection were throwing a generic
exception when the pushed pack-file was rejected by the server since it
contained too large objects. Teach JGit to better analyze the server's
response to detect this situation and throw a more specific exception.

Detect this situation by parsing the status line sent by the server.
This change only recognizes the response sent by a JGit based server.
All other servers which report such problems in a different way still
lead to a generic TransportExceptions.

Also see https://git.eclipse.org/r/#/c/46348/

Change-Id: I8d6d65e4585ebb3846f7207e7d1a2f82fa9cbd86
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-30 15:53:55 -04:00
Matthias Sohn 6569a876a3 [findBugs] Prevent potential NPE in CloneCommand.init()
File.listFiles() returns null if the File is not a directory, improve
validation of directory and gitDir to fix this.

Change-Id: I763d08835faf96a0beb8e706992df0908526bd2c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-30 10:59:48 -04:00
Matthias Sohn 9720f9e249 Prepare 4.4.0-SNAPSHOT builds
Change-Id: Iba6e423294d3315465648d19087a674a73b5ef28
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-25 23:30:55 +02:00
Matthias Sohn f2c58503d7 JGit v4.4.0.201605250940-rc1
Change-Id: Idd8e1664730b979cfbd9a2196081a48a1efa3330
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-25 15:14:46 +02:00
Matthias Sohn 88524581cf Merge branch 'master' into stable-4.4
* master:
  JGit CLI: allow to call git init with specific directory
  Redirect all Show output to outs
  Support git config [include] section with absolute path(s)
  Added filter for merge and non-merges commits.
  [findBugs] Prevent potential NPE in FS_POSIX.readUmask()
  [findBugs] Fix calculation of host header in SignerV4
  Update Orbit repository to S20160518051658 for Neon RC2
  Fix StashApply regarding handling of untracked files
  GC should not pack objects only referenced by ORIG_HEAD,...
  Make sure to overwrite files when "reset --hard" detects conflicts
  Allow setting FileMode to executable when applying patches in 
    ApplyCommand
  Fix config value get to return last instead of 1st just like git
  Remove UTF-8 checking duplication in Config lib subclasses
  Update Maven plugins
  Fix type parameter in javadoc in TestRepository.delete(String ref)
  TestRepository: Add delete() method
  Make BaseReceivePack.setAtomic public
  ReceivePack: Pass atomic setting from client to BatchRefUpdate

Change-Id: I5c9c5b7ccb23fb48b44b3da10b2c5d876d043d24
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-24 17:00:08 +02:00
Matthias Sohn fc0ec94bc3 Merge branch 'stable-4.3' into stable-4.4
* stable-4.3:
  Fix computation of id in WorkingTreeIterator with autocrlf and
    smudging
  Prepare 4.3.2-SNAPSHOT builds
  JGit v4.3.1.201605051710-r
  Scan loose ref before packed in case gc about to remove the loose
  Fix possible NPEs when reporting transport errors
  Fix calling of clean/smudge filters from Checkout,MergeCommands
  Fix ApplyCommand when result of patch is an empty file

Change-Id: I829f06699f6670e519d04c927bdba4b82df29199
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-24 16:44:03 +02:00
Christian Halstrick ffa237e7db Fix computation of id in WorkingTreeIterator with autocrlf and smudging
JGit failed to do checkouts when the index contained smudged entries and
autocrlf was on. In such cases the WorkingTreeIterator calculated the
SHA1 sometimes on content which was not correctly filtered. The SHA1 was
computed on content which two times went through a lf->crlf conversion.

We used to tell the treewalk whether it is a checkin or checkout
operation and always use the related filters when reading any content.
If on windows and autocrlf is true and we do a checkout operation then
we always used a lf->crlf conversion on any text content. That's not
correct. Even during a checkout we sometimes need the crlf->lf
conversion. E.g. when calculating the content-id for working-tree
content we need to use crlf->lf filtering although the overall operation
type is checkout.

Often this bug does not have effects because we seldom compute the
content-id of filesystem content during a checkout. But we do need to
know whether a file is dirty or not before we overwrite it during a
checkout. And if the index entries are smudged we don't trust the index
and compute filesystem-content-sha1's explicitly.

This caused EGit not to be able to switch branches anymore on Windows
when autocrlf was true. EGit denied the checkout because it thought
workingtree files are dirty because content-sha1 are computed on wrongly
filtered content.

Bug: 493360
Change-Id: I1072a57b4c529ba3aaa50b7b02d2b816bb64a9b8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-23 15:39:04 +02:00
Marco Miller 1f86350c5a Support git config [include] section with absolute path(s)
As per [1], but limited to absolute paths indeed. No support yet for
tilde or $HOME expansion. Support for the --[no-]includes options
([1]) is not part of this commit scope either, but those options'
defaults are in effect as described in [1].

[1] https://git-scm.com/docs/git-config

Included path can be a config file that includes other path-s in turn.
An exception is thrown if too many recursions (circular includes)
happen because of ill-specified config files.

Change-Id: I700bd7b7e1625eb7de0180f220c707d8e7b0930b
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-21 01:14:06 +02:00
Alcemir Santos ba0dfe1ae2 Added filter for merge and non-merges commits.
Added the option to retrieve either merge or non-merge commits in the
LogCommand.

Change-Id: Ie0e1c515a823f2392783f1a47d385c31230e8167
Signed-off-by: Alcemir Santos <alcemir.santos@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-20 01:05:40 +02:00
Matthias Sohn 3652887108 [findBugs] Prevent potential NPE in FS_POSIX.readUmask()
BufferedReader.readLine() returns null if the end of the stream has been
reached.

Change-Id: I83102bbfb1316407247e0f29023077af9e8d9606
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-19 15:04:46 +02:00
Matthias Sohn 4641c43a98 Prepare 4.3.2-SNAPSHOT builds
Change-Id: I71997a8be83841765111cb7b55506bd8edd8adad
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-19 10:17:39 +02:00
Christian Halstrick ad1548b49e Fix StashApply regarding handling of untracked files
There was a bug regarding how JGit handled untracked files when applying
a stash. Problem was that untracked files are applied by doing a merge
of HEAD and untrackedFiles commit with a merge base of the stashed HEAD.
That's wrong because the untrackedFiles commit has no parent and
contains only the untracked files. Using stashed HEAD as merge base
leads to unneccessary conflicts on files not event included in the
untrackedFiles commit.

Imagine this graph directly before you want to apply a stash which was
based on 0. You want to apply the stash on current HEAD commit 5.

  5 (HEAD,master)
 /
0---+
 \   \
  1---3 (WIP on master)
     /
    2 (untracked files on master)

Imagine for a specific (tracked) file f
- commit 0 contains X
- HEAD contains Y
- commit 2 (the untracked files) does not contain file f

A merge of 2 and 5 with a merge base of 0 leads to a conflict. The 5
commit wants to modify the file and the 2 commit wants to delete the
file -> conflict.

If no merge base is set then the semantic is correct.

Thanks to Bow for finding this bug and providing the test case.

Bug: 485467
Change-Id: I453fa6ec337f81b2a52c4f51f23044faeec409e6
Also-by: Bow Ruggeri <bow@bow.net>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-19 00:04:32 +02:00
Christian Halstrick 6590c0a92a GC should not pack objects only referenced by ORIG_HEAD,...
There are references which are returned by
RefDatabase.getAdditionalRefs() which are allowed to point to
non-existing objects. These refs should not save objects from being
garbage collected. Examples for these references are ORIG_HEAD,
MERGE_HEAD, FETCH_HEAD and CHERRY_PICK_HEAD. Native git will not take
these references into account when doing a gc and therefore these
references may point to non-existing objects after a gc. Teach JGit's
GC to behave the same: ignore additional refs if they don't start with
"refs/". Examples for refs returned by getAdditionalRefs() which do
start with "refs/" are the bootstrap refs when using reftree's (see
commit 115f1ad3974d1162b33d1c8eff466019d1f249f3). See also
http://article.gmane.org/gmane.comp.version-control.git/294126.

Bug: 479697
Change-Id: I10e40589f13e72aacdd9f86f3b44696fd1cd068a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-18 22:49:22 +02:00
Christian Halstrick 0afd62efa8 Make sure to overwrite files when "reset --hard" detects conflicts
When performing a "reset --hard" a checkout is done. The pathes are
checked for potential checkout conflicts. But in the end for all
remaining conflicts these files are simply deleted from the working
tree. That's not the right strategy to handle checkout conflicts during
"reset --hard". Instead for every conflict we should simply checkout the
merge commit's content.

This is different from native gits behavior which reports errors when
during a "checkout --hard" a file shows up where a folder was expected.

  "warning: unable to unlink d/c.txt: Not a directory"

Why it is like that in native git was asked in
http://permalink.gmane.org/gmane.comp.version-control.git/279482. Unless
it is explained why native git why this error is reported JGit should
overwrite the files.

Bug: 474842
Change-Id: I08e23822a577aaf22120c5137eb169b6bd08447b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-18 13:29:02 +02:00
Nadav Cohen e81592e076 Allow setting FileMode to executable when applying patches in ApplyCommand
git-apply allows modifying file modes in patched files using either
"new mode" or "new file mode" headers. This patch adds support for
setting files as executables and vice-versa.

Change-Id: I24848966b46f686f540a8efa8150b42e0d9c3ad1
Signed-off-by: Nadav Cohen <nadavcoh@gmail.com>
2016-05-17 00:08:01 -07:00
Marco Miller 00db4ab06e Fix config value get to return last instead of 1st just like git
Before this fix, getting the value of 'key' below used to return
value1. This fix makes it so that value3 gets returned instead,
just like native git's get.

[section]
  key = value1
  key = value2
  key = value3

Change-Id: Iccb24de9b63c3ad8646c909494ca3f8c9ed6e29c
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-12 00:26:38 +02:00
Marco Miller e5a9915a92 Remove UTF-8 checking duplication in Config lib subclasses
Change-Id: Ib9f0ae8207000a36c5bf1a92fcc2c32efc4c0984
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-12 00:14:17 +02:00
Matthias Sohn 41b194c718 JGit v4.3.1.201605051710-r
Change-Id: I25fb72cc17d7a27b0b69746d907dac9ccd4d7997
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-05 23:08:18 +02:00
Matthias Sohn 89db7e01fa Merge branch 'stable-4.3'
* stable-4.3:
  Scan loose ref before packed in case gc about to remove the loose
  Fix possible NPEs when reporting transport errors
  Fix calling of clean/smudge filters from Checkout,MergeCommands
  Fix ApplyCommand when result of patch is an empty file

Change-Id: I0dc76b7a8c87ce8e0386a1b9e0fa92a3aa62abf7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-05 01:13:45 +02:00
Marco Miller 05fd01656e Scan loose ref before packed in case gc about to remove the loose
Before this change, jgit used to read packed-refs before scanning
loose refs. That was not a problem if gc didn't run concurrently. When
gc did run concurrently with such refs reading, that order sometimes
broke the latter. This lead to reading an older version of a ref's
tip, which meant "losing" the real tip or commit. The specific
read-Vs-gc concurrency scenario which broke reading that way follows:

1. let ref R be in packed-refs and R' be in loose
2. jgit starts reading packed-refs
3. gc also starts its business around that very time
4. jgit still has the time to read R from packed-refs
5. as gc is not done yet updating packed-refs with R'
6. jgit then starts scanning loose refs (or is about to)
7. gc quickly ends up being done moving loose R' to packed-refs
8. so gc (quickly) removes loose refs
9. -while jgit is scanning loose refs, now gone
10. so jgit assumes no loose to consider => packed-refs winning
11. so jgit wrongfully returns R (from 4.) as the tip, instead of R'.

This fix switches the order so loose refs are scanned (secured) before
taking the time to read packed-refs. This way, knowledge of the
likelier tip is guaranteed for ref reading to return the true tip
- despite concurrent gc. If there is no loose ref to scan, jgit reads
packed-refs and lands on R' (or S), which it then returns, as
expected. The gerrit issue [1] should be solved by this fix.

[1] https://code.google.com/p/gerrit/issues/detail?id=2302

Change-Id: Ibd120120a361a3a6ed565f3836afc1db706fbcdd
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-05 00:49:44 +02:00
Jonathan Nieder e89393ba3e Make BaseReceivePack.setAtomic public
This makes atomic more consistent with other properties like
allowNonFastForwards.

Change-Id: Ie3b41f14ffba1d0b206ffecc697377417daa6973
2016-05-04 15:04:55 -07:00
Jonathan Nieder 73b3c9c1d8 ReceivePack: Pass atomic setting from client to BatchRefUpdate
Change-Id: I0e4e6cef693e8138562f5ca345e0db61a8abef9c
2016-05-04 14:00:42 -07:00
Matthias Sohn b4c6a41adc Prepare 4.4.0-SNAPSHOT builds
Change-Id: Ib95be1300b1b95cc7e8153170d509282bdc4e328
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-04 22:00:58 +02:00
Matthias Sohn 1447159b92 JGit v4.4.0.201605041135-m1
Change-Id: Ic9b6d7dae293887c3ac3a11f92e153501abad1dc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-05-04 17:35:15 +02:00
Dave Borowitz c9b00288fd PersonIdent: Make appendSanitized public
Change-Id: I337c90fff3c013819a42a7622ac6bacc72828c07
2016-05-03 14:40:15 -07:00
Stefan Beller 0406290eb4 Config: Improve documentation for setStringList
Change-Id: Idccfa0dfd6db324236f7cb26ab28bdbd80581a8b
Signed-off-by: Stefan Beller <sbeller@google.com>
2016-05-03 11:22:11 -07:00
Dave Borowitz 125a8959d2 PersonIdent: Strip some special chars from external strings
The special characters <> and '\n' interfere with parsing of
identities. C git strips these special characters, so we should too.

Rather than allocating extra strings by calling String#trim(), add a
few lines to our sanitization method to perform the same trimming as
described in String's Javadoc.

Change-Id: I96edcb93a2fc194ee354d60566d352299742a52f
2016-04-29 11:27:14 -04:00
Dave Borowitz 773f9661d0 PersonIdent: Document that name and email aren't trimmed
This might be somewhat surprising behavior to users who might
naturally assume the following invariant:
  ident.equals(parseIdent(ident.toExternalString()))

This invariant does not hold since whitespace is only trimmed during
serialization. We don't want to mess with the strings during
initialization, as this is called during the highly-optimized commit
parsing codepath.

Change-Id: I081a603f0ac0e33167462244779b0ff3ad51e80c
2016-04-29 11:27:06 -04:00
Christian Halstrick ddc0e9e84a Fix possible NPEs when reporting transport errors
There was a bug in JGit which caused NPEs being thrown when Transport
errors should be reported. Avoid the NPE to let the original error show
up.

Change-Id: I9e1e2b0195bd61b7e531a09d0fc7bce109bd6515
2016-04-27 10:07:51 +02:00
Dave Borowitz adff322a69 Expose the ObjectInserter that created an ObjectReader
We've found in Gerrit Code Review that it is common to pass around
both an ObjectReader (or more commonly a RevWalk wrapping one) and an
ObjectInserter. These code paths often assume that the ObjectReader
can read back any objects created by the ObjectInserter without
flushing. However, we previously had no way to enforce that constraint
programmatically, leading to hard-to-spot problems.

Provide a solution by exposing the ObjectInserter that created an
ObjectReader, when known. Callers can either continue passing both
objects and check:
  reader.getCreatedFromInserter() == inserter
or they can just pass around ObjectReader and extract the inserter
when it's needed (checking that it's not null at usage time).

Change-Id: Ibbf5d1968b506f6b47030ab1b046ffccb47352ea
2016-04-26 17:21:37 -04:00
Dave Borowitz 8a26d0577f Add ObjectReader.Filter, like in ObjectInserter
Change-Id: If34ad8185dc8192435e622995fdca598b86add7e
2016-04-25 13:36:38 -04:00
Christian Halstrick 22d7ec2971 Fix calling of clean/smudge filters from Checkout,MergeCommands
When CheckoutCommand or MergeCommand is called then not in all situation
the treewalks have been prepared to support clean/smudge filters. Fix
this

Bug: 491505
Change-Id: Iab5608049221c46d06812552ab97299e44d59e64
2016-04-22 09:32:34 +02:00
Dave Borowitz a37d85ccd6 Support per-BatchRefUpdate atomic transactions
Repurpose RefDatabase#performsAtomicTransactions() slightly, to
indicate that the backend _supports_ atomic transactions, rather than
the current definition, which is that the backend always _uses_ atomic
transactions regardless of whether or not the caller actually wants
them. Allow BatchRefUpdate callers to turn off atomic transactions by
calling setAtomic(false). Defaulting to true means this is backwards
compatible.

Change-Id: I6df78d7df65ab147b4cce7764bd3101db985491c
2016-04-19 10:01:57 -04:00
Jon Schneider 80fa5f39f9 Fix ApplyCommand when result of patch is an empty file
Such hunks are identifiable by a zero value for "new start line". Prior
to the fix, JGit throws and ArrayIndexOutOfBoundsException on such
patches.

Change-Id: I4f3deb5e5f41a08af965fcc178d678c77270cddb
Signed-off-by: Jonathan Schneider <jkschneider@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-04-16 17:28:06 -05:00
Mike Edgar 4812fdab61 Make UploadPack observe exceptions reading refs
Now if refs are unreadable when serving an upload pack the handler
will fail due to the actual underlying failure. Previously all wants
would be rejected as invalid because Repository.getAllRefs() returned
an empty map.

Testing this required a new subclass of InMemoryRepository so that
an IOException could be injected at the correct time.

Signed-off-by: Michael Edgar <adgar@google.com>
Change-Id: Iac708b1db9d0ccce08c4ef5ace599ea0b57afdc0
2016-04-14 20:41:53 -04:00
Ned Twigg 32a5993227 Expose conflicting files in CheckoutConflictException
Change-Id: I5b3b7b0633354d5ccf0c6c320c0df9c93fdf8eeb
Signed-off-by: Ned Twigg <ned.twigg@diffplug.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-04-11 22:55:16 +02:00
Matthias Sohn eeeca8042f Merge "Fix CommitCommand to be able to skip writing to RefLog" 2016-04-11 16:50:11 -04:00
Christian Halstrick 36a53d1a3c Fix CommitCommand to be able to skip writing to RefLog
CommitCommand already provided a method to set the comment which should
be written into the reflog. The underlying RefUpdate class supported to
skip writing a reflog entry. But through the CommitCommand API it was
not possible to prevent writing a reflog entry. Fix this and allow
creating commits which don't occur in the reflog.

Change-Id: I193c53de71fb5958ea749c4bfa8360a51acc9b58
2016-04-11 08:58:48 +02:00
Matthias Sohn ccf8363693 Prepare 4.4.0-SNAPSHOT builds
Change-Id: If3162f4cc4ae6319b9f1e3293549485b039cfe7f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-04-08 17:59:59 +02:00
Matthias Sohn ac5d1bc37b Prepare 4.3.1-SNAPSHOT versions
Change-Id: I985828fd379e4596ae7f1c30a87e55df06a7924e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-04-08 17:24:30 +02:00
Matthias Sohn 08fc807780 Merge "Prepare 4.3.1-SNAPSHOT versions" 2016-04-08 11:01:18 -04:00
Terry Parker 2708b11b6c Filter corrupt objects from DfsReader.selectObjectRepresentation()
PackWriter.writeObject() can get into an infinite loop when corrupt
packs are present. When it finds a pack file with an object that can be
reused it calls DfsPackFile.copyAsIs(). If that method sees an invalid
CRC, it adds the object to the DfsPackFile's corrupt object list and
throws a CorruptObjectException, which it later catches as an
IOException and wraps in a
StoredObjectRepresentationNotAvailableException.
PackWriter.writeObjectImpl() catches that SORNAE and retries the
operation by calling DfsReader.selectObjectRepresentation(). But
currently that method returns the same object which was just seen to
be corrupt.

Change DfsPackFile.isCorrupt() from private to package private, and use
that method in DfsReader.selectObjectRepresentation() to filter out
corrupt objects.

The stack traces that show the problem are:
  org.eclipse.jgit.errors.CorruptObjectException.<init>(CorruptObjectException.java:113)
  org.eclipse.jgit.internal.storage.dfs.DfsPackFile.copyAsIs(DfsPackFile.java:624)
  org.eclipse.jgit.internal.storage.dfs.DfsReader.copyObjectAsIs(DfsReader.java:491)
  org.eclipse.jgit.internal.storage.pack.PackWriter.writeObjectImpl(PackWriter.java:1478)
  org.eclipse.jgit.internal.storage.pack.PackWriter.writeObject(PackWriter.java:1455)

  org.eclipse.jgit.internal.storage.dfs.DfsPackFile.getPackIndex(DfsPackFile.java:228)
  org.eclipse.jgit.internal.storage.dfs.DfsReader.findAllFromPack(DfsReader.java:476)
  org.eclipse.jgit.internal.storage.dfs.DfsReader.selectObjectRepresentation(DfsReader.java:455)
  org.eclipse.jgit.internal.storage.pack.PackWriter.writeObjectImpl(PackWriter.java:1492)
  org.eclipse.jgit.internal.storage.pack.PackWriter.writeObject(PackWriter.java:1455)

Change-Id: Iad7bbcaed1f11a6aa3b4f5af911a73a34c0fabfd
Signed-off-by: Terry Parker <tparker@google.com>
2016-04-07 16:25:05 -07:00
Matthias Sohn f2ee537d55 Prepare 4.3.1-SNAPSHOT versions
Change-Id: I52c98ba8fb3a303269a1f9380af114b6dd8c5009
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-04-08 00:56:43 +02:00
Matthias Sohn 4f0daa3bb2 JGit v4.3.0.201604071810-r
Change-Id: I902cdf1ff92ce8c6e9d80c4965d8d5bd8b9ac6c1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-04-08 00:10:10 +02:00
Matthias Sohn 57e6274bcf JGit v4.3.0.201604071045-r
Change-Id: Iafab78d6be34d31a13f979b7be67611135c0f8bd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-04-07 16:41:24 +02:00
Matthias Sohn 27d06cb8d5 Merge branch 'master' into stable-4.3
* master:
  Remove repository from cache when it's closed
  Fix RefDirectory not closing resources
  Fix repository cache never closing repository

Change-Id: I9dc9d017806cba25125f69b53812cc3e062ef975
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-04-07 13:06:23 +02:00
Hugo Arès 7d2b3b9e25 Remove repository from cache when it's closed
RepositoryCache has 2 methods to remove a repository from the cache but
they are never called when a repository is closed. Users of the cache
were expected to call one of those 2 methods but how could they have
called them at proper time without having visibility of the repository
usage count.

Ideally, I would have reworked the RepositoryCache to wrap any
repository it opens in a class that would be responsible to unregister
them from the cache when it's really closed, i.e. when usage counter
reaches 0. The problem preventing the wrapping solution is the
RepositoryCache.register method that allows to register an already
opened repository in the cache. Such repositories cannot be wrapped
because callers are still holding a reference on the unwrapped
repository.

Document that RepositoryCache.close method is removing the repository
from the cache as well as closing it and rework
RepositoryCache.unregister method to only remove the repository from the
cache. Use the latter to unregister repository when Repository.doClose
is getting executed.

Change-Id: Ia364816e4da8d7b6cfa72f10758ca31aa8a1f9db
Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-04-07 13:00:50 +02:00
Hugo Arès 53ea86cd7b Fix RefDirectory not closing resources
When repositories are opened using the RepositoryCache, they are kept in
memory and when the repository usage counter reaches 0, the
Repository.close method is called which then calls close method on its
reference and object databases.

The problem is that RefDirectory.close method was a no-op and the
reference database was kept in memory. This problem is only happening
when opening a repository using the RepositoryCache because it never
evicts repositories, it's just calling the close method.

Change-Id: Iacb961de8e8b1f5b37824bf0d1a4caf4c6f1233f
Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
2016-04-07 11:32:57 +02:00
Hugo Arès 83235432e7 Fix repository cache never closing repository
Repository has a usage counter that is initialized to 1 at
instantiation and this counter is decremented when Repository.close
method is called. There is also a Repository.incrementOpen method that
RepositoryCache uses to increment the usage count when it's returning a
repository that is already opened.

The problem was that RepositoryCache was incrementing the usage count
for repositories that it just opened or registered. The usage count was
2 when it should have been 1.

Incrementing usage count is now only be done for repository that are
served from the cache.

This bug is causing slow memory increase of our Gerrit server until the
server become slow. Even if the RepositoryCache is using SoftReference,
it seems that the JVM is not garbage collecting the repositories because
it's not yet on the edge of being out of memory.

To test this change, I replicated all repositories(11k) from Gerrit
master to one slave. The Gerrit master used memory after this test was
10GB without this change and 3.5GB with.

Change-Id: I86c7b36174e384f106b51fe92f306018fd1dbdf0
Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
2016-04-07 11:32:57 +02:00
Matthias Sohn f56b9001fc Merge branch 'master' into stable-4.3
* master:
  Add config parameter gc.prunePackExpire for packfile expiration
  In TestRepository, use a consistent clock

Change-Id: I7ac568e650fbd191e48a8f1a4068af72deb242e8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-04-06 16:05:14 +02:00
Christian Halstrick 47dd98e362 Enable calling of smudge filters when checking out paths
When checking out commits/branches JGit was triggering correctly
configured smudge filters. But when checking out paths (either from
index or from commits) JGit was not triggering smudge filters. Fix
CheckoutCommand to properly call filters.

Bug: 486560
Also-by: Pascal Krause <pascal.krausek@sap.com>
Change-Id: I5ff893054defe57ab12e201d901fe74e1376efea
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-04-06 00:06:53 +02:00
Matthias Sohn 46bef2bcb6 Prepare 4.3-SNAPSHOT builds
Change-Id: Ib831f8870938113bd5338763f90a07d5c108b1de
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-04-05 23:10:06 +02:00
Preben Ingvaldsen 403f04d8dd Implement DIR_NO_GITLINKS
Implement the DIR_NO_GITLINKS setting with the same functionality
it provides in cGit.

Bug: 436200
Change-Id: I8304e42df2d7e8d7925f515805e075a92ff6ce28
Signed-off-by: Preben Ingvaldsen <preben@puppetlabs.com>
2016-04-05 10:43:40 +02:00
Christian Halstrick 74743bc547 Add config parameter gc.prunePackExpire for packfile expiration
JGit's Garbage Collector is repacking relevant objects into new
packfiles and is afterwards deleting the now obsolete packfiles. But to
prevent problems caused by race conditions JGit was not deleting
packfiles when they are too young. The same mechanism as for loose
objects and the config parameter gc.pruneExpire was used.
But JGit was reusing the parameter gc.pruneExpire also for packfiles
which may cause a lot of filesystem consumption if gc.pruneExpire was
set to the default of 2 weeks. Only two weeks after packfile creation gc
was allowed to delete this packfile.

This change introduces a new config paramter gc.prunePackExpire with a
default of "1.hour". This parameter is used when packfiles are deleted.
Only packfiles older than the specified time can be deleted.

For loose objects the behaviour is not changed and only the old
parameter gc.pruneExpire is relevant. 

Change-Id: I6209efb05678b15153bd22479dc13486907a44f8
2016-03-31 16:11:02 +02:00
Matthias Sohn bf32c9102f JGit v4.3.0.201603230630-rc1
Change-Id: I10835e5aa3618e5033424595942cc1649152cb24
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-03-23 11:27:04 +01:00
Jonathan Nieder b601e88738 Merge "Add missing @Deprecated annotation" 2016-03-11 17:58:13 -05:00
Jonathan Nieder 90cf265dd4 Add missing @Deprecated annotation
Noticed by error-prone (http://errorprone.info/bugpattern/DepAnn).

Change-Id: If8dcc2dd6d7cabffc95e10f8357ce31c12cf6b1c
2016-03-11 14:55:18 -08:00
Yuxuan 'fishy' Wang 7507d9e2a9 Fix wrong whitespaces.
This change replaced some tabs with spaces introduced in
change I8b3765713599e34f1411f9bbc7f575ec7c2384e0.

Change-Id: Ia5c23b38c9fbbb46f150e527347b61c64c8d9e87
Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
2016-03-11 14:37:16 -08:00
Yuxuan 'fishy' Wang 0ecb016d7d Add ignoreRemoteFailures option to RepoCommand
With ignoreRemoteFailures set to true, we can ignore remote failures
(e.g. the branch of a project described in the manifest file does not
exist), skip that project and continue to the next one, instead of fail
the whole operation.

Change-Id: I8b3765713599e34f1411f9bbc7f575ec7c2384e0
Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
2016-03-11 14:20:24 -08:00
Preben Ingvaldsen cff546b0cb Introduce FileModeStrategy to FileTreeIterator
This commit introduces a FileModeStrategy to
the FileTreeIterator class.  This provides a way to
allow different modes of traversing a file tree;
for example, to control whether or not a nested
.git directory should be treated as a gitlink.

Bug: 436200
Change-Id: Ibf85defee28cdeec1e1463e596d0dcd03090dddd
Signed-off-by: Preben Ingvaldsen <preben@puppetlabs.com>
2016-03-11 08:41:13 +01:00
Matthias Sohn 6bcd8c6e90 Merge "Change visibility of DirCacheTree#getObjectId to public" 2016-03-07 20:12:00 -05:00
Philipp Marx 011e5da3e0 Change visibility of DirCacheTree#getObjectId to public
Allow access to the ObjectId of a DirCacheTree if known for low level
integration code.

Change-Id: I6f05b10c9ac781f5e8b38af4a19e653313c91fa8
Signed-off-by: Philipp Marx <smigfu@googlemail.com>
2016-03-07 22:55:46 +01:00
Ivan Motsch b811e4399e Add EOL stream type detection to TreeWalk
TreeWalk provides the new method getEolStreamType. This new method can
be used with EolStreamTypeUtil in order to create a wrapped InputStream
or OutputStream when reading / writing files. The implementation
implements support for the git configuration options core.crlf, core.eol
and the .gitattributes "text", "eol" and "binary"

CQ: 10896
Bug: 486563
Change-Id: Ie4f6367afc2a6aec1de56faf95120fff0339a358
Signed-off-by: Ivan Motsch <ivan.motsch@bsiag.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-03-07 17:24:32 +01:00
XinTong Wang 770d36c8ba Fix apply patch which did not work with non-ascii characters
Bug: 483943
Change-Id: If28f64053d20ab1bee54245f223e952dc2fe392c
Signed-off-by: XinTong Wang <xintong@ca.ibm.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-03-03 01:43:02 +01:00
Ivan Motsch 2baa5f1d6d Tests on Windows with URIish fail
The reason is that URIish(URL) and URIish(String) make different parsing
of path / rawPath with regard to drive letters. /C:/... for URL and
C:/... for String. This patch fixes the issue.

Change-Id: I8e2013fff30b7bb198ff733c038e21366667b8a0
Signed-off-by: Ivan Motsch <ivan.motsch@bsiag.com>
2016-02-25 15:39:41 +01:00
Shawn Pearce 68d8a51d08 Introduce specific WantNotValidException for servers
Capture the internal "want X not valid" state as a specific subclass
of PackProtocolException, allowing this to be more easily identified
in server stack traces and wrapper application code.

Change-Id: I4b1adb7497f396432da420b0f600ad25a261f912
2016-02-16 16:41:51 -08:00
Shawn Pearce e7a6e85b95 smart HTTP server: Pass along "want X not valid" to client
If the client sends a SHA-1 that the server does not recognize echo
this back to the client with an explicit error message instead of
the generic "internal server error".

This was always the intent of the implementation but it was being
dropped on smart HTTP due to the UploadPackServlet catching the
PackProtocolException, discarding the buffered message UploadPack
meant to send, and sending along a generic message instead.

Change-Id: I8d96b064ec655aef64ac2ef3e01853625af32cd1
2016-02-16 15:09:05 -08:00
Matthias Sohn ff5c756c79 Merge branch 'stable-4.2'
* stable-4.2:
  Revert "Fix warnings about unchecked conversion of MergeResult"

Change-Id: I31c2e0679ad4cff77190858ac9a570d04841c386
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-02-16 01:06:11 +01:00
Shawn Pearce 8c1d44e436 Merge "Revert "Fix warnings about unchecked conversion of MergeResult"" into stable-4.2 2016-02-15 19:00:50 -05:00
Shawn Pearce 591e39bf9d Revert "Fix warnings about unchecked conversion of MergeResult"
This reverts commit 979fa19110.
Breaks API.

Change-Id: I54af657898d49f64d6906fe3edfb6b08e996d901
2016-02-15 18:45:55 -05:00
Matthias Sohn 514b11ddcc Merge branch 'stable-4.2'
* stable-4.2:
  Don't use deprecated LockFile constructor
  Fix warnings about unchecked conversion of MergeResult
  MockServletConfig: Fix warning about unchecked conversion of Enumeration
  HugeFileTest: Make Git a class member and open in try-with-resource
  Suppress "unchecked cast" warnings related to UploadPackFactory.DISABLED
  DiffAlgorithms: Fix warnings about variable hiding
  DirCacheBasicTest: Open ObjectInserter.Formatter in try-with-resource
  DirCacheBuilderIteratorTest: Open TreeWalk in try-with-resource
  DirCacheCGitCompatabilityTest: Open TreeWalk in try-with-resource
  DirCacheCheckoutMaliciousPathTest: Open Git and RevWalk in t-w-r
  DirCacheIteratorTest: Open TreeWalk instances in try-with-resource
  ForPathTest: Open TreeWalk in try-with-resource
  GitConstructionTest: Open Git instance in try-with-resource
  IndexDiffTest: Open Git instances in try-with-resources
  ManifestParserTest: Don't use deprecated StringBufferInputStream
  InMemoryRepository: Remove unused RevWalk from batch method signature
  IndexModificationTimesTest: Open Git instances in try-with-resource
  InterIndexDiffFilterTest: Open TreeWalk in try-with-resource
  LockFileTest: Open Git instance in try-with-resource
  JGit v4.1.2.201602141800-r
  MergeCommandTest: Use JUnit's assume to check preconditions
  MergeCommandTest: Open Git instances in try-with-resource

Change-Id: Ie5dba6b9132a29e86958a04fa2b76465bcd2c6b5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-02-15 23:28:18 +01:00
Shawn Pearce 621b0740b3 Merge "Allow deletion of HEAD ref if the repository is bare." 2016-02-15 13:02:05 -05:00
David Pursehouse e96cb22a43 Don't use deprecated LockFile constructor
Change-Id: Ibc3e2f3372e1a65732dd6d3c71cec53fb1aa15e2
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-15 18:44:24 +09:00
David Pursehouse 979fa19110 Fix warnings about unchecked conversion of MergeResult
Change-Id: I1490b2209fa7b39676849c624adbc262a672f6df
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-15 18:22:53 +09:00
David Pursehouse f04bd20fc6 InMemoryRepository: Remove unused RevWalk from batch method signature
The RevWalk given in the arguments is not used. According to the
comment at the top of the method, a new RevWalk is intentionally
used in the implementation.

Remove the unused argument.

Change-Id: Iec81a1341d5bf377801475845b96a465753096ef
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-15 14:57:39 +09: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
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
Matthias Sohn 3bae524f6f Support LFS protocol and a file system based LFS storage
Implement LfsProtocolServlet handling the "Git LFS v1 Batch API"
protocol [1]. Add a simple file system based LFS content store and the
debug-lfs-store command to simplify testing.

Introduce a LargeFileRepository interface to enable additional storage
implementation while reusing the same protocol implementation.

At the client side we have to configure the lfs.url, specify that
we use the batch API and we don't use authentication:

  [lfs]
	  url = http://host:port/lfs
	  batch = true
  [lfs "http://host:port/lfs"]
	  access = none

the git-lfs client appends the "objects/batch" to the lfs.url.

Hard code an Authorization header in the FileLfsRepository.getAction
because then git-lfs client will skip asking for credentials. It will
just forward the Authorization header from the response to the
download/upload request.

The FileLfsServlet supports file content storage for "Large File
Storage" (LFS) server as defined by the Github LFS API [2].

- upload and download of large files is probably network bound hence use
  an asynchronous servlet for good scalability
- simple object storage in file system with 2 level fan-out
- use LockFile to protect writing large objects against multiple
  concurrent uploads of the same object
- to prevent corrupt uploads the uploaded file is rejected if its hash
  doesn't match id given in URL

The debug-lfs-store command is used to run the LfsProtocolServlet and,
optionally, the FileLfsServlet which makes it easier to setup a
local test server.

[1]
https://github.com/github/git-lfs/blob/master/docs/api/http-v1-batch.md
[2] https://github.com/github/git-lfs/tree/master/docs/api

Bug: 472961
Change-Id: I7378da5575159d2195138d799704880c5c82d5f3
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
2016-02-04 17:49:43 +01:00
Matthias Sohn 536db18cc6 Implement SHA-256 abstraction
The Large File Storage extension specified by GitHub [1] uses SHA-256 to
compute the ID of large files stored by the extension. Hence implement a
SHA-256 abstraction similar to the SHA-1 abstraction used by JGit.

[1] https://git-lfs.github.com/

Bug: 470333
Change-Id: I3a95954543c8570d73929e55f4a884b55dbf1b7a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-02-04 17:49:42 +01:00
Hugo Arès df904a4227 Fix diff for added and removed submodule
Since If13f7b406, submodule difference are shown as a hunk. The issue
was that added and removed submodule were considered as Edit.REPLACE
instead of Edit.INSERT and Edit.DELETE in the DiffFormatter result.

Change-Id: I4330c2aa3f10e29d7d6b0b2e5286e59293a06239
Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
2016-02-04 10:27:50 -05:00
Matthias Sohn 2de33d7678 Remove unused API problem filters
Change-Id: I8b1c99b108b4cea6356e0a62e6bfc0731df44cf5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-02-03 10:39:08 +01:00
Matthias Sohn b0facdc113 Merge branch 'stable-4.2'
* stable-4.2:
  DirCacheCheckoutTest: Open Git and TreeWalk in try-with-resource
  CommitCommand: Remove declaration of unthrown exception
  Branch: Fix variable hiding warning
  ApplyCommandTest: Open Git in try-with-resource
  PackFileTest: Open ObjectInserter.Formatter in try-with-resource

Change-Id: I8484b10fad5a4c35fcfaedc1cdf8ccf97471618e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-02-03 10:30:52 +01:00
David Pursehouse 521f513d6d CommitCommand: Remove declaration of unthrown exception
Change-Id: I1795b1e510ab170f062ee6c5988d7a7567abe260
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-02 18:27:47 +09:00
Matthias Sohn 9400d0cb17 Merge "Prevent ChainingCredentialsProvider from adding delegated providers twice" 2016-01-28 18:51:14 -05:00
Mike Williams 48ad6842fc Allow deletion of HEAD ref if the repository is bare.
Change-Id: I2281d818c9f76019e7e053e89b20214f2d663957
Signed-off-by: Mike Williams <miwilliams@google.com>
2016-01-28 11:43:59 -05:00
Yuxuan 'fishy' Wang 7960fa8735 [gitrepo] Support revision in remote tag.
Repo manifest file allows revision attribute in <remote> tag. This change
teaches JGit to read that information.

Change-Id: I1c878a2505b9d09fa09fbd404a119b71f2fb8fdb
Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
2016-01-27 16:01:06 -08:00
Rüdiger Herrmann bd67084d2b Prevent ChainingCredentialsProvider from adding delegated providers twice
Signed-off-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de>
Change-Id: Icc0907af4fe26877d066db3c813dba37213a3ccc
2016-01-26 18:55:39 +01:00
Thomas Wolf 9441d61e37 Fix a @since tag
Ketch didn't make it into 4.2

Change-Id: Iab3ddfb926a2f8d31622e212c845c825369b09d5
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2016-01-23 23:51:14 +01:00
Matthias Sohn fc4d117511 Prepare 4.2.1-SNAPSHOT builds
Change-Id: Ic9eac53b10ac97b2038b334d388ae3d21393f993
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-01-22 01:48:52 +01:00
Matthias Sohn 20c2079f70 JGit v4.2.0.201601211800-r
Change-Id: I89f33b0da81ff499315baa5311f95f31724fa510
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-01-21 23:47:12 +01:00
Terry Parker f321741cff Merge "Remove unused variable from DfsBlockCache" 2016-01-21 16:21:15 -05:00
Terry Parker 4d178be021 Remove unused variable from DfsBlockCache
Change-Id: I8ea167e44e9ebcac7ca08920e806d8bcb8188bf0
Signed-off-by: Terry Parker <tparker@google.com>
2016-01-21 13:02:39 -08:00
Matthias Sohn b30917ce21 Prepare 4.3.0-SNAPSHOT builds
Change-Id: Idcf0479529693b023042becd96698f9afd344bd4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-01-21 21:49:41 +01:00
Laurent Delaigue 4409751516 Add progress monitor to Merger
Monitoring progress of merges can be useful for users for large
repositories or complex merge processes that take some time.

This enables setting a monitor. Existing merge implementations in jgit
do not yet report progress if a monitor is set. This will be added in a
later change.

Change-Id: I17b978b3fc91750dd88649638b90a46820a0877c
Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-01-21 17:08:04 +01:00
Chris Gavin 82f47ace3d Fix TransportException when reading bundle
When reading a bundle file, commit messages who's oneline format is
longer than 982 characters caused JGit to treat subsequent text in
the commit as a SHA, then throw a TransportException because it's
not a valid SHA.

Now the readLine method will read all the way to the end of the
line, not just the first 1024 characters of it.

Change-Id: If15b491aa9a1e4fd9b8bbed2dd9e6be47a64ccb7
Signed-off-by: Chris Gavin <chris@chrisgavin.me>
2016-01-21 17:07:57 +01:00
Laurent Delaigue 1e1fb9fc59 Add progress monitor to Merger
Monitoring progress of merges can be useful for users for large
repositories or complex merge processes that take some time.

This enables setting a monitor. Existing merge implementations in jgit
do not yet report progress if a monitor is set. This will be added in a
later change.

Change-Id: I17b978b3fc91750dd88649638b90a46820a0877c
Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-01-21 11:37:26 +01:00
Shawn Pearce 08aac5904e Merge "Fix TransportException when reading bundle" 2016-01-21 01:15:12 -05:00
Chris Gavin d2bf41e7dd Fix TransportException when reading bundle
When reading a bundle file, commit messages who's oneline format is
longer than 982 characters caused JGit to treat subsequent text in
the commit as a SHA, then throw a TransportException because it's
not a valid SHA.

Now the readLine method will read all the way to the end of the
line, not just the first 1024 characters of it.

Change-Id: If15b491aa9a1e4fd9b8bbed2dd9e6be47a64ccb7
Signed-off-by: Chris Gavin <chris@chrisgavin.me>
2016-01-21 01:14:56 -05:00
Shawn Pearce 8fe9a8baf5 Merge changes from topic 'reftree'
* changes:
  debug-rebuild-ref-tree: Copy HEAD into RefTree
  debug-rebuild-ref-tree: Add --enable flag to turn the database on
  RefTreeDatabase: Allow ORIG_HEAD, etc. on non-bare repositories
  RefTreeDatabase: Expose bootstrap refs in getAdditionalRefs
2016-01-21 00:32:17 -05:00
Shawn Pearce 8d0551dd64 Merge changes from topic 'ketch'
* changes:
  daemon: Add --ketch=LEADER flag
  Ketch: Intercept push and route it through Ketch
  Ketch: Simple map of running leader instances
  Ketch: Basic replication system
2016-01-20 23:15:09 -05:00
Shawn Pearce 7b6122908b Merge "TreeWalk: Remove CorruptObjectException from addTree(AbstractTreeIterator)" 2016-01-20 11:03:47 -05:00
Shawn Pearce 2262a794b4 TreeWalk: Remove CorruptObjectException from addTree(AbstractTreeIterator)
This form of addTree() does not parse any objects and cannot throw the
declared checked exception.  Callers are being forced to try-catch
CorruptObjectException that cannot occur when the iterator instance
has already been constructed.

Change-Id: Id338035302903bab81569d1576eab063eee0885a
2016-01-20 07:41:08 -08:00
Christian Halstrick 7182cb2a26 Fix ResetCommand to return the resulting ref
ResetCommand was not returning the updated ref as a result of the call()
method. Since the ResetCommand is always updating the same ref (HEAD)
this should always be the HEAD ref.

Bug: 440750
Change-Id: I7974975c3ab05e68c208384e69cf0692ded6e8db
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-01-20 11:27:31 +01:00
Christian Halstrick da43d8d798 Add option to allow empty commits to CommitCommand
CommitCommand should allow to specify whether empty commits (commits
having the same tree as the sole predecessor commit) are allowed or not.
Similar to native git's "--allow-empty" flag.

The defaults differ between JGit and native git even after this change.
When not specifying paths then by default JGit allows to create empty
commits while native git does not. It would be API breaking to change
this now.

Bug: 460301
Change-Id: I88feb0c3ffb2c686b1d0594e669729b065cda4cb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-01-20 11:14:19 +01:00
Shawn Pearce da5ef91ad0 daemon: Add --ketch=LEADER flag
Experimental flag to turn on the KetchLeader within this daemon JVM.
This is a manually elected leader process, set from the command line.
Remote followers for each repository are configured per-repository
using remote sections with ketch-type = FULL. For example:

Manually elected leader's $GIT_DIR/config:

  [ketch]
    name = A

  [remote "A"]
    ketch-type = FULL

  [remote "B"]
    url = git://127.0.0.1:9421/sample.git
    ketch-type = FULL

  [remote "C"]
    url = git://127.0.0.1:9422/sample.git
    ketch-type = FULL

Replica B and C daemons:

  git daemon \
    --export-all \
    --enable=receive-pack \
    --listen=127.0.0.1 --port=9421 \
    --base-path=$HOME/ketch_test/follower_one \
    $HOME/ketch_test/follower_one &

  git daemon \
    --export-all \
    --enable=receive-pack \
    --listen=127.0.0.1 --port=9422 \
    --base-path=$HOME/ketch_test/follower_two \
    $HOME/ketch_test/follower_two &

Change-Id: I165f85970a77e16b5263115290d685d8a00566f5
2016-01-19 23:05:28 -08:00
Shawn Pearce 1f9d205043 Ketch: Intercept push and route it through Ketch
Capture commands and pass to the in-process KetchLeader, allowing
it to replicate to followers.

Change-Id: I25dfeb2a93821af65354337f391480a72bae2210
2016-01-19 23:04:41 -08:00
Shawn Pearce b718e3d304 Ketch: Simple map of running leader instances
Supports use in basic daemons where RepositoryCache is also effective.

Change-Id: Ia736b32c2c710b5a802233badc0d30818de763cd
2016-01-19 23:03:35 -08:00
Shawn Pearce 9b33f4aeeb Ketch: Basic replication system
Git Ketch is a multi-master Git repository management system.  Writes
are successful only if a majority of participant servers agree.  Acked
writes are durable against server failures as a majority of the
participants store all required objects.

Git Ketch is modeled on the Raft Consensus Algorithm[1].  A ketch
sailing vessel is faster and more nimble than a raft.  It can also
carry more source codes.

Git Ketch front-loads replication costs, which vaguely resembles a
ketch sailing vessel's distinguishing feature of the main mast on the
front of the ship.

[1] https://raft.github.io/
Change-Id: Ib378dab068961fc7de624cd96030266660b64fb4
2016-01-19 23:03:32 -08:00
David Pursehouse aca07fac46 Merge branch 'stable-4.2'
* stable-4.2:
  CheckoutCommandTest: Create Git instances in try-with-resource
  BranchCommandTest: Create Git instances in try-with-resource
  CheckoutTest: Create Git instances in try-with-resource
  BranchTest: Create Git instances in try-with-resource
  URIishTest: Use @Test annotation's `expected` argument
  Suppress "The allocated object is never used" warning in tests
  Add $NON-NLS to suppress "Non-externalized string literal" warnings
  Don't use deprecated constructors of CmdLineException
  Prepare 4.2.0-SNAPSHOT builds
  Remove org.eclipse.jgit.updatesite project from tools/version.sh
  RevParse: Remove superfluous semicolon
  RefUpdateTest: Use try-with-resource for auto-closable types
  RefUpdateTest: Add null check to prevent potential NPE
  CommitCommand: Remove redundant null check
  JGit v4.2.0.201512141825-rc1

Change-Id: I2179859289b2f2e3d0b7c6d02ef7e7890c467f7b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-01-20 09:45:48 +09:00
Dave Borowitz 2ccea7f05a ChangeIdUtil: Don't throw IOException
This could have only happened during the getBytes call. Instead, use
Constants.encode, which is a non-throwing implementation.

This change is binary compatible with existing code compiled against
older versions of JGit, although it might break compilation of
previously compiling code due to dead catch blocks.

Change-Id: I191fec5cac718657407230de141440e86d0151fb
2016-01-19 17:59:19 -05:00
Shawn Pearce a693d7b33c Merge "Transport: Implement AutoCloseable" 2016-01-19 17:36:39 -05:00
Shawn Pearce 6b662af76e Transport: Implement AutoCloseable
After creating a Transport instance callers should always call
its close() method. Use AutoCloseable to document this idiom
and allow use of try-with-resources.

Change-Id: I0c6ff3e39ebecdd7a028dbcae1856a818937b186
2016-01-19 14:27:11 -08:00
Shawn Pearce 68a6d0c0ab Merge changes from topic 'deadtree'
* changes:
  Ignore API errors about Tree, TreeEntry, FileTreeEntry and friends being removed
  Revert "Revert "Remove deprecated Tree, TreeEntry, FileTreeEntry and friends""
2016-01-19 17:08:54 -05:00
Shawn Pearce 9d3b56a905 Merge "ReceiveCommand.abort(): Utility to mark batch of commands as failed" 2016-01-19 15:54:07 -05:00
Shawn Pearce 462017e02b Ignore API errors about Tree, TreeEntry, FileTreeEntry and friends being
removed

Bug: 486105
Change-Id: I04adcdb68bee7d5f608bb7ab959fe36a890f9ecd
2016-01-19 18:49:11 +01:00
Andrey Loskutov 7f31a9c9ad Revert "Revert "Remove deprecated Tree, TreeEntry, FileTreeEntry and
friends""

This reverts commit 2cc80187d3.

Bug: 486105
Change-Id: Id4f9987c33d66cbed9de6e4d4d6784afdd01a3cf
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
2016-01-19 18:48:48 +01:00
David Pursehouse 9ddc0ed83d Add $NON-NLS to suppress "Non-externalized string literal" warnings
Change-Id: I3e6f83ad2bc7d493e2c1ab5a8c60affa2b49c386
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-01-19 17:27:45 +01:00