The genignore command does not handle blank lines

Issue #431 resolved
Peter Geer
created an issue

The genignore command does not correctly handle svn:ignore properties where there are blank lines between the entries. The generated .hgignore file treats each blank line as an entry consisting of the current directory. This results in HgSubversion generating a .hgignore that ignores the entire directory rather than just the specified files, which can result in major confusion for the user. HgSubversion should simply ignore blank lines in svn:ignore properties.

Example: The following is an svn:ignore property on a directory named www/app/:

fwk-classes.js

app-classes-min.js

fwk-classes-min.js

ext-classes.js

ext-classes-min.js

app-classes.js

This results in the following being added to the .hgignore file:

www/app/fwk-classes.js
www/app/
www/app/app-classes-min.js
www/app/
www/app/fwk-classes-min.js
www/app/
www/app/ext-classes.js
www/app/
www/app/ext-classes-min.js
www/app/
www/app/app-classes.js

As a side-note, I'm told that certain versions of a Subversion plugin for Eclipse are responsible for generating properties like this.

Comments (4)

  1. Augie Fackler repo owner

    Can you please commit the patch and then use 'hg email' to send it to the hgsubversion@googlegroups address?

    That'll make it easier for me to give you correct attribution.

  2. Log in to comment