##// END OF EJS Templates
add: don't attempt to add back removed files unless explicitly listed...
Martin von Zweigbergk -
r52056:b8f9911c default
parent child Browse files
Show More
@@ -2381,8 +2381,19 b' def add(ui, repo, match, prefix, uipathf'
2381 2381 full=False,
2382 2382 )
2383 2383 ):
2384 entry = dirstate.get_entry(f)
2385 # We don't want to even attmpt to add back files that have been removed
2386 # It would lead to a misleading message saying we're adding the path,
2387 # and can also lead to file/dir conflicts when attempting to add it.
2388 removed = entry and entry.removed
2384 2389 exact = match.exact(f)
2385 if exact or not explicitonly and f not in wctx and repo.wvfs.lexists(f):
2390 if (
2391 exact
2392 or not explicitonly
2393 and f not in wctx
2394 and repo.wvfs.lexists(f)
2395 and not removed
2396 ):
2386 2397 if cca:
2387 2398 cca(f)
2388 2399 names.append(f)
@@ -210,14 +210,10 b' can add with --include'
210 210
211 211 $ hg add -I foo
212 212 adding foo
213 adding foo/a (known-bad-output !)
214 abort: file 'foo' in dirstate clashes with 'foo/a' (known-bad-output !)
215 [255]
216 213 $ hg status
217 214 A bar/a
218 A foo (missing-correct-output !)
215 A foo
219 216 R foo/a
220 ? foo (known-bad-output !)
221 217
222 218 $ cd ..
223 219
General Comments 0
You need to be logged in to leave comments. Login now