/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 grep.py

  • Committer: Parth Malwankar
  • Date: 2010-03-16 13:59:56 UTC
  • mto: (0.44.2 grep) (6531.3.1 merge-grep)
  • mto: This revision was merged to the branch mainline in revision 6555.
  • Revision ID: parth.malwankar@gmail.com-20100316135956-la1cnuz7knx2g0wl
optimization for single revision.
single revision is not as slow as revision range.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
    wt, relpath = WorkingTree.open_containing('.')
53
53
 
54
54
    start_rev = revision[0]
55
 
    end_rev = revision[0]
 
55
    start_revid = start_rev.as_revision_id(wt.branch)
 
56
    srevno_tuple = wt.branch.revision_id_to_dotted_revno(start_revid)
 
57
    start_revno = '.'.join(map(str, srevno_tuple))
 
58
    start_rev_tuple = (start_revid, start_revno, 0)
 
59
 
56
60
    if len(revision) == 2:
57
61
        end_rev = revision[1]
58
 
 
59
 
    start_revid = start_rev.as_revision_id(wt.branch)
60
 
    end_revid   = end_rev.as_revision_id(wt.branch)
61
 
 
62
 
    given_revs = logcmd._graph_view_revisions(wt.branch, start_revid, end_revid)
 
62
        end_revid   = end_rev.as_revision_id(wt.branch)
 
63
        given_revs = logcmd._graph_view_revisions(wt.branch, start_revid, end_revid)
 
64
    else:
 
65
        given_revs = [start_rev_tuple]
63
66
 
64
67
    for revid, revno, merge_depth in given_revs:
65
68
        if levels == 1 and merge_depth != 0: