obsolete: fix hidden() revset
authorPatrick Mezard <patrick@mezard.eu>
Sun, 29 Jul 2012 17:25:47 +0200
changeset 398 42828b0ace98
parent 397 0bd63f294a6f
child 399 4d63f8a00787
obsolete: fix hidden() revset The hiddenrevs set was moved from changelog to localrepository in hg@62c56c94c77e.
hgext/obsolete.py
tests/test-obsolete.t
--- a/hgext/obsolete.py	Sun Jul 29 17:10:43 2012 +0200
+++ b/hgext/obsolete.py	Sun Jul 29 17:25:47 2012 +0200
@@ -128,7 +128,7 @@
     Changeset is hidden.
     """
     args = revset.getargs(x, 0, 0, 'hidden takes no argument')
-    return [r for r in subset if r in repo.changelog.hiddenrevs]
+    return [r for r in subset if r in repo.hiddenrevs]
 
 def revsetobsolete(repo, subset, x):
     """``obsolete()``
--- a/tests/test-obsolete.t	Sun Jul 29 17:10:43 2012 +0200
+++ b/tests/test-obsolete.t	Sun Jul 29 17:25:47 2012 +0200
@@ -39,6 +39,11 @@
   4538525df7e2b9f09423636c61ef63a4cb872a2d 0d3f46688ccc6e756c7e96cf64c391c411309597 0 {'date': '', 'user': 'test'}
 
 
+Test hidden() revset
+
+  $ qlog -r 'hidden()' --hidden
+  2
+  - 4538525df7e2
 
 Test that obsolete changeset are hidden