##// END OF EJS Templates
addremove: warn when addremove fails to operate on a named path...
Matt Harbison -
r23534:83bbedc1 default
parent child Browse files
Show More
@@ -721,9 +721,15 b' def addremove(repo, matcher, opts={}, dr'
721 similarity = float(opts.get('similarity') or 0)
721 similarity = float(opts.get('similarity') or 0)
722
722
723 rejected = []
723 rejected = []
724 m.bad = lambda x, y: rejected.append(x)
724 origbad = m.bad
725 def badfn(f, msg):
726 if f in m.files():
727 origbad(f, msg)
728 rejected.append(f)
725
729
730 m.bad = badfn
726 added, unknown, deleted, removed, forgotten = _interestingfiles(repo, m)
731 added, unknown, deleted, removed, forgotten = _interestingfiles(repo, m)
732 m.bad = origbad
727
733
728 unknownset = set(unknown + forgotten)
734 unknownset = set(unknown + forgotten)
729 toprint = unknownset.copy()
735 toprint = unknownset.copy()
@@ -22,6 +22,16 b''
22 $ hg forget foo
22 $ hg forget foo
23 $ hg -v addremove
23 $ hg -v addremove
24 adding foo
24 adding foo
25 $ hg forget foo
26 #if windows
27 $ hg -v addremove nonexistant
28 nonexistant: The system cannot find the file specified
29 [1]
30 #else
31 $ hg -v addremove nonexistant
32 nonexistant: No such file or directory
33 [1]
34 #endif
25 $ cd ..
35 $ cd ..
26
36
27 $ hg init subdir
37 $ hg init subdir
General Comments 0
You need to be logged in to leave comments. Login now