Mercurial > evolve
changeset 2051:74934195747b
evolve: switch away from deprecated repo.opener
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 07 Mar 2017 09:47:37 -0800 |
parents | 604ecce27969 |
children | 05170e635e26 |
files | hgext3rd/evolve/__init__.py hgext3rd/evolve/legacy.py |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/__init__.py Tue Mar 07 13:31:19 2017 +0100 +++ b/hgext3rd/evolve/__init__.py Tue Mar 07 09:47:37 2017 -0800 @@ -1502,7 +1502,7 @@ # XXX This is a terrible terrible hack, please get rid of it. lock = repo.wlock() try: - repo.opener.write('graftstate', orig.hex() + '\n') + repo.vfs.write('graftstate', orig.hex() + '\n') try: graftcmd = commands.table['graft'][0] ret = graftcmd(ui, repo, old_obsolete=True, **{'continue': True}) @@ -1716,7 +1716,7 @@ tmpctx = repo[tmpid] obsolete.createmarkers(repo, [(bumped, (tmpctx,))]) except MergeFailure: - repo.opener.write('graftstate', bumped.hex() + '\n') + repo.vfs.write('graftstate', bumped.hex() + '\n') repo.ui.write_err(_('evolution failed!\n')) msg = _("fix conflict and run 'hg evolve --continue'\n") repo.ui.write_err(msg) @@ -3043,7 +3043,7 @@ lock = repo.lock() if kwargs.get('old_obsolete'): if kwargs.get('continue'): - obsoleted.extend(repo.opener.read('graftstate').splitlines()) + obsoleted.extend(repo.vfs.read('graftstate').splitlines()) else: obsoleted.extend(revs) # convert obsolete target into revs to avoid alias joke
--- a/hgext3rd/evolve/legacy.py Tue Mar 07 13:31:19 2017 +0100 +++ b/hgext3rd/evolve/legacy.py Tue Mar 07 09:47:37 2017 -0800 @@ -51,7 +51,7 @@ if 'debugc' in arg: break else: - data = repo.opener.tryread('obsolete-relations') + data = repo.vfs.tryread('obsolete-relations') if not data: data = repo.svfs.tryread('obsoletemarkers') if data: @@ -90,7 +90,7 @@ store = repo.obsstore ### very first format try: - f = repo.opener('obsolete-relations') + f = repo.vfs('obsolete-relations') try: some = True for line in f: