[PATCH 1 of 2 STABLE] revset: use appropriate predicate name in error messages

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Thu Jul 26 00:04:14 CDT 2012


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1343278723 -32400
# Branch stable
# Node ID 55e282c5700cdf0b8b134522822b6f80fc718364
# Parent  bf5bb38bcc7c28f7a355fdfff323aba2018cbb17
revset: use appropriate predicate name in error messages

"extinct" and "unstable" predicates use "obsolete" implementation
internally, but own predicate name should be used in error messages of
them instead of "obsolete".

diff -r bf5bb38bcc7c -r 55e282c5700c mercurial/revset.py
--- a/mercurial/revset.py	Wed Jul 25 16:50:22 2012 +0200
+++ b/mercurial/revset.py	Thu Jul 26 13:58:43 2012 +0900
@@ -615,7 +615,7 @@
 def extinct(repo, subset, x):
     """``extinct()``
     obsolete changeset with obsolete descendant only."""
-    getargs(x, 0, 0, _("obsolete takes no arguments"))
+    getargs(x, 0, 0, _("extinct takes no arguments"))
     extinctset = set(repo.revs('(obsolete()::) - (::(not obsolete()))'))
     return [r for r in subset if r in extinctset]
 
@@ -1406,7 +1406,7 @@
 def unstable(repo, subset, x):
     """``unstable()``
     Unstable changesets are non-obsolete with obsolete descendants."""
-    getargs(x, 0, 0, _("obsolete takes no arguments"))
+    getargs(x, 0, 0, _("unstable takes no arguments"))
     unstableset = set(repo.revs('(obsolete()::) - obsolete()'))
     return [r for r in subset if r in unstableset]
 


More information about the Mercurial-devel mailing list