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.
--- 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: