Mercurial > hg-stable
changeset 1855:0ba9dee8cfbd
Fixed spacing/indentation, removed #! script header, added short description.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Wed, 08 Mar 2006 05:16:36 +0100 |
parents | 638b1bc6c6c9 |
children | b8bd84ad9b67 |
files | contrib/hbisect.py |
diffstat | 1 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/hbisect.py Wed Mar 08 05:07:20 2006 +0100 +++ b/contrib/hbisect.py Wed Mar 08 05:16:36 2006 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +# bisect extension for mercurial # # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. @@ -91,7 +91,7 @@ if head is None: head = self.badrev return self.__ancestors_and_nb_ancestors(head, stop)[1] - + def ancestors(self, head=None, stop=None): """ returns the set of the ancestors of head (self included) @@ -100,7 +100,7 @@ if head is None: head = self.badrev return self.__ancestors_and_nb_ancestors(head, stop)[0] - + def __ancestors_and_nb_ancestors(self, head, stop=None): """ if stop is None then ancestors of goodrevs are used as @@ -131,7 +131,7 @@ for p in parents: d[p][0] += 1 return d - + if head in stop: self.ui.warn("Unconsistent state, %s is good and bad\n" % hg.hex(head)) @@ -161,7 +161,8 @@ if not self.goodrevs: self.ui.warn("No good revision given\n") self.ui.warn("Assuming the first revision is good\n") - ancestors, num_ancestors = self.__ancestors_and_nb_ancestors(self.badrev) + ancestors, num_ancestors = self.__ancestors_and_nb_ancestors( + self.badrev) tot = len(ancestors) if tot == 1: if ancestors.pop() != self.badrev: @@ -260,7 +261,7 @@ for cmd in cmds: doc = cmdtable[cmd][0].__doc__.splitlines(0)[0].rstrip() ui.write(" %-*s %s\n" % (m, cmd, doc)) - + b = bisect(ui, repo) bisectcmdtable = { "init": (b.init, 0, "hg bisect init"), @@ -270,7 +271,7 @@ "reset": (b.reset, 0, "hg bisect reset"), "help": (help_, 1, "hg bisect help [<subcommand>]"), } - + if not bisectcmdtable.has_key(cmd): ui.warn("bisect: Unknown sub-command\n") return help_() @@ -280,7 +281,6 @@ return bisectcmdtable[cmd][0](*args) cmdtable = { - "bisect": (bisect_run, [], - "hg bisect [help|init|reset|next|good|bad]"), + "bisect": (bisect_run, [], "hg bisect [help|init|reset|next|good|bad]"), #"bisect-test": (test, [], "hg bisect-test rev"), }