[PATCH] mq: introduce -B option to remove a bookmark

Matt Mackall mpm at selenic.com
Sun May 13 14:31:28 CDT 2012


On Sun, 2012-05-13 at 16:40 +0200, David Soria Parra wrote:
> # HG changeset patch
> # User David Soria Parra <dsp at php.net>
> # Date 1336919980 -7200
> # Node ID da15c45873b3db985a53f43d985e3ee088dec0d4
> # Parent  a0a756c91dadafdefb6cfef4eeef20fc33c52f1f
> mq: introduce -B option to remove a bookmark

Queued for default with a couple tweaks.

> +            rmatch = revset.formatspec("ancestors(bookmark(%s)) - "
> +                                   "ancestors(head() and not bookmark(%s)) - "
> +                                   "ancestors(bookmark() and not bookmark(%s))",
> +                                   mark, mark, mark)
> +            rsrevs = revset.match(ui, rmatch)(repo, range(len(repo)))

This is a longer way of writing repo.revs(...)

> +            ui.write(_("bookmark '%s' deleted\n" % mark))

check-code caught a problem with your '%' placement.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list