[PATCH 3 of 4] Add option to heads to show only heads for current branch
Eric Hopper
hopper at omnifarious.org
Mon Jun 18 22:06:46 CDT 2007
On Sun, Jun 17, 2007 at 02:29:56PM +0200, Thomas Arendsen Hein wrote:
> * Eric Hopper <hopper at omnifarious.org> [20070614 18:26]:
> > + if len(branchrevs) > 0:
>
> Just "if branchrevs:"
>
> > + if len(bheads) <= 0:
>
> Just "if not bheads:"
Oh, sure, make me drop my idioms born of many hard lessons I managed to
avoid learning in C by pre-emptively doing things this way! Python is
written in C I'll have you know!
> > + 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.
The question now in 'whitespace matters' in Python is "Where?". It's
sometimes hard to tell.
Thanks,
--
"It does me no injury for my neighbor to say there are twenty gods or no God.
It neither picks my pocket nor breaks my leg." --- Thomas Jefferson
"Go to Heaven for the climate, Hell for the company." -- Mark Twain
-- Eric Hopper (http://www.omnifarious.org/~hopper) --
-------------- 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/20070618/eec8eb57/attachment.pgp
More information about the Mercurial-devel
mailing list