On Fri, Jan 9, 2009 at 3:19 PM, Steve Borho <[email protected]> wrote:
> On Fri, Jan 9, 2009 at 12:45 AM, TK Soh <[email protected]> wrote:
>>
>> On Fri, Jan 9, 2009 at 6:38 AM, Steve Borho <[email protected]> wrote:
>> > # HG changeset patch
>> > # User Steve Borho <[email protected]>
>> > # Date 1231481389 21600
>> > # Node ID 04d755479d2d5d1cac8276e6487156b7ca613a37
>> > # Parent  d7f03d14d1065a28a6fb21e10d194eec93309409
>> > nautilus: update to latest dirstate.status() API
>> >
>> > diff --git a/contrib/nautilus-thg.py b/contrib/nautilus-thg.py
>> > --- a/contrib/nautilus-thg.py
>> > +++ b/contrib/nautilus-thg.py
>> > @@ -12,7 +12,7 @@
>> >  import gconf
>> >  import gtk
>> >  import gobject
>> > -from mercurial import hg, ui, util, repo
>> > +from mercurial import hg, ui, repo, match
>> >  from mercurial.node import short
>> >  import nautilus
>> >  import os
>> > @@ -367,7 +367,12 @@
>> >             localpath = path[len(repo.root)+1:]
>> >             localpaths.append(localpath)
>> >
>> > -        changes = repo.dirstate.status(localpaths, util.always, True,
>> > True)
>> > +        if not localpaths:
>> > +            return
>> > +        path = localpaths[0]
>> > +        cwd = os.path.isdir(path) and path or os.path.dirname(path)
>> > +        _match = match.exact(repo.root, cwd, localpaths)
>> > +        changes = repo.dirstate.status(_match, True, True, True)
>> >         (lookup, modified, added, removed, deleted, unknown,
>> >                 ignored, clean) = changes
>> >
>> > @@ -431,7 +436,8 @@
>> >
>> >         # This is not what the API is optimized for, but this appears
>> >         # to work efficiently enough
>> > -        changes = repo.dirstate.status([localpath], util.always, True,
>> > True)
>> > +        _match = match.always(repo.root, localpath)
>> > +        changes = repo.dirstate.status(_match, True, True, True)
>> >         (lookup, modified, added, removed, deleted, unknown,
>> >                 ignored, clean) = changes
>>
>> I know we have not been very consistent on variable naming, but _match
>> seem a little out of place in its neighborhood (based on this patch).
>> Would it be better if you can import match as match_, then '_match'
>> can become 'match'?
>
> Feel free to make that change locally.  I think I'm going to delete my
> thg-crew-steve
> repo on bitbucket and re-fork from the crew repository.

There's certain risk in me editing the patch like this, since I won't
be able to test it (with nautilus). Can you make the change and post
it again?

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to