changeset 23619:70afc58c32d3 stable

largefiles: fix a spurious missing file warning with forget (issue4053) If an uncommitted and deleted file was forgotten, a warning would be emitted, even though the operation was successful. See the previous patch for 'remove -A' for the exact circumstances, and details about the cause.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 21 Dec 2014 15:06:54 -0500
parents 9dd5dfeaab4c
children 2205d00b6d2b
files hgext/largefiles/overrides.py tests/test-largefiles-cache.t
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Sun Dec 21 15:04:13 2014 -0500
+++ b/hgext/largefiles/overrides.py	Sun Dec 21 15:06:54 2014 -0500
@@ -1008,7 +1008,8 @@
     installnormalfilesmatchfn(repo[None].manifest())
     result = orig(ui, repo, *pats, **opts)
     restorematchfn()
-    m = scmutil.match(repo[None], pats, opts)
+    m = composelargefilematcher(scmutil.match(repo[None], pats, opts),
+                                repo[None].manifest())
 
     try:
         repo.lfstatus = True
--- a/tests/test-largefiles-cache.t	Sun Dec 21 15:04:13 2014 -0500
+++ b/tests/test-largefiles-cache.t	Sun Dec 21 15:06:54 2014 -0500
@@ -136,7 +136,8 @@
 #endif
 
 Test issue 4053 (remove --after on a deleted, uncommitted file shouldn't say
-it is missing, but a remove on a nonexistant unknown file still should)
+it is missing, but a remove on a nonexistant unknown file still should.  Same
+for a forget.)
 
   $ cd src
   $ touch x
@@ -146,3 +147,9 @@
   ENOENT: * (glob)
   not removing y: file is untracked
   [1]
+  $ hg add y
+  $ mv y z
+  $ hg forget y z ENOENT
+  ENOENT: * (glob)
+  not removing z: file is already untracked
+  [1]