diff --git a/hgext/hgk.py b/hgext/hgk.py --- a/hgext/hgk.py +++ b/hgext/hgk.py @@ -96,7 +96,7 @@ def difftree(ui, repo, node1=None, node2 chunks = patch.diff(repo, node1, node2, match=m, opts=patch.diffopts(ui, {'git': True})) for chunk in chunks: - repo.ui.write(chunk) + ui.write(chunk) else: __difftree(repo, node1, node2, files=files) if not opts['stdin']: diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -96,7 +96,7 @@ def rebase(ui, repo, **opts): if result: originalwd, target, state, external = result else: # Empty state built, nothing to rebase - repo.ui.status(_('nothing to rebase\n')) + ui.status(_('nothing to rebase\n')) return if keepbranchesf: @@ -133,7 +133,7 @@ def rebase(ui, repo, **opts): ui.warn(_("warning: new changesets detected on source branch, " "not stripping\n")) else: - repair.strip(repo.ui, repo, repo[min(state)].node(), "strip") + repair.strip(ui, repo, repo[min(state)].node(), "strip") clearstatus(repo) ui.status(_("rebase completed\n")) diff --git a/hgext/transplant.py b/hgext/transplant.py --- a/hgext/transplant.py +++ b/hgext/transplant.py @@ -413,7 +413,7 @@ def browserevs(ui, repo, nodes, opts): elif action == 'p': parent = repo.changelog.parents(node)[0] for chunk in patch.diff(repo, parent, node): - repo.ui.write(chunk) + ui.write(chunk) action = None elif action not in ('y', 'n', 'm', 'c', 'q'): ui.write('no such option\n') diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1078,7 +1078,7 @@ def diff(ui, repo, *pats, **opts): m = cmdutil.match(repo, pats, opts) it = patch.diff(repo, node1, node2, match=m, opts=patch.diffopts(ui, opts)) for chunk in it: - repo.ui.write(chunk) + ui.write(chunk) def export(ui, repo, *changesets, **opts): """dump the header and diffs for one or more changesets @@ -2491,7 +2491,7 @@ def revert(ui, repo, *pats, **opts): for f in names: if f.startswith(path_): return False - repo.ui.warn("%s: %s\n" % (m.rel(path), msg)) + ui.warn("%s: %s\n" % (m.rel(path), msg)) return False m = cmdutil.match(repo, pats, opts) diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py --- a/mercurial/filemerge.py +++ b/mercurial/filemerge.py @@ -163,11 +163,11 @@ def filemerge(repo, mynode, orig, fcd, f util.copyfile(a, back) if orig != fco.path(): - repo.ui.status(_("merging %s and %s to %s\n") % (orig, fco.path(), fd)) + ui.status(_("merging %s and %s to %s\n") % (orig, fco.path(), fd)) else: - repo.ui.status(_("merging %s\n") % fd) + ui.status(_("merging %s\n") % fd) - repo.ui.debug(_("my %s other %s ancestor %s\n") % (fcd, fco, fca)) + ui.debug(_("my %s other %s ancestor %s\n") % (fcd, fco, fca)) # do we attempt to simplemerge first? if _toolbool(ui, tool, "premerge", not (binary or symlink)): @@ -213,7 +213,7 @@ def filemerge(repo, mynode, orig, fcd, f _matcheol(repo.wjoin(fd), back) if r: - repo.ui.warn(_("merging %s failed!\n") % fd) + ui.warn(_("merging %s failed!\n") % fd) else: os.unlink(back)