changeset 10175:fc32b2fc468e

subrepo: load from a context where the subrepo exists
author Augie Fackler <durin42@gmail.com>
date Thu, 31 Dec 2009 16:30:34 -0600
parents 65b6dc44cdbf
children 24ce8f0c0a39
files mercurial/subrepo.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/subrepo.py	Thu Dec 31 17:25:46 2009 -0600
+++ b/mercurial/subrepo.py	Thu Dec 31 16:30:34 2009 -0600
@@ -45,6 +45,7 @@
                          for s in sorted(state)]), '')
 
 def submerge(repo, wctx, mctx, actx):
+    # working context, merging context, ancestor context
     if mctx == actx: # backwards?
         actx = wctx.p1()
     s1 = wctx.substate
@@ -105,7 +106,7 @@
             continue
         elif s not in sa:
             debug(s, "remote added, get", r)
-            wctx.sub(s).get(r)
+            mctx.sub(s).get(r)
             sm[s] = r
         elif r != sa[s]:
             if repo.ui.promptchoice(