442 |
442 |
443 update = {} |
443 update = {} |
444 updated, removed = 0, 0 |
444 updated, removed = 0, 0 |
445 for lfile in lfiles: |
445 for lfile in lfiles: |
446 abslfile = repo.wjoin(lfile) |
446 abslfile = repo.wjoin(lfile) |
|
447 abslfileorig = cmdutil.origpath(ui, repo, abslfile) |
447 absstandin = repo.wjoin(lfutil.standin(lfile)) |
448 absstandin = repo.wjoin(lfutil.standin(lfile)) |
|
449 absstandinorig = cmdutil.origpath(ui, repo, absstandin) |
448 if os.path.exists(absstandin): |
450 if os.path.exists(absstandin): |
449 if (os.path.exists(absstandin + '.orig') and |
451 if (os.path.exists(absstandinorig) and |
450 os.path.exists(abslfile)): |
452 os.path.exists(abslfile)): |
451 shutil.copyfile(abslfile, abslfile + '.orig') |
453 shutil.copyfile(abslfile, abslfileorig) |
452 util.unlinkpath(absstandin + '.orig') |
454 util.unlinkpath(absstandinorig) |
453 expecthash = lfutil.readstandin(repo, lfile) |
455 expecthash = lfutil.readstandin(repo, lfile) |
454 if expecthash != '': |
456 if expecthash != '': |
455 if lfile not in repo[None]: # not switched to normal file |
457 if lfile not in repo[None]: # not switched to normal file |
456 util.unlinkpath(abslfile, ignoremissing=True) |
458 util.unlinkpath(abslfile, ignoremissing=True) |
457 # use normallookup() to allocate an entry in largefiles |
459 # use normallookup() to allocate an entry in largefiles |