Skip to content
Snippets Groups Projects
Commit 9fd30400 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

copies: clarify the return of _merge_copies_dict

I misused that function twice in the past few days, so lets clarify the API.
parent 29a9bf08
No related branches found
No related tags found
No related merge requests found
......@@ -408,8 +408,8 @@
minor, major = othercopies, newcopies
else:
minor, major = newcopies, othercopies
_merge_copies_dict(minor, major, isancestor, changes)
all_copies[c] = minor
copies = _merge_copies_dict(minor, major, isancestor, changes)
all_copies[c] = copies
final_copies = {}
for dest, (tt, source) in all_copies[targetrev].items():
......@@ -428,6 +428,8 @@
- `ismerged(path)`: callable return True if `path` have been merged in the
current revision,
return the resulting dict (in practice, the "minor" object, updated)
"""
for dest, value in major.items():
other = minor.get(dest)
......@@ -461,6 +463,7 @@
minor[dest] = value
elif isancestor(other_tt, new_tt):
minor[dest] = value
return minor
def _revinfo_getter_extra(repo):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment