Amire80 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/56383
Change subject: Normalize line endings
......................................................................
Normalize line endings
Change-Id: If29c536a26181aacc7c957a7f7112593fc574121
---
M melange/BundleCreater.php
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/translatewiki
refs/changes/83/56383/1
diff --git a/melange/BundleCreater.php b/melange/BundleCreater.php
index 7297ec9..c3183ee 100644
--- a/melange/BundleCreater.php
+++ b/melange/BundleCreater.php
@@ -202,7 +202,11 @@
exec( "git rm .gitreview --quiet --ignore-unmatch" );
$notefile = $this->dir . "/notes/$version-$ext";
- $contents = file_get_contents( $notefile );
+
+ // Sometimes these files pass through other editors,
+ // which save them with wrong file endings.
+ // Convert all endings to \n.
+ $contents = str_replace( array( "\r\n", "\r", "\n" ),
"\n", file_get_contents( $notefile ) );
preg_match( '/^#---$(.*)^#---$/msU', $contents,
$matches );
$notes = trim( $matches[1] );
$notes = "== $ext $version ==\nReleased at
$date.\n\n$notes\n";
--
To view, visit https://gerrit.wikimedia.org/r/56383
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If29c536a26181aacc7c957a7f7112593fc574121
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits