changeset 9881:54b518fc6671

httprepo: suppress the `real URL is...' message in safe, common cases. When the actual and requested URL only differ by trailing slashes, there is no need to warn. As an example, this easily happens when accessing repositories on Bitbucket over HTTP(S). As far as I could tell, there were no existing tests for this behaviour.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Wed, 18 Nov 2009 12:47:58 +0100
parents a1886801d466
children b3b57ecbda50
files mercurial/httprepo.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/httprepo.py	Wed Nov 18 17:09:00 2009 +0100
+++ b/mercurial/httprepo.py	Wed Nov 18 12:47:58 2009 +0100
@@ -93,7 +93,7 @@
         resp_url = resp.geturl()
         if resp_url.endswith(qs):
             resp_url = resp_url[:-len(qs)]
-        if self._url != resp_url:
+        if self._url.rstrip('/') != resp_url.rstrip('/'):
             self.ui.status(_('real URL is %s\n') % resp_url)
             self._url = resp_url
         try: