~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Martin Pool
  • Date: 2005-08-29 04:53:09 UTC
  • Revision ID: mbp@sourcefrog.net-20050829045309-6609704fdb44b600
- fix up logging for history2weaves tool

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
from bzrlib.tree import EmptyTree
54
54
from bzrlib.delta import compare_trees
55
55
from bzrlib.trace import mutter
 
56
from bzrlib.errors import InvalidRevisionNumber
56
57
 
57
58
 
58
59
def find_touching_revisions(branch, file_id):
161
162
    
162
163
    if start_revision is None:
163
164
        start_revision = 1
164
 
    else:
165
 
        branch.check_real_revno(start_revision)
 
165
    elif start_revision < 1 or start_revision >= len(which_revs):
 
166
        raise InvalidRevisionNumber(start_revision)
166
167
    
167
168
    if end_revision is None:
168
169
        end_revision = len(which_revs)
169
 
    else:
170
 
        branch.check_real_revno(end_revision)
 
170
    elif end_revision < 1 or end_revision >= len(which_revs):
 
171
        raise InvalidRevisionNumber(end_revision)
171
172
 
172
173
    # list indexes are 0-based; revisions are 1-based
173
174
    cut_revs = which_revs[(start_revision-1):(end_revision)]
309
310
        print >>to_file,  'revno:', revno
310
311
        if self.show_ids:
311
312
            print >>to_file,  'revision-id:', rev.revision_id
312
 
 
313
 
            for parent in rev.parents:
314
 
                print >>to_file, 'parent:', parent.revision_id
315
 
            
316
313
        print >>to_file,  'committer:', rev.committer
317
314
 
318
315
        date_str = format_date(rev.timestamp,