~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/history.py

  • Committer: Michael Hudson
  • Date: 2007-12-18 10:10:43 UTC
  • mfrom: (128.5.1 mwhudson.dev)
  • mto: This revision was merged to the branch mainline in revision 144.
  • Revision ID: michael.hudson@canonical.com-20071218101043-rayfbdl4kxdl3jdu
merge aaron's changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
229
229
            revno_str = '.'.join(str(n) for n in revno)
230
230
            self._revno_revid[revno_str] = revid
231
231
            self._revision_info[revid] = (seq, revid, merge_depth, revno_str, end_of_merge)
232
 
 
233
232
        # cache merge info
234
233
        self._where_merged = {}
235
234
        for revid in self._revision_graph.keys():
236
 
            if not revid in self._full_history:
 
235
            if self._revision_info[revid][2] == 0:
237
236
                continue
238
237
            for parent in self._revision_graph[revid]:
239
238
                self._where_merged.setdefault(parent, set()).add(revid)
244
243
    @classmethod
245
244
    def from_folder(cls, path, name=None):
246
245
        b = bzrlib.branch.Branch.open(path)
247
 
        return cls.from_branch(b, name)
 
246
        b.lock_read()
 
247
        try:
 
248
            return cls.from_branch(b, name)
 
249
        finally:
 
250
            b.unlock()
248
251
 
249
252
    @with_branch_lock
250
253
    def out_of_date(self):