Patchwork [2,of,2] subrepo: remove superfluous newline from subrepo prompt

login
register
mail settings
Submitter Mads Kiilerich
Date Sept. 30, 2014, 11:13 p.m.
Message ID <47b37c8cb4ea4ada2404.1412118799@ssl.google-analytics.com>
Download mbox | patch
Permalink /patch/6056/
State Accepted
Headers show

Comments

Mads Kiilerich - Sept. 30, 2014, 11:13 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1412118497 -7200
#      Wed Oct 01 01:08:17 2014 +0200
# Node ID 47b37c8cb4ea4ada240462937e213b03fedb0566
# Parent  9c2c63ed69f0b417f3f8d3f9104cc4b02f6f6946
subrepo: remove superfluous newline from subrepo prompt
Matt Mackall - Sept. 30, 2014, 11:30 p.m.
On Wed, 2014-10-01 at 01:13 +0200, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <madski@unity3d.com>
> # Date 1412118497 -7200
> #      Wed Oct 01 01:08:17 2014 +0200
> # Node ID 47b37c8cb4ea4ada240462937e213b03fedb0566
> # Parent  9c2c63ed69f0b417f3f8d3f9104cc4b02f6f6946
> subrepo: remove superfluous newline from subrepo prompt

These are queued, thanks. I added a comment to the magic in the first
one.

Patch

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -263,13 +263,13 @@  def submerge(repo, wctx, mctx, actx, ove
 def _updateprompt(ui, sub, dirty, local, remote):
     if dirty:
         msg = (_(' subrepository sources for %s differ\n'
-                 'use (l)ocal source (%s) or (r)emote source (%s)?\n'
+                 'use (l)ocal source (%s) or (r)emote source (%s)?'
                  '$$ &Local $$ &Remote')
                % (subrelpath(sub), local, remote))
     else:
         msg = (_(' subrepository sources for %s differ (in checked out '
                  'version)\n'
-                 'use (l)ocal source (%s) or (r)emote source (%s)?\n'
+                 'use (l)ocal source (%s) or (r)emote source (%s)?'
                  '$$ &Local $$ &Remote')
                % (subrelpath(sub), local, remote))
     return ui.promptchoice(msg, 0)
diff --git a/tests/test-largefiles-update.t b/tests/test-largefiles-update.t
--- a/tests/test-largefiles-update.t
+++ b/tests/test-largefiles-update.t
@@ -436,8 +436,7 @@  Test that the internal linear merging wo
    subrepository sub diverged (local revision: f74e50bd9e55, remote revision: d65e59e952a9)
   (M)erge, keep (l)ocal or keep (r)emote? m
    subrepository sources for sub differ (in checked out version)
-  use (l)ocal source (f74e50bd9e55) or (r)emote source (d65e59e952a9)?
-   r
+  use (l)ocal source (f74e50bd9e55) or (r)emote source (d65e59e952a9)? r
   local changed .hglf/large2 which remote deleted
   use (c)hanged version or (d)elete? c
   remote turned local largefile large2 into a normal file
diff --git a/tests/test-subrepo-git.t b/tests/test-subrepo-git.t
--- a/tests/test-subrepo-git.t
+++ b/tests/test-subrepo-git.t
@@ -467,8 +467,7 @@  Sticky subrepositories, file changes
    subrepository s diverged (local revision: da5f5b1, remote revision: aa84837)
   (M)erge, keep (l)ocal or keep (r)emote? m
    subrepository sources for s differ
-  use (l)ocal source (da5f5b1) or (r)emote source (aa84837)?
-   l
+  use (l)ocal source (da5f5b1) or (r)emote source (aa84837)? l
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg id -n
   4+
@@ -494,8 +493,7 @@  Sticky subrepository, revision updates
    subrepository s diverged (local revision: 32a3438, remote revision: da5f5b1)
   (M)erge, keep (l)ocal or keep (r)emote? m
    subrepository sources for s differ (in checked out version)
-  use (l)ocal source (32a3438) or (r)emote source (da5f5b1)?
-   l
+  use (l)ocal source (32a3438) or (r)emote source (da5f5b1)? l
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg id -n
   1+
@@ -517,8 +515,7 @@  Sticky subrepository, file changes and r
    subrepository s diverged (local revision: 32a3438, remote revision: 32a3438)
   (M)erge, keep (l)ocal or keep (r)emote? m
    subrepository sources for s differ
-  use (l)ocal source (32a3438) or (r)emote source (32a3438)?
-   l
+  use (l)ocal source (32a3438) or (r)emote source (32a3438)? l
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg id -n
   7+
diff --git a/tests/test-subrepo-svn.t b/tests/test-subrepo-svn.t
--- a/tests/test-subrepo-svn.t
+++ b/tests/test-subrepo-svn.t
@@ -322,8 +322,7 @@  Sticky subrepositories, file changes
    subrepository s diverged (local revision: 2, remote revision: 3)
   (M)erge, keep (l)ocal or keep (r)emote? m
    subrepository sources for s differ
-  use (l)ocal source (2) or (r)emote source (3)?
-   l
+  use (l)ocal source (2) or (r)emote source (3)? l
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg id -n
   2+
@@ -354,8 +353,7 @@  Sticky subrepository, revision updates
    subrepository s diverged (local revision: 3, remote revision: 2)
   (M)erge, keep (l)ocal or keep (r)emote? m
    subrepository sources for s differ (in checked out version)
-  use (l)ocal source (1) or (r)emote source (2)?
-   l
+  use (l)ocal source (1) or (r)emote source (2)? l
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg id -n
   1+
@@ -378,8 +376,7 @@  Sticky subrepository, file changes and r
    subrepository s diverged (local revision: 3, remote revision: 3)
   (M)erge, keep (l)ocal or keep (r)emote? m
    subrepository sources for s differ
-  use (l)ocal source (1) or (r)emote source (3)?
-   l
+  use (l)ocal source (1) or (r)emote source (3)? l
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg id -n
   2+
diff --git a/tests/test-subrepo.t b/tests/test-subrepo.t
--- a/tests/test-subrepo.t
+++ b/tests/test-subrepo.t
@@ -976,13 +976,11 @@  Sticky subrepositories, file changes
    subrepository s diverged (local revision: fc627a69481f, remote revision: 12a213df6fa9)
   (M)erge, keep (l)ocal or keep (r)emote? m
    subrepository sources for s differ
-  use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)?
-   l
+  use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)? l
    subrepository t diverged (local revision: e95bcfa18a35, remote revision: 52c0adc0515a)
   (M)erge, keep (l)ocal or keep (r)emote? m
    subrepository sources for t differ
-  use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)?
-   l
+  use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)? l
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg id
   925c17564ef8+ tip
@@ -1013,8 +1011,7 @@  Sticky subrepository, revision updates
    subrepository t diverged (local revision: 52c0adc0515a, remote revision: 20a0db6fbf6c)
   (M)erge, keep (l)ocal or keep (r)emote? m
    subrepository sources for t differ (in checked out version)
-  use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)?
-   l
+  use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)? l
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg id
   e45c8b14af55+
@@ -1038,13 +1035,11 @@  Sticky subrepository, file changes and r
    subrepository s diverged (local revision: 12a213df6fa9, remote revision: 12a213df6fa9)
   (M)erge, keep (l)ocal or keep (r)emote? m
    subrepository sources for s differ
-  use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)?
-   l
+  use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)? l
    subrepository t diverged (local revision: 52c0adc0515a, remote revision: 52c0adc0515a)
   (M)erge, keep (l)ocal or keep (r)emote? m
    subrepository sources for t differ
-  use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)?
-   l
+  use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)? l
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg id
   925c17564ef8+ tip