Commits

Sean Farley  committed 4ec2ab1

evolve: rename getobscache to getrevs keeping inline with mercurial core

A quick fix to keep up with mercurial core via Pierre-Yves' patch:

http://www.selenic.com/pipermail/mercurial-devel/2012-October/045507.html

  • Participants
  • Parent commits 9508980

Comments (0)

Files changed (1)

File hgext/evolve.py

 
 cachefuncs = obsolete.cachefuncs
 cachefor = obsolete.cachefor
-getobscache = obsolete.getobscache
+getrevs = obsolete.getrevs
 clearobscaches = obsolete.clearobscaches
 
 #####################################################################
     """is the changeset latecomer (Try to succeed to public change)"""
     if ctx.node() is None:
         return False
-    return ctx.rev() in getobscache(ctx._repo, 'latecomer')
+    return ctx.rev() in getrevs(ctx._repo, 'latecomer')
 
 @eh.addattr(context.changectx, 'conflicting')
 def conflicting(ctx):
     """is the changeset conflicting (Try to succeed to public change)"""
     if ctx.node() is None:
         return False
-    return ctx.rev() in getobscache(ctx._repo, 'conflicting')
+    return ctx.rev() in getrevs(ctx._repo, 'conflicting')
 
 ### revset symbol
 
     Changesets marked as successors of public changesets.
     """
     args = revset.getargs(x, 0, 0, 'latecomer takes no arguments')
-    lates = getobscache(repo, 'latecomer')
+    lates = getrevs(repo, 'latecomer')
     return [r for r in subset if r in lates]
 
 @eh.revset('conflicting')
     Changesets marked as successors of a same changeset.
     """
     args = revset.getargs(x, 0, 0, 'conflicting takes no arguments')
-    conf = getobscache(repo, 'conflicting')
+    conf = getrevs(repo, 'conflicting')
     return [r for r in subset if r in conf]
 
 @eh.revset('divergent')
     Changesets marked as successors of a same changeset.
     """
     args = revset.getargs(x, 0, 0, 'divergent takes no arguments')
-    conf = getobscache(repo, 'conflicting')
+    conf = getrevs(repo, 'conflicting')
     return [r for r in subset if r in conf]
 
 
     Obsolete changesets with non-obsolete descendants.
     """
     args = revset.getargs(x, 0, 0, 'suspended takes no arguments')
-    suspended = getobscache(repo, 'suspended')
+    suspended = getrevs(repo, 'suspended')
     return [r for r in subset if r in suspended]
 
 
             ui.note(s)
 
     ret = orig(ui, repo, *args, **kwargs)
-    nbunstable = len(getobscache(repo, 'unstable'))
-    nblatecomer = len(getobscache(repo, 'latecomer'))
-    nbconflicting = len(getobscache(repo, 'unstable'))
+    nbunstable = len(getrevs(repo, 'unstable'))
+    nblatecomer = len(getrevs(repo, 'latecomer'))
+    nbconflicting = len(getrevs(repo, 'unstable'))
     write('unstable: %i changesets\n', nbunstable)
     write('latecomer: %i changesets\n', nblatecomer)
     write('conflicting: %i changesets\n', nbconflicting)