6236 if inst.errno != errno.ENOENT: |
6236 if inst.errno != errno.ENOENT: |
6237 raise |
6237 raise |
6238 |
6238 |
6239 ms.commit() |
6239 ms.commit() |
6240 branchmerge = repo.dirstate.p2() != repo.nullid |
6240 branchmerge = repo.dirstate.p2() != repo.nullid |
6241 mergestatemod.recordupdates(repo, ms.actions(), branchmerge, None) |
6241 # resolve is not doing a parent change here, however, `record updates` |
|
6242 # will call some dirstate API that at intended for parent changes call. |
|
6243 # Ideally we would not need this and could implement a lighter version |
|
6244 # of the recordupdateslogic that will not have to deal with the part |
|
6245 # related to parent changes. However this would requires that: |
|
6246 # - we are sure we passed around enough information at update/merge |
|
6247 # time to no longer needs it at `hg resolve time` |
|
6248 # - we are sure we store that information well enough to be able to reuse it |
|
6249 # - we are the necessary logic to reuse it right. |
|
6250 # |
|
6251 # All this should eventually happens, but in the mean time, we use this |
|
6252 # context manager slightly out of the context it should be. |
|
6253 with repo.dirstate.parentchange(): |
|
6254 mergestatemod.recordupdates(repo, ms.actions(), branchmerge, None) |
6242 |
6255 |
6243 if not didwork and pats: |
6256 if not didwork and pats: |
6244 hint = None |
6257 hint = None |
6245 if not any([p for p in pats if p.find(b':') >= 0]): |
6258 if not any([p for p in pats if p.find(b':') >= 0]): |
6246 pats = [b'path:%s' % p for p in pats] |
6259 pats = [b'path:%s' % p for p in pats] |