Mercurial > hg-stable
changeset 8663:45f626a39def
wrap string literals in error messages
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sun, 31 May 2009 01:30:16 +0200 |
parents | eaee3491ce11 |
children | f265106ccb53 |
files | mercurial/hgweb/hgweb_mod.py mercurial/hgweb/hgwebdir_mod.py mercurial/hgweb/server.py mercurial/localrepo.py |
diffstat | 4 files changed, 13 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py Sun May 31 01:29:30 2009 +0200 +++ b/mercurial/hgweb/hgweb_mod.py Sun May 31 01:30:16 2009 +0200 @@ -68,7 +68,8 @@ def run(self): if not os.environ.get('GATEWAY_INTERFACE', '').startswith("CGI/1."): - raise RuntimeError("This function is only intended to be called while running as a CGI script.") + raise RuntimeError("This function is only intended to be " + "called while running as a CGI script.") import mercurial.hgweb.wsgicgi as wsgicgi wsgicgi.launch(self)
--- a/mercurial/hgweb/hgwebdir_mod.py Sun May 31 01:29:30 2009 +0200 +++ b/mercurial/hgweb/hgwebdir_mod.py Sun May 31 01:30:16 2009 +0200 @@ -92,7 +92,8 @@ def run(self): if not os.environ.get('GATEWAY_INTERFACE', '').startswith("CGI/1."): - raise RuntimeError("This function is only intended to be called while running as a CGI script.") + raise RuntimeError("This function is only intended to be " + "called while running as a CGI script.") import mercurial.hgweb.wsgicgi as wsgicgi wsgicgi.launch(self)
--- a/mercurial/hgweb/server.py Sun May 31 01:29:30 2009 +0200 +++ b/mercurial/hgweb/server.py Sun May 31 01:30:16 2009 +0200 @@ -69,8 +69,8 @@ self._start_response("500 Internal Server Error", []) self._write("Internal Server Error") tb = "".join(traceback.format_exception(*sys.exc_info())) - self.log_error("Exception happened during processing request '%s':\n%s", - self.path, tb) + self.log_error("Exception happened during processing " + "request '%s':\n%s", self.path, tb) def do_GET(self): self.do_POST() @@ -126,7 +126,8 @@ def send_headers(self): if not self.saved_status: - raise AssertionError("Sending headers before start_response() called") + raise AssertionError("Sending headers before " + "start_response() called") saved_status = self.saved_status.split(None, 1) saved_status[0] = int(saved_status[0]) self.send_response(*saved_status) @@ -163,7 +164,8 @@ self.send_headers() if self.length is not None: if len(data) > self.length: - raise AssertionError("Content-length header sent, but more bytes than specified are being written.") + raise AssertionError("Content-length header sent, but more " + "bytes than specified are being written.") self.length = self.length - len(data) self.wfile.write(data) self.wfile.flush()
--- a/mercurial/localrepo.py Sun May 31 01:29:30 2009 +0200 +++ b/mercurial/localrepo.py Sun May 31 01:30:16 2009 +0200 @@ -1402,7 +1402,9 @@ cg = remote.changegroup(fetch, 'pull') else: if not remote.capable('changegroupsubset'): - raise util.Abort(_("Partial pull cannot be done because other repository doesn't support changegroupsubset.")) + raise util.Abort(_("Partial pull cannot be done because " + "other repository doesn't support " + "changegroupsubset.")) cg = remote.changegroupsubset(fetch, heads, 'pull') return self.addchangegroup(cg, 'pull', remote.url()) finally: