~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Robert Collins
  • Date: 2005-10-07 06:17:49 UTC
  • mfrom: (1185.13.2) (1417.1.8)
  • Revision ID: robertc@robertcollins.net-20051007061749-191de10c005c1db3
merge in readonly and passthrough transaction - make log suck less

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
    
115
115
    This is used to show summaries in verbose logs, and also for finding 
116
116
    revisions which touch a given file."""
117
 
    # FIXME: The current version is very inefficient; it retrieves all revisions
118
 
    # twice and reads the weave twice.  We ought to keep revisions in memory 
119
 
    # in case they're used again, either in a general cache or perhaps 
120
 
    # in this code.
121
117
    # XXX: What are we supposed to do when showing a summary for something 
122
118
    # other than a mainline revision.  The delta to it's first parent, or
123
119
    # (more useful) the delta to a nominated other revision.
154
150
    end_revision
155
151
        If not None, only show revisions <= end_revision
156
152
    """
 
153
    branch.lock_read()
 
154
    try:
 
155
        _show_log(branch, lf, specific_fileid, verbose, direction,
 
156
                  start_revision, end_revision, search)
 
157
    finally:
 
158
        branch.unlock()
 
159
    
 
160
def _show_log(branch,
 
161
             lf,
 
162
             specific_fileid=None,
 
163
             verbose=False,
 
164
             direction='reverse',
 
165
             start_revision=None,
 
166
             end_revision=None,
 
167
             search=None):
 
168
    """Worker function for show_log - see show_log."""
157
169
    from bzrlib.osutils import format_date
158
170
    from bzrlib.errors import BzrCheckError
159
171
    from bzrlib.textui import show_status