summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--manifest_xml.py25
-rw-r--r--project.py7
-rwxr-xr-xrepo4
3 files changed, 17 insertions, 19 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index 890c954d..8b57bf52 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -38,8 +38,9 @@ MANIFEST_FILE_NAME = 'manifest.xml'
38LOCAL_MANIFEST_NAME = 'local_manifest.xml' 38LOCAL_MANIFEST_NAME = 'local_manifest.xml'
39LOCAL_MANIFESTS_DIR_NAME = 'local_manifests' 39LOCAL_MANIFESTS_DIR_NAME = 'local_manifests'
40 40
41urllib.parse.uses_relative.extend(['ssh', 'git']) 41# urljoin gets confused if the scheme is not known.
42urllib.parse.uses_netloc.extend(['ssh', 'git']) 42urllib.parse.uses_relative.extend(['ssh', 'git', 'persistent-https', 'rpc'])
43urllib.parse.uses_netloc.extend(['ssh', 'git', 'persistent-https', 'rpc'])
43 44
44class _Default(object): 45class _Default(object):
45 """Project defaults within the manifest.""" 46 """Project defaults within the manifest."""
@@ -85,21 +86,13 @@ class _XmlRemote(object):
85 # urljoin will gets confused over quite a few things. The ones we care 86 # urljoin will gets confused over quite a few things. The ones we care
86 # about here are: 87 # about here are:
87 # * no scheme in the base url, like <hostname:port> 88 # * no scheme in the base url, like <hostname:port>
88 # * persistent-https:// 89 # We handle no scheme by replacing it with an obscure protocol, gopher
89 # * rpc:// 90 # and then replacing it with the original when we are done.
90 # We handle this by replacing these with obscure protocols 91
91 # and then replacing them with the original when we are done.
92 # gopher -> <none>
93 # wais -> persistent-https
94 # nntp -> rpc
95 if manifestUrl.find(':') != manifestUrl.find('/') - 1: 92 if manifestUrl.find(':') != manifestUrl.find('/') - 1:
96 manifestUrl = 'gopher://' + manifestUrl 93 url = urllib.parse.urljoin('gopher://' + manifestUrl, url)[9:]
97 manifestUrl = re.sub(r'^persistent-https://', 'wais://', manifestUrl) 94 else:
98 manifestUrl = re.sub(r'^rpc://', 'nntp://', manifestUrl) 95 url = urllib.parse.urljoin(manifestUrl, url)
99 url = urllib.parse.urljoin(manifestUrl, url)
100 url = re.sub(r'^gopher://', '', url)
101 url = re.sub(r'^wais://', 'persistent-https://', url)
102 url = re.sub(r'^nntp://', 'rpc://', url)
103 return url 96 return url
104 97
105 def ToRemoteSpec(self, projectName): 98 def ToRemoteSpec(self, projectName):
diff --git a/project.py b/project.py
index 1245fa2a..e76d6394 100644
--- a/project.py
+++ b/project.py
@@ -1326,6 +1326,8 @@ class Project(object):
1326 if not ID_RE.match(self.revisionExpr): 1326 if not ID_RE.match(self.revisionExpr):
1327 # in case of manifest sync the revisionExpr might be a SHA1 1327 # in case of manifest sync the revisionExpr might be a SHA1
1328 branch.merge = self.revisionExpr 1328 branch.merge = self.revisionExpr
1329 if not branch.merge.startswith('refs/'):
1330 branch.merge = R_HEADS + branch.merge
1329 branch.Save() 1331 branch.Save()
1330 1332
1331 if cnt_mine > 0 and self.rebase: 1333 if cnt_mine > 0 and self.rebase:
@@ -1394,6 +1396,8 @@ class Project(object):
1394 branch = self.GetBranch(name) 1396 branch = self.GetBranch(name)
1395 branch.remote = self.GetRemote(self.remote.name) 1397 branch.remote = self.GetRemote(self.remote.name)
1396 branch.merge = self.revisionExpr 1398 branch.merge = self.revisionExpr
1399 if not branch.merge.startswith('refs/'):
1400 branch.merge = R_HEADS + self.revisionExpr
1397 revid = self.GetRevisionId(all_refs) 1401 revid = self.GetRevisionId(all_refs)
1398 1402
1399 if head.startswith(R_HEADS): 1403 if head.startswith(R_HEADS):
@@ -1865,7 +1869,8 @@ class Project(object):
1865 1869
1866 shallowfetch = self.config.GetString('repo.shallowfetch') 1870 shallowfetch = self.config.GetString('repo.shallowfetch')
1867 if shallowfetch and shallowfetch != ' '.join(spec): 1871 if shallowfetch and shallowfetch != ' '.join(spec):
1868 GitCommand(self, ['fetch', '--unshallow', name] + shallowfetch.split(), 1872 GitCommand(self, ['fetch', '--depth=2147483647', name]
1873 + shallowfetch.split(),
1869 bare=True, ssh_proxy=ssh_proxy).Wait() 1874 bare=True, ssh_proxy=ssh_proxy).Wait()
1870 if depth: 1875 if depth:
1871 self.config.SetString('repo.shallowfetch', ' '.join(spec)) 1876 self.config.SetString('repo.shallowfetch', ' '.join(spec))
diff --git a/repo b/repo
index 960e76f9..f12354a4 100755
--- a/repo
+++ b/repo
@@ -20,7 +20,7 @@ REPO_REV = 'stable'
20# limitations under the License. 20# limitations under the License.
21 21
22# increment this whenever we make important changes to this script 22# increment this whenever we make important changes to this script
23VERSION = (1, 22) 23VERSION = (1, 21)
24 24
25# increment this if the MAINTAINER_KEYS block is modified 25# increment this if the MAINTAINER_KEYS block is modified
26KEYRING_VERSION = (1, 2) 26KEYRING_VERSION = (1, 2)
@@ -102,7 +102,7 @@ JuinEP+AwLAUZ1Bsx9ISC0Agpk2VeHXPL3FGhroEmoMvBzO0kTFGyoeT7PR/BfKv
102""" 102"""
103 103
104GIT = 'git' # our git command 104GIT = 'git' # our git command
105MIN_GIT_VERSION = (1, 8, 2) # minimum supported git version 105MIN_GIT_VERSION = (1, 7, 2) # minimum supported git version
106repodir = '.repo' # name of repo's private directory 106repodir = '.repo' # name of repo's private directory
107S_repo = 'repo' # special repo repository 107S_repo = 'repo' # special repo repository
108S_manifests = 'manifests' # special manifest repository 108S_manifests = 'manifests' # special manifest repository