comparison mercurial/commands.py @ 45164:7f41e824a02b

mergestate: remove unnecessary recordactions() from mergestate class This function is updating dirstate which sounds like not something which a method on mergestate class should do. Also this just calls another function. Lets directly call that function and remove this reducing mergestate responsibility a bit. There was single caller which is updated. Differential Revision: https://phab.mercurial-scm.org/D8737
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 09 Jul 2020 18:20:54 +0530
parents 487df3676d2c
children 5178dd2233d0
comparison
equal deleted inserted replaced
45163:f69253935bf8 45164:7f41e824a02b
6127 except OSError as inst: 6127 except OSError as inst:
6128 if inst.errno != errno.ENOENT: 6128 if inst.errno != errno.ENOENT:
6129 raise 6129 raise
6130 6130
6131 ms.commit() 6131 ms.commit()
6132 ms.recordactions() 6132 branchmerge = repo.dirstate.p2() != nullid
6133 mergestatemod.recordupdates(repo, ms.actions(), branchmerge, None)
6133 6134
6134 if not didwork and pats: 6135 if not didwork and pats:
6135 hint = None 6136 hint = None
6136 if not any([p for p in pats if p.find(b':') >= 0]): 6137 if not any([p for p in pats if p.find(b':') >= 0]):
6137 pats = [b'path:%s' % p for p in pats] 6138 pats = [b'path:%s' % p for p in pats]