1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 12:30:56 +01:00

[svn1.7] Fix matching xml tag when parsing svn commits

Summary:
svn 1.7 changed their xml format slightly, they now have a
 ##<?xml version="1.0" encoding="UTF-8"?>## tag instead of
 ##<?xml version="1.0"?>##. This relaxes matching this tag.

Test Plan: ./scripts/repository/reparse.php rE521979 --change

Reviewers: epriestley, jungejason

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1866
This commit is contained in:
Nick Harper 2012-03-12 16:06:34 -07:00
parent f4be64792e
commit 9b48384415

View file

@ -1,7 +1,7 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
* Copyright 2012 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -723,8 +723,8 @@ class PhabricatorRepositorySvnCommitChangeParserWorker
}
break;
case 'xml':
$expect = '<?xml version="1.0"?>';
if ($line !== $expect) {
$expect = '/<?xml version="1.0".*?>/';
if (!preg_match($expect, $line)) {
throw new Exception("Expected '{$expect}', got {$line}.");
}
$mode = 'list';