Mercurial > hg
changeset 20282:2cfb720592fe
commands: use bookmarks.validdest instead of duplicating logic
Now that bookmarks.py has grown a validdest method that even handles successor
changesets, we use that instead of duplicating the logic in commands.py
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Wed, 15 Jan 2014 17:55:13 -0600 |
parents | 67ee87a371b2 |
children | 2b96073f3138 |
files | mercurial/commands.py |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Jan 15 17:48:48 2014 -0600 +++ b/mercurial/commands.py Wed Jan 15 17:55:13 2014 -0600 @@ -847,12 +847,10 @@ bookmarks.deletedivergent(repo, [target], mark) return - # consider successor changesets as well - foreground = obsolete.foreground(repo, [marks[mark]]) deletefrom = [b for b in divs if repo[b].rev() in anc or b == target] bookmarks.deletedivergent(repo, deletefrom, mark) - if bmctx.rev() in anc or target in foreground: + if bookmarks.validdest(repo, bmctx, repo[target]): ui.status(_("moving bookmark '%s' forward from %s\n") % (mark, short(bmctx.node()))) return