equal
deleted
inserted
replaced
124 funcmap = [func for op, func in opmap if opts.get(op)] |
124 funcmap = [func for op, func in opmap if opts.get(op)] |
125 if linenumber: |
125 if linenumber: |
126 lastfunc = funcmap[-1] |
126 lastfunc = funcmap[-1] |
127 funcmap[-1] = lambda x: "%s:%s" % (lastfunc(x), x[1]) |
127 funcmap[-1] = lambda x: "%s:%s" % (lastfunc(x), x[1]) |
128 |
128 |
|
129 def bad(x, y): |
|
130 raise util.Abort("%s: %s" % (x, y)) |
|
131 |
129 ctx = cmdutil.revsingle(repo, opts.get('rev')) |
132 ctx = cmdutil.revsingle(repo, opts.get('rev')) |
130 m = cmdutil.match(repo, pats, opts) |
133 m = cmdutil.match(repo, pats, opts) |
|
134 m.bad = bad |
131 follow = not opts.get('no_follow') |
135 follow = not opts.get('no_follow') |
132 for abs in ctx.walk(m): |
136 for abs in ctx.walk(m): |
133 fctx = ctx[abs] |
137 fctx = ctx[abs] |
134 if not opts.get('text') and util.binary(fctx.data()): |
138 if not opts.get('text') and util.binary(fctx.data()): |
135 ui.write(_("%s: binary file\n") % ((pats and m.rel(abs)) or abs)) |
139 ui.write(_("%s: binary file\n") % ((pats and m.rel(abs)) or abs)) |