/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-15 17:52:08 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-20100315175208-u2y035fk7sw1m8l3
cosmetic: improved comment

Show diffs side-by-side

added added

removed removed

Lines of Context:
207
207
    fmt_rev = path + "~%s:%s" + eol_marker
208
208
    fmt_rev_n = path + "~%s:%d:%s" + eol_marker
209
209
 
210
 
    # grep through iterable file object and print out the lines
211
 
    # matching the compiled pattern in the specified format.
 
210
    # for better performance we moved formatting conditionals out
 
211
    # of the core loop. hence, the core loop is somewhat duplicated
 
212
    # for various combinations of formatting options.
 
213
 
212
214
    if print_revno and line_number:
213
215
 
214
216
        pfmt = fmt_rev_n
241
243
            index += 1
242
244
 
243
245
    else:
 
246
 
244
247
        pfmt = fmt
245
248
        for line in file_text.split("\n"):
246
249
            res = patternc.search(line)