diff hgext/gpg.py @ 4950:30847b8af7ca

dirstate: add __contains__ and make __getitem__ more useful dirstate.state(f) == '?' -> f not in dirstate dirstate.state(f) -> dirstate[f]
author Matt Mackall <mpm@selenic.com>
date Sat, 21 Jul 2007 16:02:09 -0500
parents eadfaa9ec487
children c80af96943aa
line wrap: on
line diff
--- a/hgext/gpg.py
+++ b/hgext/gpg.py
@@ -240,7 +240,7 @@ def sign(ui, repo, *revs, **opts):
 
     repo.wfile(".hgsigs", "ab").write(sigmessage)
 
-    if repo.dirstate.state(".hgsigs") == '?':
+    if '.hgsigs' not in repo.dirstate:
         repo.add([".hgsigs"])
 
     if opts["no_commit"]: