--- a/hgext/obsolete.py Tue Sep 13 21:29:52 2011 +0200
+++ b/hgext/obsolete.py Tue Sep 13 21:37:28 2011 +0200
@@ -119,6 +119,17 @@
args = revset.getargs(x, 0, 0, 'publicheads takes no arguments')
return [r for r in subset if repo[r].obsolete()] # XXX slow
+### Other Extension compat
+############################
+
+def concludenode(orig, repo, rev, *args, **kwargs):
+ newrev = orig(repo, rev, *args, **kwargs)
+ oldnode = repo[rev].node()
+ newnode = repo[newrev].node()
+ repo.addobsolete(newnode, oldnode)
+ return newrev
+
+
def extsetup(ui):
revset.symbols["obsolete"] = revsetobsolete
@@ -179,7 +190,7 @@
pushkey.register('obsolete', pushobsolete, listobsolete)
-# New commands
+### New commands
#############################
@@ -356,14 +367,3 @@
repo.__class__ = obsoletingrepo
-
-### Other Extension compat
-############################
-
-def concludenode(orig, repo, rev, *args, **kwargs):
- newrev = orig(repo, rev, *args, **kwargs)
- oldnode = repo[rev].node()
- newnode = repo[newrev].node()
- repo.addobsolete(newnode, oldnode)
- return newrev
-