##// END OF EJS Templates
tags: don't crash if unable to write tag cache...
Greg Ward -
r9366:9ff178e7 default
parent child Browse files
Show More
@@ -301,7 +301,10 b' def _readtagcache(ui, repo):'
301 301
302 302 def _writetagcache(ui, repo, heads, tagfnode, cachetags):
303 303
304 cachefile = repo.opener('tags.cache', 'w', atomictemp=True)
304 try:
305 cachefile = repo.opener('tags.cache', 'w', atomictemp=True)
306 except (OSError, IOError):
307 return
305 308 _debug(ui, 'writing cache file %s\n' % cachefile.name)
306 309
307 310 realheads = repo.heads() # for sanity checks below
@@ -37,9 +37,17 b' hg tags'
37 37 hg identify
38 38
39 39 # repeat with cold tag cache
40 echo "% identify with cold cache"
40 41 rm -f .hg/tags.cache
41 42 hg identify
42 43
44 # and again, but now unable to write tag cache
45 echo "% identify with unwritable cache"
46 rm -f .hg/tags.cache
47 chmod 555 .hg
48 hg identify
49 chmod 755 .hg
50
43 51 echo "% create a branch"
44 52 echo bb > a
45 53 hg status
@@ -13,6 +13,9 b' acb14030fe0a21b60322c440ad2d20cf7685a376'
13 13 tip 1:b9154636be93
14 14 first 0:acb14030fe0a
15 15 b9154636be93 tip
16 % identify with cold cache
17 b9154636be93 tip
18 % identify with unwritable cache
16 19 b9154636be93 tip
17 20 % create a branch
18 21 M a
General Comments 0
You need to be logged in to leave comments. Login now