Author: jcorvel Date: Fri Jul 28 22:01:32 2017 New Revision: 1803336 URL: http://svn.apache.org/viewvc?rev=1803336&view=rev Log: * site/publish/faq.html (dumpload): Add links to ... (fix-nonLF-log): New question & answer explaining how to fix the dreaded "svnadmin: E125005: Cannot accept non-LF line endings in 'svn:log' property" when running 'svnadmin load'.
Modified: subversion/site/publish/faq.html Modified: subversion/site/publish/faq.html URL: http://svn.apache.org/viewvc/subversion/site/publish/faq.html?rev=1803336&r1=1803335&r2=1803336&view=diff ============================================================================== --- subversion/site/publish/faq.html (original) +++ subversion/site/publish/faq.html Fri Jul 28 22:01:32 2017 @@ -90,6 +90,9 @@ For older questions, see <a href="#depre a working copy directly)?</a></li> <li><a href="#dumpload">What is this "dump/load cycle" people sometimes talk about when upgrading a Subversion server?</a></li> +<li><a href="#fix-nonLF-log">What can I do about <tt>"svnadmin: E125005: Cannot accept + non-LF line endings in 'svn:log' property"</tt> while running + 'svnadmin load'?</a></li> <li><a href="#sspi">How do I allow clients to authenticate against a Windows domain controller using SSPI Authentication?</a></li> <li><a href="#adm-dir">I don't like the ".svn" directory name, and @@ -1584,9 +1587,11 @@ svnadmin: E125005: Cannot accept non-LF This means the svn:log message of the revision has non-LF line endings (these were accepted by older servers, but no longer as of Subversion 1.6). -You can accept this minor corruption by adding --bypass-prop-validation -to your 'svnadmin load' command (you can always repair this later in the -new repository). Or you can try to repair this in the source repository +You can ignore this minor corruption by adding --bypass-prop-validation +to your 'svnadmin load' command (you can always +<a href="#fix-nonLF-log">repair</a> this later in the +new repository). Or you can try to <a href="#fix-nonLF-log">repair</a> this +in the source repository before executing the dump+load (since svn:log is a <i>revision property</i> it can easily be fixed without "rewriting history"). </li> @@ -1623,6 +1628,73 @@ loading.</p> </div> +<div class="h3" id="fix-nonLF-log"> +<h3>What can I do about <tt>"svnadmin: E125005: Cannot accept non-LF line endings +in 'svn:log' property"</tt> while running 'svnadmin load'? + <a class="sectionlink" href="#fix-nonLF-log" + title="Link to this section">¶</a> +</h3> + +<p>This error means the svn:log message of the revision in your +dumpfile / dumpstream has non-LF line endings (these +were accepted by older servers, but no longer as of Subversion 1.6). +You can ignore this minor corruption while loading into your new +repository by adding --bypass-prop-validation to your 'svnadmin load' +command (you can always repair this later in the +new repository). Or you can try to repair this in the source repository +before executing the dump+load (since svn:log is a <i>revision property</i> +it can easily be fixed without "rewriting history"). Also note that +<tt>svnsync</tt> normalizes this on the fly, so it might be an easier +alternative than dump+load.</p> + +<p>There is no standard procedure for normalizing the line endings in +the svn:log property, but using the administrative commands 'svnlook propget', +'svnlook log' and 'svnadmin setlog' can get you there:</p> + +<ul> +<li><tt><b>svnlook propget -r$REV --revprop $REPOS svn:log</b></tt> gets the +raw svn:log revision property (no normalization, no extra newline at the end). +You can use that to validate it and search for 'non-LF line endings'. +</li> + +<li><tt><b>svnlook log -r$REV $REPOS</b></tt> gets a normalized version of it +(LF-eols, normalized to UTF8 (if you have the correct "source encoding" set +as your locale), and an extra newline at the end). If you strip of the final +newline, this gives you a nice normalized version of the log message to +feed to ... +</li> + +<li><tt><b>svnadmin setlog -r$REV $REPOS --bypass-hooks</b></tt> (or without +the --bypass-hooks option if you want the hooks to be run) will set the value +it's reading from stdin as the new log message. +</li> +</ul> + +<p>You can stitch them together into a script to handle all revisions +in a repository, like in these bash oneliners:</p> + +<pre> +Find the "broken" revisions and echo the revision numbers: + +bash$ YOUNGEST=`svnlook youngest $REPOS`; for (( i=1; i<=$YOUNGEST; i++ )); \ +do svnlook propget -r $i --revprop $REPOS svn:log | xxd -ps -c1 | fgrep '0d' > /dev/null \ +&& echo "$i" ; done; echo "Verified until revision $YOUNGEST" +</pre> +<p></p> +<pre> +Find and immediately fix the "broken" revisions with 'svnadmin setlog': + +bash$ YOUNGEST=`svnlook youngest $REPOS`; for (( i=1; i<=$YOUNGEST; i++ )); \ +do svnlook propget -r $i --revprop $REPOS svn:log | xxd -ps -c1 | fgrep '0d' > /dev/null \ +&& echo "Fixing r$i" && svnadmin setlog $REPOS --bypass-hooks -r$i \ +<( svnlook log -r$i $REPOS | sed '$d' ); done; echo "Verified until revision $YOUNGEST" + +(the "sed '$d'" strips off the extra newline that's added by "svnlook log") +</pre> + +</div> + + <div class="h3" id="sspi"> <h3>How do I allow clients to authenticate against a Windows domain controller using SSPI authentication?