~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/branch.py

  • Committer: Martin Packman
  • Date: 2011-10-14 18:42:17 UTC
  • mto: This revision was merged to the branch mainline in revision 6235.
  • Revision ID: martin.packman@canonical.com-20111014184217-2fmnziqqo4duhgbz
Remove unneeded _LRUNode.cleanup callback ability and deprecate LRUCache.add

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
from bzrlib import (
21
21
    bencode,
22
22
    errors,
23
 
    revision as _mod_revision,
24
23
    )
25
24
from bzrlib.controldir import ControlDir
26
25
from bzrlib.smart.request import (
172
171
        The revision list is returned as the body content,
173
172
        with each revision utf8 encoded and \x00 joined.
174
173
        """
175
 
        branch.lock_read()
176
 
        try:
177
 
            graph = branch.repository.get_graph()
178
 
            stop_revisions = (None, _mod_revision.NULL_REVISION)
179
 
            history = list(graph.iter_lefthand_ancestry(
180
 
                branch.last_revision(), stop_revisions))
181
 
        finally:
182
 
            branch.unlock()
183
174
        return SuccessfulSmartServerResponse(
184
 
            ('ok', ), ('\x00'.join(reversed(history))))
 
175
            ('ok', ), ('\x00'.join(branch.revision_history())))
185
176
 
186
177
 
187
178
class SmartServerBranchRequestLastRevisionInfo(SmartServerBranchRequest):