# HG changeset patch # User Matt Mackall # Date 1306008088 18000 # Node ID bdf44e63a94c5ffd0ebdcb6f7976bdfb03f90aac # Parent bb5cbc16349e47adc8f8300fed3c397e0f54f4ec revlog: stop exporting node.short diff -r bb5cbc16349e -r bdf44e63a94c hgext/transplant.py --- 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() diff -r bb5cbc16349e -r bdf44e63a94c mercurial/revlog.py --- a/mercurial/revlog.py Thu May 19 22:55:13 2011 +0200 +++ b/mercurial/revlog.py Sat May 21 15:01:28 2011 -0500 @@ -12,7 +12,7 @@ """ # import stuff from node for others to import from revlog -from node import bin, hex, nullid, nullrev, short #@UnusedImport +from node import bin, hex, nullid, nullrev from i18n import _ import ancestor, mdiff, parsers, error, util, dagutil import struct, zlib, errno diff -r bb5cbc16349e -r bdf44e63a94c tests/test-check-pyflakes.t --- a/tests/test-check-pyflakes.t Thu May 19 22:55:13 2011 +0200 +++ b/tests/test-check-pyflakes.t Sat May 21 15:01:28 2011 -0500 @@ -6,7 +6,6 @@ mercurial/commands.py:*: 'bdiff' imported but unused (glob) mercurial/commands.py:*: 'mpatch' imported but unused (glob) mercurial/commands.py:*: 'osutil' imported but unused (glob) - mercurial/revlog.py:*: 'short' imported but unused (glob) hgext/inotify/linux/__init__.py:*: 'from _inotify import *' used; unable to detect undefined names (glob) mercurial/util.py:*: 'from posix import *' used; unable to detect undefined names (glob) mercurial/windows.py:*: 'from win32 import *' used; unable to detect undefined names (glob)