Mercurial > hg
diff mercurial/keepalive.py @ 45342:150900a17ec2
merge: rework iteration over mergeresult object in checkpathconflicts()
Instead of following pattern:
```
for f, (m, args, msg) in mresult.actions.items():
if m == mergestatemod.ACTION_*:
...
elif m == mergestatemod.ACTION_*:
...
....
```
We do:
```
for (f, args, msg) in mresult.getaction((mergestatemod.ACTION_*,)):
...
for (f, args, msg) in mresult.getaction((mergestatemod.ACTION_*,)):
...
....
```
This makes code bit easier to understand and prevent iterating over actions
which we don't need.
Differential Revision: https://phab.mercurial-scm.org/D8884
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 05 Aug 2020 13:50:49 +0530 |
parents | 9f70512ae2cf |
children | 49f8ba4febec |