Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 5953:e7f1be4bf40a
Permitting the import command to accept a --user option.
The prose section of the help text for the command already said that -u and -m
are accepted, but -u was not listed in the table of options, and did not work.
Useful when accepting patches from other people made by hg diff rather than hg
export. For completeness, also accepting -d DATE.
[CHANGES: rebased against d8878742a924, --no-commit option.]
author | Jesse Glick <jesse.glick@sun.com> |
---|---|
date | Fri, 25 Jan 2008 19:49:15 -0500 |
parents | 00dfc810dae4 |
children | f25070ecf334 |
line wrap: on
line diff
--- a/mercurial/commands.py Fri Jan 25 16:24:00 2008 -0800 +++ b/mercurial/commands.py Fri Jan 25 19:49:15 2008 -0500 @@ -1529,7 +1529,8 @@ finally: files = patch.updatedir(ui, repo, files) if not opts.get('no_commit'): - n = repo.commit(files, message, user, date) + n = repo.commit(files, message, opts.get('user') or user, + opts.get('date') or date) if opts.get('exact'): if hex(n) != nodeid: repo.rollback() @@ -2901,8 +2902,9 @@ ('', 'exact', None, _('apply patch to the nodes from which it was generated')), ('', 'import-branch', None, - _('Use any branch information in patch (implied by --exact)'))] + commitopts, - _('hg import [-p NUM] [-m MESSAGE] [-f] PATCH...')), + _('Use any branch information in patch (implied by --exact)'))] + + commitopts + commitopts2, + _('hg import [OPTION]... PATCH...')), "incoming|in": (incoming, [('M', 'no-merges', None, _('do not show merges')),