[Nut-upsdev] reposurgeon and svn:ignore on a newly added directory

Charles Lepple clepple at gmail.com
Fri Apr 13 03:18:39 UTC 2012

Hi Eric,

One corner case I ran across when building from a reposurgeon-generated tree is that .gitignore files do not seem to be generated when a directory is created at the same time as its svn:ignore property is set.

In NUT, this manifests itself in r3109: http://trac.networkupstools.org/projects/nut/changeset/3109

Trac doesn't show it there, but scripts/avahi was created in that commit, and it had svn:ignore set:


With 'verbose 4', reposurgeon sees this in the import stream:

reposurgeon: node list parsing, line 11292079: 'Node-path: trunk/scripts/avahi\n'
reposurgeon: node list parsing, line 11292080: 'Node-kind: dir\n'
reposurgeon: node list parsing, line 11292081: 'Node-action: add\n'
reposurgeon: node list parsing, line 11292082: 'Prop-content-length: 44\n'
reposurgeon: node list parsing, line 11292083: 'Content-length: 44\n'
reposurgeon: node list parsing, line 11292084: '\n'
reposurgeon: readprops, line 11292085: 'K 10\n'
reposurgeon: readprops: on trunk/scripts/avahi, setting svn:ignore = 'nut.service\n'
reposurgeon: readprops, line 11292090: 'PROPS-END\n'

But the .gitignore is not generated:

reposurgeon: Revision 3109:
reposurgeon: <NodeAction: r3109 change file 'trunk/configure.in'>
reposurgeon: <NodeAction: r3109 change file 'trunk/scripts/Makefile.am'>
reposurgeon: <NodeAction: r3109 add dir 'trunk/scripts/avahi' properties=[('svn:ignore', 'nut.service\n')]>
reposurgeon: <NodeAction: r3109 add file 'trunk/scripts/avahi/nut.service.in' properties=>
reposurgeon: -> find_node(3108, trunk/configure.in)
reposurgeon: find_node(3108, trunk/configure.in) -> <NodeAction: r3022 change file 'trunk/configure.in'>
reposurgeon: -> find_node(3108, trunk/scripts/Makefile.am)
reposurgeon: find_node(3108, trunk/scripts/Makefile.am) -> <NodeAction: r2836 change file 'trunk/scripts/Makefile.am'>
reposurgeon: r3109: 3 actions
reposurgeon: r3109 gets mark :11867

The .gitignore creation only seems to happen on line 2226 of reposurgeon (as of a2ae20b - master on 2012-04-02), where it checks for a node.action of SD_CHANGE.

There's some logic in the SD_ADD case that I don't completely grok at this late hour, so I haven't attempted a patch yet. If you would like me to take a stab at it, let me know how what would be least intrusive. I'm thinking that the property stuff moves up to where SD_ADD is, in a check for SD_ADD || SD_CHANGE, then move the svn_nobranch logic into an 'if' statement one level down from that.

Here's what I'm using:

https://gitorious.org/~clepple/reposurgeon/clepple-nut-conversion/commits/cfl-mods (mostly debugging changes to the configuration, but some new items in nut.box)

https://gitorious.org/~clepple/reposurgeon/clepple-reposurgeon (tried with both your latest pushed master branch as of this evening, and my nut-conversion branch, which was based off of an older commit.)

Charles Lepple
clepple at gmail

More information about the Nut-upsdev mailing list