Mercurial > public > mercurial-scm > hg
comparison contrib/perf.py @ 49705:ec8140c44b14
path: update logic in `perf` to use the push variant when available
The command seems currently broken, but at least it won't be broken by us !
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 01 Dec 2022 01:41:34 +0100 |
parents | 27bff60887fe |
children | 4cedae992ed1 |
comparison
equal
deleted
inserted
replaced
49704:a7985c822c09 | 49705:ec8140c44b14 |
---|---|
1611 if not path: | 1611 if not path: |
1612 raise error.Abort( | 1612 raise error.Abort( |
1613 b'default repository not configured!', | 1613 b'default repository not configured!', |
1614 hint=b"see 'hg help config.paths'", | 1614 hint=b"see 'hg help config.paths'", |
1615 ) | 1615 ) |
1616 dest = path.pushloc or path.loc | 1616 if util.safehasattr(path, 'main_path'): |
1617 path = path.get_push_variant() | |
1618 dest = path.loc | |
1619 else: | |
1620 dest = path.pushloc or path.loc | |
1617 ui.statusnoi18n(b'analysing phase of %s\n' % util.hidepassword(dest)) | 1621 ui.statusnoi18n(b'analysing phase of %s\n' % util.hidepassword(dest)) |
1618 other = hg.peer(repo, opts, dest) | 1622 other = hg.peer(repo, opts, dest) |
1619 | 1623 |
1620 # easier to perform discovery through the operation | 1624 # easier to perform discovery through the operation |
1621 op = exchange.pushoperation(repo, other) | 1625 op = exchange.pushoperation(repo, other) |