Mercurial > public > mercurial-scm > hg-stable
diff hgext/transplant.py @ 14393:bdf44e63a94c
revlog: stop exporting node.short
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 21 May 2011 15:01:28 -0500 |
parents | 2d16f15da7bd |
children | 517e1d88bf7e |
line wrap: on
line diff
--- a/hgext/transplant.py Thu May 19 22:55:13 2011 +0200 +++ b/hgext/transplant.py Sat May 21 15:01:28 2011 -0500 @@ -15,6 +15,7 @@ from mercurial.i18n import _ import os, tempfile +from mercurial.node import short from mercurial import bundlerepo, hg, merge, match from mercurial import patch, revlog, scmutil, util, error, cmdutil from mercurial import revset, templatekw @@ -110,7 +111,7 @@ lock = repo.lock() for rev in revs: node = revmap[rev] - revstr = '%s:%s' % (rev, revlog.short(node)) + revstr = '%s:%s' % (rev, short(node)) if self.applied(repo, node, p1): self.ui.warn(_('skipping already applied revision %s\n') % @@ -143,7 +144,7 @@ if parents[1] != revlog.nullid: self.ui.note(_('skipping merge changeset %s:%s\n') - % (rev, revlog.short(node))) + % (rev, short(node))) patchfile = None else: fd, patchfile = tempfile.mkstemp(prefix='hg-transplant-') @@ -163,11 +164,11 @@ filter=opts.get('filter')) if n and domerge: self.ui.status(_('%s merged at %s\n') % (revstr, - revlog.short(n))) + short(n))) elif n: self.ui.status(_('%s transplanted to %s\n') - % (revlog.short(node), - revlog.short(n))) + % (short(node), + short(n))) finally: if patchfile: os.unlink(patchfile) @@ -219,7 +220,7 @@ # we don't translate messages inserted into commits message += '\n(transplanted from %s)' % revlog.hex(node) - self.ui.status(_('applying %s\n') % revlog.short(node)) + self.ui.status(_('applying %s\n') % short(node)) self.ui.note('%s %s\n%s\n' % (user, date, message)) if not patchfile and not merge: @@ -270,8 +271,8 @@ '''recover last transaction and apply remaining changesets''' if os.path.exists(os.path.join(self.path, 'journal')): n, node = self.recover(repo) - self.ui.status(_('%s transplanted as %s\n') % (revlog.short(node), - revlog.short(n))) + self.ui.status(_('%s transplanted as %s\n') % (short(node), + short(n))) seriespath = os.path.join(self.path, 'series') if not os.path.exists(seriespath): self.transplants.write()