Patchwork [09,of,12,misc,largefiles] largefiles: remove silent handling of incorrect invocation of restorematchfn

login
register
mail settings
Submitter Mads Kiilerich
Date April 13, 2014, 4:59 p.m.
Message ID <fb681a874db6c991e93d.1397408352@localhost.localdomain>
Download mbox | patch
Permalink /patch/4325/
State Accepted
Commit 56fda512db9faf9b76bba19831649b15f94509ea
Headers show

Comments

Mads Kiilerich - April 13, 2014, 4:59 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1397407543 -7200
#      Sun Apr 13 18:45:43 2014 +0200
# Node ID fb681a874db6c991e93decb5bd4076bde76c3208
# Parent  918a93c8be12e4277f406d0439f956e3784e4c2f
largefiles: remove silent handling of incorrect invocation of restorematchfn

It is better to get a crash than to continue without noticing errors.

Patch

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -54,7 +54,7 @@  def restorematchfn():
 
     Note that n calls to installmatchfn will require n calls to
     restore matchfn to reverse'''
-    scmutil.match = getattr(scmutil.match, 'oldmatch', scmutil.match)
+    scmutil.match = getattr(scmutil.match, 'oldmatch')
 
 def addlargefiles(ui, repo, *pats, **opts):
     large = opts.pop('large', None)