Mercurial > hg
comparison hgext/gpg.py @ 4906: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 |
comparison
equal
deleted
inserted
replaced
4905:fc61495ea9cf | 4906:30847b8af7ca |
---|---|
238 "(please commit .hgsigs manually " | 238 "(please commit .hgsigs manually " |
239 "or use --force)")) | 239 "or use --force)")) |
240 | 240 |
241 repo.wfile(".hgsigs", "ab").write(sigmessage) | 241 repo.wfile(".hgsigs", "ab").write(sigmessage) |
242 | 242 |
243 if repo.dirstate.state(".hgsigs") == '?': | 243 if '.hgsigs' not in repo.dirstate: |
244 repo.add([".hgsigs"]) | 244 repo.add([".hgsigs"]) |
245 | 245 |
246 if opts["no_commit"]: | 246 if opts["no_commit"]: |
247 return | 247 return |
248 | 248 |