changeset 398:42828b0ace98

obsolete: fix hidden() revset The hiddenrevs set was moved from changelog to localrepository in hg@62c56c94c77e.
author Patrick Mezard <patrick@mezard.eu>
date Sun, 29 Jul 2012 17:25:47 +0200
parents 0bd63f294a6f
children 4d63f8a00787
files hgext/obsolete.py tests/test-obsolete.t
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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