##// END OF EJS Templates
use ui instead of repo.ui when the former is in scope
Martin Geisler -
r8615:94ca38e6 default
parent child Browse files
Show More
@@ -96,7 +96,7 b' def difftree(ui, repo, node1=None, node2'
96 chunks = patch.diff(repo, node1, node2, match=m,
96 chunks = patch.diff(repo, node1, node2, match=m,
97 opts=patch.diffopts(ui, {'git': True}))
97 opts=patch.diffopts(ui, {'git': True}))
98 for chunk in chunks:
98 for chunk in chunks:
99 repo.ui.write(chunk)
99 ui.write(chunk)
100 else:
100 else:
101 __difftree(repo, node1, node2, files=files)
101 __difftree(repo, node1, node2, files=files)
102 if not opts['stdin']:
102 if not opts['stdin']:
@@ -96,7 +96,7 b' def rebase(ui, repo, **opts):'
96 if result:
96 if result:
97 originalwd, target, state, external = result
97 originalwd, target, state, external = result
98 else: # Empty state built, nothing to rebase
98 else: # Empty state built, nothing to rebase
99 repo.ui.status(_('nothing to rebase\n'))
99 ui.status(_('nothing to rebase\n'))
100 return
100 return
101
101
102 if keepbranchesf:
102 if keepbranchesf:
@@ -133,7 +133,7 b' def rebase(ui, repo, **opts):'
133 ui.warn(_("warning: new changesets detected on source branch, "
133 ui.warn(_("warning: new changesets detected on source branch, "
134 "not stripping\n"))
134 "not stripping\n"))
135 else:
135 else:
136 repair.strip(repo.ui, repo, repo[min(state)].node(), "strip")
136 repair.strip(ui, repo, repo[min(state)].node(), "strip")
137
137
138 clearstatus(repo)
138 clearstatus(repo)
139 ui.status(_("rebase completed\n"))
139 ui.status(_("rebase completed\n"))
@@ -413,7 +413,7 b' def browserevs(ui, repo, nodes, opts):'
413 elif action == 'p':
413 elif action == 'p':
414 parent = repo.changelog.parents(node)[0]
414 parent = repo.changelog.parents(node)[0]
415 for chunk in patch.diff(repo, parent, node):
415 for chunk in patch.diff(repo, parent, node):
416 repo.ui.write(chunk)
416 ui.write(chunk)
417 action = None
417 action = None
418 elif action not in ('y', 'n', 'm', 'c', 'q'):
418 elif action not in ('y', 'n', 'm', 'c', 'q'):
419 ui.write('no such option\n')
419 ui.write('no such option\n')
@@ -1078,7 +1078,7 b' def diff(ui, repo, *pats, **opts):'
1078 m = cmdutil.match(repo, pats, opts)
1078 m = cmdutil.match(repo, pats, opts)
1079 it = patch.diff(repo, node1, node2, match=m, opts=patch.diffopts(ui, opts))
1079 it = patch.diff(repo, node1, node2, match=m, opts=patch.diffopts(ui, opts))
1080 for chunk in it:
1080 for chunk in it:
1081 repo.ui.write(chunk)
1081 ui.write(chunk)
1082
1082
1083 def export(ui, repo, *changesets, **opts):
1083 def export(ui, repo, *changesets, **opts):
1084 """dump the header and diffs for one or more changesets
1084 """dump the header and diffs for one or more changesets
@@ -2491,7 +2491,7 b' def revert(ui, repo, *pats, **opts):'
2491 for f in names:
2491 for f in names:
2492 if f.startswith(path_):
2492 if f.startswith(path_):
2493 return False
2493 return False
2494 repo.ui.warn("%s: %s\n" % (m.rel(path), msg))
2494 ui.warn("%s: %s\n" % (m.rel(path), msg))
2495 return False
2495 return False
2496
2496
2497 m = cmdutil.match(repo, pats, opts)
2497 m = cmdutil.match(repo, pats, opts)
@@ -163,11 +163,11 b' def filemerge(repo, mynode, orig, fcd, f'
163 util.copyfile(a, back)
163 util.copyfile(a, back)
164
164
165 if orig != fco.path():
165 if orig != fco.path():
166 repo.ui.status(_("merging %s and %s to %s\n") % (orig, fco.path(), fd))
166 ui.status(_("merging %s and %s to %s\n") % (orig, fco.path(), fd))
167 else:
167 else:
168 repo.ui.status(_("merging %s\n") % fd)
168 ui.status(_("merging %s\n") % fd)
169
169
170 repo.ui.debug(_("my %s other %s ancestor %s\n") % (fcd, fco, fca))
170 ui.debug(_("my %s other %s ancestor %s\n") % (fcd, fco, fca))
171
171
172 # do we attempt to simplemerge first?
172 # do we attempt to simplemerge first?
173 if _toolbool(ui, tool, "premerge", not (binary or symlink)):
173 if _toolbool(ui, tool, "premerge", not (binary or symlink)):
@@ -213,7 +213,7 b' def filemerge(repo, mynode, orig, fcd, f'
213 _matcheol(repo.wjoin(fd), back)
213 _matcheol(repo.wjoin(fd), back)
214
214
215 if r:
215 if r:
216 repo.ui.warn(_("merging %s failed!\n") % fd)
216 ui.warn(_("merging %s failed!\n") % fd)
217 else:
217 else:
218 os.unlink(back)
218 os.unlink(back)
219
219
General Comments 0
You need to be logged in to leave comments. Login now