Yuya Nishihara  committed d6197a0

serve: rename --webdir-conf to --web-conf (sync with Mercurial)

This applies the same change as aca9a7cf2c9a of Mercurial.

  • Participants
  • Parent commits 74b5067
  • Branches stable

Comments (0)

Files changed (2)

File tortoisehg/hgtk/

 def serve(ui, *pats, **opts):
     """web server"""
     from tortoisehg.hgtk.serve import run
-    if paths.find_root() == None and not opts['webdir_conf']:
+    if paths.find_root() == None and not (opts['web_conf'] or opts['webdir_conf']):
         raise error.RepoError(_("There is no Mercurial repository here"
                     " (.hg not found)"))
     gtkrun(run, ui, *pats, **opts)
     "forget": (forget, [], _('hgtk forget [FILE]...')),
-         [('', 'webdir-conf', '', _('name of the webdir config file'))],
+         [('', 'web-conf', '',
+           _('name of the hgweb config file (serve more than one repository)')),
+          ('', 'webdir-conf', '',
+           _('name of the hgweb config file (DEPRECATED)'))],
          _('hgtk serve [OPTION]...')),
     "thgstatus": (thgstatus,
         [('',  'delay', None, _('wait until the second ticks over')),

File tortoisehg/hgtk/

                         baseui.setconfig("web", o, str(opts[o]))
                         if repoui:
                             repoui.setconfig("web", o, str(opts[o]))
-                if opts.get('webdir_conf'):
-                    app = hgwebdir_mod.hgwebdir(opts['webdir_conf'], repo.ui)
+                o = opts.get('web_conf') or opts.get('webdir_conf')
+                if o:
+                    app = hgwebdir_mod.hgwebdir(o, repo.ui)
                     app = hgweb_mod.hgweb(hg.repository(repo.ui, repo.root))
                 self.httpd = server.create_server(ui, app)
           ('', 'prefix', '', _('prefix path to serve from (default: server root)')),
           ('n', 'name', '',
            _('name to show in web pages (default: working dir)')),
+          ('', 'web-conf', '',
+           _('name of the hgweb config file (serve more than one repository)')),
           ('', 'webdir-conf', '', _('name of the webdir config file'
-                                    ' (serve more than one repo)')),
+                                    ' (DEPRECATED)')),
           ('', 'pid-file', '', _('name of file to write process ID to')),
           ('', 'stdio', None, _('for remote clients')),
           ('t', 'templates', '', _('web templates to use')),
          _('hg serve [OPTION]...'))}
 def run(ui, *pats, **opts):
-    return ServeDialog(opts.get('webdir_conf'))
+    return ServeDialog(opts.get('web_conf') or opts.get('webdir_conf'))