@need 3200

@node Customizing the inventory Naming Conventions
@appendix Customizing the inventory Naming Conventions

In @ref{Project Tree Inventories}, you learned how the @code{larch
inventory} command classifies files within a project tree using a set
of naming conventions.   This appendix explains how you can customize
those naming conventions.

@need 3200

@section When to Customize Naming Conventions

It's best to make customizations to the naming conventions of a
project at the outset: before you @code{import} your first revision.


If you @emph{must} make changes later, then it's @emph{@strong{essential}} that your
changes do not change the classification of files already in the
latest revision(s) of your project at the time you make the change
(otherwise, you are likely to experience perplexing and undesirable
behavior).




@need 3200

@section How to Customize Naming Conventions

You should begin by reviewing the naming convention algorithm in
@strong{The arch Naming Conventions} in @ref{Project Tree Inventories}.  You can modify that algorithm by
changing the regular expression used for each category test.


You can customize naming conventions by modifying the file
@code{./@{arch@}/=tagging-method} in your project trees.  That file is
created by the @code{tagging-method} command and initially, it contains a
single line which names the tagging method (@code{names}, @code{explicit}, or
@code{implicit}).


In particular, @code{=tagging-method} can contain blank lines and comments
(lines beginning with @geindex #
@dfn{#}) and directives, one per line.  The
permissible directives are:

@example
@group
        implicit
        explicit
        names
                specify the tagging method to use for this tree
@end group
@group
@end group
@end example
@example
@group
        exclude RE
        junk RE
        backup RE
        precious RE
        unrecognized RE
        source RE
                specify a regular expression to use for the indicated
                category of files.
@end group
@group
@end group
@end example

Regular expressions are specified in Posix ERE syntax (the same syntax
used by @geindex egrep
@dfn{egrep}, @geindex grep -E
@dfn{grep -E}, and @geindex awk
@dfn{awk}) and have default values which
implement the naming conventions described in @strong{The arch Naming Conventions} in @ref{Project Tree Inventories}.







