diff mercurial/dispatch.py @ 20330:69a0d22b9677 stable

dispatch: take --hidden from individual commands into account The command server would otherwise ignore that option, since the repo object is only created once.
author Julien Cristau <julien.cristau@logilab.fr>
date Mon, 27 Jan 2014 10:57:20 +0100
parents 03d345da0579
children f144928dd058 dd2e25e49862
line wrap: on
line diff
--- a/mercurial/dispatch.py	Thu Jan 30 15:03:36 2014 +0900
+++ b/mercurial/dispatch.py	Mon Jan 27 10:57:20 2014 +0100
@@ -773,8 +773,6 @@
                 repo = hg.repository(ui, path=path)
                 if not repo.local():
                     raise util.Abort(_("repository '%s' is not local") % path)
-                if options['hidden']:
-                    repo = repo.unfiltered()
                 repo.ui.setconfig("bundle", "mainreporoot", repo.root)
             except error.RequirementError:
                 raise
@@ -794,6 +792,8 @@
                     raise
         if repo:
             ui = repo.ui
+            if options['hidden']:
+                repo = repo.unfiltered()
         args.insert(0, repo)
     elif rpath:
         ui.warn(_("warning: --repository ignored\n"))