diff tests/test-bundle.t @ 26758:bde7ef23340d

commands: support consuming stream clone bundles For the same reasons that we don't produce stream clone bundles with `hg bundle`, we don't support consuming stream clone bundles with `hg unbundle`. We introduce a complementary debug command for applying stream clone bundles. This command is mostly to facilitate testing. Although it may be used to manually apply stream clone bundles until a more formal mechanism is (possibly) adopted.
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 15 Oct 2015 13:43:18 -0700
parents 43708f92f471
children 608cabec1b15
line wrap: on
line diff
--- a/tests/test-bundle.t	Sat Oct 17 11:40:29 2015 -0700
+++ b/tests/test-bundle.t	Thu Oct 15 13:43:18 2015 -0700
@@ -288,6 +288,26 @@
   0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 00 64 61 |elta,revlogv1.da|
   0030: 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 03 00 01 |ta/foo.i.64.....|
 
+Unpacking packed1 bundles with "hg unbundle" isn't allowed
+
+  $ hg init packed
+  $ hg -R packed unbundle packed.hg
+  abort: packed bundles cannot be applied with "hg unbundle"
+  (use "hg debugapplystreamclonebundle")
+  [255]
+
+packed1 can be consumed from debug command
+
+  $ hg -R packed debugapplystreamclonebundle packed.hg
+  6 files to transfer, 2.55 KB of data
+  transferred 2.55 KB in *.* seconds (*) (glob)
+
+Does not work on non-empty repo
+
+  $ hg -R packed debugapplystreamclonebundle packed.hg
+  abort: cannot apply stream clone bundle on non-empty repo
+  [255]
+
 Create partial clones
 
   $ rm -r empty