--- a/mercurial/scmutil.py Fri Feb 24 16:16:48 2012 -0600
+++ b/mercurial/scmutil.py Fri Feb 24 16:52:32 2012 -0600
@@ -607,6 +607,9 @@
added, unknown, deleted, removed = [], [], [], []
audit_path = pathauditor(repo.root)
m = match(repo[None], pats, opts)
+ rejected = []
+ m.bad = lambda x, y: rejected.append(x)
+
for abs in repo.walk(m):
target = repo.wjoin(abs)
good = True
@@ -651,6 +654,11 @@
finally:
wlock.release()
+ for f in rejected:
+ if f in m.files():
+ return 1
+ return 0
+
def updatedir(ui, repo, patches, similarity=0):
'''Update dirstate after patch application according to metadata'''
if not patches: