Kota Ishihara
Kota Ishihara

Reputation: 41

How can we unset all names in a section (Mercurial)

Our team are using mercurial both on Windows and Linux, and many members have their own customized .hgrc files in their home directories in order to convert source code;
We're using .hgrc files (in home directory) with non-empty [encode]/[decode] sections.

Recently, we created a new repository for a project in which encoding of text files plays a key role. We have multiple files with same extension, in various encoding forms. (e.g., .html files in Shift-JIS, euc-japan-unix, utf8, and so on.)

In order to preserve encoding forms in this repository, we want to unset all names in a section.

Currently, we are dealing with this issue by listing all extension names that may be listed in .hgrc file in home directories, in hgrc file of the project.

So our hgrc file looks like this:

[encode]
%unset **.js
%unset **.txt
%unset **.html

[decode]
%unset **.js
%unset **.txt
%unset **.html

This method works, but is painful. (we might have to add more extension names to unset in the future.) Is there any way to unset all names in a section, without pain?

Upvotes: 3

Views: 51

Answers (0)

Related Questions