evolvecmd: _possibledestination() skip visiting empty parent stable
authorSushil khanchi <sushilkhanchi97@gmail.com>
Tue, 06 Nov 2018 10:43:35 +0530
branchstable
changeset 4230 e796835fe6b3
parent 4229 a8ed26f01c8d
child 4231 3eb78bdcdd7c
evolvecmd: _possibledestination() skip visiting empty parent I see that even in the case when "parent == -1" we are visiting that also and find succsets for that and in last -1 is being added in the set of possible destination. Why not skip that?
hgext3rd/evolve/evolvecmd.py
--- a/hgext3rd/evolve/evolvecmd.py	Sat Nov 03 12:21:19 2018 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Tue Nov 06 10:43:35 2018 +0530
@@ -1015,6 +1015,8 @@
     tovisit = list(parents(rev))
     while tovisit:
         r = tovisit.pop()
+        if r == -1:
+            continue
         succsets = obsutil.successorssets(repo, tonode(r))
         if not succsets:
             tovisit.extend(parents(r))