Charles Lepple
2012-Apr-13 03:18 UTC
[Nut-upsdev] reposurgeon and svn:ignore on a newly added directory
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: http://trac.networkupstools.org/projects/nut/browser/trunk/scripts/avahi?rev=3109 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
Charles Lepple
2012-Apr-15 02:38 UTC
[Nut-upsdev] reposurgeon and svn:ignore on a newly added directory
On Apr 12, 2012, at 11:18 PM, Charles Lepple wrote:> 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.I started to look into this, and noticed the 'compare' rule in the Makefile in nut-conversion. I just pushed a commit to the cfl-mods branch to compare .gitignore with what git-svn creates, and I ran across another corner case where it looks like .gitignore files are not being deleted after a directory is deleted. I'm not entirely sure what's going on with scripts/python/module/PyNUTClient.py or scripts/udev/nut-usbups.hotplug.in in the attached diff, though.> https://gitorious.org/~clepple/reposurgeon/clepple-nut-conversion/commits/cfl-mods (mostly debugging changes to the configuration, but some new items in nut.box)-- Charles Lepple clepple at gmail -------------- next part -------------- A non-text attachment was scrubbed... Name: compare.diff Type: application/octet-stream Size: 1714 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20120414/9fd5f7b0/attachment.obj>
Charles Lepple
2012-Aug-17 12:28 UTC
[Nut-upsdev] reposurgeon and svn:ignore on a newly added directory
On Apr 12, 2012, at 11:18 PM, Charles Lepple wrote:> 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.A quick update for the NUT list: I am still tracking this down, plus another issue where .gitignore files linger after their parent directory has been deleted. While these are not the only discrepancies between the reposurgeon and git-svn conversions, they generate a lot of noise in the diffs, and I would like to fix them so that they don't mask other differences. Eric: do you have any local commits to reposurgeon that haven't been pushed to gitorious? Fixing this will probably involve a good bit of code shuffling in the vicinity of line 2216, and I don't even want to think what a merge would look like. Also, I am trying to work on a test case for this, but I am still trying to figure out a good way to generate the "golden" files for the output comparison. Suggestions are welcome. -- Charles Lepple clepple at gmail