|
@@ -50,6 +50,8 @@ def parse_options():
|
|
|
|
|
|
|
|
|
def support_cow(src, dest):
|
|
|
+ # 'cp --reflink' always succeeds when 'src' is a symlink or a directory
|
|
|
+ assert os.path.isfile(src) and not os.path.islink(src)
|
|
|
try:
|
|
|
subprocess.check_output(['cp', '-a', '--reflink', src, dest],
|
|
|
stderr=subprocess.STDOUT)
|
|
@@ -74,6 +76,8 @@ def main():
|
|
|
args = parse_options()
|
|
|
|
|
|
gclient = os.path.join(args.repository, '.gclient')
|
|
|
+ if os.path.islink(gclient):
|
|
|
+ gclient = os.realpath(gclient)
|
|
|
new_gclient = os.path.join(args.new_workdir, '.gclient')
|
|
|
|
|
|
if try_vol_snapshot(args.repository, args.new_workdir):
|