Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/localrepo.py @ 31425:1527ffe65f9f
localrepo: use 'wvfs' instead of 'wfile'
Method is about to be deprecated and the modern form is shorter.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Wed, 15 Mar 2017 00:29:09 -0700 |
parents | ecc87acb4d10 |
children | fb1b5cd17664 |
comparison
equal
deleted
inserted
replaced
31424:5d92107dfb9b | 31425:1527ffe65f9f |
---|---|
689 for name in names: | 689 for name in names: |
690 self.hook('tag', node=hex(node), tag=name, local=local) | 690 self.hook('tag', node=hex(node), tag=name, local=local) |
691 return | 691 return |
692 | 692 |
693 try: | 693 try: |
694 fp = self.wfile('.hgtags', 'rb+') | 694 fp = self.wvfs('.hgtags', 'rb+') |
695 except IOError as e: | 695 except IOError as e: |
696 if e.errno != errno.ENOENT: | 696 if e.errno != errno.ENOENT: |
697 raise | 697 raise |
698 fp = self.wfile('.hgtags', 'ab') | 698 fp = self.wvfs('.hgtags', 'ab') |
699 else: | 699 else: |
700 prevtags = fp.read() | 700 prevtags = fp.read() |
701 | 701 |
702 # committed tags are stored in UTF-8 | 702 # committed tags are stored in UTF-8 |
703 writetags(fp, names, encoding.fromlocal, prevtags) | 703 writetags(fp, names, encoding.fromlocal, prevtags) |