# HG changeset patch # User Thomas Arendsen Hein # Date 1173120861 -3600 # Node ID 03e9c22a6489af6b066d2c43057314627a5d7a5a # Parent 193e0f8d9a47af8c45d93a9761194750182537ab# Parent 26314500a5e10ada4d892eef040541e310759a56 merge with crew-stable diff -r 193e0f8d9a47 -r 03e9c22a6489 hgext/patchbomb.py --- a/hgext/patchbomb.py Sun Mar 04 14:35:11 2007 -0300 +++ b/hgext/patchbomb.py Mon Mar 05 19:54:21 2007 +0100 @@ -154,12 +154,13 @@ else: body += '\n'.join(patch) msg = email.MIMEText.MIMEText(body) + + subj = desc[0].strip().rstrip('. ') if total == 1: - subj = '[PATCH] ' + desc[0].strip() + subj = '[PATCH] ' + (opts['subject'] or subj) else: tlen = len(str(total)) - subj = '[PATCH %0*d of %d] %s' % (tlen, idx, total, desc[0].strip()) - if subj.endswith('.'): subj = subj[:-1] + subj = '[PATCH %0*d of %d] %s' % (tlen, idx, total, subj) msg['Subject'] = subj msg['X-Mercurial-Node'] = node return msg @@ -298,7 +299,7 @@ ('', 'plain', None, 'omit hg patch header'), ('n', 'test', None, 'print messages that would be sent'), ('m', 'mbox', '', 'write messages to mbox file instead of sending them'), - ('s', 'subject', '', 'subject of introductory message'), + ('s', 'subject', '', 'subject of first message (intro or single patch)'), ('t', 'to', [], 'email addresses of recipients')], "hg email [OPTION]... [REV]...") } diff -r 193e0f8d9a47 -r 03e9c22a6489 mercurial/commands.py --- a/mercurial/commands.py Sun Mar 04 14:35:11 2007 -0300 +++ b/mercurial/commands.py Mon Mar 05 19:54:21 2007 +0100 @@ -274,9 +274,8 @@ if ui.quiet: ui.write("%s\n" % t) else: - t = util.localsub(t, 30) - t += " " * (30 - util.locallen(t)) - ui.write("%s %s:%s\n" % (t, -r, hexfunc(n))) + spaces = " " * (30 - util.locallen(t)) + ui.write("%s%s %s:%s\n" % (t, spaces, -r, hexfunc(n))) def bundle(ui, repo, fname, dest=None, **opts): """create a changegroup file @@ -2469,9 +2468,8 @@ if ui.quiet: ui.write("%s\n" % t) else: - t = util.localsub(t, 30) - t += " " * (30 - util.locallen(t)) - ui.write("%s %s\n" % (t, r)) + spaces = " " * (30 - util.locallen(t)) + ui.write("%s%s %s\n" % (t, spaces, r)) def tip(ui, repo, **opts): """show the tip revision diff -r 193e0f8d9a47 -r 03e9c22a6489 tests/test-tags --- a/tests/test-tags Sun Mar 04 14:35:11 2007 -0300 +++ b/tests/test-tags Mon Mar 05 19:54:21 2007 +0100 @@ -10,6 +10,9 @@ hg co hg identify T=`hg tip --debug | head -n 1 | cut -d : -f 3` +hg tag -l "This is a local tag with a really long name!" +hg tags +rm .hg/localtags echo "$T first" > .hgtags cat .hgtags hg add .hgtags diff -r 193e0f8d9a47 -r 03e9c22a6489 tests/test-tags.out --- a/tests/test-tags.out Sun Mar 04 14:35:11 2007 -0300 +++ b/tests/test-tags.out Mon Mar 05 19:54:21 2007 +0100 @@ -1,6 +1,8 @@ unknown 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 0acdaf898367 tip +tip 0:0acdaf898367 +This is a local tag with a really long name! 0:0acdaf898367 0acdaf8983679e0aac16e811534eb49d7ee1f2b4 first tip 1:8a3ca90d111d first 0:0acdaf898367