Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG4e33aa8639d0: py3: use "%d" for converting int to bytes in transplant.py
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
diffopts.git = True | diffopts.git = True | ||||
lock = tr = None | lock = tr = None | ||||
try: | try: | ||||
lock = repo.lock() | lock = repo.lock() | ||||
tr = repo.transaction('transplant') | tr = repo.transaction('transplant') | ||||
for rev in revs: | for rev in revs: | ||||
node = revmap[rev] | node = revmap[rev] | ||||
revstr = '%s:%s' % (rev, nodemod.short(node)) | revstr = '%d:%s' % (rev, nodemod.short(node)) | ||||
if self.applied(repo, node, p1): | if self.applied(repo, node, p1): | ||||
self.ui.warn(_('skipping already applied revision %s\n') % | self.ui.warn(_('skipping already applied revision %s\n') % | ||||
revstr) | revstr) | ||||
continue | continue | ||||
parents = source.changelog.parents(node) | parents = source.changelog.parents(node) | ||||
if not (opts.get('filter') or opts.get('log')): | if not (opts.get('filter') or opts.get('log')): | ||||
# transplants before them fail. | # transplants before them fail. | ||||
domerge = True | domerge = True | ||||
if not hasnode(repo, node): | if not hasnode(repo, node): | ||||
exchange.pull(repo, source.peer(), heads=[node]) | exchange.pull(repo, source.peer(), heads=[node]) | ||||
skipmerge = False | skipmerge = False | ||||
if parents[1] != revlog.nullid: | if parents[1] != revlog.nullid: | ||||
if not opts.get('parent'): | if not opts.get('parent'): | ||||
self.ui.note(_('skipping merge changeset %s:%s\n') | self.ui.note(_('skipping merge changeset %d:%s\n') | ||||
% (rev, nodemod.short(node))) | % (rev, nodemod.short(node))) | ||||
skipmerge = True | skipmerge = True | ||||
else: | else: | ||||
parent = source.lookup(opts['parent']) | parent = source.lookup(opts['parent']) | ||||
if parent not in parents: | if parent not in parents: | ||||
raise error.Abort(_('%s is not a parent of %s') % | raise error.Abort(_('%s is not a parent of %s') % | ||||
(nodemod.short(parent), | (nodemod.short(parent), | ||||
nodemod.short(node))) | nodemod.short(node))) |