##// END OF EJS Templates
merge with stable
Matt Mackall -
r19886:e8289757 merge default
parent child Browse files
Show More
@@ -60,7 +60,10 b' class _httprequesthandler(BaseHTTPServer'
60 self._log_any(self.server.accesslog, format, *args)
60 self._log_any(self.server.accesslog, format, *args)
61
61
62 def log_request(self, code='-', size='-'):
62 def log_request(self, code='-', size='-'):
63 xheaders = [h for h in self.headers.items() if h[0].startswith('x-')]
63 xheaders = []
64 if util.safehasattr(self, 'headers'):
65 xheaders = [h for h in self.headers.items()
66 if h[0].startswith('x-')]
64 self.log_message('"%s" %s %s%s',
67 self.log_message('"%s" %s %s%s',
65 self.requestline, str(code), str(size),
68 self.requestline, str(code), str(size),
66 ''.join([' %s:%s' % h for h in sorted(xheaders)]))
69 ''.join([' %s:%s' % h for h in sorted(xheaders)]))
@@ -994,7 +994,7 b' def graph(web, req, tmpl):'
994 desc = templatefilters.firstline(ctx.description())
994 desc = templatefilters.firstline(ctx.description())
995 desc = cgi.escape(templatefilters.nonempty(desc))
995 desc = cgi.escape(templatefilters.nonempty(desc))
996 user = cgi.escape(templatefilters.person(ctx.user()))
996 user = cgi.escape(templatefilters.person(ctx.user()))
997 branch = ctx.branch()
997 branch = cgi.escape(ctx.branch())
998 try:
998 try:
999 branchnode = web.repo.branchtip(branch)
999 branchnode = web.repo.branchtip(branch)
1000 except error.RepoLookupError:
1000 except error.RepoLookupError:
@@ -1003,7 +1003,8 b' def graph(web, req, tmpl):'
1003
1003
1004 if usetuples:
1004 if usetuples:
1005 data.append((node, vtx, edges, desc, user, age, branch,
1005 data.append((node, vtx, edges, desc, user, age, branch,
1006 ctx.tags(), ctx.bookmarks()))
1006 [cgi.escape(x) for x in ctx.tags()],
1007 [cgi.escape(x) for x in ctx.bookmarks()]))
1007 else:
1008 else:
1008 edgedata = [dict(col=edge[0], nextcol=edge[1],
1009 edgedata = [dict(col=edge[0], nextcol=edge[1],
1009 color=(edge[2] - 1) % 6 + 1,
1010 color=(edge[2] - 1) % 6 + 1,
@@ -215,6 +215,7 b' def _uescape(c):'
215 _escapes = [
215 _escapes = [
216 ('\\', '\\\\'), ('"', '\\"'), ('\t', '\\t'), ('\n', '\\n'),
216 ('\\', '\\\\'), ('"', '\\"'), ('\t', '\\t'), ('\n', '\\n'),
217 ('\r', '\\r'), ('\f', '\\f'), ('\b', '\\b'),
217 ('\r', '\\r'), ('\f', '\\f'), ('\b', '\\b'),
218 ('<', '\\u003c'), ('>', '\\u003e')
218 ]
219 ]
219
220
220 def jsonescape(s):
221 def jsonescape(s):
@@ -665,7 +665,7 b' class ui(object):'
665 if not self.interactive():
665 if not self.interactive():
666 return default
666 return default
667 try:
667 try:
668 self.write(self.label(prompt or _('password: '), 'ui.prompt'))
668 self.write_err(self.label(prompt or _('password: '), 'ui.prompt'))
669 return getpass.getpass('')
669 return getpass.getpass('')
670 except EOFError:
670 except EOFError:
671 raise util.Abort(_('response expected'))
671 raise util.Abort(_('response expected'))
@@ -42,7 +42,7 b' mercurial.localrepo.localrepository.test'
42 # create an empty repo. and instanciate it. It is important to run
42 # create an empty repo. and instanciate it. It is important to run
43 # those test on the real object to detect regression.
43 # those test on the real object to detect regression.
44 repopath = os.path.join(os.environ['TESTTMP'], 'repo')
44 repopath = os.path.join(os.environ['TESTTMP'], 'repo')
45 subprocess.check_call(['hg', 'init', repopath])
45 assert subprocess.call(['hg', 'init', repopath]) == 0
46 ui = uimod.ui()
46 ui = uimod.ui()
47 repo = mercurial.hg.repository(ui, path=repopath).unfiltered()
47 repo = mercurial.hg.repository(ui, path=repopath).unfiltered()
48
48
General Comments 0
You need to be logged in to leave comments. Login now