# HG changeset patch # User Alexander Solovyov # Date 1259419687 -7200 # Node ID b5f352f33520c292060cf8edece99a6baaa75e0f # Parent 54cd28258ea71af85c12587793da365ec5941028 commands.export: accept -r option as revision specification This brings consistency with other commands option and allows specification of negative numbers (-r -2), which were recognized as options earlier. diff -r 54cd28258ea7 -r b5f352f33520 mercurial/commands.py --- a/mercurial/commands.py Mon Nov 30 23:51:06 2009 +0100 +++ b/mercurial/commands.py Sat Nov 28 16:48:07 2009 +0200 @@ -1161,6 +1161,7 @@ With the --switch-parent option, the diff will be against the second parent. It can be useful to review a merge. """ + changesets += tuple(opts.get('rev', [])) if not changesets: raise util.Abort(_("export requires at least one changeset")) revs = cmdutil.revrange(repo, changesets) @@ -3456,7 +3457,8 @@ "^export": (export, [('o', 'output', '', _('print output to file with formatted name')), - ('', 'switch-parent', None, _('diff against the second parent')) + ('', 'switch-parent', None, _('diff against the second parent')), + ('r', 'rev', [], _('revisions to export')), ] + diffopts, _('[OPTION]... [-o OUTFILESPEC] REV...')), "^forget":