~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Alexander Belchenko
  • Date: 2007-04-19 19:28:39 UTC
  • mto: This revision was merged to the branch mainline in revision 2439.
  • Revision ID: bialix@ukr.net-20070419192839-p964uu06n6vbjgrt
changes after John's review

Show diffs side-by-side

added added

removed removed

Lines of Context:
223
223
            DeprecationWarning, stacklevel=3)
224
224
    view_revisions = list(get_view_revisions(mainline_revs, rev_nos, branch,
225
225
                          direction, include_merges=include_merges))
226
 
    
 
226
 
227
227
    use_tags = getattr(lf, 'supports_tags', False)
228
228
    if use_tags:
229
229
        rev_tag_dict = {}
230
230
        if branch.supports_tags():
231
231
            rev_tag_dict = branch.tags.get_reverse_tag_dict()
232
 
    
 
232
 
233
233
    def iter_revisions():
234
234
        # r = revision, n = revno, d = merge depth
235
235
        revision_ids = [r for r, n, d in view_revisions]
263
263
 
264
264
        if merge_depth == 0:
265
265
            # a mainline revision.
266
 
                
 
266
 
267
267
            if specific_fileid:
268
268
                if not delta.touches_file_id(specific_fileid):
269
269
                    continue
270
 
    
 
270
 
271
271
            if not verbose:
272
272
                # although we calculated it, throw it away without display
273
273
                delta = None
353
353
 
354
354
    def short_committer(self, rev):
355
355
        return re.sub('<.*@.*>', '', rev.committer).strip(' ')
356
 
    
357
 
    
 
356
 
 
357
 
358
358
class LongLogFormatter(LogFormatter):
 
359
 
359
360
    supports_tags = True    # must exist and be True
360
361
                            # if this log formatter support tags.
361
362
                            # .show() and .show_merge_revno() must then accept
392
393
            for parent_id in rev.parent_ids:
393
394
                print >>to_file, indent+'parent:', parent_id
394
395
        print >>to_file,  indent+'committer:', rev.committer
395
 
        
 
396
 
396
397
        try:
397
398
            print >>to_file, indent+'branch nick: %s' % \
398
399
                rev.properties['branch-nick']