Merge lp:~jelmer/brz/find-previous-paths into lp:brz

Proposed by Jelmer Vernooij on 2018-03-12
Status: Merged
Merge reported by: Jelmer Vernooij
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/find-previous-paths
Merge into: lp:brz
Diff against target: 10 lines (+1/-1)
1 file modified
breezy/builtins.py (+1/-1)
To merge this branch: bzr merge lp:~jelmer/brz/find-previous-paths
Reviewer Review Type Date Requested Status
Martin Packman 2018-03-12 Approve on 2018-03-23
Review via email: mp+341291@code.launchpad.net

Commit message

Introduce a find_previous_path call.

Description of the change

Introduce a find_previous_path call.

This function takes two trees and finds the equivalent path in one tree in
another. At the moment, the implementation is pretty simple and relies on file
ids, but abstracting this away makes it possible to do fancier things in the
future. For example, for Git we'd want to use rename detection based on file
contents.

To post a comment you must log in.
Martin Packman (gz) wrote :

Makes sense, thanks, see inline comments.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/builtins.py'
2--- breezy/builtins.py 2018-03-24 00:39:56 +0000
3+++ breezy/builtins.py 2018-03-24 00:58:16 +0000
4@@ -3027,7 +3027,7 @@
5 with tree.lock_read():
6 touching_revs = log.find_touching_revisions(
7 tree.branch.repository, tree.branch.last_revision(), tree, relpath)
8- for revno, revision_id, what in reversed(list(touching_revs)):
9+ for revno, revision_id, what in reversed(touching_revs):
10 self.outf.write("%6d %s\n" % (revno, what))
11
12

Subscribers

People subscribed via source and target branches