comparison tests/test-update-names.t @ 29629:b33c0c38d68f stable

update: fix bug when update tries to modify folder symlink In 1e4512eac59e0114bc60ecbcdc4157fc0fa0439d, I introduced a new bug: when a symlink points to a folder in commit A and to another folder in commit B, while updating from A to B, Mercurial will try to use removedir on this symlink, which will fail. This is a very bad bug, since it basically renders symlinks to folders unusable in repos. Added test case fails without a fix and passes with it.
author Kostia Balytskyi <ikostia@fb.com>
date Thu, 21 Jul 2016 15:55:47 -0700
parents 1e4512eac59e
children 90a6c18a7c1d
comparison
equal deleted inserted replaced
29628:6217180f9ab8 29629:b33c0c38d68f
51 ? name/file 51 ? name/file
52 $ hg up 1 52 $ hg up 1
53 abort: *: '$TESTTMP/r1/r2/name' (glob) 53 abort: *: '$TESTTMP/r1/r2/name' (glob)
54 [255] 54 [255]
55 $ cd .. 55 $ cd ..
56
57 #if symlink
58
59 Test update when two commits have symlinks that point to different folders
60 $ hg init r3 && cd r3
61 $ echo root > root && hg ci -Am root
62 adding root
63 $ mkdir folder1 && mkdir folder2
64 $ ln -s folder1 folder
65 $ hg ci -Am "symlink to folder1"
66 adding folder
67 $ rm folder
68 $ ln -s folder2 folder
69 $ hg ci -Am "symlink to folder2"
70 $ hg up 1
71 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
72 $ cd ..
73
74 #endif