minor issues with "hg bookmark"
Thomas Arendsen Hein
thomas at intevation.de
Tue Oct 9 05:01:06 CDT 2012
> bookmarks: deactivate current bookmark if no name is given
While looking at the code I saw some minor things:
- Renaming bookmark does not check all things that marking does,
e.g. newlines, whitespace and branch name collision.
- Incompatible options are not catched, e.g. something like
if delete and rename:
raise util.Abort(_("--delete and --rename are incompatible"))
(and some more)
- There are far too many return statements compared to other parts
of the code. I suggest dropping them where not needed and
replacing "if xx:" with "elif xx:" elsewhere, or even simply
"else:" in the case of "if mark is None:".
Of course this is a matter of taste, the explicit returns and
checks could help prevent mistakes, but as other parts of the code
don't do this, it feels too much here.
Can you send patches for this for me to push to crew (not stable)?
thomas at intevation.de - http://intevation.de/~thomas/ - OpenPGP key: 0x5816791A
Intevation GmbH, Neuer Graben 17, 49074 Osnabrueck - AG Osnabrueck, HR B 18998
Geschaeftsfuehrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
More information about the Mercurial-devel