contrib/perf.py
changeset 49474 d513ae93dff3
parent 49473 a7a5740b322a
child 49561 220738a53d05
equal deleted inserted replaced
49473:a7a5740b322a 49474:d513ae93dff3
  1063 def perfbundle(ui, repo, *revs, **opts):
  1063 def perfbundle(ui, repo, *revs, **opts):
  1064     """benchmark the creation of a bundle from a repository
  1064     """benchmark the creation of a bundle from a repository
  1065 
  1065 
  1066     For now, this only supports "none" compression.
  1066     For now, this only supports "none" compression.
  1067     """
  1067     """
  1068     from mercurial import bundlecaches
  1068     try:
       
  1069         from mercurial import bundlecaches
       
  1070 
       
  1071         parsebundlespec = bundlecaches.parsebundlespec
       
  1072     except ImportError:
       
  1073         from mercurial import exchange
       
  1074 
       
  1075         parsebundlespec = exchange.parsebundlespec
       
  1076 
  1069     from mercurial import discovery
  1077     from mercurial import discovery
  1070     from mercurial import bundle2
  1078     from mercurial import bundle2
  1071 
  1079 
  1072     opts = _byteskwargs(opts)
  1080     opts = _byteskwargs(opts)
  1073     timer, fm = gettimer(ui, opts)
  1081     timer, fm = gettimer(ui, opts)