mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Move hgfs update lock out of hg checkout
Newer hglib freaks out if files that don't belong in the repo are present. This commit moves the update lock up a level into $cachedir/hgfs.
This commit is contained in:
parent
c83e558728
commit
a2d78e57f7
@ -308,7 +308,8 @@ def _clear_old_remotes():
|
||||
except ValueError:
|
||||
pass
|
||||
remove_dirs = [os.path.join(bp_, rdir) for rdir in remove_dirs
|
||||
if rdir not in ('hash', 'refs', 'envs.p', 'remote_map.txt')]
|
||||
if rdir not in ('hash', 'refs', 'envs.p', 'remote_map.txt')
|
||||
and not rdir.endswith('.update.lk')]
|
||||
if remove_dirs:
|
||||
for rdir in remove_dirs:
|
||||
shutil.rmtree(rdir)
|
||||
@ -376,7 +377,10 @@ def _update_lockfile(repo):
|
||||
'''
|
||||
Return the filename of the update lock
|
||||
'''
|
||||
return os.path.join(repo['repo'].root(), 'update.lk')
|
||||
#return os.path.join(repo['repo'].root(), 'update.lk')
|
||||
return os.path.join(__opts__['cachedir'],
|
||||
'hgfs',
|
||||
'{0}.update.lk'.format(repo['hash']))
|
||||
|
||||
|
||||
def update():
|
||||
|
Loading…
Reference in New Issue
Block a user