Mercurial > hg
comparison hgext/rebase.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 | c51d6c043bb1 |
children | 3cbb5bf4035d |
comparison
equal
deleted
inserted
replaced
23876:48fd1dfb99aa | 23877:7cc77030c557 |
---|---|
752 marks.write() | 752 marks.write() |
753 | 753 |
754 def storestatus(repo, originalwd, target, state, collapse, keep, keepbranches, | 754 def storestatus(repo, originalwd, target, state, collapse, keep, keepbranches, |
755 external, activebookmark): | 755 external, activebookmark): |
756 'Store the current status to allow recovery' | 756 'Store the current status to allow recovery' |
757 f = repo.opener("rebasestate", "w") | 757 f = repo.vfs("rebasestate", "w") |
758 f.write(repo[originalwd].hex() + '\n') | 758 f.write(repo[originalwd].hex() + '\n') |
759 f.write(repo[target].hex() + '\n') | 759 f.write(repo[target].hex() + '\n') |
760 f.write(repo[external].hex() + '\n') | 760 f.write(repo[external].hex() + '\n') |
761 f.write('%d\n' % int(collapse)) | 761 f.write('%d\n' % int(collapse)) |
762 f.write('%d\n' % int(keep)) | 762 f.write('%d\n' % int(keep)) |
787 target = None | 787 target = None |
788 collapse = False | 788 collapse = False |
789 external = nullrev | 789 external = nullrev |
790 activebookmark = None | 790 activebookmark = None |
791 state = {} | 791 state = {} |
792 f = repo.opener("rebasestate") | 792 f = repo.vfs("rebasestate") |
793 for i, l in enumerate(f.read().splitlines()): | 793 for i, l in enumerate(f.read().splitlines()): |
794 if i == 0: | 794 if i == 0: |
795 originalwd = repo[l].rev() | 795 originalwd = repo[l].rev() |
796 elif i == 1: | 796 elif i == 1: |
797 target = repo[l].rev() | 797 target = repo[l].rev() |