##// 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 60 self._log_any(self.server.accesslog, format, *args)
61 61
62 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 67 self.log_message('"%s" %s %s%s',
65 68 self.requestline, str(code), str(size),
66 69 ''.join([' %s:%s' % h for h in sorted(xheaders)]))
@@ -994,7 +994,7 b' def graph(web, req, tmpl):'
994 994 desc = templatefilters.firstline(ctx.description())
995 995 desc = cgi.escape(templatefilters.nonempty(desc))
996 996 user = cgi.escape(templatefilters.person(ctx.user()))
997 branch = ctx.branch()
997 branch = cgi.escape(ctx.branch())
998 998 try:
999 999 branchnode = web.repo.branchtip(branch)
1000 1000 except error.RepoLookupError:
@@ -1003,7 +1003,8 b' def graph(web, req, tmpl):'
1003 1003
1004 1004 if usetuples:
1005 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 1008 else:
1008 1009 edgedata = [dict(col=edge[0], nextcol=edge[1],
1009 1010 color=(edge[2] - 1) % 6 + 1,
@@ -215,6 +215,7 b' def _uescape(c):'
215 215 _escapes = [
216 216 ('\\', '\\\\'), ('"', '\\"'), ('\t', '\\t'), ('\n', '\\n'),
217 217 ('\r', '\\r'), ('\f', '\\f'), ('\b', '\\b'),
218 ('<', '\\u003c'), ('>', '\\u003e')
218 219 ]
219 220
220 221 def jsonescape(s):
@@ -665,7 +665,7 b' class ui(object):'
665 665 if not self.interactive():
666 666 return default
667 667 try:
668 self.write(self.label(prompt or _('password: '), 'ui.prompt'))
668 self.write_err(self.label(prompt or _('password: '), 'ui.prompt'))
669 669 return getpass.getpass('')
670 670 except EOFError:
671 671 raise util.Abort(_('response expected'))
@@ -42,7 +42,7 b' mercurial.localrepo.localrepository.test'
42 42 # create an empty repo. and instanciate it. It is important to run
43 43 # those test on the real object to detect regression.
44 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 46 ui = uimod.ui()
47 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