##// END OF EJS Templates
largefiles: drop the override for 'fetch'...
Matt Harbison -
r23441:d289ba74 default
parent child Browse files
Show More
@@ -946,7 +946,7 b' def hgsubrepoarchive(orig, repo, ui, arc'
946 # If a largefile is modified, the change is not reflected in its
946 # If a largefile is modified, the change is not reflected in its
947 # standin until a commit. cmdutil.bailifchanged() raises an exception
947 # standin until a commit. cmdutil.bailifchanged() raises an exception
948 # if the repo has uncommitted changes. Wrap it to also check if
948 # if the repo has uncommitted changes. Wrap it to also check if
949 # largefiles were changed. This is used by bisect and backout.
949 # largefiles were changed. This is used by bisect, backout and fetch.
950 def overridebailifchanged(orig, repo):
950 def overridebailifchanged(orig, repo):
951 orig(repo)
951 orig(repo)
952 repo.lfstatus = True
952 repo.lfstatus = True
@@ -955,15 +955,6 b' def overridebailifchanged(orig, repo):'
955 if s.modified or s.added or s.removed or s.deleted:
955 if s.modified or s.added or s.removed or s.deleted:
956 raise util.Abort(_('uncommitted changes'))
956 raise util.Abort(_('uncommitted changes'))
957
957
958 # Fetch doesn't use cmdutil.bailifchanged so override it to add the check
959 def overridefetch(orig, ui, repo, *pats, **opts):
960 repo.lfstatus = True
961 s = repo.status()
962 repo.lfstatus = False
963 if s.modified or s.added or s.removed or s.deleted:
964 raise util.Abort(_('uncommitted changes'))
965 return orig(ui, repo, *pats, **opts)
966
967 def overrideforget(orig, ui, repo, *pats, **opts):
958 def overrideforget(orig, ui, repo, *pats, **opts):
968 installnormalfilesmatchfn(repo[None].manifest())
959 installnormalfilesmatchfn(repo[None].manifest())
969 result = orig(ui, repo, *pats, **opts)
960 result = orig(ui, repo, *pats, **opts)
@@ -160,9 +160,6 b' def uisetup(ui):'
160
160
161 # override some extensions' stuff as well
161 # override some extensions' stuff as well
162 for name, module in extensions.extensions():
162 for name, module in extensions.extensions():
163 if name == 'fetch':
164 extensions.wrapcommand(getattr(module, 'cmdtable'), 'fetch',
165 overrides.overridefetch)
166 if name == 'purge':
163 if name == 'purge':
167 extensions.wrapcommand(getattr(module, 'cmdtable'), 'purge',
164 extensions.wrapcommand(getattr(module, 'cmdtable'), 'purge',
168 overrides.overridepurge)
165 overrides.overridepurge)
@@ -67,6 +67,11 b' Test copies and moves from a directory o'
67 dirc/baz/largefile
67 dirc/baz/largefile
68 dirc/dirb
68 dirc/dirb
69 dirc/dirb/largefile
69 dirc/dirb/largefile
70
71 $ hg clone -q . ../fetch
72 $ hg --config extensions.fetch= fetch ../fetch
73 abort: uncommitted changes
74 [255]
70 $ hg up -qC
75 $ hg up -qC
71 $ cd ..
76 $ cd ..
72
77
General Comments 0
You need to be logged in to leave comments. Login now