[PATCH 3 of 4] Add option to heads to show only heads for current branch

Thomas Arendsen Hein thomas at intevation.de
Sun Jun 17 07:29:56 CDT 2007


* Eric Hopper <hopper at omnifarious.org> [20070614 18:26]:
> # HG changeset patch
> # User Eric Hopper <hopper at omnifarious.org>
> # Date 1181836915 25200
> # Node ID 00ee3a369814418263fea8bf7e13644385d5a10f
> # Parent  f98ca5c0c43c4aacddbd147d7b854f280c827653
> Add option to heads to show only heads for current branch.
> 
> +    if len(branchrevs) > 0:

Just "if branchrevs:"

> +            if len(bheads) <= 0:

Just "if not bheads:"

> +                if branch != branchrev:
> +                    ui.warn(_("No changes on branch %s (the branch of revision"\
> +                                  " %s) are reachable from revision %s\n") % \
> +                                (branch, branchrev, opts['rev']))
> +                else:
> +                    ui.warn(_("No changes on branch %s are reachable "\
> +                                  "from revision %s\n") % \
> +                                (branch, opts['rev']))

Indentation, and you don't need '\' here.

> +    if len(heads) <= 0:

Just "if not heads:"

> +         _('hg heads [-r REV] [REV]...')),

This is too confusing.

So if I say "hg heads -r foo" I get the global heads descending from
the foo branch's tip?

Otherwise I really want to have this feature, just in a
non-confusing way :)

Thomas

-- 
thomas at intevation.de - http://intevation.de/~thomas/ - OpenPGP key: 0x5816791A
Intevation GmbH, Osnabrueck - Register: Amtsgericht Osnabrueck, HR B 18998
Geschaeftsfuehrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20070617/20c64b12/attachment-0001.pgp 


More information about the Mercurial-devel mailing list