changeset 21588:4944c488f738

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.
author Sean Farley <sean.michael.farley@gmail.com>
date Fri, 20 Sep 2013 21:59:34 -0500
parents 02a8612ddec2
children 2945fdc38aad
files mercurial/localrepo.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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,