Show More
@@ -15,6 +15,7 b' map from a changeset hash to its hash in' | |||||
15 |
|
15 | |||
16 | from mercurial.i18n import _ |
|
16 | from mercurial.i18n import _ | |
17 | import os, tempfile |
|
17 | import os, tempfile | |
|
18 | from mercurial.node import short | |||
18 | from mercurial import bundlerepo, hg, merge, match |
|
19 | from mercurial import bundlerepo, hg, merge, match | |
19 | from mercurial import patch, revlog, scmutil, util, error, cmdutil |
|
20 | from mercurial import patch, revlog, scmutil, util, error, cmdutil | |
20 | from mercurial import revset, templatekw |
|
21 | from mercurial import revset, templatekw | |
@@ -110,7 +111,7 b' class transplanter(object):' | |||||
110 | lock = repo.lock() |
|
111 | lock = repo.lock() | |
111 | for rev in revs: |
|
112 | for rev in revs: | |
112 | node = revmap[rev] |
|
113 | node = revmap[rev] | |
113 |
revstr = '%s:%s' % (rev, |
|
114 | revstr = '%s:%s' % (rev, short(node)) | |
114 |
|
115 | |||
115 | if self.applied(repo, node, p1): |
|
116 | if self.applied(repo, node, p1): | |
116 | self.ui.warn(_('skipping already applied revision %s\n') % |
|
117 | self.ui.warn(_('skipping already applied revision %s\n') % | |
@@ -143,7 +144,7 b' class transplanter(object):' | |||||
143 |
|
144 | |||
144 | if parents[1] != revlog.nullid: |
|
145 | if parents[1] != revlog.nullid: | |
145 | self.ui.note(_('skipping merge changeset %s:%s\n') |
|
146 | self.ui.note(_('skipping merge changeset %s:%s\n') | |
146 |
% (rev, |
|
147 | % (rev, short(node))) | |
147 | patchfile = None |
|
148 | patchfile = None | |
148 | else: |
|
149 | else: | |
149 | fd, patchfile = tempfile.mkstemp(prefix='hg-transplant-') |
|
150 | fd, patchfile = tempfile.mkstemp(prefix='hg-transplant-') | |
@@ -163,11 +164,11 b' class transplanter(object):' | |||||
163 | filter=opts.get('filter')) |
|
164 | filter=opts.get('filter')) | |
164 | if n and domerge: |
|
165 | if n and domerge: | |
165 | self.ui.status(_('%s merged at %s\n') % (revstr, |
|
166 | self.ui.status(_('%s merged at %s\n') % (revstr, | |
166 |
|
|
167 | short(n))) | |
167 | elif n: |
|
168 | elif n: | |
168 | self.ui.status(_('%s transplanted to %s\n') |
|
169 | self.ui.status(_('%s transplanted to %s\n') | |
169 |
% ( |
|
170 | % (short(node), | |
170 |
|
|
171 | short(n))) | |
171 | finally: |
|
172 | finally: | |
172 | if patchfile: |
|
173 | if patchfile: | |
173 | os.unlink(patchfile) |
|
174 | os.unlink(patchfile) | |
@@ -219,7 +220,7 b' class transplanter(object):' | |||||
219 | # we don't translate messages inserted into commits |
|
220 | # we don't translate messages inserted into commits | |
220 | message += '\n(transplanted from %s)' % revlog.hex(node) |
|
221 | message += '\n(transplanted from %s)' % revlog.hex(node) | |
221 |
|
222 | |||
222 |
self.ui.status(_('applying %s\n') % |
|
223 | self.ui.status(_('applying %s\n') % short(node)) | |
223 | self.ui.note('%s %s\n%s\n' % (user, date, message)) |
|
224 | self.ui.note('%s %s\n%s\n' % (user, date, message)) | |
224 |
|
225 | |||
225 | if not patchfile and not merge: |
|
226 | if not patchfile and not merge: | |
@@ -270,8 +271,8 b' class transplanter(object):' | |||||
270 | '''recover last transaction and apply remaining changesets''' |
|
271 | '''recover last transaction and apply remaining changesets''' | |
271 | if os.path.exists(os.path.join(self.path, 'journal')): |
|
272 | if os.path.exists(os.path.join(self.path, 'journal')): | |
272 | n, node = self.recover(repo) |
|
273 | n, node = self.recover(repo) | |
273 |
self.ui.status(_('%s transplanted as %s\n') % ( |
|
274 | self.ui.status(_('%s transplanted as %s\n') % (short(node), | |
274 |
|
|
275 | short(n))) | |
275 | seriespath = os.path.join(self.path, 'series') |
|
276 | seriespath = os.path.join(self.path, 'series') | |
276 | if not os.path.exists(seriespath): |
|
277 | if not os.path.exists(seriespath): | |
277 | self.transplants.write() |
|
278 | self.transplants.write() |
@@ -12,7 +12,7 b' and O(changes) merge between branches.' | |||||
12 | """ |
|
12 | """ | |
13 |
|
13 | |||
14 | # import stuff from node for others to import from revlog |
|
14 | # import stuff from node for others to import from revlog | |
15 |
from node import bin, hex, nullid, nullrev |
|
15 | from node import bin, hex, nullid, nullrev | |
16 | from i18n import _ |
|
16 | from i18n import _ | |
17 | import ancestor, mdiff, parsers, error, util, dagutil |
|
17 | import ancestor, mdiff, parsers, error, util, dagutil | |
18 | import struct, zlib, errno |
|
18 | import struct, zlib, errno |
@@ -6,7 +6,6 b'' | |||||
6 | mercurial/commands.py:*: 'bdiff' imported but unused (glob) |
|
6 | mercurial/commands.py:*: 'bdiff' imported but unused (glob) | |
7 | mercurial/commands.py:*: 'mpatch' imported but unused (glob) |
|
7 | mercurial/commands.py:*: 'mpatch' imported but unused (glob) | |
8 | mercurial/commands.py:*: 'osutil' imported but unused (glob) |
|
8 | mercurial/commands.py:*: 'osutil' imported but unused (glob) | |
9 | mercurial/revlog.py:*: 'short' imported but unused (glob) |
|
|||
10 | hgext/inotify/linux/__init__.py:*: 'from _inotify import *' used; unable to detect undefined names (glob) |
|
9 | hgext/inotify/linux/__init__.py:*: 'from _inotify import *' used; unable to detect undefined names (glob) | |
11 | mercurial/util.py:*: 'from posix import *' used; unable to detect undefined names (glob) |
|
10 | mercurial/util.py:*: 'from posix import *' used; unable to detect undefined names (glob) | |
12 | mercurial/windows.py:*: 'from win32 import *' used; unable to detect undefined names (glob) |
|
11 | mercurial/windows.py:*: 'from win32 import *' used; unable to detect undefined names (glob) |
General Comments 0
You need to be logged in to leave comments.
Login now