Show More
@@ -186,13 +186,15 b' def addremove(repo, pats=[], opts={}, wl' | |||||
186 | add, remove = [], [] |
|
186 | add, remove = [], [] | |
187 | mapping = {} |
|
187 | mapping = {} | |
188 | for src, abs, rel, exact in walk(repo, pats, opts): |
|
188 | for src, abs, rel, exact in walk(repo, pats, opts): | |
|
189 | target = repo.wjoin(abs) | |||
189 | if src == 'f' and repo.dirstate.state(abs) == '?': |
|
190 | if src == 'f' and repo.dirstate.state(abs) == '?': | |
190 | add.append(abs) |
|
191 | add.append(abs) | |
191 | mapping[abs] = rel, exact |
|
192 | mapping[abs] = rel, exact | |
192 | if repo.ui.verbose or not exact: |
|
193 | if repo.ui.verbose or not exact: | |
193 | repo.ui.status(_('adding %s\n') % ((pats and rel) or abs)) |
|
194 | repo.ui.status(_('adding %s\n') % ((pats and rel) or abs)) | |
194 |
islink = os.path.islink( |
|
195 | islink = os.path.islink(target) | |
195 |
if repo.dirstate.state(abs) != 'r' and not islink |
|
196 | if (repo.dirstate.state(abs) != 'r' and not islink | |
|
197 | and not os.path.exists(target)): | |||
196 | remove.append(abs) |
|
198 | remove.append(abs) | |
197 | mapping[abs] = rel, exact |
|
199 | mapping[abs] = rel, exact | |
198 | if repo.ui.verbose or not exact: |
|
200 | if repo.ui.verbose or not exact: |
General Comments 0
You need to be logged in to leave comments.
Login now