largefiles: correctly handle newly added largefile on other side of merge
authorNa'Tosha Bard <natosha@unity3d.com>
Mon, 16 Jan 2012 19:45:35 +0100
changeset 15905 634d49a8b6db
parent 15904 7d28d6a67dd3
child 15906 aad565319fa3
largefiles: correctly handle newly added largefile on other side of merge
hgext/largefiles/lfcommands.py
--- 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()