tests/test-bundle-r.t
changeset 14117 07708f4171f1
parent 13446 1e497df514e2
child 14127 f45c8db21749
equal deleted inserted replaced
14116:cd3032437064 14117:07708f4171f1
     1   $ hg init test
     1   $ hg init test
     2   $ cd test
     2   $ cd test
     3   $ echo "0" >> afile
     3   $ hg unbundle $TESTDIR/bundles/remote.hg
     4   $ hg add afile
     4   adding changesets
     5   $ hg commit -m "0.0"
     5   adding manifests
     6   $ echo "1" >> afile
     6   adding file changes
     7   $ hg commit -m "0.1"
     7   added 9 changesets with 7 changes to 4 files (+1 heads)
     8   $ echo "2" >> afile
     8   (run 'hg heads' to see heads, 'hg merge' to merge)
     9   $ hg commit -m "0.2"
     9   $ hg up tip
    10   $ echo "3" >> afile
       
    11   $ hg commit -m "0.3"
       
    12   $ hg update -C 0
       
    13   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
    10   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
    14   $ echo "1" >> afile
       
    15   $ hg commit -m "1.1"
       
    16   created new head
       
    17   $ echo "2" >> afile
       
    18   $ hg commit -m "1.2"
       
    19   $ echo "a line" > fred
       
    20   $ echo "3" >> afile
       
    21   $ hg add fred
       
    22   $ hg commit -m "1.3"
       
    23   $ hg mv afile adifferentfile
       
    24   $ hg commit -m "1.3m"
       
    25   $ hg update -C 3
       
    26   1 files updated, 0 files merged, 2 files removed, 0 files unresolved
       
    27   $ hg mv afile anotherfile
       
    28   $ hg commit -m "0.3m"
       
    29   $ hg debugindex .hg/store/data/afile.i
       
    30      rev    offset  length   base linkrev nodeid       p1           p2
       
    31        0         0       3      0       0 362fef284ce2 000000000000 000000000000
       
    32        1         3       5      1       1 125144f7e028 362fef284ce2 000000000000
       
    33        2         8       7      2       2 4c982badb186 125144f7e028 000000000000
       
    34        3        15       9      3       3 19b1fc555737 4c982badb186 000000000000
       
    35   $ hg debugindex .hg/store/data/adifferentfile.i
       
    36      rev    offset  length   base linkrev nodeid       p1           p2
       
    37        0         0      75      0       7 2565f3199a74 000000000000 000000000000
       
    38   $ hg debugindex .hg/store/data/anotherfile.i
       
    39      rev    offset  length   base linkrev nodeid       p1           p2
       
    40        0         0      75      0       8 2565f3199a74 000000000000 000000000000
       
    41   $ hg debugindex .hg/store/data/fred.i
       
    42      rev    offset  length   base linkrev nodeid       p1           p2
       
    43        0         0       8      0       6 12ab3bcc5ea4 000000000000 000000000000
       
    44   $ hg debugindex .hg/store/00manifest.i
       
    45      rev    offset  length   base linkrev nodeid       p1           p2
       
    46        0         0      48      0       0 43eadb1d2d06 000000000000 000000000000
       
    47        1        48      48      1       1 8b89697eba2c 43eadb1d2d06 000000000000
       
    48        2        96      48      2       2 626a32663c2f 8b89697eba2c 000000000000
       
    49        3       144      48      3       3 f54c32f13478 626a32663c2f 000000000000
       
    50        4       192      58      3       6 de68e904d169 626a32663c2f 000000000000
       
    51        5       250      68      3       7 09bb521d218d de68e904d169 000000000000
       
    52        6       318      54      6       8 1fde233dfb0f f54c32f13478 000000000000
       
    53   $ hg verify
       
    54   checking changesets
       
    55   checking manifests
       
    56   crosschecking files in changesets and manifests
       
    57   checking files
       
    58   4 files, 9 changesets, 7 total revisions
       
    59   $ cd ..
    11   $ cd ..
       
    12 
    60   $ for i in 0 1 2 3 4 5 6 7 8; do
    13   $ for i in 0 1 2 3 4 5 6 7 8; do
    61   >    mkdir test-"$i"
    14   >    mkdir test-"$i"
    62   >    hg --cwd test-"$i" init
    15   >    hg --cwd test-"$i" init
    63   >    hg -R test bundle -r "$i" test-"$i".hg test-"$i"
    16   >    hg -R test bundle -r "$i" test-"$i".hg test-"$i"
    64   >    cd test-"$i"
    17   >    cd test-"$i"
    77   checking changesets
    30   checking changesets
    78   checking manifests
    31   checking manifests
    79   crosschecking files in changesets and manifests
    32   crosschecking files in changesets and manifests
    80   checking files
    33   checking files
    81   1 files, 1 changesets, 1 total revisions
    34   1 files, 1 changesets, 1 total revisions
    82   0:f9ee2f85a263
    35   0:bfaf4b5cbf01
    83   searching for changes
    36   searching for changes
    84   2 changesets found
    37   2 changesets found
    85   adding changesets
    38   adding changesets
    86   adding manifests
    39   adding manifests
    87   adding file changes
    40   adding file changes
    90   checking changesets
    43   checking changesets
    91   checking manifests
    44   checking manifests
    92   crosschecking files in changesets and manifests
    45   crosschecking files in changesets and manifests
    93   checking files
    46   checking files
    94   1 files, 2 changesets, 2 total revisions
    47   1 files, 2 changesets, 2 total revisions
    95   1:34c2bf6b0626
    48   1:21f32785131f
    96   searching for changes
    49   searching for changes
    97   3 changesets found
    50   3 changesets found
    98   adding changesets
    51   adding changesets
    99   adding manifests
    52   adding manifests
   100   adding file changes
    53   adding file changes
   103   checking changesets
    56   checking changesets
   104   checking manifests
    57   checking manifests
   105   crosschecking files in changesets and manifests
    58   crosschecking files in changesets and manifests
   106   checking files
    59   checking files
   107   1 files, 3 changesets, 3 total revisions
    60   1 files, 3 changesets, 3 total revisions
   108   2:e38ba6f5b7e0
    61   2:4ce51a113780
   109   searching for changes
    62   searching for changes
   110   4 changesets found
    63   4 changesets found
   111   adding changesets
    64   adding changesets
   112   adding manifests
    65   adding manifests
   113   adding file changes
    66   adding file changes
   116   checking changesets
    69   checking changesets
   117   checking manifests
    70   checking manifests
   118   crosschecking files in changesets and manifests
    71   crosschecking files in changesets and manifests
   119   checking files
    72   checking files
   120   1 files, 4 changesets, 4 total revisions
    73   1 files, 4 changesets, 4 total revisions
   121   3:eebf5a27f8ca
    74   3:93ee6ab32777
   122   searching for changes
    75   searching for changes
   123   2 changesets found
    76   2 changesets found
   124   adding changesets
    77   adding changesets
   125   adding manifests
    78   adding manifests
   126   adding file changes
    79   adding file changes
   129   checking changesets
    82   checking changesets
   130   checking manifests
    83   checking manifests
   131   crosschecking files in changesets and manifests
    84   crosschecking files in changesets and manifests
   132   checking files
    85   checking files
   133   1 files, 2 changesets, 2 total revisions
    86   1 files, 2 changesets, 2 total revisions
   134   1:095197eb4973
    87   1:c70afb1ee985
   135   searching for changes
    88   searching for changes
   136   3 changesets found
    89   3 changesets found
   137   adding changesets
    90   adding changesets
   138   adding manifests
    91   adding manifests
   139   adding file changes
    92   adding file changes
   142   checking changesets
    95   checking changesets
   143   checking manifests
    96   checking manifests
   144   crosschecking files in changesets and manifests
    97   crosschecking files in changesets and manifests
   145   checking files
    98   checking files
   146   1 files, 3 changesets, 3 total revisions
    99   1 files, 3 changesets, 3 total revisions
   147   2:1bb50a9436a7
   100   2:f03ae5a9b979
   148   searching for changes
   101   searching for changes
   149   4 changesets found
   102   4 changesets found
   150   adding changesets
   103   adding changesets
   151   adding manifests
   104   adding manifests
   152   adding file changes
   105   adding file changes
   155   checking changesets
   108   checking changesets
   156   checking manifests
   109   checking manifests
   157   crosschecking files in changesets and manifests
   110   crosschecking files in changesets and manifests
   158   checking files
   111   checking files
   159   2 files, 4 changesets, 5 total revisions
   112   2 files, 4 changesets, 5 total revisions
   160   3:7373c1169842
   113   3:095cb14b1b4d
   161   searching for changes
   114   searching for changes
   162   5 changesets found
   115   5 changesets found
   163   adding changesets
   116   adding changesets
   164   adding manifests
   117   adding manifests
   165   adding file changes
   118   adding file changes
   168   checking changesets
   121   checking changesets
   169   checking manifests
   122   checking manifests
   170   crosschecking files in changesets and manifests
   123   crosschecking files in changesets and manifests
   171   checking files
   124   checking files
   172   3 files, 5 changesets, 6 total revisions
   125   3 files, 5 changesets, 6 total revisions
   173   4:a6a34bfa0076
   126   4:faa2e4234c7a
   174   searching for changes
   127   searching for changes
   175   5 changesets found
   128   5 changesets found
   176   adding changesets
   129   adding changesets
   177   adding manifests
   130   adding manifests
   178   adding file changes
   131   adding file changes
   181   checking changesets
   134   checking changesets
   182   checking manifests
   135   checking manifests
   183   crosschecking files in changesets and manifests
   136   crosschecking files in changesets and manifests
   184   checking files
   137   checking files
   185   2 files, 5 changesets, 5 total revisions
   138   2 files, 5 changesets, 5 total revisions
   186   4:aa35859c02ea
   139   4:916f1afdef90
   187   $ cd test-8
   140   $ cd test-8
   188   $ hg pull ../test-7
   141   $ hg pull ../test-7
   189   pulling from ../test-7
   142   pulling from ../test-7
   190   searching for changes
   143   searching for changes
   191   adding changesets
   144   adding changesets
   245   $ cd test-9
   198   $ cd test-9
   246 
   199 
   247 revision 2
   200 revision 2
   248 
   201 
   249   $ hg tip -q
   202   $ hg tip -q
   250   2:e38ba6f5b7e0
   203   2:4ce51a113780
   251   $ hg unbundle ../test-bundle-should-fail.hg
   204   $ hg unbundle ../test-bundle-should-fail.hg
   252   adding changesets
   205   adding changesets
   253   transaction abort!
   206   transaction abort!
   254   rollback completed
   207   rollback completed
   255   abort: 00changelog.i@eebf5a27f8ca: unknown parent!
   208   abort: 00changelog.i@93ee6ab32777: unknown parent!
   256   [255]
   209   [255]
   257 
   210 
   258 revision 2
   211 revision 2
   259 
   212 
   260   $ hg tip -q
   213   $ hg tip -q
   261   2:e38ba6f5b7e0
   214   2:4ce51a113780
   262   $ hg unbundle ../test-bundle-all.hg
   215   $ hg unbundle ../test-bundle-all.hg
   263   adding changesets
   216   adding changesets
   264   adding manifests
   217   adding manifests
   265   adding file changes
   218   adding file changes
   266   added 6 changesets with 4 changes to 4 files (+1 heads)
   219   added 6 changesets with 4 changes to 4 files (+1 heads)
   267   (run 'hg heads' to see heads, 'hg merge' to merge)
   220   (run 'hg heads' to see heads, 'hg merge' to merge)
   268 
   221 
   269 revision 8
   222 revision 8
   270 
   223 
   271   $ hg tip -q
   224   $ hg tip -q
   272   8:aa35859c02ea
   225   8:916f1afdef90
   273   $ hg verify
   226   $ hg verify
   274   checking changesets
   227   checking changesets
   275   checking manifests
   228   checking manifests
   276   crosschecking files in changesets and manifests
   229   crosschecking files in changesets and manifests
   277   checking files
   230   checking files
   281   working directory now based on revision 2
   234   working directory now based on revision 2
   282 
   235 
   283 revision 2
   236 revision 2
   284 
   237 
   285   $ hg tip -q
   238   $ hg tip -q
   286   2:e38ba6f5b7e0
   239   2:4ce51a113780
   287   $ hg unbundle ../test-bundle-branch1.hg
   240   $ hg unbundle ../test-bundle-branch1.hg
   288   adding changesets
   241   adding changesets
   289   adding manifests
   242   adding manifests
   290   adding file changes
   243   adding file changes
   291   added 2 changesets with 2 changes to 2 files
   244   added 2 changesets with 2 changes to 2 files
   292   (run 'hg update' to get a working copy)
   245   (run 'hg update' to get a working copy)
   293 
   246 
   294 revision 4
   247 revision 4
   295 
   248 
   296   $ hg tip -q
   249   $ hg tip -q
   297   4:aa35859c02ea
   250   4:916f1afdef90
   298   $ hg verify
   251   $ hg verify
   299   checking changesets
   252   checking changesets
   300   checking manifests
   253   checking manifests
   301   crosschecking files in changesets and manifests
   254   crosschecking files in changesets and manifests
   302   checking files
   255   checking files
   312   (run 'hg heads' to see heads, 'hg merge' to merge)
   265   (run 'hg heads' to see heads, 'hg merge' to merge)
   313 
   266 
   314 revision 6
   267 revision 6
   315 
   268 
   316   $ hg tip -q
   269   $ hg tip -q
   317   6:a6a34bfa0076
   270   6:faa2e4234c7a
   318   $ hg verify
   271   $ hg verify
   319   checking changesets
   272   checking changesets
   320   checking manifests
   273   checking manifests
   321   crosschecking files in changesets and manifests
   274   crosschecking files in changesets and manifests
   322   checking files
   275   checking files
   332   (run 'hg update' to get a working copy)
   285   (run 'hg update' to get a working copy)
   333 
   286 
   334 revision 4
   287 revision 4
   335 
   288 
   336   $ hg tip -q
   289   $ hg tip -q
   337   4:aa35859c02ea
   290   4:916f1afdef90
   338   $ hg verify
   291   $ hg verify
   339   checking changesets
   292   checking changesets
   340   checking manifests
   293   checking manifests
   341   crosschecking files in changesets and manifests
   294   crosschecking files in changesets and manifests
   342   checking files
   295   checking files
   365   (run 'hg update' to get a working copy)
   318   (run 'hg update' to get a working copy)
   366 
   319 
   367 revision 9
   320 revision 9
   368 
   321 
   369   $ hg tip -q
   322   $ hg tip -q
   370   9:905597b0d5d4
   323   9:03fc0b0e347c
   371   $ hg verify
   324   $ hg verify
   372   checking changesets
   325   checking changesets
   373   checking manifests
   326   checking manifests
   374   crosschecking files in changesets and manifests
   327   crosschecking files in changesets and manifests
   375   checking files
   328   checking files