tests/test-bundle-r.t
changeset 14127 f45c8db21749
parent 14073 72c84f24b420
parent 14117 07708f4171f1
child 15131 7c26ce9edbd2
equal deleted inserted replaced
14103:a36e8c99d51c 14127:f45c8db21749
     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
   246   $ cd test-9
   199   $ cd test-9
   247 
   200 
   248 revision 2
   201 revision 2
   249 
   202 
   250   $ hg tip -q
   203   $ hg tip -q
   251   2:e38ba6f5b7e0
   204   2:4ce51a113780
   252   $ hg unbundle ../test-bundle-should-fail.hg
   205   $ hg unbundle ../test-bundle-should-fail.hg
   253   adding changesets
   206   adding changesets
   254   transaction abort!
   207   transaction abort!
   255   rollback completed
   208   rollback completed
   256   abort: 00changelog.i@eebf5a27f8ca: unknown parent!
   209   abort: 00changelog.i@93ee6ab32777: unknown parent!
   257   [255]
   210   [255]
   258 
   211 
   259 revision 2
   212 revision 2
   260 
   213 
   261   $ hg tip -q
   214   $ hg tip -q
   262   2:e38ba6f5b7e0
   215   2:4ce51a113780
   263   $ hg unbundle ../test-bundle-all.hg
   216   $ hg unbundle ../test-bundle-all.hg
   264   adding changesets
   217   adding changesets
   265   adding manifests
   218   adding manifests
   266   adding file changes
   219   adding file changes
   267   added 6 changesets with 4 changes to 4 files (+1 heads)
   220   added 6 changesets with 4 changes to 4 files (+1 heads)
   268   (run 'hg heads' to see heads, 'hg merge' to merge)
   221   (run 'hg heads' to see heads, 'hg merge' to merge)
   269 
   222 
   270 revision 8
   223 revision 8
   271 
   224 
   272   $ hg tip -q
   225   $ hg tip -q
   273   8:aa35859c02ea
   226   8:916f1afdef90
   274   $ hg verify
   227   $ hg verify
   275   checking changesets
   228   checking changesets
   276   checking manifests
   229   checking manifests
   277   crosschecking files in changesets and manifests
   230   crosschecking files in changesets and manifests
   278   checking files
   231   checking files
   282   working directory now based on revision 2
   235   working directory now based on revision 2
   283 
   236 
   284 revision 2
   237 revision 2
   285 
   238 
   286   $ hg tip -q
   239   $ hg tip -q
   287   2:e38ba6f5b7e0
   240   2:4ce51a113780
   288   $ hg unbundle ../test-bundle-branch1.hg
   241   $ hg unbundle ../test-bundle-branch1.hg
   289   adding changesets
   242   adding changesets
   290   adding manifests
   243   adding manifests
   291   adding file changes
   244   adding file changes
   292   added 2 changesets with 2 changes to 2 files
   245   added 2 changesets with 2 changes to 2 files
   293   (run 'hg update' to get a working copy)
   246   (run 'hg update' to get a working copy)
   294 
   247 
   295 revision 4
   248 revision 4
   296 
   249 
   297   $ hg tip -q
   250   $ hg tip -q
   298   4:aa35859c02ea
   251   4:916f1afdef90
   299   $ hg verify
   252   $ hg verify
   300   checking changesets
   253   checking changesets
   301   checking manifests
   254   checking manifests
   302   crosschecking files in changesets and manifests
   255   crosschecking files in changesets and manifests
   303   checking files
   256   checking files
   313   (run 'hg heads' to see heads, 'hg merge' to merge)
   266   (run 'hg heads' to see heads, 'hg merge' to merge)
   314 
   267 
   315 revision 6
   268 revision 6
   316 
   269 
   317   $ hg tip -q
   270   $ hg tip -q
   318   6:a6a34bfa0076
   271   6:faa2e4234c7a
   319   $ hg verify
   272   $ hg verify
   320   checking changesets
   273   checking changesets
   321   checking manifests
   274   checking manifests
   322   crosschecking files in changesets and manifests
   275   crosschecking files in changesets and manifests
   323   checking files
   276   checking files
   333   (run 'hg update' to get a working copy)
   286   (run 'hg update' to get a working copy)
   334 
   287 
   335 revision 4
   288 revision 4
   336 
   289 
   337   $ hg tip -q
   290   $ hg tip -q
   338   4:aa35859c02ea
   291   4:916f1afdef90
   339   $ hg verify
   292   $ hg verify
   340   checking changesets
   293   checking changesets
   341   checking manifests
   294   checking manifests
   342   crosschecking files in changesets and manifests
   295   crosschecking files in changesets and manifests
   343   checking files
   296   checking files
   366   (run 'hg update' to get a working copy)
   319   (run 'hg update' to get a working copy)
   367 
   320 
   368 revision 9
   321 revision 9
   369 
   322 
   370   $ hg tip -q
   323   $ hg tip -q
   371   9:905597b0d5d4
   324   9:03fc0b0e347c
   372   $ hg verify
   325   $ hg verify
   373   checking changesets
   326   checking changesets
   374   checking manifests
   327   checking manifests
   375   crosschecking files in changesets and manifests
   328   crosschecking files in changesets and manifests
   376   checking files
   329   checking files