Patchwork [4,of,6] largefiles: don't add extra \n when displaying remote messages in putlfile

login
register
mail settings
Submitter Mads Kiilerich
Date Oct. 23, 2013, 5:54 p.m.
Message ID <7f98fd463044277d30c0.1382550849@localhost.localdomain>
Download mbox | patch
Permalink /patch/2809/
State Accepted
Commit 29f12a7a03eedd844151f2e09963fe7d53753036
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 7f98fd463044277d30c07e5314ed04fd344ec3f2
# Parent  ebadc2a98fa4c6fed4fa6acd39d2cd235d96d5f3
largefiles: don't add extra \n when displaying remote messages in putlfile

Patch

diff --git a/hgext/largefiles/proto.py b/hgext/largefiles/proto.py
--- a/hgext/largefiles/proto.py
+++ b/hgext/largefiles/proto.py
@@ -93,7 +93,7 @@  def wirereposetup(ui, repo):
                         headers={'content-type':'application/mercurial-0.1'})
                     d, output = res.split('\n', 1)
                     for l in output.splitlines(True):
-                        self.ui.warn(_('remote: '), l, '\n')
+                        self.ui.warn(_('remote: '), l) # assume l ends with \n
                     return int(d)
                 except (ValueError, urllib2.HTTPError):
                     self.ui.warn(_('unexpected putlfile response: %r\n') % res)
diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t
--- a/tests/test-largefiles.t
+++ b/tests/test-largefiles.t
@@ -1678,7 +1678,6 @@  Corrupt the cached largefile in r7 and m
   pushing to http://localhost:$HGPORT1/
   searching for changes
   remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash
-  
   abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob)
   [255]
   $ mv 4cdac4d8b084d0b599525cf732437fb337d422a8 r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8