diff hgext/largefiles/lfcommands.py @ 15905:634d49a8b6db

largefiles: correctly handle newly added largefile on other side of merge
author Na'Tosha Bard <natosha@unity3d.com>
date Mon, 16 Jan 2012 19:45:35 +0100
parents 3ecce805ac13
children 8435fa20dff9
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py	Tue Jan 17 02:55:55 2012 +0100
+++ b/hgext/largefiles/lfcommands.py	Mon Jan 16 19:45:35 2012 +0100
@@ -379,7 +379,8 @@
         # working copy to have the correct hashvalue.  This is because the
         # original hg.merge() already updated the standin as part of the normal
         # merge process -- we just have to udpate the largefile to match.
-        if getattr(repo, "_ismerging", False):
+        if (getattr(repo, "_ismerging", False) and
+             os.path.exists(repo.wjoin(lfutil.standin(lfile)))):
             expectedhash = lfutil.readstandin(repo, lfile)
         else:
             expectedhash = repo[node][lfutil.standin(lfile)].data().strip()