diff --git a/src/parser/ArcanistDiffParser.php b/src/parser/ArcanistDiffParser.php index d3b509bf..ecf5d4dd 100644 --- a/src/parser/ArcanistDiffParser.php +++ b/src/parser/ArcanistDiffParser.php @@ -232,7 +232,7 @@ final class ArcanistDiffParser { // This is a normal SVN text change, probably from "svn diff". '(?PIndex): (?P.+)', // This is an SVN text change, probably from "svnlook diff". - '(?PModified|Added|Deleted): (?P.+)', + '(?PModified|Added|Deleted|Copied): (?P.+)', // This is an SVN property change, probably from "svn diff". '(?PProperty changes on): (?P.+)', // 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': diff --git a/src/parser/__tests__/ArcanistDiffParserTestCase.php b/src/parser/__tests__/ArcanistDiffParserTestCase.php index 7be06394..87f4ae45 100644 --- a/src/parser/__tests__/ArcanistDiffParserTestCase.php +++ b/src/parser/__tests__/ArcanistDiffParserTestCase.php @@ -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': diff --git a/src/parser/__tests__/diff/svnlook-copied.svndiff b/src/parser/__tests__/diff/svnlook-copied.svndiff new file mode 100644 index 00000000..44463cb8 --- /dev/null +++ b/src/parser/__tests__/diff/svnlook-copied.svndiff @@ -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