# HG changeset patch # User "Yann E. MORIN" # Date 1316379251 -7200 # Node ID 81adf7777f8f54b934e39b53c657fa1c09739ca0 # Parent b1c62c754bf8e23b2113cd5f562d58570bc92191 revset: rename bisected() to bisect() Rename the 'bisected' keyword to simply 'bisect'. Still accept the old name, but no longer advertise it. As discussed with Matt on IRC. Signed-off-by: "Yann E. MORIN" diff -r b1c62c754bf8 -r 81adf7777f8f mercurial/revset.py --- a/mercurial/revset.py Sun Sep 18 10:07:51 2011 +0200 +++ b/mercurial/revset.py Sun Sep 18 22:54:11 2011 +0200 @@ -235,8 +235,8 @@ n = getstring(x, _("author requires a string")).lower() return [r for r in subset if n in repo[r].user().lower()] -def bisected(repo, subset, x): - """``bisected(string)`` +def bisect(repo, subset, x): + """``bisect(string)`` Changesets marked in the specified bisect state (good, bad, skip). """ state = getstring(x, _("bisect requires a string")).lower() @@ -245,6 +245,11 @@ marked = set(repo.changelog.rev(n) for n in hbisect.load_state(repo)[state]) return [r for r in subset if r in marked] +# Backward-compatibility +# - no help entry so that we do not advertise it any more +def bisected(repo, subset, x): + return bisect(repo, subset, x) + def bookmark(repo, subset, x): """``bookmark([name])`` The named bookmark or all bookmarks. @@ -837,6 +842,7 @@ "ancestor": ancestor, "ancestors": ancestors, "author": author, + "bisect": bisect, "bisected": bisected, "bookmark": bookmark, "branch": branch, diff -r b1c62c754bf8 -r 81adf7777f8f tests/test-bisect.t --- a/tests/test-bisect.t Sun Sep 18 10:07:51 2011 +0200 +++ b/tests/test-bisect.t Sun Sep 18 22:54:11 2011 +0200 @@ -377,7 +377,7 @@ date: Thu Jan 01 00:00:06 1970 +0000 summary: msg 6 - $ hg log -r "bisected(good)" + $ hg log -r "bisect(good)" changeset: 0:b99c7b9c8e11 user: test date: Thu Jan 01 00:00:00 1970 +0000 @@ -388,13 +388,13 @@ date: Thu Jan 01 00:00:05 1970 +0000 summary: msg 5 - $ hg log -r "bisected(bad)" + $ hg log -r "bisect(bad)" changeset: 6:a3d5c6fdf0d3 user: test date: Thu Jan 01 00:00:06 1970 +0000 summary: msg 6 - $ hg log -r "bisected(skip)" + $ hg log -r "bisect(skip)" changeset: 1:5cd978ea5149 user: test date: Thu Jan 01 00:00:01 1970 +0000 @@ -416,6 +416,15 @@ summary: msg 4 +test legacy bisected() keyword + + $ hg log -r "bisected(bad)" + changeset: 6:a3d5c6fdf0d3 + user: test + date: Thu Jan 01 00:00:06 1970 +0000 + summary: msg 6 + + $ set +e test invalid command