changeset 9780:1ee085511b89

subrepo: notice dirty subrepo states when merging
author Matt Mackall <mpm@selenic.com>
date Sat, 07 Nov 2009 16:30:42 -0600
parents 58a6f3f4d553
children eccc8aacd6f9
files mercurial/merge.py mercurial/subrepo.py
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Sat Nov 07 16:29:49 2009 -0600
+++ b/mercurial/merge.py	Sat Nov 07 16:30:42 2009 -0600
@@ -169,6 +169,12 @@
 
     # Compare manifests
     for f, n in m1.iteritems():
+        if f == '.hgsubstate':
+            # check whether sub state is modified
+            for s in p1.substate:
+                if p1.sub(s).dirty():
+                    n += "+"
+                    break
         if partial and not partial(f):
             continue
         if f in m2:
--- a/mercurial/subrepo.py	Sat Nov 07 16:29:49 2009 -0600
+++ b/mercurial/subrepo.py	Sat Nov 07 16:30:42 2009 -0600
@@ -58,6 +58,8 @@
         repo.ui.debug(_("  subrepo %s: %s %s\n") % (s, msg, r))
 
     for s, l in s1.items():
+        if wctx.sub(s).dirty():
+            l = (l[0], l[1] + "+")
         a = sa.get(s, nullstate)
         if s in s2:
             r = s2[s]