svn_load_dirs.pl bug when specifying a tag that already exists, and other bugs that led to it
From: Ryan Schmidt <subversion-2006d_at_ryandesign.com>
Date: 2006-11-15 19:08:34 CET
I have used svn_load_dirs.pl for years now and have run into a minor
$ svn_load_dirs.pl -t 1.2.3 $REPO/vendor/foo current ./foo-1.2.3
The problem arose because the tag 1.2.3 already existed in $REPO/
I could not see an issue in the issue tracker about this, and would
--- You could say that this was user error, and in a way it is. But a) the tool should prevent user error where possible, and b) the user error occurred because of further problems in svn_load_dirs. A file "bar.baz" in foo-1.2.3 had DOS line endings, but I have set up my Subversion config to set svn:eol-style to LF on all *.baz files. After importing version 1.2.3, svn_load_dirs checks out the new code and runs a diff to make sure everything worked correctly. In this case, it printed an error that there was an unexpected difference, and showed a difference across every line of this file. When I saw the error message, I assumed the import had not succeeded. I changed the line endings of bar.baz to LF in a text editor and reran the svn_load_dirs command, which unexpectedly created the "current" directory in the existing tag as I explained above. The additional svn_load_dirs bugs here would be: * svn_load_dirs should accomodate having svn:eol-style set, in cases where this results in the line endings changing. It should also support any other properties that would change the files (this might include svn:keywords). * When svn_load_dirs exits with an error, but the import was nevertheless successful, a message should be printed stating that the import was successful, so that the user does not think he needs to repeat the import. I would like to report these as bugs as well. [1] In fact, it's not 1.2.3, it's 2.9.1; it's not foo, it's phpMyAdmin [2]; and it's not bar.baz, it's config.sample.inc.php. But you get the idea. [2] http://www.phpmyadmin.net/ [3] Reproduction recipe: Make sure ~/.subversion/config contains these lines: [miscellany] enable-auto-props = yes [auto-props] *.php = svn:eol-style=LF Then: $ cd /tmp $ curl -O http://umn.dl.sf.net/sourceforge/phpmyadmin/ phpMyAdmin-2.9.1-english.tar.bz2 $ svnadmin create testrepo $ svn mkdir file://`pwd`/testrepo/vendor -m "" $ svn mkdir file://`pwd`/testrepo/vendor/pma -m "" $ svn_load_dirs.pl -t 2.9.1 file://`pwd`/testrepo/vendor/pma current ./phpMyAdmin-2.9.1-english Result: svn_load_dirs.pl: diff -u -x .svn -r ./phpMyAdmin-2.9.1-english /tmp/ svn_load_dirs_hS7TrNSsom/my_tag_wc_named_2.9.1 failed with this output: [snipped diff of config.sample.inc.php] Press return to quit and clean up svn working directory: This sounds like an error, but the repository in fact contains 2.9.1 now. But the user repeats the command because he thinks it was a fatal error: $ svn_load_dirs.pl -t 2.9.1 file://`pwd`/testrepo/vendor/pma current ./phpMyAdmin-2.9.1-english Result: svn_load_dirs.pl: diff -u -x .svn -r ./phpMyAdmin-2.9.1-english /tmp/ svn_load_dirs_mKTdL2Rh0u/my_tag_wc_named_2.9.1 failed with this output: [snipped diff of config.sample.inc.php] Only in /tmp/svn_load_dirs_mKTdL2Rh0u/my_tag_wc_named_2.9.1: current Press return to quit and clean up svn working directory: And now the 2.9.1 tag also contains a "current" directory. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org For additional commands, e-mail: users-help@subversion.tigris.orgReceived on Wed Nov 15 19:09:47 2006 |
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.