~mwhudson/loggerhead/wsgi-ify

« back to all changes in this revision

Viewing changes to loggerhead/history.py

  • Committer: Michael Hudson
  • Date: 2008-06-18 11:27:59 UTC
  • Revision ID: michael.hudson@canonical.com-20080618112759-xm531vaz4rq1myws
make keeping up to date less ugly

Show diffs side-by-side

added added

removed removed

Lines of Context:
195
195
        self._lock = threading.RLock()
196
196
 
197
197
    @classmethod
198
 
    def from_branch(cls, branch, name=None):
 
198
    def from_branch(cls, branch):
199
199
        z = time.time()
200
200
        self = cls()
201
201
        self._branch = branch
202
202
        self._last_revid = self._branch.last_revision()
203
203
 
204
 
        if name is None:
205
 
            name = self._branch.nick
206
 
        self._name = name
207
 
        self.log = logging.getLogger('loggerhead.%s' % (name,))
 
204
        self.log = logging.getLogger('loggerhead.%s' % (self._branch.nick,))
208
205
 
209
206
        graph = branch.repository.get_graph()
210
207
        parent_map = dict(((key, value) for key, value in
255
252
        return revision_graph
256
253
 
257
254
    @classmethod
258
 
    def from_folder(cls, path, name=None):
 
255
    def from_folder(cls, path):
259
256
        b = bzrlib.branch.Branch.open(path)
260
257
        b.lock_read()
261
258
        try:
262
 
            return cls.from_branch(b, name)
 
259
            return cls.from_branch(b)
263
260
        finally:
264
261
            b.unlock()
265
262