# HG changeset patch # User Martin Geisler # Date 1246707096 -7200 # Node ID 28b1797b00405f3e238575b4f1b93e23904408ab # Parent 10532b29cdee993efd804c7d60a188347425ebaf# Parent 42956a93db3a381b0869ef19e8d1d0b023cc2596 merge with crew-stable diff -r 42956a93db3a -r 28b1797b0040 hgext/color.py --- a/hgext/color.py Sat Jul 04 12:40:34 2009 +0200 +++ b/hgext/color.py Sat Jul 04 13:31:36 2009 +0200 @@ -146,9 +146,9 @@ for patch in patches: patchname = patch if opts['summary']: - patchname = patchname.split(': ')[0] + patchname = patchname.split(': ', 1)[0] if ui.verbose: - patchname = patchname.split(' ', 2)[-1] + patchname = patchname.lstrip().split(' ', 2)[-1] if opts['missing']: effects = _patch_effects['missing'] @@ -158,7 +158,9 @@ effects = _patch_effects['applied'] else: effects = _patch_effects['unapplied'] - ui.write(render_effects(patch, effects) + '\n') + + patch = patch.replace(patchname, render_effects(patchname, effects), 1) + ui.write(patch + '\n') return retval _patch_effects = { 'applied': ['blue', 'bold', 'underline'], diff -r 42956a93db3a -r 28b1797b0040 hgext/convert/subversion.py --- a/hgext/convert/subversion.py Sat Jul 04 12:40:34 2009 +0200 +++ b/hgext/convert/subversion.py Sat Jul 04 13:31:36 2009 +0200 @@ -2,7 +2,6 @@ # # Copyright(C) 2007 Daniel Holth et al -import locale import os import re import sys diff -r 42956a93db3a -r 28b1797b0040 hgext/keyword.py --- a/hgext/keyword.py Sat Jul 04 12:40:34 2009 +0200 +++ b/hgext/keyword.py Sat Jul 04 13:31:36 2009 +0200 @@ -495,7 +495,8 @@ release(lock, wlock) # monkeypatches - def kwpatchfile_init(orig, self, ui, fname, opener, missing=False, eol=None): + def kwpatchfile_init(orig, self, ui, fname, opener, + missing=False, eol=None): '''Monkeypatch/wrap patch.patchfile.__init__ to avoid rejects or conflicts due to expanded keywords in working dir.''' orig(self, ui, fname, opener, missing, eol) diff -r 42956a93db3a -r 28b1797b0040 hgext/mq.py --- a/hgext/mq.py Sat Jul 04 12:40:34 2009 +0200 +++ b/hgext/mq.py Sat Jul 04 13:31:36 2009 +0200 @@ -1343,19 +1343,24 @@ def qseries(self, repo, missing=None, start=0, length=None, status=None, summary=False): - def displayname(patchname): + def displayname(pfx, patchname): if summary: ph = patchheader(self.join(patchname)) msg = ph.message msg = msg and ': ' + msg[0] or ': ' else: msg = '' - return '%s%s' % (patchname, msg) + msg = "%s%s%s" % (pfx, patchname, msg) + if self.ui.interactive(): + msg = util.ellipsis(msg, util.termwidth()) + self.ui.write(msg + '\n') applied = set([p.name for p in self.applied]) if length is None: length = len(self.series) - start if not missing: + if self.ui.verbose: + idxwidth = len(str(start+length - 1)) for i in xrange(start, start+length): patch = self.series[i] if patch in applied: @@ -1366,10 +1371,10 @@ stat = 'G' pfx = '' if self.ui.verbose: - pfx = '%d %s ' % (i, stat) + pfx = '%*d %s ' % (idxwidth, i, stat) elif status and status != stat: continue - self.ui.write('%s%s\n' % (pfx, displayname(patch))) + displayname(pfx, patch) else: msng_list = [] for root, dirs, files in os.walk(self.path): @@ -1383,7 +1388,7 @@ msng_list.append(fl) for x in sorted(msng_list): pfx = self.ui.verbose and ('D ') or '' - self.ui.write("%s%s\n" % (pfx, displayname(x))) + displayname(pfx, x) def issaveline(self, l): if l.name == '.hg.patches.save.line': diff -r 42956a93db3a -r 28b1797b0040 hgext/share.py --- a/hgext/share.py Sat Jul 04 12:40:34 2009 +0200 +++ b/hgext/share.py Sat Jul 04 13:31:36 2009 +0200 @@ -5,7 +5,6 @@ '''share a common history between several working directories''' -import os from mercurial.i18n import _ from mercurial import hg, commands diff -r 42956a93db3a -r 28b1797b0040 mercurial/commands.py --- a/mercurial/commands.py Sat Jul 04 12:40:34 2009 +0200 +++ b/mercurial/commands.py Sat Jul 04 13:31:36 2009 +0200 @@ -396,8 +396,8 @@ while size <= changesets: tests, size = tests + 1, size * 2 rev = repo.changelog.rev(node) - ui.write(_("Testing changeset %s:%s " - "(%s changesets remaining, ~%s tests)\n") + ui.write(_("Testing changeset %d:%s " + "(%d changesets remaining, ~%d tests)\n") % (rev, short(node), changesets, tests)) if not noupdate: cmdutil.bail_if_changed(repo) diff -r 42956a93db3a -r 28b1797b0040 mercurial/context.py --- a/mercurial/context.py Sat Jul 04 12:40:34 2009 +0200 +++ b/mercurial/context.py Sat Jul 04 13:31:36 2009 +0200 @@ -199,7 +199,9 @@ assert (changeid is not None or fileid is not None - or changectx is not None) + or changectx is not None), \ + ("bad args: changeid=%r, fileid=%r, changectx=%r" + % (changeid, fileid, changectx)) if filelog: self._filelog = filelog diff -r 42956a93db3a -r 28b1797b0040 mercurial/extensions.py --- a/mercurial/extensions.py Sat Jul 04 12:40:34 2009 +0200 +++ b/mercurial/extensions.py Sat Jul 04 13:31:36 2009 +0200 @@ -166,10 +166,6 @@ def enabled(): '''return a dict of {name: desc} of extensions, and the max name length''' - - if not enabled: - return {}, 0 - exts = {} maxlength = 0 exthelps = [] diff -r 42956a93db3a -r 28b1797b0040 tests/test-hook --- a/tests/test-hook Sat Jul 04 12:40:34 2009 +0200 +++ b/tests/test-hook Sat Jul 04 13:31:36 2009 +0200 @@ -230,4 +230,22 @@ hg showconfig hooks | sed -e 's/ at .*>/>/' +echo '# test python hook configured with python:[file]:[hook] syntax' +cd .. +mkdir d +cd d +hg init repo +mkdir hooks + +cd hooks +cat > testhooks.py < ../repo/.hg/hgrc +echo "pre-commit.test = python:`pwd`/testhooks.py:testhook" >> ../repo/.hg/hgrc + +cd ../repo +hg commit + exit 0 diff -r 42956a93db3a -r 28b1797b0040 tests/test-hook.out --- a/tests/test-hook.out Sat Jul 04 12:40:34 2009 +0200 +++ b/tests/test-hook.out Sat Jul 04 13:31:36 2009 +0200 @@ -160,3 +160,6 @@ Automatically installed hook committed changeset 1:52998019f6252a2b893452765fcb0a47351a5708 hooks.commit.auto= +# test python hook configured with python:[file]:[hook] syntax +hook works +nothing changed