tests/test-clone-stream.t
branchstable
changeset 48796 c00d3ce4e94b
parent 48693 de3ac3d2c60b
child 48968 4a8eff64860a
equal deleted inserted replaced
48776:b84ff512b645 48796:c00d3ce4e94b
     8   > bundle2.stream = no
     8   > bundle2.stream = no
     9   > EOF
     9   > EOF
    10 #endif
    10 #endif
    11 
    11 
    12 Initialize repository
    12 Initialize repository
    13 the status call is to check for issue5130
       
    14 
    13 
    15   $ hg init server
    14   $ hg init server
    16   $ cd server
    15   $ cd server
    17   $ touch foo
    16   $ sh $TESTDIR/testlib/stream_clone_setup.sh
    18   $ hg -q commit -A -m initial
       
    19   >>> for i in range(1024):
       
    20   ...     with open(str(i), 'wb') as fh:
       
    21   ...         fh.write(b"%d" % i) and None
       
    22   $ hg -q commit -A -m 'add a lot of files'
       
    23   $ hg st
       
    24 
       
    25 add files with "tricky" name:
       
    26 
       
    27   $ echo foo > 00changelog.i
       
    28   $ echo foo > 00changelog.d
       
    29   $ echo foo > 00changelog.n
       
    30   $ echo foo > 00changelog-ab349180a0405010.nd
       
    31   $ echo foo > 00manifest.i
       
    32   $ echo foo > 00manifest.d
       
    33   $ echo foo > foo.i
       
    34   $ echo foo > foo.d
       
    35   $ echo foo > foo.n
       
    36   $ echo foo > undo.py
       
    37   $ echo foo > undo.i
       
    38   $ echo foo > undo.d
       
    39   $ echo foo > undo.n
       
    40   $ echo foo > undo.foo.i
       
    41   $ echo foo > undo.foo.d
       
    42   $ echo foo > undo.foo.n
       
    43   $ echo foo > undo.babar
       
    44   $ mkdir savanah
       
    45   $ echo foo > savanah/foo.i
       
    46   $ echo foo > savanah/foo.d
       
    47   $ echo foo > savanah/foo.n
       
    48   $ echo foo > savanah/undo.py
       
    49   $ echo foo > savanah/undo.i
       
    50   $ echo foo > savanah/undo.d
       
    51   $ echo foo > savanah/undo.n
       
    52   $ echo foo > savanah/undo.foo.i
       
    53   $ echo foo > savanah/undo.foo.d
       
    54   $ echo foo > savanah/undo.foo.n
       
    55   $ echo foo > savanah/undo.babar
       
    56   $ mkdir data
       
    57   $ echo foo > data/foo.i
       
    58   $ echo foo > data/foo.d
       
    59   $ echo foo > data/foo.n
       
    60   $ echo foo > data/undo.py
       
    61   $ echo foo > data/undo.i
       
    62   $ echo foo > data/undo.d
       
    63   $ echo foo > data/undo.n
       
    64   $ echo foo > data/undo.foo.i
       
    65   $ echo foo > data/undo.foo.d
       
    66   $ echo foo > data/undo.foo.n
       
    67   $ echo foo > data/undo.babar
       
    68   $ mkdir meta
       
    69   $ echo foo > meta/foo.i
       
    70   $ echo foo > meta/foo.d
       
    71   $ echo foo > meta/foo.n
       
    72   $ echo foo > meta/undo.py
       
    73   $ echo foo > meta/undo.i
       
    74   $ echo foo > meta/undo.d
       
    75   $ echo foo > meta/undo.n
       
    76   $ echo foo > meta/undo.foo.i
       
    77   $ echo foo > meta/undo.foo.d
       
    78   $ echo foo > meta/undo.foo.n
       
    79   $ echo foo > meta/undo.babar
       
    80   $ mkdir store
       
    81   $ echo foo > store/foo.i
       
    82   $ echo foo > store/foo.d
       
    83   $ echo foo > store/foo.n
       
    84   $ echo foo > store/undo.py
       
    85   $ echo foo > store/undo.i
       
    86   $ echo foo > store/undo.d
       
    87   $ echo foo > store/undo.n
       
    88   $ echo foo > store/undo.foo.i
       
    89   $ echo foo > store/undo.foo.d
       
    90   $ echo foo > store/undo.foo.n
       
    91   $ echo foo > store/undo.babar
       
    92 
       
    93 Name with special characters
       
    94 
       
    95   $ echo foo > store/CélesteVille_is_a_Capital_City
       
    96 
       
    97 name causing issue6581
       
    98 
       
    99   $ mkdir -p container/isam-build-centos7/
       
   100   $ touch container/isam-build-centos7/bazel-coverage-generator-sandboxfs-compatibility-0758e3e4f6057904d44399bd666faba9e7f40686.patch
       
   101 
       
   102 Add all that
       
   103 
       
   104   $ hg add .
       
   105   adding 00changelog-ab349180a0405010.nd
    17   adding 00changelog-ab349180a0405010.nd
   106   adding 00changelog.d
    18   adding 00changelog.d
   107   adding 00changelog.i
    19   adding 00changelog.i
   108   adding 00changelog.n
    20   adding 00changelog.n
   109   adding 00manifest.d
    21   adding 00manifest.d
   163   adding undo.foo.i
    75   adding undo.foo.i
   164   adding undo.foo.n
    76   adding undo.foo.n
   165   adding undo.i
    77   adding undo.i
   166   adding undo.n
    78   adding undo.n
   167   adding undo.py
    79   adding undo.py
   168   $ hg ci -m 'add files with "tricky" name'
    80 
   169   $ hg --config server.uncompressed=false serve -p $HGPORT -d --pid-file=hg.pid
    81   $ hg --config server.uncompressed=false serve -p $HGPORT -d --pid-file=hg.pid
   170   $ cat hg.pid > $DAEMON_PIDS
    82   $ cat hg.pid > $DAEMON_PIDS
   171   $ cd ..
    83   $ cd ..
   172 
    84 
   173 Check local clone
    85 Check local clone
   382   content-type: application/mercurial-0.2
   294   content-type: application/mercurial-0.2
   383   
   295   
   384 
   296 
   385 #if no-zstd no-rust
   297 #if no-zstd no-rust
   386   $ f --size --hex --bytes 256 body
   298   $ f --size --hex --bytes 256 body
   387   body: size=119153
   299   body: size=119123
   388   0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
   300   0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
   389   0010: 80 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......|
   301   0010: 62 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |b.STREAM2.......|
   390   0020: 06 09 04 0c 44 62 79 74 65 63 6f 75 6e 74 31 30 |....Dbytecount10|
   302   0020: 06 09 04 0c 26 62 79 74 65 63 6f 75 6e 74 31 30 |....&bytecount10|
   391   0030: 34 31 31 35 66 69 6c 65 63 6f 75 6e 74 31 30 39 |4115filecount109|
   303   0030: 34 31 31 35 66 69 6c 65 63 6f 75 6e 74 31 30 39 |4115filecount109|
   392   0040: 33 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |3requirementsdot|
   304   0040: 33 72 65 71 75 69 72 65 6d 65 6e 74 73 67 65 6e |3requirementsgen|
   393   0050: 65 6e 63 6f 64 65 25 32 43 66 6e 63 61 63 68 65 |encode%2Cfncache|
   305   0050: 65 72 61 6c 64 65 6c 74 61 25 32 43 72 65 76 6c |eraldelta%2Crevl|
   394   0060: 25 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 25 |%2Cgeneraldelta%|
   306   0060: 6f 67 76 31 25 32 43 73 70 61 72 73 65 72 65 76 |ogv1%2Csparserev|
   395   0070: 32 43 72 65 76 6c 6f 67 76 31 25 32 43 73 70 61 |2Crevlogv1%2Cspa|
   307   0070: 6c 6f 67 00 00 80 00 73 08 42 64 61 74 61 2f 30 |log....s.Bdata/0|
   396   0080: 72 73 65 72 65 76 6c 6f 67 25 32 43 73 74 6f 72 |rserevlog%2Cstor|
   308   0080: 2e 69 00 03 00 01 00 00 00 00 00 00 00 02 00 00 |.i..............|
   397   0090: 65 00 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 |e....s.Bdata/0.i|
   309   0090: 00 01 00 00 00 00 00 00 00 01 ff ff ff ff ff ff |................|
   398   00a0: 00 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 |................|
   310   00a0: ff ff 80 29 63 a0 49 d3 23 87 bf ce fe 56 67 92 |...)c.I.#....Vg.|
   399   00b0: 00 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff |................|
   311   00b0: 67 2c 69 d1 ec 39 00 00 00 00 00 00 00 00 00 00 |g,i..9..........|
   400   00c0: 80 29 63 a0 49 d3 23 87 bf ce fe 56 67 92 67 2c |.)c.I.#....Vg.g,|
   312   00c0: 00 00 75 30 73 26 45 64 61 74 61 2f 30 30 63 68 |..u0s&Edata/00ch|
   401   00d0: 69 d1 ec 39 00 00 00 00 00 00 00 00 00 00 00 00 |i..9............|
   313   00d0: 61 6e 67 65 6c 6f 67 2d 61 62 33 34 39 31 38 30 |angelog-ab349180|
   402   00e0: 75 30 73 26 45 64 61 74 61 2f 30 30 63 68 61 6e |u0s&Edata/00chan|
   314   00e0: 61 30 34 30 35 30 31 30 2e 6e 64 2e 69 00 03 00 |a0405010.nd.i...|
   403   00f0: 67 65 6c 6f 67 2d 61 62 33 34 39 31 38 30 61 30 |gelog-ab349180a0|
   315   00f0: 01 00 00 00 00 00 00 00 05 00 00 00 04 00 00 00 |................|
   404 #endif
   316 #endif
   405 #if zstd no-rust
   317 #if zstd no-rust
   406   $ f --size --hex --bytes 256 body
   318   $ f --size --hex --bytes 256 body
   407   body: size=116340 (no-bigendian !)
   319   body: size=116310
   408   body: size=116335 (bigendian !)
   320   body: size=116335 (bigendian !)
   409   0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
   321   0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
   410   0010: 9a 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......|
   322   0010: 7c 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 ||.STREAM2.......|
   411   0020: 06 09 04 0c 5e 62 79 74 65 63 6f 75 6e 74 31 30 |....^bytecount10|
   323   0020: 06 09 04 0c 40 62 79 74 65 63 6f 75 6e 74 31 30 |....@bytecount10|
   412   0030: 31 32 37 36 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1276filecount109| (no-bigendian !)
   324   0030: 31 32 37 36 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1276filecount109| (no-bigendian !)
   413   0030: 31 32 37 31 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1271filecount109| (bigendian !)
   325   0030: 31 32 37 31 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1271filecount109| (bigendian !)
   414   0040: 33 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |3requirementsdot|
   326   0040: 33 72 65 71 75 69 72 65 6d 65 6e 74 73 67 65 6e |3requirementsgen|
   415   0050: 65 6e 63 6f 64 65 25 32 43 66 6e 63 61 63 68 65 |encode%2Cfncache|
   327   0050: 65 72 61 6c 64 65 6c 74 61 25 32 43 72 65 76 6c |eraldelta%2Crevl|
   416   0060: 25 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 25 |%2Cgeneraldelta%|
   328   0060: 6f 67 2d 63 6f 6d 70 72 65 73 73 69 6f 6e 2d 7a |og-compression-z|
   417   0070: 32 43 72 65 76 6c 6f 67 2d 63 6f 6d 70 72 65 73 |2Crevlog-compres|
   329   0070: 73 74 64 25 32 43 72 65 76 6c 6f 67 76 31 25 32 |std%2Crevlogv1%2|
   418   0080: 73 69 6f 6e 2d 7a 73 74 64 25 32 43 72 65 76 6c |sion-zstd%2Crevl|
   330   0080: 43 73 70 61 72 73 65 72 65 76 6c 6f 67 00 00 80 |Csparserevlog...|
   419   0090: 6f 67 76 31 25 32 43 73 70 61 72 73 65 72 65 76 |ogv1%2Csparserev|
   331   0090: 00 73 08 42 64 61 74 61 2f 30 2e 69 00 03 00 01 |.s.Bdata/0.i....|
   420   00a0: 6c 6f 67 25 32 43 73 74 6f 72 65 00 00 80 00 73 |log%2Cstore....s|
   332   00a0: 00 00 00 00 00 00 00 02 00 00 00 01 00 00 00 00 |................|
   421   00b0: 08 42 64 61 74 61 2f 30 2e 69 00 03 00 01 00 00 |.Bdata/0.i......|
   333   00b0: 00 00 00 01 ff ff ff ff ff ff ff ff 80 29 63 a0 |.............)c.|
   422   00c0: 00 00 00 00 00 02 00 00 00 01 00 00 00 00 00 00 |................|
   334   00c0: 49 d3 23 87 bf ce fe 56 67 92 67 2c 69 d1 ec 39 |I.#....Vg.g,i..9|
   423   00d0: 00 01 ff ff ff ff ff ff ff ff 80 29 63 a0 49 d3 |...........)c.I.|
   335   00d0: 00 00 00 00 00 00 00 00 00 00 00 00 75 30 73 26 |............u0s&|
   424   00e0: 23 87 bf ce fe 56 67 92 67 2c 69 d1 ec 39 00 00 |#....Vg.g,i..9..|
   336   00e0: 45 64 61 74 61 2f 30 30 63 68 61 6e 67 65 6c 6f |Edata/00changelo|
   425   00f0: 00 00 00 00 00 00 00 00 00 00 75 30 73 26 45 64 |..........u0s&Ed|
   337   00f0: 67 2d 61 62 33 34 39 31 38 30 61 30 34 30 35 30 |g-ab349180a04050|
   426 #endif
   338 #endif
   427 #if zstd rust no-dirstate-v2
   339 #if zstd rust no-dirstate-v2
   428   $ f --size --hex --bytes 256 body
   340   $ f --size --hex --bytes 256 body
   429   body: size=116361
   341   body: size=116310
   430   0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
   342   0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
   431   0010: af 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......|
   343   0010: 7c 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 ||.STREAM2.......|
   432   0020: 06 09 04 0c 73 62 79 74 65 63 6f 75 6e 74 31 30 |....sbytecount10|
   344   0020: 06 09 04 0c 40 62 79 74 65 63 6f 75 6e 74 31 30 |....@bytecount10|
   433   0030: 31 32 37 36 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1276filecount109|
   345   0030: 31 32 37 36 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1276filecount109|
   434   0040: 33 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |3requirementsdot|
   346   0040: 33 72 65 71 75 69 72 65 6d 65 6e 74 73 67 65 6e |3requirementsgen|
   435   0050: 65 6e 63 6f 64 65 25 32 43 66 6e 63 61 63 68 65 |encode%2Cfncache|
   347   0050: 65 72 61 6c 64 65 6c 74 61 25 32 43 72 65 76 6c |eraldelta%2Crevl|
   436   0060: 25 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 25 |%2Cgeneraldelta%|
   348   0060: 6f 67 2d 63 6f 6d 70 72 65 73 73 69 6f 6e 2d 7a |og-compression-z|
   437   0070: 32 43 70 65 72 73 69 73 74 65 6e 74 2d 6e 6f 64 |2Cpersistent-nod|
   349   0070: 73 74 64 25 32 43 72 65 76 6c 6f 67 76 31 25 32 |std%2Crevlogv1%2|
   438   0080: 65 6d 61 70 25 32 43 72 65 76 6c 6f 67 2d 63 6f |emap%2Crevlog-co|
   350   0080: 43 73 70 61 72 73 65 72 65 76 6c 6f 67 00 00 80 |Csparserevlog...|
   439   0090: 6d 70 72 65 73 73 69 6f 6e 2d 7a 73 74 64 25 32 |mpression-zstd%2|
   351   0090: 00 73 08 42 64 61 74 61 2f 30 2e 69 00 03 00 01 |.s.Bdata/0.i....|
   440   00a0: 43 72 65 76 6c 6f 67 76 31 25 32 43 73 70 61 72 |Crevlogv1%2Cspar|
   352   00a0: 00 00 00 00 00 00 00 02 00 00 00 01 00 00 00 00 |................|
   441   00b0: 73 65 72 65 76 6c 6f 67 25 32 43 73 74 6f 72 65 |serevlog%2Cstore|
   353   00b0: 00 00 00 01 ff ff ff ff ff ff ff ff 80 29 63 a0 |.............)c.|
   442   00c0: 00 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 00 |....s.Bdata/0.i.|
   354   00c0: 49 d3 23 87 bf ce fe 56 67 92 67 2c 69 d1 ec 39 |I.#....Vg.g,i..9|
   443   00d0: 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 00 |................|
   355   00d0: 00 00 00 00 00 00 00 00 00 00 00 00 75 30 73 26 |............u0s&|
   444   00e0: 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff 80 |................|
   356   00e0: 45 64 61 74 61 2f 30 30 63 68 61 6e 67 65 6c 6f |Edata/00changelo|
   445   00f0: 29 63 a0 49 d3 23 87 bf ce fe 56 67 92 67 2c 69 |)c.I.#....Vg.g,i|
   357   00f0: 67 2d 61 62 33 34 39 31 38 30 61 30 34 30 35 30 |g-ab349180a04050|
   446 #endif
   358 #endif
   447 #if zstd dirstate-v2
   359 #if zstd dirstate-v2
   448   $ f --size --hex --bytes 256 body
   360   $ f --size --hex --bytes 256 body
   449   body: size=109549
   361   body: size=109549
   450   0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
   362   0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|