mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
Allow arc to parse svnlook
diffs from moves/copies
Summary: Ref T4697. This is similar to the existing stuff, but `svnlook diff ...` can also produce a "Copied" header. Currently, we choke on it in Herald when running pre-commit rules. Test Plan: Added and ran tests. In the next diff, used this in a real system. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T4697 Differential Revision: https://secure.phabricator.com/D8653
This commit is contained in:
parent
d0bab7f34a
commit
a36969e58b
3 changed files with 10 additions and 1 deletions
|
@ -232,7 +232,7 @@ final class ArcanistDiffParser {
|
|||
// This is a normal SVN text change, probably from "svn diff".
|
||||
'(?P<type>Index): (?P<cur>.+)',
|
||||
// This is an SVN text change, probably from "svnlook diff".
|
||||
'(?P<type>Modified|Added|Deleted): (?P<cur>.+)',
|
||||
'(?P<type>Modified|Added|Deleted|Copied): (?P<cur>.+)',
|
||||
// This is an SVN property change, probably from "svn diff".
|
||||
'(?P<type>Property changes on): (?P<cur>.+)',
|
||||
// This is a git commit message, probably from "git show".
|
||||
|
@ -314,6 +314,7 @@ final class ArcanistDiffParser {
|
|||
case 'Modified':
|
||||
case 'Added':
|
||||
case 'Deleted':
|
||||
case 'Copied':
|
||||
$this->parseIndexHunk($change);
|
||||
break;
|
||||
case 'Property changes on':
|
||||
|
|
|
@ -573,6 +573,7 @@ EOTEXT
|
|||
case 'svnlook-basics.svndiff':
|
||||
case 'svnlook-add.svndiff':
|
||||
case 'svnlook-delete.svndiff':
|
||||
case 'svnlook-copied.svndiff':
|
||||
$this->assertEqual(1, count($changes));
|
||||
break;
|
||||
case 'git-format-patch.gitdiff':
|
||||
|
|
7
src/parser/__tests__/diff/svnlook-copied.svndiff
Normal file
7
src/parser/__tests__/diff/svnlook-copied.svndiff
Normal file
|
@ -0,0 +1,7 @@
|
|||
Copied: movedfile (from rev 30, newfile)
|
||||
===================================================================
|
||||
--- movedfile (rev 0)
|
||||
+++ movedfile 2014-03-31 02:21:25 UTC (txn 30-1o)
|
||||
@@ -0,0 +1,2 @@
|
||||
+blamo
|
||||
+blamo
|
Loading…
Reference in a new issue