comparison mercurial/commands.py @ 2159:5c34b98ad6b1

Small cleanups to backout command: - Accept -m for --message (like commit and similar commands), too. - Don't ignore --logfile option. - Fix command table entry (synopsis, group commit related option)
author Thomas Arendsen Hein <thomas@intevation.de>
date Sun, 30 Apr 2006 18:40:30 +0200
parents ec96c4518236
children 858df1f354c1
comparison
equal deleted inserted replaced
2158:ec96c4518236 2159:5c34b98ad6b1
960 revert_opts = opts.copy() 960 revert_opts = opts.copy()
961 revert_opts['rev'] = hex(parent) 961 revert_opts['rev'] = hex(parent)
962 revert(ui, repo, **revert_opts) 962 revert(ui, repo, **revert_opts)
963 commit_opts = opts.copy() 963 commit_opts = opts.copy()
964 commit_opts['addremove'] = False 964 commit_opts['addremove'] = False
965 if not commit_opts['message']: 965 if not commit_opts['message'] and not commit_opts['logfile']:
966 commit_opts['message'] = _("Backed out changeset %s") % (hex(node)) 966 commit_opts['message'] = _("Backed out changeset %s") % (hex(node))
967 commit(ui, repo, **commit_opts) 967 commit(ui, repo, **commit_opts)
968 def nice(node): 968 def nice(node):
969 return '%d:%s' % (repo.changelog.rev(node), short(node)) 969 return '%d:%s' % (repo.changelog.rev(node), short(node))
970 ui.status(_('changeset %s backs out changeset %s\n') % 970 ui.status(_('changeset %s backs out changeset %s\n') %
2938 ('r', 'rev', '', _('revision to distribute')), 2938 ('r', 'rev', '', _('revision to distribute')),
2939 ('t', 'type', '', _('type of distribution to create')), 2939 ('t', 'type', '', _('type of distribution to create')),
2940 ('I', 'include', [], _('include names matching the given patterns')), 2940 ('I', 'include', [], _('include names matching the given patterns')),
2941 ('X', 'exclude', [], _('exclude names matching the given patterns'))], 2941 ('X', 'exclude', [], _('exclude names matching the given patterns'))],
2942 _('hg archive [OPTION]... DEST')), 2942 _('hg archive [OPTION]... DEST')),
2943 'backout': 2943 "backout":
2944 (backout, 2944 (backout,
2945 [('', 'message', '', _('use <text> as commit message')), 2945 [('', 'merge', None,
2946 ('', 'merge', None, _('merge with old dirstate parent after backout')), 2946 _('merge with old dirstate parent after backout')),
2947 ('m', 'message', '', _('use <text> as commit message')),
2947 ('l', 'logfile', '', _('read commit message from <file>')), 2948 ('l', 'logfile', '', _('read commit message from <file>')),
2948 ('d', 'date', '', _('record datecode as commit date')), 2949 ('d', 'date', '', _('record datecode as commit date')),
2949 ('u', 'user', '', _('record user as committer')), 2950 ('u', 'user', '', _('record user as committer')),
2950 ('I', 'include', [], _('include names matching the given patterns')), 2951 ('I', 'include', [], _('include names matching the given patterns')),
2951 ('X', 'exclude', [], _('exclude names matching the given patterns'))], 2952 ('X', 'exclude', [], _('exclude names matching the given patterns'))],
2952 _('hg backout [OPTION]... [FILE]...')), 2953 _('hg backout [OPTION]... REV')),
2953
2954 "bundle": 2954 "bundle":
2955 (bundle, 2955 (bundle,
2956 [('f', 'force', None, 2956 [('f', 'force', None,
2957 _('run even when remote repository is unrelated'))], 2957 _('run even when remote repository is unrelated'))],
2958 _('hg bundle FILE DEST')), 2958 _('hg bundle FILE DEST')),