/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

merge trailing whitespace removal

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
166
166
def _annotations(repo, file_id, rev_id):
167
167
    """Return the list of (origin_revision_id, line_text) for a revision of a file in a repository."""
168
168
    annotations = repo.texts.annotate((file_id, rev_id))
169
 
    # 
 
169
    #
170
170
    return [(key[-1], line) for (key, line) in annotations]
171
171
 
172
172
 
208
208
        revision_id_to_revno[CURRENT_REVISION] = (
209
209
            "%d?" % (branch.revno() + 1),)
210
210
        revisions[CURRENT_REVISION] = current_rev
211
 
    revision_ids = [o for o in revision_ids if 
 
211
    revision_ids = [o for o in revision_ids if
212
212
                    repository.has_revision(o)]
213
 
    revisions.update((r.revision_id, r) for r in 
 
213
    revisions.update((r.revision_id, r) for r in
214
214
                     repository.get_revisions(revision_ids))
215
215
    for origin, text in annotations:
216
216
        text = text.rstrip('\r\n')
241
241
               _left_matching_blocks=None,
242
242
               heads_provider=None):
243
243
    """Create a new annotated version from new lines and parent annotations.
244
 
    
 
244
 
245
245
    :param parents_lines: List of annotated lines for all parents
246
246
    :param new_lines: The un-annotated new lines
247
247
    :param new_revision_id: The revision-id to associate with new lines