Mercurial > hg-stable
changeset 39945:75b53b809e87
bundlerepo: remove a variable alias
"parentrepo" and "repo" were the same thing and I don't see much
reason for it (unionrepo has similar structure and a similar alias but
there are two repos there so at least it makes a little more sense
there).
Differential Revision: https://phab.mercurial-scm.org/D4830
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sat, 15 Sep 2018 22:56:57 -0700 |
parents | a6f8ab537908 |
children | 85c8ff26d698 |
files | mercurial/bundlerepo.py |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/bundlerepo.py Mon Oct 01 16:11:48 2018 -0400 +++ b/mercurial/bundlerepo.py Sat Sep 15 22:56:57 2018 -0700 @@ -498,20 +498,19 @@ # to this new type and initialize the bundle-specific bits of it. try: - parentrepo = localrepo.instance(ui, repopath, create=False) + repo = localrepo.instance(ui, repopath, create=False) tempparent = None except error.RepoError: tempparent = pycompat.mkdtemp() try: - parentrepo = localrepo.instance(ui, tempparent, create=True) + repo = localrepo.instance(ui, tempparent, create=True) except Exception: shutil.rmtree(tempparent) raise - class derivedbundlerepository(bundlerepository, parentrepo.__class__): + class derivedbundlerepository(bundlerepository, repo.__class__): pass - repo = parentrepo repo.__class__ = derivedbundlerepository bundlerepository.__init__(repo, bundlepath, url, tempparent)