comparison mercurial/localrepo.py @ 12175:c0a8f9dea0f6

subrepos: handle modified but uncommitted .hgsub
author Martin Geisler <mg@lazybytes.net>
date Tue, 07 Sep 2010 16:23:55 +0200
parents 7bccd04292a2
children ecab10820983
comparison
equal deleted inserted replaced
12174:7bccd04292a2 12175:c0a8f9dea0f6
1159 removed = mf1.keys() 1159 removed = mf1.keys()
1160 1160
1161 r = modified, added, removed, deleted, unknown, ignored, clean 1161 r = modified, added, removed, deleted, unknown, ignored, clean
1162 1162
1163 if listsubrepos: 1163 if listsubrepos:
1164 for subpath in ctx1.substate: 1164 # Create a (subpath, ctx) mapping where we prefer subpaths
1165 sub = ctx1.sub(subpath) 1165 # from ctx1. The subpaths from ctx2 are important when the
1166 # .hgsub file has been modified (in ctx2) but not yet
1167 # committed (in ctx1).
1168 subpaths = dict.fromkeys(ctx2.substate, ctx2)
1169 subpaths.update(dict.fromkeys(ctx1.substate, ctx1))
1170 for subpath, ctx in subpaths.iteritems():
1171 sub = ctx.sub(subpath)
1166 if working: 1172 if working:
1167 rev2 = None 1173 rev2 = None
1168 else: 1174 else:
1169 rev2 = ctx2.substate[subpath][1] 1175 rev2 = ctx2.substate[subpath][1]
1170 try: 1176 try: