[PATCH] Fix addremove for symlinks to non-existent files
Giorgos Keramidas
keramida at ceid.upatras.gr
Fri Jan 5 12:51:57 CST 2007
# HG changeset patch
# User Giorgos Keramidas <keramida at ceid.upatras.gr>
# Date 1168025329 -7200
# Node ID 19c0fe2a4c8db94e775423c21144f1f517209611
# Parent d8fead5407c1b09fb02a41abbff14df8357e68e8
Fix addremove for symlinks to non-existent files
diff -r d8fead5407c1 -r 19c0fe2a4c8d mercurial/cmdutil.py
--- a/mercurial/cmdutil.py Fri Jan 05 17:11:21 2007 +0200
+++ b/mercurial/cmdutil.py Fri Jan 05 21:28:49 2007 +0200
@@ -174,7 +174,8 @@ def addremove(repo, pats=[], opts={}, wl
mapping[abs] = rel, exact
if repo.ui.verbose or not exact:
repo.ui.status(_('adding %s\n') % ((pats and rel) or abs))
- if repo.dirstate.state(abs) != 'r' and not os.path.exists(rel):
+ islink = os.path.islink(rel)
+ if repo.dirstate.state(abs) != 'r' and not islink and not os.path.exists(rel):
remove.append(abs)
mapping[abs] = rel, exact
if repo.ui.verbose or not exact:
More information about the Mercurial-devel
mailing list