localrepo: use new subrev method of context.py
authorSean Farley <sean.michael.farley@gmail.com>
Fri, 20 Sep 2013 21:59:34 -0500
changeset 21588 4944c488f738
parent 21587 02a8612ddec2
child 21589 2945fdc38aad
localrepo: use new subrev method of context.py With the machinery in place, we use context.subrev instead of testing for a workingctx directly. This allows more flexibility for later patches that will add memctx to the mix.
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Fri Sep 20 22:07:58 2013 -0500
+++ b/mercurial/localrepo.py	Fri Sep 20 21:59:34 2013 -0500
@@ -1556,10 +1556,7 @@
 
         if listsubrepos:
             for subpath, sub in scmutil.itersubrepos(ctx1, ctx2):
-                if working:
-                    rev2 = None
-                else:
-                    rev2 = ctx2.substate[subpath][1]
+                rev2 = ctx2.subrev(subpath)
                 try:
                     submatch = matchmod.narrowmatcher(subpath, match)
                     s = sub.status(rev2, match=submatch, ignored=listignored,