comparison mercurial/patch.py @ 6740:b148e9099133

use repo.changectx(None) to get a workingctx
author Matt Mackall <mpm@selenic.com>
date Thu, 26 Jun 2008 13:46:29 -0500
parents 336fda65759a
children 86e8187b721a
comparison
equal deleted inserted replaced
6739:c9fbd6ec3489 6740:b148e9099133
1190 modified, added, removed, deleted, unknown = changes 1190 modified, added, removed, deleted, unknown = changes
1191 1191
1192 if not modified and not added and not removed: 1192 if not modified and not added and not removed:
1193 return 1193 return
1194 1194
1195 ctx2 = repo.changectx(node2)
1195 if node2: 1196 if node2:
1196 ctx2 = repo.changectx(node2)
1197 execf2 = ctx2.manifest().execf 1197 execf2 = ctx2.manifest().execf
1198 linkf2 = ctx2.manifest().linkf 1198 linkf2 = ctx2.manifest().linkf
1199 else: 1199 else:
1200 ctx2 = repo.workingctx()
1201 execf2 = util.execfunc(repo.root, None) 1200 execf2 = util.execfunc(repo.root, None)
1202 linkf2 = util.linkfunc(repo.root, None) 1201 linkf2 = util.linkfunc(repo.root, None)
1203 if execf2 is None: 1202 if execf2 is None:
1204 mc = ctx2.parents()[0].manifest().copy() 1203 mc = ctx2.parents()[0].manifest().copy()
1205 execf2 = mc.execf 1204 execf2 = mc.execf