diff --git a/mercurial/remotenames.py b/mercurial/remotenames.py --- a/mercurial/remotenames.py +++ b/mercurial/remotenames.py @@ -7,6 +7,17 @@ from __future__ import absolute_import +def splitremotename(remote): + name = '' + if '/' in remote: + remote, name = remote.split('/', 1) + return remote, name + +def joinremotename(remote, ref): + if ref: + remote += '/' + ref + return remote + def pullremotenames(localrepo, remoterepo, remotepath): """ pulls bookmarks and branches information of the remote repo during a pull or clone operation.