equal
deleted
inserted
replaced
12 |
12 |
13 from .i18n import _ |
13 from .i18n import _ |
14 from . import ( |
14 from . import ( |
15 changelog, |
15 changelog, |
16 error, |
16 error, |
|
17 hg, |
17 localrepo, |
18 localrepo, |
18 manifest, |
19 manifest, |
19 revlog, |
20 revlog, |
20 scmutil, |
21 scmutil, |
21 util, |
22 util, |
839 # |
840 # |
840 # We have to work around the protection. |
841 # We have to work around the protection. |
841 oldcopy = repo.ui.copy |
842 oldcopy = repo.ui.copy |
842 try: |
843 try: |
843 repo.ui.__dict__.pop('copy', None) |
844 repo.ui.__dict__.pop('copy', None) |
844 dstrepo = localrepo.localrepository(repo.ui, |
845 dstrepo = hg.repository(repo.ui, path=tmppath, create=True) |
845 path=tmppath, |
|
846 create=True) |
|
847 finally: |
846 finally: |
848 repo.ui.copy = oldcopy |
847 repo.ui.copy = oldcopy |
849 |
848 |
850 with dstrepo.wlock(), dstrepo.lock(): |
849 with dstrepo.wlock(), dstrepo.lock(): |
851 backuppath = _upgraderepo(ui, repo, dstrepo, newreqs, |
850 backuppath = _upgraderepo(ui, repo, dstrepo, newreqs, |