[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] Add a rule for generating .hgignore



john levon sun com wrote:
> Add a rule for generating .hgignore
>
> diff --git a/Makefile.maint b/Makefile.maint
> --- a/Makefile.maint
> +++ b/Makefile.maint
> @@ -717,3 +717,5 @@ sync-vcs-ignore-files:
>  	mv $(c2g)-t $(c2g)
>  	perl $(c2g)
>  	rm -f $(c2g)
> +	find $(srcdir) -name .gitignore | xargs cat \
> +	    | sort -u | sed 's+\*+.*+' >.hgignore

There are a couple of problems when doing it that way:

  .gitignore uses glob syntax, while .hgignore uses regexps by default.
    You can use the "syntax: glob" directive to tell hg what to do.

  hoisting subdir-specific ignore directives all into a top-level
    .hgignore file is risky.  What if a generated (hence ignored) file
    in a subdirectory is also the name of something that must not be
    ignored at some other point in the tree?

The latter risk is why I made that rule generate one .gitignore
file alongside each .cvsignore file.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]