~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/annotate.py

  • Committer: Alexander Belchenko
  • Date: 2006-07-30 07:23:36 UTC
  • mto: (1711.2.111 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1906.
  • Revision ID: bialix@ukr.net-20060730072336-3e9fd7ddb67b5f47
More branding: bazaar-ng -> Bazaar; bazaar-ng.org -> bazaar-vcs.org

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
# e.g. "3:12 Tue", "13 Oct", "Oct 2005", etc.  
27
27
 
28
28
import sys
29
 
import os
30
29
import time
31
30
 
32
 
import bzrlib.weave
33
31
from bzrlib.config import extract_email_address
34
32
from bzrlib.errors import BzrError
35
33
 
64
62
            (revno_str, author, date_str) = ('','','')
65
63
        else:
66
64
            last_origin = origin
67
 
            line_rev_id = w.idx_to_name(origin)
68
 
            if not branch.repository.has_revision(line_rev_id):
 
65
            if not branch.repository.has_revision(origin):
69
66
                (revno_str, author, date_str) = ('?','?','?')
70
67
            else:
71
 
                if line_rev_id in rh:
72
 
                    revno_str = str(rh.index(line_rev_id) + 1)
 
68
                if origin in rh:
 
69
                    revno_str = str(rh.index(origin) + 1)
73
70
                else:
74
71
                    revno_str = 'merge'
75
 
            rev = branch.repository.get_revision(line_rev_id)
 
72
            rev = branch.repository.get_revision(origin)
76
73
            tz = rev.timezone or 0
77
74
            date_str = time.strftime('%Y%m%d', 
78
75
                                     time.gmtime(rev.timestamp + tz))
83
80
                author = extract_email_address(author)
84
81
            except BzrError:
85
82
                pass        # use the whole name
86
 
        yield (revno_str, author, date_str, line_rev_id, text)
 
83
        yield (revno_str, author, date_str, origin, text)