@@ -353,7 +353,10 @@ def clone(url, path=None, depth=None, protocol=None):
353
353
try :
354
354
Bld .init (path )
355
355
with cd (path ):
356
- Bld .seturl (url + '/tip' )
356
+ rev = Hg .remoteid (m .group (1 ), 'tip' )
357
+ if not rev :
358
+ error ("Unable to fetch library build information" )
359
+ Bld .seturl (url + '/' + rev )
357
360
except Exception as e :
358
361
if os .path .isdir (path ):
359
362
rmtree_readonly (path )
@@ -363,7 +366,7 @@ def fetch_rev(url, rev):
363
366
rev_file = os .path .join ('.' + Bld .name , '.rev-' + rev + '.zip' )
364
367
try :
365
368
if not os .path .exists (rev_file ):
366
- action ("Downloading library build \" %s\" (might take a minute )" % rev )
369
+ action ("Downloading library build \" %s\" (might take a while )" % rev )
367
370
outfd = open (rev_file , 'wb' )
368
371
inurl = urlopen (url )
369
372
outfd .write (inurl .read ())
@@ -1008,7 +1011,7 @@ def fromurl(cls, url, path=None):
1008
1011
repo .path = os .path .abspath (path or os .path .join (getcwd (), repo .name ))
1009
1012
repo .url = formaturl (m_repo_ref .group (1 ))
1010
1013
repo .rev = m_repo_ref .group (3 )
1011
- if repo .rev and repo .rev != 'latest' and not re .match (r'^([a-fA-F0-9]{6,40})$' , repo .rev ):
1014
+ if repo .rev and repo .rev != 'latest' and repo . rev != 'tip' and not re .match (r'^([a-fA-F0-9]{6,40})$' , repo .rev ):
1012
1015
error ('Invalid revision (%s)' % repo .rev , - 1 )
1013
1016
else :
1014
1017
error ('Invalid repository (%s)' % url .strip (), - 1 )
@@ -1927,7 +1930,7 @@ def new(name, scm='git', program=False, library=False, mbedlib=False, create_onl
1927
1930
p .path = cwd_root
1928
1931
p .set_root ()
1929
1932
if not create_only and not p .get_os_dir () and not p .get_mbedlib_dir ():
1930
- url = mbed_lib_url if mbedlib else mbed_os_url + '#latest'
1933
+ url = mbed_lib_url + '#tip' if mbedlib else mbed_os_url + '#latest'
1931
1934
d = 'mbed' if mbedlib else 'mbed-os'
1932
1935
try :
1933
1936
with cd (d_path ):
0 commit comments