~mnordhoff/loggerhead/cheezum

« back to all changes in this revision

Viewing changes to loggerhead/apps/branch.py

Bring in the merge_point_config code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
    def __init__(self, branch, friendly_name=None, config={},
50
50
                 graph_cache=None, branch_link=None, is_root=False,
51
51
                 served_url=_DEFAULT, use_cdn=False):
 
52
        # XXX: Why is config here a simple dictionary (which only ever has a
 
53
        #      single item that I can find), while every other 'self._config'
 
54
        #      is a LoggerheadConfig object. The latter seems a lot more
 
55
        #      useful.
52
56
        self.branch = branch
53
57
        self._config = config
54
58
        self.friendly_name = friendly_name
64
68
    def get_history(self):
65
69
        file_cache = None
66
70
        revinfo_disk_cache = None
 
71
        show_merge_points = self._config.get('show_merge_points', True)
67
72
        cache_path = self._config.get('cachepath', None)
68
73
        if cache_path is not None:
69
74
            # Only import the cache if we're going to use it.
79
84
                revinfo_disk_cache = RevInfoDiskCache(cache_path)
80
85
        return History(
81
86
            self.branch, self.graph_cache, file_cache=file_cache,
82
 
            revinfo_disk_cache=revinfo_disk_cache, cache_key=self.friendly_name)
 
87
            revinfo_disk_cache=revinfo_disk_cache,
 
88
            cache_key=self.friendly_name,
 
89
            show_merge_points=show_merge_points)
83
90
 
84
91
    def url(self, *args, **kw):
85
92
        if isinstance(args[0], list):