Mercurial > hg-stable
diff mercurial/subrepo.py @ 11470:34e33d50c26b stable
subrepo: correctly handle update -C with modified subrepos (issue2022)
(based on a patch by Saint Germain)
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 30 Jun 2010 23:56:35 -0500 |
parents | f0ea93557133 |
children | 9d88597470af 636554d58665 |
line wrap: on
line diff
--- a/mercurial/subrepo.py Wed Jun 30 18:15:23 2010 -0500 +++ b/mercurial/subrepo.py Wed Jun 30 23:56:35 2010 -0500 @@ -67,11 +67,13 @@ repo.ui.debug(" subrepo %s: %s %s\n" % (s, msg, r)) for s, l in s1.items(): + a = sa.get(s, nullstate) ld = l # local state with possible dirty flag for compares - if wctx != actx and wctx.sub(s).dirty(): + if wctx.sub(s).dirty(): ld = (l[0], l[1] + "+") + if wctx == actx: # overwrite + a = ld - a = sa.get(s, nullstate) if s in s2: r = s2[s] if ld == r or r == a: # no change or local is newer