Patchwork [4,of,4,stable] largefiles: use 'remote'/'local' in merge prompts like in other merge prompts

login
register
mail settings
Submitter Mads Kiilerich
Date Oct. 28, 2013, 10 p.m.
Message ID <4df868431e12727249c8.1382997655@mk-desktop>
Download mbox | patch
Permalink /patch/2832/
State Superseded
Commit 9bfa86746c9c1f6ab51deb8f174ffc482417d09f
Headers show

Comments

Mads Kiilerich - Oct. 28, 2013, 10 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1382996047 -3600
#      Mon Oct 28 22:34:07 2013 +0100
# Branch stable
# Node ID 4df868431e12727249c8fb0e33301d56a3b72084
# Parent  ba3857969dfc62a9b11777fd60f0137297fbbdb5
largefiles: use 'remote'/'local' in merge prompts like in other merge prompts

Prompts like
  foo has been turned into a largefile
  use (l)argefile or keep as (n)ormal file?
was not as clear as the usual prompts that use 'remote' or 'local' to explain
what happened on which side ... especially not when used to the normal prompts.

"as" could also indicate that it would be possible to take the content of the
largefile and somehow put it into the normal file. It could make it more clear
that it was a choice between one side or the other.

For consistency we will now phrase it like:
  remote turned local normal file f into a largefile
  use (l)argefile or keep (n)ormal file?
Matt Mackall - Nov. 1, 2013, 9:23 p.m.
On Mon, 2013-10-28 at 23:00 +0100, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <madski@unity3d.com>
> # Date 1382996047 -3600
> #      Mon Oct 28 22:34:07 2013 +0100
> # Branch stable
> # Node ID 4df868431e12727249c8fb0e33301d56a3b72084
> # Parent  ba3857969dfc62a9b11777fd60f0137297fbbdb5
> largefiles: use 'remote'/'local' in merge prompts like in other merge prompts

3 and 4 queued for stable, thanks.

Patch

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -387,8 +387,8 @@ 
             # the second parent
             lfile = splitstandin
             standin = f
-            msg = _('%s has been turned into a largefile\n'
-                    'use (l)argefile or keep as (n)ormal file?'
+            msg = _('remote turned local normal file %s into a largefile\n'
+                    'use (l)argefile or keep (n)ormal file?'
                     '$$ &Largefile $$ &Normal file') % lfile
             if repo.ui.promptchoice(msg, 0) == 0:
                 processed.append((lfile, "r", None, msg))
@@ -401,8 +401,8 @@ 
             # the second parent
             standin = lfutil.standin(f)
             lfile = f
-            msg = _('%s has been turned into a normal file\n'
-                    'keep as (l)argefile or use (n)ormal file?'
+            msg = _('remote turned local largefile %s into a normal file\n'
+                    'keep (l)argefile or use (n)ormal file?'
                     '$$ &Largefile $$ &Normal file') % lfile
             if repo.ui.promptchoice(msg, 0) == 0:
                 processed.append((lfile, "r", None, msg))
diff --git a/tests/test-issue3084.t b/tests/test-issue3084.t
--- a/tests/test-issue3084.t
+++ b/tests/test-issue3084.t
@@ -28,8 +28,8 @@ 
 Normal file in the working copy, keeping the normal version:
 
   $ echo "n" | hg merge --config ui.interactive=Yes
-  foo has been turned into a largefile
-  use (l)argefile or keep as (n)ormal file? 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  remote turned local normal file foo into a largefile
+  use (l)argefile or keep (n)ormal file? 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   getting changed largefiles
   0 largefiles updated, 0 removed
@@ -42,8 +42,8 @@ 
 
   $ hg update -q -C
   $ echo "l" | hg merge --config ui.interactive=Yes
-  foo has been turned into a largefile
-  use (l)argefile or keep as (n)ormal file? 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  remote turned local normal file foo into a largefile
+  use (l)argefile or keep (n)ormal file? 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   getting changed largefiles
   1 largefiles updated, 0 removed
@@ -70,8 +70,8 @@ 
 
   $ hg update -q -C -r 1
   $ echo "n" | hg merge --config ui.interactive=Yes
-  foo has been turned into a normal file
-  keep as (l)argefile or use (n)ormal file? 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  remote turned local largefile foo into a normal file
+  keep (l)argefile or use (n)ormal file? 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   getting changed largefiles
   0 largefiles updated, 0 removed
@@ -98,8 +98,8 @@ 
 
   $ hg update -q -C -r 1
   $ echo "l" | hg merge --config ui.interactive=Yes
-  foo has been turned into a normal file
-  keep as (l)argefile or use (n)ormal file? 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  remote turned local largefile foo into a normal file
+  keep (l)argefile or use (n)ormal file? 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   getting changed largefiles
   1 largefiles updated, 0 removed
@@ -219,8 +219,8 @@ 
   $ hg merge -r large
   local changed f which remote deleted
   use (c)hanged version or (d)elete? c
-  f has been turned into a largefile
-  use (l)argefile or keep as (n)ormal file? l
+  remote turned local normal file f into a largefile
+  use (l)argefile or keep (n)ormal file? l
   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   getting changed largefiles
@@ -231,8 +231,8 @@ 
   $ hg up -Cqr normal2
   $ ( echo c; echo n ) | hg merge -r large --config ui.interactive=Yes
   local changed f which remote deleted
-  use (c)hanged version or (d)elete? f has been turned into a largefile
-  use (l)argefile or keep as (n)ormal file? 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  use (c)hanged version or (d)elete? remote turned local normal file f into a largefile
+  use (l)argefile or keep (n)ormal file? 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   getting changed largefiles
   0 largefiles updated, 0 removed
@@ -255,8 +255,8 @@ 
   $ hg merge -r normal2
   remote changed f which local deleted
   use (c)hanged version or leave (d)eleted? c
-  f has been turned into a normal file
-  keep as (l)argefile or use (n)ormal file? l
+  remote turned local largefile f into a normal file
+  keep (l)argefile or use (n)ormal file? l
   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   getting changed largefiles
@@ -267,8 +267,8 @@ 
   $ hg up -Cqr large
   $ ( echo c; echo n ) | hg merge -r normal2 --config ui.interactive=Yes
   remote changed f which local deleted
-  use (c)hanged version or leave (d)eleted? f has been turned into a normal file
-  keep as (l)argefile or use (n)ormal file? 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  use (c)hanged version or leave (d)eleted? remote turned local largefile f into a normal file
+  keep (l)argefile or use (n)ormal file? 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   getting changed largefiles
   0 largefiles updated, 0 removed
@@ -312,8 +312,8 @@ 
   $ hg merge -r normal
   local changed .hglf/f which remote deleted
   use (c)hanged version or (d)elete? c
-  f has been turned into a normal file
-  keep as (l)argefile or use (n)ormal file? l
+  remote turned local largefile f into a normal file
+  keep (l)argefile or use (n)ormal file? l
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   getting changed largefiles
@@ -337,8 +337,8 @@ 
   $ hg merge -r large2
   remote changed .hglf/f which local deleted
   use (c)hanged version or leave (d)eleted? c
-  f has been turned into a largefile
-  use (l)argefile or keep as (n)ormal file? l
+  remote turned local normal file f into a largefile
+  use (l)argefile or keep (n)ormal file? l
   2 files updated, 0 files merged, 1 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   getting changed largefiles