You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jack Bates <ms...@freezone.co.uk> on 2009/01/12 21:51:14 UTC

anticipate conflicts with --dry-run in script

I have a couple scripts which run "svn merge" periodically, for example:
http://code.google.com/p/qubit-toolkit/source/browse/trunk/symfony/cron.daily/drop

I run "svn merge --dry-run" first, to exit and make no changes to the
working copy if "svn merge" would introduce conflicts. But I am having
trouble detecting whether it anticipates conflicts because "svn merge
--dry-run" exits with status zero whether or not it anticipates
conflicts.

How can I get my script to exit if "svn merge --dry-run" anticipates
conflicts?

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1020281

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: anticipate conflicts with --dry-run in script

Posted by DW Dennis Wheeler <dw...@ag.com>.
svn merge --dry-run .... | grep ^C


> -----Original Message-----
> From: Jack Bates [mailto:ms419@freezone.co.uk] 
> Sent: Monday, January 12, 2009 1:51 PM
> To: users@subversion.tigris.org
> Subject: anticipate conflicts with --dry-run in script
> 
> I have a couple scripts which run "svn merge" periodically, 
> for example:
> http://code.google.com/p/qubit-toolkit/source/browse/trunk/sym
> fony/cron.daily/drop
> 
> I run "svn merge --dry-run" first, to exit and make no 
> changes to the working copy if "svn merge" would introduce 
> conflicts. But I am having trouble detecting whether it 
> anticipates conflicts because "svn merge --dry-run" exits 
> with status zero whether or not it anticipates conflicts.
> 
> How can I get my script to exit if "svn merge --dry-run" 
> anticipates conflicts?
> 
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&
> dsMessageId=1020281
> 
> To unsubscribe from this discussion, e-mail: 
> [users-unsubscribe@subversion.tigris.org].
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1020660

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


Re: anticipate conflicts with --dry-run in script

Posted by Luke Imhoff <lu...@cray.com>.
You might have better access to error codes if you used the SWIG
bindings for perl or python or another scripting library like pysvn
(also for python).

On Mon, 2009-01-12 at 13:51 -0800, Jack Bates wrote:
> I have a couple scripts which run "svn merge" periodically, for example:
> http://code.google.com/p/qubit-toolkit/source/browse/trunk/symfony/cron.daily/drop
> 
> I run "svn merge --dry-run" first, to exit and make no changes to the
> working copy if "svn merge" would introduce conflicts. But I am having
> trouble detecting whether it anticipates conflicts because "svn merge
> --dry-run" exits with status zero whether or not it anticipates
> conflicts.
> 
> How can I get my script to exit if "svn merge --dry-run" anticipates
> conflicts?
> 
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1020281
> 
> To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1020302

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].