##// END OF EJS Templates
large-files: larger "changing_parents" context in mergeupdate override...
marmoute -
r50998:5a0c1d70 default
parent child Browse files
Show More
@@ -1769,7 +1769,7 b' def mergeupdate(orig, repo, node, branch'
1769 matcher = kwargs.get('matcher', None)
1769 matcher = kwargs.get('matcher', None)
1770 # note if this is a partial update
1770 # note if this is a partial update
1771 partial = matcher and not matcher.always()
1771 partial = matcher and not matcher.always()
1772 with repo.wlock():
1772 with repo.wlock(), repo.dirstate.changing_parents(repo):
1773 # branch | | |
1773 # branch | | |
1774 # merge | force | partial | action
1774 # merge | force | partial | action
1775 # -------+-------+---------+--------------
1775 # -------+-------+---------+--------------
@@ -1837,24 +1837,22 b' def mergeupdate(orig, repo, node, branch'
1837 raise error.ProgrammingError(
1837 raise error.ProgrammingError(
1838 b'largefiles is not compatible with in-memory merge'
1838 b'largefiles is not compatible with in-memory merge'
1839 )
1839 )
1840 with repo.dirstate.changing_parents(repo):
1840 result = orig(repo, node, branchmerge, force, *args, **kwargs)
1841 lfdirstate = lfutil.openlfdirstate(repo.ui, repo)
1842 result = orig(repo, node, branchmerge, force, *args, **kwargs)
1843
1841
1844 newstandins = lfutil.getstandinsstate(repo)
1842 newstandins = lfutil.getstandinsstate(repo)
1845 filelist = lfutil.getlfilestoupdate(oldstandins, newstandins)
1843 filelist = lfutil.getlfilestoupdate(oldstandins, newstandins)
1846
1844
1847 # to avoid leaving all largefiles as dirty and thus rehash them, mark
1845 # to avoid leaving all largefiles as dirty and thus rehash them, mark
1848 # all the ones that didn't change as clean
1846 # all the ones that didn't change as clean
1849 for lfile in oldclean.difference(filelist):
1847 for lfile in oldclean.difference(filelist):
1850 lfdirstate.update_file(lfile, p1_tracked=True, wc_tracked=True)
1848 lfdirstate.update_file(lfile, p1_tracked=True, wc_tracked=True)
1851
1849
1852 if branchmerge or force or partial:
1850 if branchmerge or force or partial:
1853 filelist.extend(s.deleted + s.removed)
1851 filelist.extend(s.deleted + s.removed)
1854
1852
1855 lfcommands.updatelfiles(
1853 lfcommands.updatelfiles(
1856 repo.ui, repo, filelist=filelist, normallookup=partial
1854 repo.ui, repo, filelist=filelist, normallookup=partial
1857 )
1855 )
1858
1856
1859 return result
1857 return result
1860
1858
General Comments 0
You need to be logged in to leave comments. Login now