# 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
 

------------------------------------------------------------------------------
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