##// END OF EJS Templates
annotate: abort early if no file is specified...
Yuya Nishihara -
r22266:711de9dc default
parent child Browse files
Show More
@@ -260,6 +260,9 b' def annotate(ui, repo, *pats, **opts):'
260
260
261 Returns 0 on success.
261 Returns 0 on success.
262 """
262 """
263 if not pats:
264 raise util.Abort(_('at least one filename or pattern is required'))
265
263 if opts.get('follow'):
266 if opts.get('follow'):
264 # --follow is deprecated and now just an alias for -f/--file
267 # --follow is deprecated and now just an alias for -f/--file
265 # to mimic the behavior of Mercurial before version 1.5
268 # to mimic the behavior of Mercurial before version 1.5
@@ -267,10 +270,6 b' def annotate(ui, repo, *pats, **opts):'
267
270
268 datefunc = ui.quiet and util.shortdate or util.datestr
271 datefunc = ui.quiet and util.shortdate or util.datestr
269 getdate = util.cachefunc(lambda x: datefunc(x[0].date()))
272 getdate = util.cachefunc(lambda x: datefunc(x[0].date()))
270
271 if not pats:
272 raise util.Abort(_('at least one filename or pattern is required'))
273
274 hexfn = ui.debugflag and hex or short
273 hexfn = ui.debugflag and hex or short
275
274
276 opmap = [('user', ' ', lambda x: ui.shortuser(x[0].user())),
275 opmap = [('user', ' ', lambda x: ui.shortuser(x[0].user())),
General Comments 0
You need to be logged in to leave comments. Login now