[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Tonight's svn-role merges - bug analysis

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 17 Apr 2014 11:32:42 +0000

Daniel Shahaf wrote on Thu, Apr 17, 2014 at 11:25:52 +0000:
> @@ -312,7 +315,7 @@ if $sh[$MAY_COMMIT]; then
> # Remove the approved entry. The sentinel guarantees the right number of blank
> # lines is removed, which prevents spurious '--renormalize' commits tomorrow.
> echo "sentinel" >> $STATUS
> - $VIM -e -s -n -N -i NONE -u NONE -c ':0normal! $entry{parno}\x{7d}kdap' -c wq $STATUS
> + $VIM -e -s -n -N -i NONE -u NONE -c ':0normal! $parno\x{7d}kdap' -c wq $STATUS
> $VIM -e -s -n -N -i NONE -u NONE -c '\$d' -c wq $STATUS
> $SVNq commit -F $logmsg_filename

Reading the code, I wonder if the sentinel trick if the last line in the
file is "Votes:\n +1: foo, bar, baz" with no newline after baz.

The fix would be easy:

    -echo "sentinel" >> $STATUS
    +printf "\n\nsentinel" >> $STATUS
    ...
    -$VIM -e -s -n -N -i NONE -u NONE -c '\$d' -c wq $STATUS
    +$VIM -e -s -n -N -i NONE -u NONE -c '\$normal! dap' -c wq $STATUS

i.e., force the sentinel to occupy its own paragraph.
Received on 2014-04-17 13:33:22 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.