get_ancestry call removed in bzr 2.6 not updated for plugin

Bug #1260700 reported by Paul Catinean
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Plugin to Update Remote Trees
New
Undecided
Unassigned

Bug Description

The summary is pretty self explanatory, the plugin contains this bit in the code:

def _get_info(a_branch):
    """Figure out how long the remote ancestry is."""
    starting_revno = a_branch.revno()
    if starting_revno is 0:
        return 0, 0
    last_rev = a_branch.last_revision()
    anc = a_branch.repository.get_ancestry(last_rev)
    assert anc[0] is None
    # anc always includes 'None'
    return starting_revno, len(anc)-1

Obviously since get_ancestry is removed from bzr 2.6 the plugin does not work

Revision history for this message
Xavier (xavier-depedro) wrote :

Confirmed that it doesn't not work due to this reason in a standard Ubuntu 14.04 (LTS).
Any workaround?

Revision history for this message
Tomasz Drozda (tgdrozda) wrote :

I am attaching a potential patch that worked for me with bzr 2.7.0.
The patch should work for bzr versions where the Repository.get_ancestry() has been deprecated and replaced with graph.iter_ancestry().

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.