D6275: copies: delete a redundant cleanup step in _chain()
This revision was automatically updated to reflect the committed changes. Closed by commit rHGdf7ad90edbd4: copies: delete a redundant cleanup step in _chain() (authored by martinvonz, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6275?vs=14970=14982 REVISION DETAIL https://phab.mercurial-scm.org/D6275 AFFECTED FILES mercurial/copies.py CHANGE DETAILS diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -134,10 +134,6 @@ if t[v] != k: # file wasn't renamed back to itself (i.e. case 4, not 3) t[k] = t[v] -if v not in dst: -# chain was a rename, not a copy -# this deletes the copy for 'y' in case 4 -del t[v] if v in src: # file is a copy of an existing file, i.e. case 6. t[k] = v To: martinvonz, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6275: copies: delete a redundant cleanup step in _chain()
martinvonz updated this revision to Diff 14970. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6275?vs=14949=14970 REVISION DETAIL https://phab.mercurial-scm.org/D6275 AFFECTED FILES mercurial/copies.py CHANGE DETAILS diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -134,10 +134,6 @@ if t[v] != k: # file wasn't renamed back to itself (i.e. case 4, not 3) t[k] = t[v] -if v not in dst: -# chain was a rename, not a copy -# this deletes the copy for 'y' in case 4 -del t[v] if v in src: # file is a copy of an existing file, i.e. case 6. t[k] = v To: martinvonz, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6275: copies: delete a redundant cleanup step in _chain()
martinvonz updated this revision to Diff 14949. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6275?vs=14847=14949 REVISION DETAIL https://phab.mercurial-scm.org/D6275 AFFECTED FILES mercurial/copies.py CHANGE DETAILS diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -134,10 +134,6 @@ if t[v] != k: # file wasn't renamed back to itself (i.e. case 4, not 3) t[k] = t[v] -if v not in dst: -# chain was a rename, not a copy -# this deletes the copy for 'y' in case 4 -del t[v] if v in src: # file is a copy of an existing file, i.e. case 6. t[k] = v To: martinvonz, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6275: copies: delete a redundant cleanup step in _chain()
martinvonz updated this revision to Diff 14847. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6275?vs=14844=14847 REVISION DETAIL https://phab.mercurial-scm.org/D6275 AFFECTED FILES mercurial/copies.py CHANGE DETAILS diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -134,10 +134,6 @@ if t[v] != k: # file wasn't renamed back to itself (i.e. case 4, not 3) t[k] = t[v] -if v not in dst: -# chain was a rename, not a copy -# this deletes the copy for 'y' in case 4 -del t[v] if v in src: # file is a copy of an existing file, i.e. case 6. t[k] = v To: martinvonz, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6275: copies: delete a redundant cleanup step in _chain()
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The check is redundant since https://phab.mercurial-scm.org/rHGd5edb5d3a337b85f56c3efc448482af87c9df3c2 (copies: filter out copies when target is not in destination manifest, 2019-02-14). To test that hypothesis, I made this change in the commit that commit, but all tests still passed. I think the case was necessary before then, we just didn't have tests for it. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6275 AFFECTED FILES mercurial/copies.py CHANGE DETAILS diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -134,10 +134,6 @@ if t[v] != k: # file wasn't renamed back to itself (i.e. case 4, not 3) t[k] = t[v] -if v not in dst: -# chain was a rename, not a copy -# this deletes the copy for 'b' in case 4 -del t[v] if v in src: # file is a copy of an existing file, i.e. case 6. t[k] = v To: martinvonz, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel