[issue1145] "abort: path 'a/f' traverses symbolic link 'a'" prevents fixing the problem with `hg rm`

Peter Arrenbrecht mercurial-bugs at selenic.com
Wed May 28 07:19:45 CDT 2008


New submission from Peter Arrenbrecht <peter.arrenbrecht at gmail.com>:

The symlink traversal check gets in the way of using `hg rm -A` to fix the
problem. Workaround: Remove the offending symlink, clean up, then recreate it.
Or use `hg mv`, which is cleaner anyway.

I suggest we fix `hg rm -A`, and add a note to the error message returned by `hg
stat` on how to fix the problem using `hg rm` or `hg mv`.

Test case:

#! /bin/bash
hg init repo ; cd repo
mkdir a ; touch a/f
hg ci -Am a
mv a b
hg stat
ln -s b a
hg stat # fails
hg rm -A a # fails
hg rm -A a/a # fails

Revert also fails:

#! /bin/bash
hg init repo ; cd repo
mkdir a ; touch a/f
hg ci -Am a
hg mv a b
ln -s b a
hg add a
hg revert -a # fails

However, move works:

#! /bin/bash
hg init repo ; cd repo
mkdir a ; touch a/f
hg ci -Am a
mv a b
hg stat
ln -s b a
hg stat # fails
hg mv -A a b
hg stat -C
hg ci -Am b

----------
messages: 6116
nosy: parren
priority: bug
status: chatting
title: "abort: path 'a/f' traverses symbolic link 'a'" prevents fixing the problem with `hg rm`

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1145>
____________________________________________________



More information about the Mercurial-devel mailing list