Page MenuHomePhabricator

Treat relocated files as added files in svn worker.
ClosedPublic

Authored by datr on Oct 27 2013, 5:27 PM.
Tags
None
Referenced Files
F14061018: D7432.diff
Mon, Nov 18, 4:43 AM
F14052737: D7432.diff
Fri, Nov 15, 10:14 AM
F14036454: D7432.diff
Sun, Nov 10, 10:18 AM
F14017511: D7432.diff
Mon, Nov 4, 6:13 PM
F14016883: D7432.id16763.diff
Mon, Nov 4, 10:52 AM
F14016882: D7432.id16726.diff
Mon, Nov 4, 10:52 AM
F14016881: D7432.id.diff
Mon, Nov 4, 10:52 AM
F14015663: D7432.id16726.diff
Sun, Nov 3, 11:31 PM
Subscribers

Details

Summary

Relocated files aren't treated as newly created files by the worker. This
can lead to the worker trying to look up information about deleted files
in the wrong location.

Test Plan

See T4030

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Hmm thinking about it, this is no good.

If instead of deleting a file added by the relocation, the relocation deleted a file that was previously there, I think we would see a similar log entry in svn but this time we'd be looking for the file in the wrong place (after this patch). We probably can't treat relocations as simple adds and will need to add specific logic for that operation.

Actually just checked that by rearranging the commits in the first example. You can see the output here:

$ svn log -c 11 https://subversion.assembla.com/svn/phabricator-example -v
------------------------------------------------------------------------
r11 | deanreilly | 2013-10-27 21:04:56 +0000 (Sun, 27 Oct 2013) | 1 line
Changed paths:
   M /branches/second-branch
   R /branches/second-branch/foo (from /trunk/foo:2)

Merged commits 3 and 2.
------------------------------------------------------------------------

SVN doesn't mark the files in this scenario so the change as proposed should be fine.

I think "R" is "Replace", not "Relocate", and we only get it when something is deleted and something else is moved on top of it (here, implicitly by a merge, I guess? Although I didn't have much luck building a simpler synthetic commit without the merge), so this patch should be correct in all cases, I believe. Some notes in T4030. Thanks for tracking this down!

Closed by commit rP62edbb8e21f3 (authored by @datr, committed by @epriestley).