# HG changeset patch # User Matt Harbison # Date 1545365818 18000 # Node ID b53c5651fcf6e41d87715c404898b846290675d8 # Parent c0865f3da28508dde7b0a0a7d9840936984c9f46 py3: convert `'{}'.format(foo)` to `'%s' % foo` in the bookflow extension Byte strings don't have the former. Converting these to byte strings is waiting on the mass rewrite. diff -r c0865f3da285 -r b53c5651fcf6 hgext/bookflow.py --- a/hgext/bookflow.py Thu Dec 20 18:12:29 2018 -0500 +++ b/hgext/bookflow.py Thu Dec 20 23:16:58 2018 -0500 @@ -41,11 +41,11 @@ if active: if active in ui.configlist(MY_NAME, 'protect'): raise error.Abort( - _('cannot commit, bookmark {} is protected').format(active)) + _('cannot commit, bookmark %s is protected') % active) if not cwd_at_bookmark(repo, active): raise error.Abort( _('cannot commit, working directory out of sync with active bookmark'), - hint=_("run 'hg up {}'").format(active)) + hint=_("run 'hg up %s'") % active) elif ui.configbool(MY_NAME, 'require-bookmark', True): raise error.Abort(_('cannot commit without an active bookmark')) return 0 @@ -64,9 +64,9 @@ marks = repo._bookmarks for name in names: if name in marks: - raise error.Abort( - _("bookmark {} already exists, to move use the --rev option" - ).format(name)) + raise error.Abort(_( + "bookmark %s already exists, to move use the --rev option" + ) % name) return orig(repo, tr, names, rev, force, inactive) def commands_commit(orig, ui, repo, *args, **opts): @@ -78,8 +78,9 @@ active = repo._bookmarks.active if active and not cwd_at_bookmark(repo, active): ui.warn(_( - "working directory out of sync with active bookmark, run 'hg up {}'" - ).format(active)) + "working directory out of sync with active bookmark, run " + "'hg up %s'" + ) % active) return rc def commands_branch(orig, ui, repo, label=None, **opts):