[isabelle-dev] Isabelle build only works in certain directories

Max W. Haslbeck max.haslbeck at gmx.de
Mon Jul 2 15:20:58 CEST 2018


Another option would be to set the HGPLAIN environment variable.
<https://www.mercurial-scm.org/repo/hg/help/environment <https://www.mercurial-scm.org/repo/hg/help/environment>>

> Am 02.07.2018 um 15:12 schrieb Max W. Haslbeck <max.haslbeck at gmx.de>:
> 
> I found the culprit.
> 
> In my ~/.hgrc I activated the option:
> [ui]
> ...
> tweakdefaults = True 
> 
> "tweakdefaults" changes the behaviour of mercurial to output paths relative to the current working directory instead of printing paths relative to the repository root [1].
> 
> I can get the same behaviour in both cases if I pass the --cwd option to mercurial.
> <"${HG:-hg}" --config defaults.status\= --repository /Users/mhaslbeck/Projects/isabelle --cwd /Users/mhaslbeck/Projects/isabelle --noninteractive status --modified --added --clean --no-status>
> 
> [1] <https://stackoverflow.com/a/46743585 <https://stackoverflow.com/a/46743585>> (at the end of the answer)
> 
> 
>> Am 02.07.2018 um 14:50 schrieb Makarius <makarius at sketis.net <mailto:makarius at sketis.net>>:
>> 
>> On 02/07/18 12:59, Max Haslbeck wrote:
>>> 
>>> When I’m in one of the "wrong" directories the build process spend most
>>> of its time in the function Mercurial.check_files [1]. The problem seems
>>> to be that the paths in hg.known_files() are relative to the current
>>> working directory. So "hg.root + Path.explode(name)" returns an
>>> incorrect path. The filtering of files in the next lines then doesn’t
>>> work and it reruns check() for every file.
>>> 
>>> The build process works in the directory "~/tmp/tmp" because the paths
>>> in hg.known_files() start with "../../" and by luck "hg.root +
>>> Path.explode(name)" returns a correct path.
>>> 
>>> The version of my mercurial installation is 4.6.1.
>>> 
>>> [1]
>>> <https://isabelle.in.tum.de/repos/isabelle/file/1b9462304e1d/src/Pure/General/mercurial.scala#l156 <https://isabelle.in.tum.de/repos/isabelle/file/1b9462304e1d/src/Pure/General/mercurial.scala#l156>>
>> 
>> Thanks for going to the bottom of it. Mercurial.known_files is merely a
>> command-line invocation as follows:
>> 
>> "${HG:-hg}" --config defaults.status\= --repository
>> /home/makarius/isabelle/repos --noninteractive status --modified --added
>> --clean --no-status
>> 
>> 
>> I did not see the reported problem: the file names are always relative
>> to the repository root, independently of the current working directory.
>> I have tried it Mercurial 4.6.1 on macOS 10.13.5, and Mercurial 3.7.3 on
>> Ubuntu 16.04.
>> 
>> So there must be something else in your setup. If we can figure this out
>> within the coming days or weeks, I can still do something about it for
>> the Isabelle2018 release.
>> 
>> 
>> 	Makarius
> 
> _______________________________________________
> isabelle-dev mailing list
> isabelle-dev at in.tum.de
> https://mailmanbroy.informatik.tu-muenchen.de/mailman/listinfo/isabelle-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman46.in.tum.de/pipermail/isabelle-dev/attachments/20180702/9afafb43/attachment-0002.html>


More information about the isabelle-dev mailing list