diff options
author | Masaya Suzuki <masayasuzuki@google.com> | 2019-07-23 12:54:43 -0700 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2019-11-13 15:57:04 -0800 |
commit | 3e9a5f993b808f0027760054fd862d7f149d07d8 (patch) | |
tree | 65806f427ba6e83d42c411f9026d1c614946786e /org.eclipse.jgit.test | |
parent | fd798d326ebfc72f5a465584b74a2526738d1e15 (diff) | |
download | jgit-3e9a5f993b808f0027760054fd862d7f149d07d8.tar.gz jgit-3e9a5f993b808f0027760054fd862d7f149d07d8.zip |
transport: Merge BaseReceivePack into ReceivePack
Move the BaseReceivePack implementation back into ReceivePack. This is a
backward-incompatible change. For example, BaseReceivePack.FirstLine no
longer exists and cannot be referenced. However, most of the code
should just work by replacing BaseReceivePack with ReceivePack.
Although this is an API change, it only affects callers using JGit as a
server, and there are very few of those in the wild.
Change-Id: I1ce92869435d5eebb7d671be44561e69c6233134
Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushCertificateParserTest.java | 2 | ||||
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java | 2 | ||||
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackTest.java (renamed from org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/BaseReceivePackTest.java) | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushCertificateParserTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushCertificateParserTest.java index 4bf26b6288..5db4563ba6 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushCertificateParserTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushCertificateParserTest.java @@ -145,7 +145,7 @@ public class PushCertificateParserTest { ObjectId newId = ObjectId.fromString("deadbeefdeadbeefdeadbeefdeadbeefdeadbeef"); String line = oldId.name() + " " + newId.name() + " refs/heads/master"; - ReceiveCommand cmd = BaseReceivePack.parseCommand(line); + ReceiveCommand cmd = ReceivePack.parseCommand(line); parser.addCommand(cmd); parser.addCommand(line); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java index 5d208eea73..89ac2fe96d 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java @@ -174,7 +174,7 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas ReceivePack rp = super.createReceivePack(dst); rp.setAdvertiseRefsHook(new AdvertiseRefsHook() { @Override - public void advertiseRefs(BaseReceivePack rp2) + public void advertiseRefs(ReceivePack rp2) throws ServiceMayNotContinueException { rp.setAdvertisedRefs(rp.getRepository().getAllRefs(), null); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/BaseReceivePackTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackTest.java index 7578c6e3eb..156746d79f 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/BaseReceivePackTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackTest.java @@ -49,14 +49,14 @@ import org.eclipse.jgit.errors.PackProtocolException; import org.eclipse.jgit.lib.ObjectId; import org.junit.Test; -/** Tests for base receive-pack utilities. */ -public class BaseReceivePackTest { +/** Tests for receive-pack utilities. */ +public class ReceivePackTest { @Test public void parseCommand() throws Exception { String o = "0000000000000000000000000000000000000000"; String n = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef"; String r = "refs/heads/master"; - ReceiveCommand cmd = BaseReceivePack.parseCommand(o + " " + n + " " + r); + ReceiveCommand cmd = ReceivePack.parseCommand(o + " " + n + " " + r); assertEquals(ObjectId.zeroId(), cmd.getOldId()); assertEquals("deadbeefdeadbeefdeadbeefdeadbeefdeadbeef", cmd.getNewId().name()); @@ -76,7 +76,7 @@ public class BaseReceivePackTest { private void assertParseCommandFails(String input) { try { - BaseReceivePack.parseCommand(input); + ReceivePack.parseCommand(input); fail(); } catch (PackProtocolException e) { // Expected. |