largefiles: don't use 'r' action for normal file that doesn't exist
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 05 Dec 2014 16:51:37 -0800
changeset 23492 da733837cdd0
parent 23491 9972758ab4c5
child 23493 28f01c318c05
largefiles: don't use 'r' action for normal file that doesn't exist When merging and the remote has turned a largefile into a normal file and the user chooses to keep the local largefile, we use the 'r' action for the remote normal file. This is wrong, since that file does not exist in the parent of the working copy. Use 'k', which does nothing but debug logging, instead.
hgext/largefiles/overrides.py
tests/test-issue3084.t
--- a/hgext/largefiles/overrides.py	Tue Dec 02 12:23:12 2014 -0800
+++ b/hgext/largefiles/overrides.py	Fri Dec 05 16:51:37 2014 -0800
@@ -456,7 +456,7 @@
             if repo.ui.promptchoice(usermsg, 0) == 0: # keep local largefile
                 if branchmerge:
                     # largefile can be restored from standin safely
-                    actions['r'].append((lfile, None, 'replaced by standin'))
+                    actions['k'].append((lfile, None, 'replaced by standin'))
                 else:
                     # "lfile" should be marked as "removed" without
                     # removal of itself
--- a/tests/test-issue3084.t	Tue Dec 02 12:23:12 2014 -0800
+++ b/tests/test-issue3084.t	Fri Dec 05 16:51:37 2014 -0800
@@ -116,8 +116,8 @@
   remote turned local largefile foo into a normal file
   keep (l)argefile or use (n)ormal file? l
   getting changed largefiles
-  1 largefiles updated, 0 removed
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  0 largefiles updated, 0 removed
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
 
   $ hg status
@@ -329,8 +329,8 @@
   remote turned local largefile f into a normal file
   keep (l)argefile or use (n)ormal file? l
   getting changed largefiles
-  1 largefiles updated, 0 removed
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  0 largefiles updated, 0 removed
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   $ cat f
   large
@@ -409,8 +409,8 @@
   remote turned local largefile f into a normal file
   keep (l)argefile or use (n)ormal file? l
   getting changed largefiles
-  1 largefiles updated, 0 removed
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  0 largefiles updated, 0 removed
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   $ cat f
   large2