Patchwork [2,of,4] largefiles: fix _always for match overrides

login
register
mail settings
Submitter Siddharth Agarwal
Date March 23, 2013, 2:37 a.m.
Message ID <90293fb6b3d77c76a598.1364006222@sid0x220>
Download mbox | patch
Permalink /patch/1170/
State Superseded
Commit d780c472463c5ed767fa278a6b3d49d328d9a114
Headers show

Comments

Siddharth Agarwal - March 23, 2013, 2:37 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1364004188 25200
#      Fri Mar 22 19:03:08 2013 -0700
# Node ID 90293fb6b3d77c76a5985f7003bdeac8d60878e0
# Parent  54e5c022f4d4e7b7f536d395268a04313f532340
largefiles: fix _always for match overrides
Siddharth Agarwal - March 23, 2013, 8:56 a.m.
On 03/22/2013 09:33 PM, Kevin Bullock wrote:
> On 22 Mar 2013, at 9:37 PM, Siddharth Agarwal wrote:
>
>> # HG changeset patch
>> # User Siddharth Agarwal <sid0@fb.com>
>> # Date 1364004188 25200
>> #      Fri Mar 22 19:03:08 2013 -0700
>> # Node ID 90293fb6b3d77c76a5985f7003bdeac8d60878e0
>> # Parent  54e5c022f4d4e7b7f536d395268a04313f532340
>> largefiles: fix _always for match overrides
> What's broken about it?


The always function returns true on those objects even though it 
shouldn't. I thought that was reasonably obvious from context.

Patch

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -34,6 +34,7 @@  def installnormalfilesmatchfn(manifest):
                 manifest)
         m._files = filter(notlfile, m._files)
         m._fmap = set(m._files)
+        m._always = False
         origmatchfn = m.matchfn
         m.matchfn = lambda f: notlfile(f) and origmatchfn(f) or None
         return m
@@ -251,6 +252,7 @@  def overridelog(orig, ui, repo, *pats, *
         standins = [lfutil.standin(f) for f in m._files]
         m._files.extend(standins)
         m._fmap = set(m._files)
+        m._always = False
         origmatchfn = m.matchfn
         def lfmatchfn(f):
             lf = lfutil.splitstandin(f)
@@ -519,6 +521,7 @@  def overridecopy(orig, ui, repo, pats, o
                 lfile = lambda f: lfutil.standin(f) in manifest
                 m._files = [lfutil.standin(f) for f in m._files if lfile(f)]
                 m._fmap = set(m._files)
+                m._always = False
                 origmatchfn = m.matchfn
                 m.matchfn = lambda f: (lfutil.isstandin(f) and
                                     (f in manifest) and
@@ -625,6 +628,7 @@  def overriderevert(orig, ui, repo, *pats
                 m._files = [tostandin(f) for f in m._files]
                 m._files = [f for f in m._files if f is not None]
                 m._fmap = set(m._files)
+                m._always = False
                 origmatchfn = m.matchfn
                 def matchfn(f):
                     if lfutil.isstandin(f):