Patchwork [2,of,6] largefiles: fix 'unexpected response' warning newlines

login
register
mail settings
Submitter Mads Kiilerich
Date Oct. 23, 2013, 5:54 p.m.
Message ID <123ddcdbcb014b3ec0ea.1382550847@localhost.localdomain>
Download mbox | patch
Permalink /patch/2807/
State Accepted
Commit 2a03faf8b5fedaeba8c3f943357756ac72ab8809
Headers show

Comments

Mads Kiilerich - Oct. 23, 2013, 5:54 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1382550596 -28800
#      Thu Oct 24 01:49:56 2013 +0800
# Branch stable
# Node ID 123ddcdbcb014b3ec0eae4b9798f30bfa3d66970
# Parent  9c9093febeb627dca63bc30c7ecf515feaea5c24
largefiles: fix 'unexpected response' warning newlines

Warnings should always end with \n. The warning message might contain or end
with \n, so better show it with repr encoding.

Patch

diff --git a/hgext/largefiles/proto.py b/hgext/largefiles/proto.py
--- a/hgext/largefiles/proto.py
+++ b/hgext/largefiles/proto.py
@@ -96,7 +96,7 @@  def wirereposetup(ui, repo):
                         self.ui.warn(_('remote: '), l, '\n')
                     return int(d)
                 except (ValueError, urllib2.HTTPError):
-                    self.ui.warn(_('unexpected putlfile response: %s') % res)
+                    self.ui.warn(_('unexpected putlfile response: %r\n') % res)
                     return 1
             # ... but we can't use sshrepository._call because the data=
             # argument won't get sent, and _callpush does exactly what we want