Page MenuHomePhabricator

Clean up copy detection code a bit
ClosedPublic

Authored by epriestley on Mar 24 2015, 6:25 PM.
Tags
None
Referenced Files
F14060260: D12145.diff
Mon, Nov 18, 12:15 AM
F14046782: D12145.diff
Wed, Nov 13, 11:42 PM
F14035090: D12145.diff
Sun, Nov 10, 4:06 AM
F14019309: D12145.diff
Tue, Nov 5, 9:53 PM
F14018263: D12145.diff
Tue, Nov 5, 7:12 AM
F14012817: D12145.id29194.diff
Fri, Nov 1, 7:40 PM
F14007611: D12145.id.diff
Tue, Oct 29, 8:54 AM
F14002722: D12145.id29204.diff
Fri, Oct 25, 9:41 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.