Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHGacc8e6e52af6: py3: use "%d" to convert integers to bytes
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | hgext/rebase.py (2 lines) | |||
M | hgext/shelve.py (2 lines) | |||
M | mercurial/verify.py (1 line) |
self.state[rev] = repo[newnode].rev() | self.state[rev] = repo[newnode].rev() | ||||
ui.debug('rebased as %s\n' % short(newnode)) | ui.debug('rebased as %s\n' % short(newnode)) | ||||
else: | else: | ||||
if not self.collapsef: | if not self.collapsef: | ||||
ui.warn(_('note: rebase of %d:%s created no changes ' | ui.warn(_('note: rebase of %d:%s created no changes ' | ||||
'to commit\n') % (rev, ctx)) | 'to commit\n') % (rev, ctx)) | ||||
self.skipped.add(rev) | self.skipped.add(rev) | ||||
self.state[rev] = p1 | self.state[rev] = p1 | ||||
ui.debug('next revision set to %s\n' % p1) | ui.debug('next revision set to %d\n' % p1) | ||||
else: | else: | ||||
ui.status(_('already rebased %s as %s\n') % | ui.status(_('already rebased %s as %s\n') % | ||||
(desc, repo[self.state[rev]])) | (desc, repo[self.state[rev]])) | ||||
return pos | return pos | ||||
def _finishrebase(self): | def _finishrebase(self): | ||||
repo, ui, opts = self.repo, self.ui, self.opts | repo, ui, opts = self.repo, self.ui, self.opts | ||||
fm = ui.formatter('rebase', opts) | fm = ui.formatter('rebase', opts) |
for p in repo.dirstate.parents()]), | for p in repo.dirstate.parents()]), | ||||
"nodestoremove": ' '.join([nodemod.hex(n) | "nodestoremove": ' '.join([nodemod.hex(n) | ||||
for n in nodestoremove]), | for n in nodestoremove]), | ||||
"branchtorestore": branchtorestore, | "branchtorestore": branchtorestore, | ||||
"keep": cls._keep if keep else cls._nokeep, | "keep": cls._keep if keep else cls._nokeep, | ||||
"activebook": activebook or cls._noactivebook | "activebook": activebook or cls._noactivebook | ||||
} | } | ||||
scmutil.simplekeyvaluefile(repo.vfs, cls._filename)\ | scmutil.simplekeyvaluefile(repo.vfs, cls._filename)\ | ||||
.write(info, firstline=str(cls._version)) | .write(info, firstline=("%d" % cls._version)) | ||||
@classmethod | @classmethod | ||||
def clear(cls, repo): | def clear(cls, repo): | ||||
repo.vfs.unlinkpath(cls._filename, ignoremissing=True) | repo.vfs.unlinkpath(cls._filename, ignoremissing=True) | ||||
def cleanupoldbackups(repo): | def cleanupoldbackups(repo): | ||||
vfs = vfsmod.vfs(repo.vfs.join(backupdir)) | vfs = vfsmod.vfs(repo.vfs.join(backupdir)) | ||||
maxbackups = repo.ui.configint('shelve', 'maxbackups') | maxbackups = repo.ui.configint('shelve', 'maxbackups') |
def warn(self, msg): | def warn(self, msg): | ||||
self.ui.warn(msg + "\n") | self.ui.warn(msg + "\n") | ||||
self.warnings += 1 | self.warnings += 1 | ||||
def err(self, linkrev, msg, filename=None): | def err(self, linkrev, msg, filename=None): | ||||
if linkrev is not None: | if linkrev is not None: | ||||
self.badrevs.add(linkrev) | self.badrevs.add(linkrev) | ||||
linkrev = "%d" % linkrev | |||||
else: | else: | ||||
linkrev = '?' | linkrev = '?' | ||||
msg = "%s: %s" % (linkrev, msg) | msg = "%s: %s" % (linkrev, msg) | ||||
if filename: | if filename: | ||||
msg = "%s@%s" % (filename, msg) | msg = "%s@%s" % (filename, msg) | ||||
self.ui.warn(" " + msg + "\n") | self.ui.warn(" " + msg + "\n") | ||||
self.errors += 1 | self.errors += 1 | ||||