diff options
author | Zygmunt Krynicki <zygmunt.krynicki@canonical.com> | 2012-12-03 12:01:51 +0100 |
---|---|---|
committer | Zygmunt Krynicki <zygmunt.krynicki@canonical.com> | 2012-12-03 12:01:51 +0100 |
commit | d7835a4581241e02d6c3960185bc867337d68a2b (patch) | |
tree | aab75377a9c38eab655ebf39e5a629b34d0968d6 | |
parent | b3cda9967f857127bd4dab5eb72223a95916f5ea (diff) | |
download | bzr-fastimport-d7835a4581241e02d6c3960185bc867337d68a2b.tar.gz |
The get_ancestry() method was removed from bzr sometime in the past.
The actual code was pulled from a similar bug in bzr-stat where get_ancestry()
is reimplemented as a two-liner.
-rw-r--r-- | branch_updater.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/branch_updater.py b/branch_updater.py index fcb13d5..e9a8aa5 100644 --- a/branch_updater.py +++ b/branch_updater.py @@ -165,7 +165,8 @@ class BranchUpdater(object): # apply tags known in this branch my_tags = {} if self.tags: - ancestry = self.repo.get_ancestry(last_rev_id) + graph = self.repo.get_graph() + ancestry = [r for (r, ps) in graph.iter_ancestry([last_rev_id]) if ps is not None] for tag,rev in self.tags.items(): if rev in ancestry: my_tags[tag] = rev |