mercurial/localrepo.py
changeset 20827 ca5dd216cb62
parent 20776 d00c731f4637
child 20880 925c2d604389
--- a/mercurial/localrepo.py	Sat Mar 22 14:46:55 2014 -0500
+++ b/mercurial/localrepo.py	Sat Mar 22 23:39:51 2014 +0900
@@ -1193,10 +1193,9 @@
             # only manage subrepos and .hgsubstate if .hgsub is present
             if '.hgsub' in wctx:
                 # we'll decide whether to track this ourselves, thanks
-                if '.hgsubstate' in changes[0]:
-                    changes[0].remove('.hgsubstate')
-                if '.hgsubstate' in changes[2]:
-                    changes[2].remove('.hgsubstate')
+                for c in changes[:3]:
+                    if '.hgsubstate' in c:
+                        c.remove('.hgsubstate')
 
                 # compare current state to last committed state
                 # build new substate based on last committed state