diff mercurial/scmutil.py @ 29119:a032ebea4e97

revset: factor out public optimize() function from recursion New optimize() hides internal arguments and return values. This makes it easy to add more parameters and return values to _optimize().
author Yuya Nishihara <yuya@tcha.org>
date Mon, 02 May 2016 12:09:00 +0900
parents 07be86828e79
children 76f1ea360c7e
line wrap: on
line diff
--- a/mercurial/scmutil.py	Mon May 02 12:47:09 2016 +0900
+++ b/mercurial/scmutil.py	Mon May 02 12:09:00 2016 +0900
@@ -751,7 +751,7 @@
 
 def _pairspec(revspec):
     tree = revset.parse(revspec)
-    tree = revset.optimize(tree, True)[1]  # fix up "x^:y" -> "(x^):y"
+    tree = revset.optimize(tree)  # fix up "x^:y" -> "(x^):y"
     return tree and tree[0] in ('range', 'rangepre', 'rangepost', 'rangeall')
 
 def revpair(repo, revs):