Mercurial > public > mercurial-scm > hg-stable
diff hgext/largefiles/lfcommands.py @ 18292:40185df018d7 stable
largefiles: make update with backup files in .hglf slightly less broken
Largefiles update would try to copy f to f.orig if there was a .hglf/f.orig .
That is in many many ways very very wrong, but it also caused an abort if f
didn't exist.
Now it only tries to copy f if it exists.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 10 Jan 2013 15:33:14 +0100 |
parents | 0fc1ce271ee6 |
children | 65cec7fa5472 |
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py Fri Jan 04 19:06:42 2013 +0100 +++ b/hgext/largefiles/lfcommands.py Thu Jan 10 15:33:14 2013 +0100 @@ -483,8 +483,8 @@ abslfile = repo.wjoin(lfile) absstandin = repo.wjoin(lfutil.standin(lfile)) if os.path.exists(absstandin): - if os.path.exists(absstandin+'.orig'): - shutil.copyfile(abslfile, abslfile+'.orig') + if os.path.exists(absstandin + '.orig') and os.path.exists(abslfile): + shutil.copyfile(abslfile, abslfile + '.orig') expecthash = lfutil.readstandin(repo, lfile) if (expecthash != '' and (not os.path.exists(abslfile) or