copies: clarify which case some conditional are handling
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 15 Jan 2021 23:49:51 +0100
changeset 46398 154ded9104f1
parent 46397 f213b250fed0
child 46399 1d6d1a15a963
copies: clarify which case some conditional are handling This make the function a bit clearer. The middle conditional get no label because we about about to remove it. See next changeset for details. Differential Revision: https://phab.mercurial-scm.org/D9794
mercurial/copies.py
--- a/mercurial/copies.py	Sat Jan 16 02:18:55 2021 +0100
+++ b/mercurial/copies.py	Fri Jan 15 23:49:51 2021 +0100
@@ -60,13 +60,13 @@
 
     for k, v in list(t.items()):
         # remove copies from files that didn't exist
-        if v not in src:
+        if v not in src:  # case 5
             del t[k]
         # remove criss-crossed copies
         elif k in src and v in dst:
             del t[k]
         # remove copies to files that were then removed
-        elif k not in dst:
+        elif k not in dst:  # case 1
             del t[k]