Exemple #1
0
def _getheads(repo):
    if visibility.enabled(repo):
        return [nodemod.hex(n) for n in visibility.heads(repo)]
    else:
        # Select the commits to sync.  To match previous behaviour, this is
        # all draft but not obsolete commits, plus any bookmarked commits,
        # and all of their ancestors.
        headsrevset = repo.set(
            "heads(draft() & ::((draft() & not obsolete()) + bookmark()))")
        return [ctx.hex() for ctx in headsrevset]
Exemple #2
0
def _getheads(repo):
    if visibility.enabled(repo):
        # Visible heads can contain public heads in some cases due to a known issue.
        # TODO (liubovd): remove the filer once the issue is fixed.
        return [nodemod.hex(n) for n in visibility.heads(repo) if repo[n].mutable()]
    else:
        # Select the commits to sync.  To match previous behaviour, this is
        # all draft but not obsolete commits, plus any bookmarked commits,
        # and all of their ancestors.
        headsrevset = repo.set(
            "heads(draft() & ::((draft() & not obsolete()) + bookmark()))"
        )
        return [ctx.hex() for ctx in headsrevset]