Commits

Augie Fackler committed 7fa27af

Update for hg-side URL handling changes.

Comments (0)

Files changed (3)

                     uri = self.ui.expandpath(uri)
                     if remote.local():
                         uri = os.path.realpath(uri)
-                        rpath = remote.root
+                        rpath = getattr(remote, 'root', None)
                     else:
                         rpath = remote._url
                         if uri.startswith('http'):
-                            uri = url.getauthinfo(uri)[0]
+                            try:
+                                uri = url.url(uri).authinfo()[0]
+                            except AttributeError:
+                                uri = url.getauthinfo(uri)[0]
                     uri = uri.rstrip('/')
                     rpath = rpath.rstrip('/')
                     if uri == rpath:

tests/test-remotebranches-with-schemes

 [paths]
 default = ../alpha
 alpha = ../alpha
-beta = dotdot://beta
+beta = dotdot://beta/
 EOF
 hg pull | $FILTERPWD
 hg pull beta | $FILTERPWD

tests/test-remotebranches-with-schemes.out

 adding file changes
 added 3 changesets with 3 changes to 3 files
 (run 'hg update' to get a working copy)
-pulling from dotdot://beta
+pulling from dotdot://beta/
 searching for changes
 adding changesets
 adding manifests