diff --git a/hgext/win32mbcs.py b/hgext/win32mbcs.py --- a/hgext/win32mbcs.py +++ b/hgext/win32mbcs.py @@ -129,7 +129,8 @@ def wrapname(name, wrapper): funcs = '''os.path.join os.path.split os.path.splitext os.path.splitunc os.path.normpath os.path.normcase os.makedirs mercurial.util.endswithsep mercurial.util.splitpath mercurial.util.checkcase - mercurial.util.fspath mercurial.util.pconvert mercurial.util.normpath''' + mercurial.util.fspath mercurial.util.pconvert mercurial.util.normpath + mercurial.util.checkwinfilename mercurial.util.checkosfilename''' # codec and alias names of sjis and big5 to be faked. problematic_encodings = '''big5 big5-tw csbig5 big5hkscs big5-hkscs diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -928,6 +928,14 @@ def optimize(x, small): elif op == 'group': return optimize(x[1], small) elif op in 'range list parent ancestorspec': + if op == 'parent': + # x^:y means (x^) : y, not x ^ (:y) + post = ('parentpost', x[1]) + if x[2][0] == 'dagrangepre': + return optimize(('dagrange', post, x[2][1]), small) + elif x[2][0] == 'rangepre': + return optimize(('range', post, x[2][1]), small) + wa, ta = optimize(x[1], small) wb, tb = optimize(x[2], small) return wa + wb, (op, ta, tb)