Patchwork [3,of,8] localrepo.commit: hook into match.explicitdir

login
register
mail settings
Submitter Siddharth Agarwal
Date May 3, 2013, 10:05 p.m.
Message ID <234e4e8080aa898afd5d.1367618744@sid0x220>
Download mbox | patch
Permalink /patch/1546/
State Accepted
Commit e579687cb5d8cf557a3a86835aa303fed3af109a
Headers show

Comments

Siddharth Agarwal - May 3, 2013, 10:05 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1367209641 25200
#      Sun Apr 28 21:27:21 2013 -0700
# Node ID 234e4e8080aa898afd5d3e3797ed2683bb6a5dff
# Parent  05f54b4c4bddfaa802f47c547139264ee4826366
localrepo.commit: hook into match.explicitdir
Matt Mackall - May 3, 2013, 10:14 p.m.
On Fri, 2013-05-03 at 15:05 -0700, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0@fb.com>
> # Date 1367209641 25200
> #      Sun Apr 28 21:27:21 2013 -0700
> # Node ID 234e4e8080aa898afd5d3e3797ed2683bb6a5dff
> # Parent  05f54b4c4bddfaa802f47c547139264ee4826366
> localrepo.commit: hook into match.explicitdir
> 
> diff -r 05f54b4c4bdd -r 234e4e8080aa mercurial/localrepo.py
> --- a/mercurial/localrepo.py	Sun Apr 28 21:25:41 2013 -0700
> +++ b/mercurial/localrepo.py	Sun Apr 28 21:27:21 2013 -0700
> @@ -1145,7 +1145,7 @@ class localrepository(object):
>  
>          if not force:
>              vdirs = []
> -            match.dir = vdirs.append
> +            match.explicitdir = vdirs.append
>              match.bad = fail

This suggests that patch 2 introduces test failures that this fixes?
Siddharth Agarwal - May 3, 2013, 10:20 p.m.
On 05/03/2013 03:14 PM, Matt Mackall wrote:
> On Fri, 2013-05-03 at 15:05 -0700, Siddharth Agarwal wrote:
>> # HG changeset patch
>> # User Siddharth Agarwal <sid0@fb.com>
>> # Date 1367209641 25200
>> #      Sun Apr 28 21:27:21 2013 -0700
>> # Node ID 234e4e8080aa898afd5d3e3797ed2683bb6a5dff
>> # Parent  05f54b4c4bddfaa802f47c547139264ee4826366
>> localrepo.commit: hook into match.explicitdir
>>
>> diff -r 05f54b4c4bdd -r 234e4e8080aa mercurial/localrepo.py
>> --- a/mercurial/localrepo.py	Sun Apr 28 21:25:41 2013 -0700
>> +++ b/mercurial/localrepo.py	Sun Apr 28 21:27:21 2013 -0700
>> @@ -1145,7 +1145,7 @@ class localrepository(object):
>>   
>>           if not force:
>>               vdirs = []
>> -            match.dir = vdirs.append
>> +            match.explicitdir = vdirs.append
>>               match.bad = fail
> This suggests that patch 2 introduces test failures that this fixes?

No, since match.explicitdir and traversedir call match.dir temporarily. 
Patch 6 drops that.

Patch

diff -r 05f54b4c4bdd -r 234e4e8080aa mercurial/localrepo.py
--- a/mercurial/localrepo.py	Sun Apr 28 21:25:41 2013 -0700
+++ b/mercurial/localrepo.py	Sun Apr 28 21:27:21 2013 -0700
@@ -1145,7 +1145,7 @@  class localrepository(object):
 
         if not force:
             vdirs = []
-            match.dir = vdirs.append
+            match.explicitdir = vdirs.append
             match.bad = fail
 
         wlock = self.wlock()