Mercurial > evolve
changeset 2510:b99b83728ea3
obsdiscovery: extract '_canobshashtree'
having this as a simple function will help use to generalise the obsdiscovery
algorithm we use.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 30 May 2017 12:32:14 +0200 |
parents | 6da129b2b440 |
children | 4c0b10d73f5f |
files | hgext3rd/evolve/obsdiscovery.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/obsdiscovery.py Tue May 30 12:26:57 2017 +0200 +++ b/hgext3rd/evolve/obsdiscovery.py Tue May 30 12:32:14 2017 +0200 @@ -703,6 +703,9 @@ # the obshash of its parents. This is similar to what happend for changeset # node where the parent is used in the computation +def _canobshashtree(repo, remote): + return remote.capable('_evoext_obshash_0') + @eh.command( 'debugobsrelsethashtree', [('', 'v0', None, 'hash on marker format "0"'), @@ -855,7 +858,7 @@ revs = list(repo.revs('::%ln', pushop.futureheads)) unfi = repo.unfiltered() cl = unfi.changelog - if not pushop.remote.capable('_evoext_obshash_0'): + if not _canobshashtree(repo, pushop.remote): return orig(pushop) common = []