~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to changelog_merge.py

Match file names, not paths, and tweak docs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
 
54
54
    name_prefix = "changelog"
55
55
 
 
56
    def get_filepath(self, params, tree):
 
57
        """Calculate the path to the file in a tree.
 
58
 
 
59
        This is overridden to return just the basename, rather than full path,
 
60
        so that e.g. if the config says ``changelog_merge_files = ChangeLog``,
 
61
        then all ChangeLog files in the tree will match (not just one in the
 
62
        root of the tree).
 
63
        
 
64
        :param params: A MergeHookParams describing the file to merge
 
65
        :param tree: a Tree, e.g. self.merger.this_tree.
 
66
        """
 
67
        return tree.inventory[params.file_id].name
 
68
 
56
69
    def merge_text(self, params):
57
70
        """Float new changelog sections from other to the top of the changelog.
58
71