mercurial/revset.py
changeset 32442 e8c043375b53
parent 32331 bd872f64a8ba
child 32473 bb5dc19484b8
--- a/mercurial/revset.py	Fri May 19 19:12:06 2017 +0530
+++ b/mercurial/revset.py	Fri May 19 20:06:45 2017 +0530
@@ -1408,7 +1408,10 @@
     ps = set()
     cl = repo.changelog
     for r in getset(repo, fullreposet(repo), x):
-        ps.add(cl.parentrevs(r)[0])
+        try:
+            ps.add(cl.parentrevs(r)[0])
+        except error.WdirUnsupported:
+            ps.add(repo[r].parents()[0].rev())
     ps -= {node.nullrev}
     # XXX we should turn this into a baseset instead of a set, smartset may do
     # some optimizations from the fact this is a baseset.