comparison mercurial/commands.py @ 825:0108c602feb9

Add an option to hg serve to serve file using IPv6
author Samuel Tardieu <sam@rfc1149.net>
date Thu, 04 Aug 2005 13:21:27 -0800
parents 0932bc2fb2be
children 16700cdd9055
comparison
equal deleted inserted replaced
824:0932bc2fb2be 825:0108c602feb9
1000 return open(opts[opt], 'w') 1000 return open(opts[opt], 'w')
1001 else: 1001 else:
1002 return default 1002 return default
1003 1003
1004 httpd = hgweb.create_server(repo.root, opts["name"], opts["templates"], 1004 httpd = hgweb.create_server(repo.root, opts["name"], opts["templates"],
1005 opts["address"], opts["port"], 1005 opts["address"], opts["port"], opts["ipv6"],
1006 openlog('accesslog', sys.stdout), 1006 openlog('accesslog', sys.stdout),
1007 openlog('errorlog', sys.stderr)) 1007 openlog('errorlog', sys.stderr))
1008 if ui.verbose: 1008 if ui.verbose:
1009 addr, port = httpd.socket.getsockname() 1009 addr, port = httpd.socket.getsockname()
1010 if addr == '0.0.0.0': 1010 if addr == '0.0.0.0':
1249 ('E', 'errorlog', '', 'error log file'), 1249 ('E', 'errorlog', '', 'error log file'),
1250 ('p', 'port', 8000, 'listen port'), 1250 ('p', 'port', 8000, 'listen port'),
1251 ('a', 'address', '', 'interface address'), 1251 ('a', 'address', '', 'interface address'),
1252 ('n', 'name', os.getcwd(), 'repository name'), 1252 ('n', 'name', os.getcwd(), 'repository name'),
1253 ('', 'stdio', None, 'for remote clients'), 1253 ('', 'stdio', None, 'for remote clients'),
1254 ('t', 'templates', "", 'template map')], 1254 ('t', 'templates', "", 'template map'),
1255 ('6', 'ipv6', None, 'use IPv6 in addition to IPv4')],
1255 "hg serve [OPTION]..."), 1256 "hg serve [OPTION]..."),
1256 "^status": (status, 1257 "^status": (status,
1257 [('I', 'include', [], 'include path in search'), 1258 [('I', 'include', [], 'include path in search'),
1258 ('X', 'exclude', [], 'exclude path from search')], 1259 ('X', 'exclude', [], 'exclude path from search')],
1259 'hg status [FILE]...'), 1260 'hg status [FILE]...'),