/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/annotate.py

  • Committer: Aaron Bentley
  • Date: 2009-03-09 02:16:29 UTC
  • mfrom: (4090 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4100.
  • Revision ID: aaron@aaronbentley.com-20090309021629-o4j18ltv1hzuuyhl
Merge bzr.dev into clean-tree2

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""File annotate based on weave storage"""
18
18
 
19
19
# TODO: Choice of more or less verbose formats:
20
 
 
20
#
21
21
# interposed: show more details between blocks of modified lines
22
22
 
23
23
# TODO: Show which revision caused a line to merge into the parent
24
24
 
25
25
# TODO: perhaps abbreviate timescales depending on how recent they are
26
 
# e.g. "3:12 Tue", "13 Oct", "Oct 2005", etc.  
 
26
# e.g. "3:12 Tue", "13 Oct", "Oct 2005", etc.
27
27
 
28
28
import sys
29
29
import time
168
168
def _annotations(repo, file_id, rev_id):
169
169
    """Return the list of (origin_revision_id, line_text) for a revision of a file in a repository."""
170
170
    annotations = repo.texts.annotate((file_id, rev_id))
171
 
    # 
 
171
    #
172
172
    return [(key[-1], line) for (key, line) in annotations]
173
173
 
174
174
 
210
210
        revision_id_to_revno[CURRENT_REVISION] = (
211
211
            "%d?" % (branch.revno() + 1),)
212
212
        revisions[CURRENT_REVISION] = current_rev
213
 
    revision_ids = [o for o in revision_ids if 
 
213
    revision_ids = [o for o in revision_ids if
214
214
                    repository.has_revision(o)]
215
 
    revisions.update((r.revision_id, r) for r in 
 
215
    revisions.update((r.revision_id, r) for r in
216
216
                     repository.get_revisions(revision_ids))
217
217
    for origin, text in annotations:
218
218
        text = text.rstrip('\r\n')
231
231
                                     time.gmtime(rev.timestamp + tz))
232
232
            # a lazy way to get something like the email address
233
233
            # TODO: Get real email address
234
 
            author = rev.get_apparent_author()
 
234
            author = rev.get_apparent_authors()[0]
235
235
            try:
236
236
                author = extract_email_address(author)
237
237
            except errors.NoEmailInUsername:
243
243
               _left_matching_blocks=None,
244
244
               heads_provider=None):
245
245
    """Create a new annotated version from new lines and parent annotations.
246
 
    
 
246
 
247
247
    :param parents_lines: List of annotated lines for all parents
248
248
    :param new_lines: The un-annotated new lines
249
249
    :param new_revision_id: The revision-id to associate with new lines