Mercurial > public > mercurial-scm > hg-stable
diff mercurial/bundlerepo.py @ 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 | 24e493ec2229 |
children | 55db747a21ad |
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)