diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2010-07-22 11:17:00 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2010-07-22 14:56:34 -0700 |
commit | fa9b225e06f16ca7fd7ffca5689f4af0942a73e1 (patch) | |
tree | d85054426a826f9b1495186d41252d0130f33407 /org.eclipse.jgit.test/tst/org/eclipse/jgit/api | |
parent | ab062caa2255054cca413985bbaa3ad7c1c9c383 (diff) | |
parent | 12fe0f2d1eb18aab2964532e99d11d4311d558eb (diff) | |
download | jgit-fa9b225e06f16ca7fd7ffca5689f4af0942a73e1.tar.gz jgit-fa9b225e06f16ca7fd7ffca5689f4af0942a73e1.zip |
Merge branch 'delta'
* delta: (103 commits)
Discard the uncompressed delta as soon as its compressed
Honor pack.windowlimit to cap memory usage during packing
Honor pack.threads and perform delta search in parallel
Cache small deltas during packing
Implement delta generation during packing
debug-show-packdelta: Dump a pack delta to the console
Initial pack format delta generator
Add debugging toString() method to ObjectToPack
Make ObjectToPack clearReuseAsIs signal available to subclasses
Correctly classify the compressing objects phase
Refactor ObjectToPack's delta depth setting
Configure core.bigFileThreshold into PackWriter
Add doNotDelta flag to ObjectToPack
Add more configuration options to PackWriter
Save object path hash codes during packing
Add path hash code to ObjectWalk
Add getObjectSize to ObjectReader
Allow TemporaryBuffer.Heap to allocate smaller than 8 KiB
Define a constant for 127 in DeltaEncoder
Cap delta copy instructions at 64k
...
Conflicts:
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java
org.eclipse.jgit/resources/org/eclipse/jgit/JGitText.properties
org.eclipse.jgit/src/org/eclipse/jgit/JGitText.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteTreeFilter.java
Change-Id: I7c7a05e443a48d32c836173a409ee7d340c70796
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/api')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java | 44 | ||||
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java | 18 |
2 files changed, 31 insertions, 31 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java index ab011807cb..9e195b4974 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java @@ -78,7 +78,7 @@ public class AddCommandTest extends RepositoryTestCase { } public void testAddExistingSingleFile() throws IOException, NoFilepatternException { - File file = new File(db.getWorkDir(), "a.txt"); + File file = new File(db.getWorkTree(), "a.txt"); file.createNewFile(); PrintWriter writer = new PrintWriter(file); writer.print("content"); @@ -98,8 +98,8 @@ public class AddCommandTest extends RepositoryTestCase { } public void testAddExistingSingleFileInSubDir() throws IOException, NoFilepatternException { - new File(db.getWorkDir(), "sub").mkdir(); - File file = new File(db.getWorkDir(), "sub/a.txt"); + new File(db.getWorkTree(), "sub").mkdir(); + File file = new File(db.getWorkTree(), "sub/a.txt"); file.createNewFile(); PrintWriter writer = new PrintWriter(file); writer.print("content"); @@ -119,7 +119,7 @@ public class AddCommandTest extends RepositoryTestCase { } public void testAddExistingSingleFileTwice() throws IOException, NoFilepatternException { - File file = new File(db.getWorkDir(), "a.txt"); + File file = new File(db.getWorkTree(), "a.txt"); file.createNewFile(); PrintWriter writer = new PrintWriter(file); writer.print("content"); @@ -143,7 +143,7 @@ public class AddCommandTest extends RepositoryTestCase { } public void testAddExistingSingleFileTwiceWithCommit() throws Exception { - File file = new File(db.getWorkDir(), "a.txt"); + File file = new File(db.getWorkTree(), "a.txt"); file.createNewFile(); PrintWriter writer = new PrintWriter(file); writer.print("content"); @@ -169,7 +169,7 @@ public class AddCommandTest extends RepositoryTestCase { } public void testAddRemovedFile() throws Exception { - File file = new File(db.getWorkDir(), "a.txt"); + File file = new File(db.getWorkTree(), "a.txt"); file.createNewFile(); PrintWriter writer = new PrintWriter(file); writer.print("content"); @@ -191,7 +191,7 @@ public class AddCommandTest extends RepositoryTestCase { } public void testAddRemovedCommittedFile() throws Exception { - File file = new File(db.getWorkDir(), "a.txt"); + File file = new File(db.getWorkTree(), "a.txt"); file.createNewFile(); PrintWriter writer = new PrintWriter(file); writer.print("content"); @@ -217,20 +217,20 @@ public class AddCommandTest extends RepositoryTestCase { public void testAddWithConflicts() throws Exception { // prepare conflict - File file = new File(db.getWorkDir(), "a.txt"); + File file = new File(db.getWorkTree(), "a.txt"); file.createNewFile(); PrintWriter writer = new PrintWriter(file); writer.print("content"); writer.close(); - File file2 = new File(db.getWorkDir(), "b.txt"); + File file2 = new File(db.getWorkTree(), "b.txt"); file2.createNewFile(); writer = new PrintWriter(file2); writer.print("content b"); writer.close(); ObjectWriter ow = new ObjectWriter(db); - DirCache dc = DirCache.lock(db); + DirCache dc = db.lockDirCache(); DirCacheBuilder builder = dc.builder(); addEntryToBuilder("b.txt", file2, ow, builder, 0); @@ -264,13 +264,13 @@ public class AddCommandTest extends RepositoryTestCase { } public void testAddTwoFiles() throws Exception { - File file = new File(db.getWorkDir(), "a.txt"); + File file = new File(db.getWorkTree(), "a.txt"); file.createNewFile(); PrintWriter writer = new PrintWriter(file); writer.print("content"); writer.close(); - File file2 = new File(db.getWorkDir(), "b.txt"); + File file2 = new File(db.getWorkTree(), "b.txt"); file2.createNewFile(); writer = new PrintWriter(file2); writer.print("content b"); @@ -287,14 +287,14 @@ public class AddCommandTest extends RepositoryTestCase { } public void testAddFolder() throws Exception { - new File(db.getWorkDir(), "sub").mkdir(); - File file = new File(db.getWorkDir(), "sub/a.txt"); + new File(db.getWorkTree(), "sub").mkdir(); + File file = new File(db.getWorkTree(), "sub/a.txt"); file.createNewFile(); PrintWriter writer = new PrintWriter(file); writer.print("content"); writer.close(); - File file2 = new File(db.getWorkDir(), "sub/b.txt"); + File file2 = new File(db.getWorkTree(), "sub/b.txt"); file2.createNewFile(); writer = new PrintWriter(file2); writer.print("content b"); @@ -311,20 +311,20 @@ public class AddCommandTest extends RepositoryTestCase { } public void testAddIgnoredFile() throws Exception { - new File(db.getWorkDir(), "sub").mkdir(); - File file = new File(db.getWorkDir(), "sub/a.txt"); + new File(db.getWorkTree(), "sub").mkdir(); + File file = new File(db.getWorkTree(), "sub/a.txt"); file.createNewFile(); PrintWriter writer = new PrintWriter(file); writer.print("content"); writer.close(); - File ignoreFile = new File(db.getWorkDir(), ".gitignore"); + File ignoreFile = new File(db.getWorkTree(), ".gitignore"); ignoreFile.createNewFile(); writer = new PrintWriter(ignoreFile); writer.print("sub/b.txt"); writer.close(); - File file2 = new File(db.getWorkDir(), "sub/b.txt"); + File file2 = new File(db.getWorkTree(), "sub/b.txt"); file2.createNewFile(); writer = new PrintWriter(file2); writer.print("content b"); @@ -339,14 +339,14 @@ public class AddCommandTest extends RepositoryTestCase { } public void testAddWholeRepo() throws Exception { - new File(db.getWorkDir(), "sub").mkdir(); - File file = new File(db.getWorkDir(), "sub/a.txt"); + new File(db.getWorkTree(), "sub").mkdir(); + File file = new File(db.getWorkTree(), "sub/a.txt"); file.createNewFile(); PrintWriter writer = new PrintWriter(file); writer.print("content"); writer.close(); - File file2 = new File(db.getWorkDir(), "sub/b.txt"); + File file2 = new File(db.getWorkTree(), "sub/b.txt"); file2.createNewFile(); writer = new PrintWriter(file2); writer.print("content b"); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java index c965c67664..773d2f0556 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java @@ -100,20 +100,20 @@ public class MergeCommandTest extends RepositoryTestCase { addNewFileToIndex("file1"); RevCommit first = git.commit().setMessage("initial commit").call(); - assertTrue(new File(db.getWorkDir(), "file1").exists()); + assertTrue(new File(db.getWorkTree(), "file1").exists()); createBranch(first, "refs/heads/branch1"); addNewFileToIndex("file2"); RevCommit second = git.commit().setMessage("second commit").call(); - assertTrue(new File(db.getWorkDir(), "file2").exists()); + assertTrue(new File(db.getWorkTree(), "file2").exists()); checkoutBranch("refs/heads/branch1"); - assertFalse(new File(db.getWorkDir(), "file2").exists()); + assertFalse(new File(db.getWorkTree(), "file2").exists()); MergeResult result = git.merge().include(db.getRef(Constants.MASTER)).call(); - assertTrue(new File(db.getWorkDir(), "file1").exists()); - assertTrue(new File(db.getWorkDir(), "file2").exists()); + assertTrue(new File(db.getWorkTree(), "file1").exists()); + assertTrue(new File(db.getWorkTree(), "file2").exists()); assertEquals(MergeResult.MergeStatus.FAST_FORWARD, result.getMergeStatus()); assertEquals(second, result.getNewHead()); } @@ -132,8 +132,8 @@ public class MergeCommandTest extends RepositoryTestCase { git.commit().setMessage("third commit").call(); checkoutBranch("refs/heads/branch1"); - assertFalse(new File(db.getWorkDir(), "file2").exists()); - assertFalse(new File(db.getWorkDir(), "file3").exists()); + assertFalse(new File(db.getWorkTree(), "file2").exists()); + assertFalse(new File(db.getWorkTree(), "file3").exists()); MergeCommand merge = git.merge(); merge.include(second.getId()); @@ -152,7 +152,7 @@ public class MergeCommandTest extends RepositoryTestCase { } private void checkoutBranch(String branchName) throws Exception { - File workDir = db.getWorkDir(); + File workDir = db.getWorkTree(); if (workDir != null) { WorkDirCheckout workDirCheckout = new WorkDirCheckout(db, workDir, db.mapCommit(Constants.HEAD).getTree(), @@ -176,7 +176,7 @@ public class MergeCommandTest extends RepositoryTestCase { File writeTrashFile = writeTrashFile(filename, filename); GitIndex index = db.getIndex(); - Entry entry = index.add(db.getWorkDir(), writeTrashFile); + Entry entry = index.add(db.getWorkTree(), writeTrashFile); entry.update(writeTrashFile); index.write(); } |