Patchwork [3,of,3] subrepo: add trailing newlines to warnings

login
register
mail settings
Submitter Siddharth Agarwal
Date March 21, 2014, 2:58 a.m.
Message ID <ac706f21e8ff72edd876.1395370699@dev1738.prn1.facebook.com>
Download mbox | patch
Permalink /patch/4015/
State Accepted
Commit e5641536e4d509b2dc5fab783344f86ea61b17c2
Headers show

Comments

Siddharth Agarwal - March 21, 2014, 2:58 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1395369545 25200
#      Thu Mar 20 19:39:05 2014 -0700
# Node ID ac706f21e8ff72edd87605924073b6d24d47b1b4
# Parent  9e261a5993f8b991a3f2b24a2b1438e981d7228b
subrepo: add trailing newlines to warnings
Matt Mackall - March 21, 2014, 10:07 p.m.
On Thu, 2014-03-20 at 19:58 -0700, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0@fb.com>
> # Date 1395369545 25200
> #      Thu Mar 20 19:39:05 2014 -0700
> # Node ID ac706f21e8ff72edd87605924073b6d24d47b1b4
> # Parent  9e261a5993f8b991a3f2b24a2b1438e981d7228b
> subrepo: add trailing newlines to warnings

Queued for stable, thanks.

Patch

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -1109,7 +1109,7 @@ 
             out, err = self._gitnodir(['--version'])
         m = re.search(r'^git version (\d+)\.(\d+)', out)
         if not m:
-            self._ui.warn(_('cannot retrieve git version'))
+            self._ui.warn(_('cannot retrieve git version\n'))
             return
         version = (int(m.group(1)), int(m.group(2)))
         # git 1.4.0 can't work at all, but 1.5.X can in at least some cases,
@@ -1118,7 +1118,7 @@ 
         if version < (1, 5):
             raise util.Abort(_('git subrepo requires at least 1.6.0 or later'))
         elif version < (1, 6):
-            self._ui.warn(_('git subrepo requires at least 1.6.0 or later'))
+            self._ui.warn(_('git subrepo requires at least 1.6.0 or later\n'))
 
     def _gitcommand(self, commands, env=None, stream=False):
         return self._gitdir(commands, env=env, stream=stream)[0]