tests/test-hardlinks.t
changeset 13034 8cb33163b391
parent 13019 42ac864ed394
child 13272 5ccdca7df211
equal deleted inserted replaced
13033:026053f691a4 13034:8cb33163b391
   228   2 r4/.hg/undo.dirstate
   228   2 r4/.hg/undo.dirstate
   229   2 r4/d1/data1
   229   2 r4/d1/data1
   230   2 r4/d1/f2
   230   2 r4/d1/f2
   231   1 r4/f1
   231   1 r4/f1
   232 
   232 
       
   233 
       
   234 Test hardlinking outside hg:
       
   235 
       
   236   $ mkdir x
       
   237   $ echo foo > x/a
       
   238 
       
   239   $ linkcp x y
       
   240   $ echo bar >> y/a
       
   241 
       
   242 No diff if hardlink:
       
   243 
       
   244   $ diff x/a y/a
       
   245 
       
   246 Test mq hardlinking:
       
   247 
       
   248   $ echo "[extensions]" >> $HGRCPATH
       
   249   $ echo "mq=" >> $HGRCPATH
       
   250 
       
   251   $ hg init a
       
   252   $ cd a
       
   253 
       
   254   $ hg qimport -n foo - << EOF
       
   255   > # HG changeset patch
       
   256   > # Date 1 0
       
   257   > diff -r 2588a8b53d66 a
       
   258   > --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
       
   259   > +++ b/a	Wed Jul 23 15:54:29 2008 +0200
       
   260   > @@ -0,0 +1,1 @@
       
   261   > +a
       
   262   > EOF
       
   263   adding foo to series file
       
   264 
       
   265   $ hg qpush
       
   266   applying foo
       
   267   now at: foo
       
   268 
       
   269   $ cd ..
       
   270   $ linkcp a b
       
   271   $ cd b
       
   272 
       
   273   $ hg qimport -n bar - << EOF
       
   274   > # HG changeset patch
       
   275   > # Date 2 0
       
   276   > diff -r 2588a8b53d66 a
       
   277   > --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
       
   278   > +++ b/b	Wed Jul 23 15:54:29 2008 +0200
       
   279   > @@ -0,0 +1,1 @@
       
   280   > +b
       
   281   > EOF
       
   282   adding bar to series file
       
   283 
       
   284   $ hg qpush
       
   285   applying bar
       
   286   now at: bar
       
   287 
       
   288   $ cat .hg/patches/status
       
   289   430ed4828a74fa4047bc816a25500f7472ab4bfe:foo
       
   290   4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c:bar
       
   291 
       
   292   $ cat .hg/patches/series
       
   293   foo
       
   294   bar
       
   295 
       
   296   $ cat ../a/.hg/patches/status
       
   297   430ed4828a74fa4047bc816a25500f7472ab4bfe:foo
       
   298 
       
   299   $ cat ../a/.hg/patches/series
       
   300   foo
       
   301 
       
   302 Test tags hardlinking:
       
   303 
       
   304   $ hg qdel -r qbase:qtip
       
   305   patch foo finalized without changeset message
       
   306   patch bar finalized without changeset message
       
   307 
       
   308   $ hg tag -l lfoo
       
   309   $ hg tag foo
       
   310 
       
   311   $ cd ..
       
   312   $ linkcp b c
       
   313   $ cd c
       
   314 
       
   315   $ hg tag -l -r 0 lbar
       
   316   $ hg tag -r 0 bar
       
   317 
       
   318   $ cat .hgtags
       
   319   4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo
       
   320   430ed4828a74fa4047bc816a25500f7472ab4bfe bar
       
   321 
       
   322   $ cat .hg/localtags
       
   323   4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo
       
   324   430ed4828a74fa4047bc816a25500f7472ab4bfe lbar
       
   325 
       
   326   $ cat ../b/.hgtags
       
   327   4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo
       
   328 
       
   329   $ cat ../b/.hg/localtags
       
   330   4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo
       
   331