comparison mercurial/dispatch.py @ 7733:30e95eafc1d0

warn if --repository provided for norepo commands
author Matt Mackall <mpm@selenic.com>
date Wed, 28 Jan 2009 14:27:44 -0600
parents e62a456b8dc5
children 88887054d277
comparison
equal deleted inserted replaced
7732:3793802ea41b 7733:30e95eafc1d0
352 if not path: 352 if not path:
353 raise error.RepoError(_("There is no Mercurial repository" 353 raise error.RepoError(_("There is no Mercurial repository"
354 " here (.hg not found)")) 354 " here (.hg not found)"))
355 raise 355 raise
356 args.insert(0, repo) 356 args.insert(0, repo)
357 elif rpath:
358 ui.warn("warning: --repository ignored\n")
357 359
358 d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) 360 d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
359 361
360 # run pre-hook, and abort if it fails 362 # run pre-hook, and abort if it fails
361 ret = hook.hook(lui, repo, "pre-%s" % cmd, False, args=" ".join(fullargs)) 363 ret = hook.hook(lui, repo, "pre-%s" % cmd, False, args=" ".join(fullargs))