comparison hgext/rebase.py @ 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 6d4bf1c1a003
children 3d44f1a68353
comparison
equal deleted inserted replaced
8614:573734e7e6d0 8615:94ca38e63576
94 cmdutil.bail_if_changed(repo) 94 cmdutil.bail_if_changed(repo)
95 result = buildstate(repo, destf, srcf, basef, collapsef) 95 result = buildstate(repo, destf, srcf, basef, collapsef)
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:
103 if extrafn: 103 if extrafn:
104 raise error.ParseError( 104 raise error.ParseError(
131 # Remove no more useful revisions 131 # Remove no more useful revisions
132 if set(repo.changelog.descendants(min(state))) - set(state): 132 if set(repo.changelog.descendants(min(state))) - set(state):
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"))
140 if os.path.exists(repo.sjoin('undo')): 140 if os.path.exists(repo.sjoin('undo')):
141 util.unlink(repo.sjoin('undo')) 141 util.unlink(repo.sjoin('undo'))