Comments
Patch
@@ -927,7 +927,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
@@ -936,15 +936,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)
@@ -160,9 +160,6 @@
# override some extensions' stuff as well
for name, module in extensions.extensions():
- if name == 'fetch':
- extensions.wrapcommand(getattr(module, 'cmdtable'), 'fetch',
- overrides.overridefetch)
if name == 'purge':
extensions.wrapcommand(getattr(module, 'cmdtable'), 'purge',
overrides.overridepurge)
@@ -67,6 +67,11 @@
dirc/baz/largefile
dirc/dirb
dirc/dirb/largefile
+
+ $ hg clone -q . ../fetch
+ $ hg --config extensions.fetch= fetch ../fetch
+ abort: uncommitted changes
+ [255]
$ hg up -qC
$ cd ..