Mercurial > hg
changeset 23635:faec11cfb645
largefile: explain why no monkey patching on a repoview
The comment requested for investigations, here they are.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 17 Dec 2014 12:19:33 -0800 |
parents | bbd50e13c006 |
children | ab3b8d8fd2a0 |
files | hgext/largefiles/overrides.py |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py Wed Dec 17 12:10:16 2014 -0800 +++ b/hgext/largefiles/overrides.py Wed Dec 17 12:19:33 2014 -0800 @@ -1122,8 +1122,15 @@ # Calling purge with --all will cause the largefiles to be deleted. # Override repo.status to prevent this from happening. def overridepurge(orig, ui, repo, *dirs, **opts): - # XXX large file status is buggy when used on repo proxy. - # XXX this needs to be investigate. + # XXX Monkey patching a repoview will not work. The assigned attribute will + # be set on the unfiltered repo, but we will only lookup attributes in the + # unfiltered repo if the lookup in the repoview object itself fails. As the + # monkey patched method exists on the repoview class the lookup will not + # fail. As a result, the original version will shadow the monkey patched + # one, defeating the monkey patch. + # + # As a work around we use an unfiltered repo here. We should do something + # cleaner instead. repo = repo.unfiltered() oldstatus = repo.status def overridestatus(node1='.', node2=None, match=None, ignored=False,