diff hgext/largefiles/overrides.py @ 23441:d289ba74dba3

largefiles: drop the override for 'fetch' The fetch extension has been calling cmdutil.bailifchanged() since a014fdc97154, so this is redundant. Add test coverage to prevent regression. It doesn't look like there is any testing for fetch with largefiles.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 30 Nov 2014 23:30:31 -0500
parents b5e3f3d25395
children 2b23a25f06fd
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Fri Nov 21 15:50:38 2014 -0800
+++ b/hgext/largefiles/overrides.py	Sun Nov 30 23:30:31 2014 -0500
@@ -946,7 +946,7 @@
 # If a largefile is modified, the change is not reflected in its
 # standin until a commit. cmdutil.bailifchanged() raises an exception
 # if the repo has uncommitted changes. Wrap it to also check if
-# largefiles were changed. This is used by bisect and backout.
+# largefiles were changed. This is used by bisect, backout and fetch.
 def overridebailifchanged(orig, repo):
     orig(repo)
     repo.lfstatus = True
@@ -955,15 +955,6 @@
     if s.modified or s.added or s.removed or s.deleted:
         raise util.Abort(_('uncommitted changes'))
 
-# Fetch doesn't use cmdutil.bailifchanged so override it to add the check
-def overridefetch(orig, ui, repo, *pats, **opts):
-    repo.lfstatus = True
-    s = repo.status()
-    repo.lfstatus = False
-    if s.modified or s.added or s.removed or s.deleted:
-        raise util.Abort(_('uncommitted changes'))
-    return orig(ui, repo, *pats, **opts)
-
 def overrideforget(orig, ui, repo, *pats, **opts):
     installnormalfilesmatchfn(repo[None].manifest())
     result = orig(ui, repo, *pats, **opts)