We have a very diverse development team. Each developer prefers a completely different indentation and formatting style of the source code. There are Beautifier / pretty print devices that can be displayed in each of these developers' preferred styles. Our code is stored in the Mercurial repository in a standard formatting style using commit commit.
However, I would like to go a little further. Is it possible to decorate the source code with the developer’s preferred style when he clones / pulls / updates his workspace? Thus, he will see all the code in his preferred style. When he / she commits, the code becomes embellished back to the standard formatting style of the central repository.
Is there a hook that I can use to decorate files before being updated / checked?
How will this work in a merger? Can the files of others that we merge with also be decorated using the chosen style (to minimize the number of conflicts)?
source share