# HG changeset patch # User Pierre-Yves David # Date 2022-08-25 22:50:31 # Node ID d513ae93dff31eb3119f21dc05f1b01cbbd98935 # Parent a7a5740b322adff1511feef450a15a6ca01466df perf: make perf::bundle compatible down to 5.2 A another small change to make it compatible with a wider set of revision. I did not check compatibility in the python-2 territory yet. diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -1065,7 +1065,15 @@ def perfbundle(ui, repo, *revs, **opts): For now, this only supports "none" compression. """ - from mercurial import bundlecaches + try: + from mercurial import bundlecaches + + parsebundlespec = bundlecaches.parsebundlespec + except ImportError: + from mercurial import exchange + + parsebundlespec = exchange.parsebundlespec + from mercurial import discovery from mercurial import bundle2