2cadz
(Christophe)
March 25, 2020, 7:40am
1
Hello,
I clone the tryton repository as indicated on the website:
hg clone https://hg.tryton.org/tryton-env
I’m trying to update this repository with the last changes:
cd tryton-env
hg pull -u
And on each sub-deposit I have the following warning:
...
/bin/sh: 1: .hooks/link_modules: not found
warning: update.modules hook exited with status 127
...
Is this normal? what did i forget or not do ?
Regards.
maxx
(Maxime Richez)
March 25, 2020, 8:01am
2
See https://hg.tryton.org/tryton-env/file/tip/README
To have symlinks for modules created automatically on Mercurial update, add
the following line to the hooks section of your .hg/hgrc:
update.modules = .hooks/link_modules
pokoli
(Sergi Almacellas Abellana)
March 25, 2020, 8:04am
3
It seems you added the hook on the global hgrc file which executes it on each repository.
You should only activate the hook on the tryton-env repository.
2cadz
(Christophe)
March 25, 2020, 8:39am
4
How do you do this? by a bash script? or is there an option in mercurial?
You just have to follow the README instructions.
2cadz
(Christophe)
March 25, 2020, 11:45am
6
That’s my ~/.hgrc
[ui]
username = Christophe <xt0ph@adiczion.net>
ignore = ~/.hgignore
interface = curses
[hooks]
update.modules = .hooks/link_modules
and with my ~/.hgrc, I have the warning on each sub-repository hence my question. As suggested by @pokoli is there a way to apply the update.modules hook only on the tryton-env repository?
pokoli
(Sergi Almacellas Abellana)
March 25, 2020, 12:02pm
7
You should not add the [hooks] on your ~/.hgrc but on the .hgrc file which is inside of the .hg folder in the directory you cloned tryton-env.
This is becasue the hook should be execute only on the tryton-env repository (so we declare in it’s own mercurial configuration).
2cadz
(Christophe)
March 25, 2020, 2:24pm
8
Ah ok thank, I didn’t understand that it was in this directory. Is there a reason why this file is not part of the repository?
.hgrc is the configuration file for mercurial repository so each user can customize it in the way he wants