Mercurial > hg
comparison hgext/gpg.py @ 23877:7cc77030c557
localrepo: remove all external users of localrepo.opener
This change touches every module in which repository.opener was being used, and
changes it for the equivalent repository.vfs. This is meant to make it easier
to split the repository.vfs into several separate vfs.
It should now be possible to remove localrepo.opener.
author | Angel Ezquerra <angel.ezquerra@gmail.com> |
---|---|
date | Thu, 15 Jan 2015 23:17:12 +0100 |
parents | f1872fdc1c3c |
children | 3f0744eeaeaf |
comparison
equal
deleted
inserted
replaced
23876:48fd1dfb99aa | 23877:7cc77030c557 |
---|---|
101 for item in parsefile(fl.read(r).splitlines(), fn): | 101 for item in parsefile(fl.read(r).splitlines(), fn): |
102 yield item | 102 yield item |
103 try: | 103 try: |
104 # read local signatures | 104 # read local signatures |
105 fn = "localsigs" | 105 fn = "localsigs" |
106 for item in parsefile(repo.opener(fn), fn): | 106 for item in parsefile(repo.vfs(fn), fn): |
107 yield item | 107 yield item |
108 except IOError: | 108 except IOError: |
109 pass | 109 pass |
110 | 110 |
111 def getkeys(ui, repo, mygpg, sigdata, context): | 111 def getkeys(ui, repo, mygpg, sigdata, context): |
248 sig = sig.replace("\n", "") | 248 sig = sig.replace("\n", "") |
249 sigmessage += "%s %s %s\n" % (hexnode, sigver, sig) | 249 sigmessage += "%s %s %s\n" % (hexnode, sigver, sig) |
250 | 250 |
251 # write it | 251 # write it |
252 if opts['local']: | 252 if opts['local']: |
253 repo.opener.append("localsigs", sigmessage) | 253 repo.vfs.append("localsigs", sigmessage) |
254 return | 254 return |
255 | 255 |
256 if not opts["force"]: | 256 if not opts["force"]: |
257 msigs = match.exact(repo.root, '', ['.hgsigs']) | 257 msigs = match.exact(repo.root, '', ['.hgsigs']) |
258 if util.any(repo.status(match=msigs, unknown=True, ignored=True)): | 258 if util.any(repo.status(match=msigs, unknown=True, ignored=True)): |