Mercurial > hg
comparison hgext/hbisect.py @ 3643:b4ad640a3bcf
templates: move changeset templating bits to cmdutils
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 13 Nov 2006 13:26:57 -0600 |
parents | 3d6efcbbd1c9 |
children | abaee83ce0a6 50a46ae14efb |
comparison
equal
deleted
inserted
replaced
3642:b2c47652e8e3 | 3643:b4ad640a3bcf |
---|---|
6 # This software may be used and distributed according to the terms | 6 # This software may be used and distributed according to the terms |
7 # of the GNU General Public License, incorporated herein by reference. | 7 # of the GNU General Public License, incorporated herein by reference. |
8 | 8 |
9 from mercurial.i18n import gettext as _ | 9 from mercurial.i18n import gettext as _ |
10 from mercurial.demandload import demandload | 10 from mercurial.demandload import demandload |
11 demandload(globals(), "os sys sets mercurial:hg,util,commands") | 11 demandload(globals(), "os sys sets mercurial:hg,util,commands,cmdutil") |
12 | 12 |
13 versionstr = "0.0.3" | 13 versionstr = "0.0.3" |
14 | 14 |
15 def lookup_rev(ui, repo, rev=None): | 15 def lookup_rev(ui, repo, rev=None): |
16 """returns rev or the checked-out revision if rev is None""" | 16 """returns rev or the checked-out revision if rev is None""" |
167 tot = len(ancestors) | 167 tot = len(ancestors) |
168 if tot == 1: | 168 if tot == 1: |
169 if ancestors.pop() != self.badrev: | 169 if ancestors.pop() != self.badrev: |
170 raise util.Abort(_("Could not find the first bad revision")) | 170 raise util.Abort(_("Could not find the first bad revision")) |
171 self.ui.write(_("The first bad revision is:\n")) | 171 self.ui.write(_("The first bad revision is:\n")) |
172 displayer = commands.show_changeset(self.ui, self.repo, {}) | 172 displayer = cmdutil.show_changeset(self.ui, self.repo, {}) |
173 displayer.show(changenode=self.badrev) | 173 displayer.show(changenode=self.badrev) |
174 return None | 174 return None |
175 best_rev = None | 175 best_rev = None |
176 best_len = -1 | 176 best_len = -1 |
177 for n in ancestors: | 177 for n in ancestors: |