1612
1612
# local work is unreferenced and will appear to have been lost.
1621
1622
if revision not in self.branch.revision_history():
1622
1623
raise errors.NoSuchRevision(self.branch, revision)
1624
1625
# merge tree state up to new branch tip.
1625
1626
basis = self.basis_tree()
1626
1627
to_tree = self.branch.repository.revision_tree(revision)