--- a/mercurial/commands.py Tue Aug 09 17:24:38 2005 -0800
+++ b/mercurial/commands.py Fri Aug 12 09:58:35 2005 -0800
@@ -393,11 +393,10 @@
q = dict(zip(pats, pats))
add, remove = [], []
for src, abs, rel in walk(repo, pats, opts):
- if src == 'f':
- if repo.dirstate.state(abs) == '?':
- add.append(abs)
- if rel not in q: ui.status('adding ', rel, '\n')
- elif repo.dirstate.state(abs) != 'r' and not os.path.exists(rel):
+ if src == 'f' and repo.dirstate.state(abs) == '?':
+ add.append(abs)
+ if rel not in q: ui.status('adding ', rel, '\n')
+ if repo.dirstate.state(abs) != 'r' and not os.path.exists(rel):
remove.append(abs)
if rel not in q: ui.status('removing ', rel, '\n')
repo.add(add)
@@ -632,9 +631,11 @@
raise util.Abort("too many revisions to diff")
files = []
- roots, match, results = makewalk(repo, pats, opts)
- for src, abs, rel in results:
- files.append(abs)
+ match = util.always
+ if pats:
+ roots, match, results = makewalk(repo, pats, opts)
+ for src, abs, rel in results:
+ files.append(abs)
dodiff(sys.stdout, ui, repo, files, *revs, **{'match': match})
def doexport(ui, repo, changeset, seqno, total, revwidth, opts):