# HG changeset patch # User Matt Mackall # Date 1166133346 21600 # Node ID 57b797601b61d32feafbb69d516e71b674e32551 # Parent abaee83ce0a6deb8adb8fc1f67685954fc7a4e27# Parent d83b125b7d7ed6da71b83aa72d0612d285a535ae Merge with crew diff --git a/contrib/zsh_completion b/contrib/zsh_completion --- a/contrib/zsh_completion +++ b/contrib/zsh_completion @@ -178,6 +178,7 @@ typeset -A _hg_cmd_globals } _hg_status() { + [[ -d $PREFIX ]] || PREFIX=$PREFIX:h status_files=(${(ps:\0:)"$(_hg_cmd status -0n$1 ./$PREFIX 2>/dev/null)"}) } diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py --- a/hgext/patchbomb.py +++ b/hgext/patchbomb.py @@ -215,8 +215,6 @@ def patchbomb(ui, repo, *revs, **opts): bcc = [a.strip() for a in bcc if a.strip()] if len(patches) > 1: - ui.write(_('\nWrite the introductory message for the patch series.\n\n')) - tlen = len(str(len(patches))) subj = '[PATCH %0*d of %d] %s' % ( @@ -226,21 +224,13 @@ def patchbomb(ui, repo, *revs, **opts): prompt('Subject:', rest = ' [PATCH %0*d of %d] ' % (tlen, 0, len(patches)))) - ui.write(_('Finish with ^D or a dot on a line by itself.\n\n')) - - body = [] - - while True: - try: l = raw_input() - except EOFError: break - if l == '.': break - body.append(l) - + body = '' if opts['diffstat']: d = cdiffstat(_('Final summary:\n'), jumbo) - if d: body.append('\n' + d) + if d: body = '\n' + d - body = '\n'.join(body) + '\n' + ui.write(_('\nWrite the introductory message for the patch series.\n\n')) + body = ui.edit(body, sender) msg = email.MIMEText.MIMEText(body) msg['Subject'] = subj diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2581,7 +2581,7 @@ table = { ('n', 'number', None, _('list the revision number (default)')), ('c', 'changeset', None, _('list the changeset')), ] + walkopts, - _('hg annotate [-r REV] [-a] [-u] [-d] [-n] [-c] FILE...')), + _('hg annotate [-r REV] [-f] [-a] [-u] [-d] [-n] [-c] FILE...')), "archive": (archive, [('', 'no-decode', None, _('do not pass files through decoders')), @@ -2610,7 +2610,7 @@ table = { ('', 'base', [], _('a base changeset to specify instead of a destination')), ] + remoteopts, - _('hg bundle [--base REV]... [--rev REV]... FILE [DEST]')), + _('hg bundle [-f] [-r REV]... [--base REV]... FILE [DEST]')), "cat": (cat, [('o', 'output', '', _('print output to file with formatted name')), @@ -2679,7 +2679,7 @@ table = { ('B', 'ignore-blank-lines', None, _('ignore changes whose lines are all blank')), ] + walkopts, - _('hg diff [-a] [-I] [-X] [-r REV1 [-r REV2]] [FILE]...')), + _('hg diff [OPTION]... [-r REV1 [-r REV2]] [FILE]...')), "^export": (export, [('o', 'output', '', _('print output to file with formatted name')), @@ -2687,7 +2687,7 @@ table = { ('g', 'git', None, _('use git extended diff format')), ('', 'nodates', None, _("don't include dates in diff headers")), ('', 'switch-parent', None, _('diff against the second parent'))], - _('hg export [-a] [-o OUTFILESPEC] REV...')), + _('hg export [OPTION]... [-o OUTFILESPEC] REV...')), "grep": (grep, [('0', 'print0', None, _('end fields with NUL')), @@ -2730,10 +2730,12 @@ table = { ('r', 'rev', [], _('a specific revision up to which you would like to pull')), ('', 'template', '', _('display with template')), ] + remoteopts, - _('hg incoming [-p] [-n] [-M] [-r REV]...' + _('hg incoming [-p] [-n] [-M] [-f] [-r REV]...' ' [--bundle FILENAME] [SOURCE]')), "^init": - (init, remoteopts, _('hg init [-e FILE] [--remotecmd FILE] [DEST]')), + (init, + remoteopts, + _('hg init [-e CMD] [--remotecmd CMD] [DEST]')), "locate": (locate, [('r', 'rev', '', _('search the repository as it stood at rev')), @@ -2778,7 +2780,7 @@ table = { ('n', 'newest-first', None, _('show newest record first')), ('', 'template', '', _('display with template')), ] + remoteopts, - _('hg outgoing [-M] [-p] [-n] [-r REV]... [DEST]')), + _('hg outgoing [-M] [-p] [-n] [-f] [-r REV]... [DEST]')), "^parents": (parents, [('r', 'rev', '', _('show parents from the specified rev')), @@ -2792,15 +2794,16 @@ table = { _('update to new tip if changesets were pulled')), ('f', 'force', None, _('run even when remote repository is unrelated')), - ('r', 'rev', [], _('a specific revision up to which you would like to pull')), + ('r', 'rev', [], + _('a specific revision up to which you would like to pull')), ] + remoteopts, - _('hg pull [-u] [-r REV]... [-e FILE] [--remotecmd FILE] [SOURCE]')), + _('hg pull [-u] [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [SOURCE]')), "^push": (push, [('f', 'force', None, _('force push')), ('r', 'rev', [], _('a specific revision you would like to push')), ] + remoteopts, - _('hg push [-f] [-r REV]... [-e FILE] [--remotecmd FILE] [DEST]')), + _('hg push [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [DEST]')), "debugrawcommit|rawcommit": (rawcommit, [('p', 'parent', [], _('parent')), @@ -2830,7 +2833,7 @@ table = { ('r', 'rev', '', _('revision to revert to')), ('', 'no-backup', None, _('do not save backup copies of files')), ] + walkopts + dryrunopts, - _('hg revert [-r REV] [NAME]...')), + _('hg revert [OPTION]... [-r REV] [NAME]...')), "rollback": (rollback, [], _('hg rollback')), "root": (root, [], _('hg root')), "showconfig|debugconfig": @@ -2896,7 +2899,7 @@ table = { (update, [('C', 'clean', None, _('overwrite locally modified files')), ('d', 'date', '', _('tipmost revision matching date'))], - _('hg update [-C] [REV]')), + _('hg update [-C] [-d DATE] [REV]')), "verify": (verify, [], _('hg verify')), "version": (version_, [], _('hg version')), } diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py +++ b/mercurial/hgweb/hgweb_mod.py @@ -651,7 +651,7 @@ class hgweb(object): def run_wsgi(self, req): def header(**map): header_file = cStringIO.StringIO( - ''.join(self.t("header", encoding = util._encoding, **map))) + ''.join(self.t("header", encoding=util._encoding, **map))) msg = mimetools.Message(header_file, 0) req.header(msg.items()) yield header_file.read() diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py +++ b/mercurial/hgweb/hgwebdir_mod.py @@ -60,7 +60,8 @@ class hgwebdir(object): def run_wsgi(self, req): def header(**map): - header_file = cStringIO.StringIO(''.join(tmpl("header", **map))) + header_file = cStringIO.StringIO( + ''.join(tmpl("header", encoding=util._encoding, **map))) msg = mimetools.Message(header_file, 0) req.header(msg.items()) yield header_file.read() diff --git a/setup.py b/setup.py diff --git a/tests/test-help.out b/tests/test-help.out --- a/tests/test-help.out +++ b/tests/test-help.out @@ -163,7 +163,7 @@ options: -I --include include names matching the given patterns -X --exclude exclude names matching the given patterns -n --dry-run do not perform actions, just print output -hg diff [-a] [-I] [-X] [-r REV1 [-r REV2]] [FILE]... +hg diff [OPTION]... [-r REV1 [-r REV2]] [FILE]... diff repository (or selected files)