# HG changeset patch # User Mads Kiilerich # Date 1505347686 -7200 # Node ID 86bd75e0347c5c4b867957649f2a8ed895ccc5d5 # Parent 5f1af779bddf6e800af00161b55923dbdf651933 vcs: refactor hgcompat demandimport handling to prepare for Mercurial 4.3 See https://www.mercurial-scm.org/repo/hg/rev/0906b85bf222#l4.1 . We might not need the hgcompat workaround any more - the d18500a8840c commit message is not helpful in explaining exactly what problem it solved. diff -r 5f1af779bddf -r 86bd75e0347c kallithea/lib/vcs/utils/hgcompat.py --- a/kallithea/lib/vcs/utils/hgcompat.py Thu Sep 14 02:08:06 2017 +0200 +++ b/kallithea/lib/vcs/utils/hgcompat.py Thu Sep 14 02:08:06 2017 +0200 @@ -3,9 +3,9 @@ """ import mercurial -import mercurial.demandimport +from mercurial import demandimport # patch demandimport, due to bug in mercurial when it always triggers demandimport.enable() -mercurial.demandimport.enable = lambda *args, **kwargs: 1 +demandimport.enable = lambda *args, **kwargs: 1 from mercurial import archival, merge as hg_merge, patch, ui from mercurial import discovery from mercurial import localrepo