Mercurial > hg-stable
diff mercurial/commands.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 | ddc17eaf0f1b |
children | 9994f45ba714 |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Jan 14 20:29:47 2015 -0800 +++ b/mercurial/commands.py Thu Jan 15 23:17:12 2015 +0100 @@ -1803,7 +1803,7 @@ tr.close() if tags: - repo.opener.write("localtags", "".join(tags)) + repo.vfs.write("localtags", "".join(tags)) finally: ui.progress(_('building'), None) release(tr, lock) @@ -3377,7 +3377,7 @@ raise util.Abort(_("can't specify --continue and revisions")) # read in unfinished revisions try: - nodes = repo.opener.read('graftstate').splitlines() + nodes = repo.vfs.read('graftstate').splitlines() revs = [repo[node].rev() for node in nodes] except IOError, inst: if inst.errno != errno.ENOENT: @@ -3506,7 +3506,7 @@ if stats and stats[3] > 0: # write out state for --continue nodelines = [repo[rev].hex() + "\n" for rev in revs[pos:]] - repo.opener.write('graftstate', ''.join(nodelines)) + repo.vfs.write('graftstate', ''.join(nodelines)) raise util.Abort( _("unresolved conflicts, can't continue"), hint=_('use hg resolve and hg graft --continue'))