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

Re: svn commit: r14587 - trunk/contrib/client-side

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-05-06 18:45:05 CEST

archiecobbs@tigris.org writes:

> Author: archiecobbs
> Date: Thu May 5 20:15:07 2005
> New Revision: 14587

> --- trunk/contrib/client-side/svnmerge (original)
> +++ trunk/contrib/client-side/svnmerge Thu May 5 20:15:07 2005
> @@ -689,8 +689,7 @@
> # Get latest revision of head
> report checking latest revision of "${HEAD_URL}"
> HEAD_REVISION=`"${SVN_MERGE_SVN}" proplist --revprop -r HEAD "${HEAD_URL}" \
> - | grep '^Unversioned properties on revision' \
> - | sed 's/^Unversioned properties on revision \([0-9]\{1,\}\).*$/\1/g'`
> + | head -1 | sed 's/.* \([0-9]\{1,\}\).*$/\1/g'`

'head -1' has some portability problems: some versions of GNU head
only support the POSIX form 'head -n1' unless an environment variable
is set to force compatibilty. On the other hand some older heads
don't support 'head -n1'. The usual workaround is to use 'sed 1q'
instead (warning untested):

      sed -e 's/.* \([0-9]\{1,\}\).*$/\1/g' -e 1q

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 6 18:50:11 2005

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