Page MenuHomePhabricator

Clean up copy detection code a bit
ClosedPublic

Authored by epriestley on Mar 24 2015, 6:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 12, 3:55 PM
Unknown Object (File)
Tue, Sep 10, 4:56 PM
Unknown Object (File)
Sat, Aug 31, 10:04 AM
Unknown Object (File)
Tue, Aug 20, 8:16 AM
Unknown Object (File)
Mon, Aug 19, 2:08 AM
Unknown Object (File)
Fri, Aug 16, 3:15 PM
Unknown Object (File)
Aug 14 2024, 12:11 AM
Unknown Object (File)
Aug 7 2024, 6:49 PM
Subscribers

Details

Reviewers
btrahan
Maniphest Tasks
Restricted Maniphest Task
Commits
Restricted Diffusion Commit
rP373aaa643a51: Clean up copy detection code a bit
Summary

Ref T1266. This doesn't change any behaviors, but some of this code has a lot of really complicated conditionals and I tried to break that up a bit.

Also, reexpress this stuff in terms of the "structured" parser in D12144.

Test Plan

Unit tests still pass. They aren't hugely comprehensive but did reliably fail when I screwed stuff up.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Clean up copy detection code a bit.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
epriestley added a task: Restricted Maniphest Task.
src/applications/differential/parser/DifferentialChangesetParser.php
1347

In particular, this kind of stuff feels sketchy and unpredictable to me and I wanted to get rid of it before changing behavior.

btrahan edited edge metadata.

Might be worth a quick comparison of a revision that has copy detection / holding this a bit 'til subsequent diff(s) where you do that sort of testing or unit tests are more comprehensive, etc... Anyway, much better code on the right hand side!

src/applications/differential/parser/DifferentialChangesetParser.php
1347

good lord

This revision is now accepted and ready to land.Mar 24 2015, 6:42 PM

Yeah, D12146 adds more coverage and I looked through ~5 revisions after that to see if I could spot anything obvious. The new behavior after that change generally seems better, but yell if you spot anything sketchy looking after that pushes.

This revision was automatically updated to reflect the committed changes.