$line = $this->getLine();
if ($is_svn) {
- $ok = preg_match('/^=+$/', $line);
+ $ok = preg_match('/^=+\s*$/', $line);
if (!$ok) {
$this->didFailParse("Expected '=======================' divider line.");
} else {
}
$is_binary_add = preg_match(
- '/^Cannot display: file marked as a binary type.$/',
- $line);
+ '/^Cannot display: file marked as a binary type\.$/',
+ rtrim($line));
if ($is_binary_add) {
$this->nextLine(); // Cannot display: file marked as a binary type.
$this->nextNonemptyLine(); // svn:mime-type = application/octet-stream
// WITHOUT a binary mime-type and is changed and given a binary mime-type.
$is_binary_diff = preg_match(
'/^Binary files .* and .* differ$/',
- $line);
+ rtrim($line));
if ($is_binary_diff) {
$this->nextNonemptyLine(); // Binary files x and y differ
$this->markBinary($change);
// can not apply these patches.)
$is_hg_binary_delete = preg_match(
'/^Binary file .* has changed$/',
- $line);
+ rtrim($line));
if ($is_hg_binary_delete) {
$this->nextNonemptyLine();
$this->markBinary($change);
// patch.
$is_git_binary_patch = preg_match(
'/^GIT binary patch$/',
- $line);
+ rtrim($line));
if ($is_git_binary_patch) {
$this->nextLine();
$this->parseGitBinaryPatch();
if ($is_git) {
// "git diff -b" ignores whitespace, but has an empty hunk target
- if (preg_match('@^diff --git a/.*$@', $line)) {
+ if (preg_match('@^diff --git .*$@', $line)) {
$this->nextLine();
return null;
}
--- /dev/null
+Index: Database/tables/dbo.Account.sql\r
+===================================================================\r
+--- Database/tables/dbo.Account.sql (revision 1587)\r
++++ Database/tables/dbo.Account.sql (working copy)\r
+@@ -23,6 +23,8 @@\r
+ GO\r
+ CREATE CLUSTERED INDEX IX_Account ON [Account] ([CreationDateTime])\r
+ GO\r
++ALTER TABLE [dbo].[Account] ADD CONSTRAINT [UK_Account_APIKey] UNIQUE ([APIKey])\r
++GO\r
+ ALTER TABLE [dbo].[Account] ADD CONSTRAINT [DF_Account_AccountId] DEFAULT (newid()) FOR [AccountId]\r
+ GO\r
+ ALTER TABLE [dbo].[Account] ADD CONSTRAINT [DF_Account_CreationDateTime] DEFAULT (getutcdate()) FOR [CreationDateTime]\r