diff --git a/mercurial/commands.py b/mercurial/commands.py index fe22d86a8992c5e442a45a3bfd673ca59129214a_bWVyY3VyaWFsL2NvbW1hbmRzLnB5..711de9dcb1d37f639ceb36ef4dd7d366df3da20a_bWVyY3VyaWFsL2NvbW1hbmRzLnB5 100644 --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -260,6 +260,9 @@ Returns 0 on success. """ + if not pats: + raise util.Abort(_('at least one filename or pattern is required')) + if opts.get('follow'): # --follow is deprecated and now just an alias for -f/--file # to mimic the behavior of Mercurial before version 1.5 @@ -267,10 +270,6 @@ datefunc = ui.quiet and util.shortdate or util.datestr getdate = util.cachefunc(lambda x: datefunc(x[0].date())) - - if not pats: - raise util.Abort(_('at least one filename or pattern is required')) - hexfn = ui.debugflag and hex or short opmap = [('user', ' ', lambda x: ui.shortuser(x[0].user())),