# HG changeset patch # User Vadim Gelfer # Date 1149867756 25200 # Node ID e5cb39577b9f105651b80ad351ac959285034f1c # Parent 734df6333ca4278a11a663601e33877babf53d47 addremove: add -n/--dry-run option diff -r 734df6333ca4 -r e5cb39577b9f mercurial/commands.py --- a/mercurial/commands.py Fri Jun 09 08:40:06 2006 -0700 +++ b/mercurial/commands.py Fri Jun 09 08:42:36 2006 -0700 @@ -671,8 +671,9 @@ remove.append(abs) if ui.verbose or not exact: ui.status(_('removing %s\n') % ((pats and rel) or abs)) - repo.add(add, wlock=wlock) - repo.remove(remove, wlock=wlock) + if not opts.get('dry_run'): + repo.add(add, wlock=wlock) + repo.remove(remove, wlock=wlock) def annotate(ui, repo, *pats, **opts): """show changeset information per file line @@ -2808,7 +2809,8 @@ "debugaddremove|addremove": (addremove, [('I', 'include', [], _('include names matching the given patterns')), - ('X', 'exclude', [], _('exclude names matching the given patterns'))], + ('X', 'exclude', [], _('exclude names matching the given patterns')), + ('n', 'dry-run', None, _('print what would be done'))], _('hg addremove [OPTION]... [FILE]...')), "^annotate": (annotate,