changeset 8615:94ca38e63576

use ui instead of repo.ui when the former is in scope
author Martin Geisler <mg@lazybytes.net>
date Sun, 24 May 2009 22:37:20 +0200
parents 573734e7e6d0
children 704833724ff6
files hgext/hgk.py hgext/rebase.py hgext/transplant.py mercurial/commands.py mercurial/filemerge.py
diffstat 5 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/hgk.py	Sun May 24 16:38:29 2009 -0500
+++ b/hgext/hgk.py	Sun May 24 22:37:20 2009 +0200
@@ -96,7 +96,7 @@
             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']:
--- a/hgext/rebase.py	Sun May 24 16:38:29 2009 -0500
+++ b/hgext/rebase.py	Sun May 24 22:37:20 2009 +0200
@@ -96,7 +96,7 @@
             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 @@
                 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"))
--- a/hgext/transplant.py	Sun May 24 16:38:29 2009 -0500
+++ b/hgext/transplant.py	Sun May 24 22:37:20 2009 +0200
@@ -413,7 +413,7 @@
             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')
--- a/mercurial/commands.py	Sun May 24 16:38:29 2009 -0500
+++ b/mercurial/commands.py	Sun May 24 22:37:20 2009 +0200
@@ -1078,7 +1078,7 @@
     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 @@
             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)
--- a/mercurial/filemerge.py	Sun May 24 16:38:29 2009 -0500
+++ b/mercurial/filemerge.py	Sun May 24 22:37:20 2009 +0200
@@ -163,11 +163,11 @@
     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 @@
         _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)