tests/test-audit-path.t
changeset 34555 989e884d1be9
parent 33633 20bac46f7744
child 34661 eb586ed5d8ce
equal deleted inserted replaced
34554:6f11a74d489f 34555:989e884d1be9
   101   $ hg manifest -r2
   101   $ hg manifest -r2
   102   back
   102   back
   103   back/test
   103   back/test
   104 #if symlink
   104 #if symlink
   105   $ hg update -Cr2
   105   $ hg update -Cr2
   106   abort: path 'back/test' traverses symbolic link 'back'
   106   back: is both a file and a directory
       
   107   abort: destination manifest contains path conflicts
   107   [255]
   108   [255]
   108 #else
   109 #else
   109 ('back' will be a file and cause some other system specific error)
   110 ('back' will be a file and cause some other system specific error)
   110   $ hg update -Cr2
   111   $ hg update -Cr2
   111   abort: * (glob)
   112   abort: * (glob)
   158 
   159 
   159 try trivial merge
   160 try trivial merge
   160 
   161 
   161   $ hg up -qC 1
   162   $ hg up -qC 1
   162   $ hg merge 2
   163   $ hg merge 2
   163   abort: path 'a/poisoned' traverses symbolic link 'a'
   164   a: path conflict - a file or link has the same name as a directory
   164   [255]
   165   the local file has been renamed to a~aa04623eb0c3
       
   166   resolve manually then use 'hg resolve --mark a'
       
   167   1 files updated, 0 files merged, 0 files removed, 1 files unresolved
       
   168   use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
       
   169   [1]
   165 
   170 
   166 try rebase onto other revision: cache of audited paths should be discarded,
   171 try rebase onto other revision: cache of audited paths should be discarded,
   167 and the rebase should fail (issue5628)
   172 and the rebase should fail (issue5628)
   168 
   173 
   169   $ hg up -qC 2
   174   $ hg up -qC 2
   170   $ hg rebase -s 2 -d 1 --config extensions.rebase=
   175   $ hg rebase -s 2 -d 1 --config extensions.rebase=
   171   rebasing 2:e73c21d6b244 "file a/poisoned" (tip)
   176   rebasing 2:e73c21d6b244 "file a/poisoned" (tip)
   172   abort: path 'a/poisoned' traverses symbolic link 'a'
   177   a: path conflict - a file or link has the same name as a directory
   173   [255]
   178   the local file has been renamed to a~aa04623eb0c3
       
   179   resolve manually then use 'hg resolve --mark a'
       
   180   unresolved conflicts (see hg resolve, then hg rebase --continue)
       
   181   [1]
   174   $ ls ../merge-symlink-out
   182   $ ls ../merge-symlink-out
   175 
   183 
   176   $ cd ..
   184   $ cd ..
   177 
   185 
   178 Test symlink traversal on update:
   186 Test symlink traversal on update:
   200 
   208 
   201 try linear update where symlink already exists:
   209 try linear update where symlink already exists:
   202 
   210 
   203   $ hg up -qC 0
   211   $ hg up -qC 0
   204   $ hg up 1
   212   $ hg up 1
   205   abort: path 'a/b' traverses symbolic link 'a'
   213   a: is both a file and a directory
       
   214   abort: destination manifest contains path conflicts
   206   [255]
   215   [255]
   207 
   216 
   208 try linear update including symlinked directory and its content: paths are
   217 try linear update including symlinked directory and its content: paths are
   209 audited first by calculateupdates(), where no symlink is created so both
   218 audited first by calculateupdates(), where no symlink is created so both
   210 'a' and 'a/b' are taken as good paths. still applyupdates() should fail.
   219 'a' and 'a/b' are taken as good paths. still applyupdates() should fail.
   211 
   220 
   212   $ hg up -qC null
   221   $ hg up -qC null
   213   $ hg up 1
   222   $ hg up 1
   214   abort: path 'a/b' traverses symbolic link 'a'
   223   a: is both a file and a directory
       
   224   abort: destination manifest contains path conflicts
   215   [255]
   225   [255]
   216   $ ls ../update-symlink-out
   226   $ ls ../update-symlink-out
   217 
   227 
   218 try branch update replacing directory with symlink, and its content: the
   228 try branch update replacing directory with symlink, and its content: the
   219 path 'a' is audited as a directory first, which should be audited again as
   229 path 'a' is audited as a directory first, which should be audited again as
   220 a symlink.
   230 a symlink.
   221 
   231 
   222   $ rm -f a
   232   $ rm -f a
   223   $ hg up -qC 2
   233   $ hg up -qC 2
   224   $ hg up 1
   234   $ hg up 1
   225   abort: path 'a/b' traverses symbolic link 'a'
   235   a: is both a file and a directory
       
   236   abort: destination manifest contains path conflicts
   226   [255]
   237   [255]
   227   $ ls ../update-symlink-out
   238   $ ls ../update-symlink-out
   228 
   239 
   229   $ cd ..
   240   $ cd ..
   230 
   241