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

Additions to N. Commands that make us *better* than CVS

From: Thom Wood <thom_at_collab.net>
Date: 2001-03-30 04:12:43 CEST

it would be nice if svn had a either a scripting mode or better script support then cvs.

Example of svn script mode.

==============================
#!/bin/sh

editor="emacs"

if [ ! -z "$SVN_EDITOR" ]; then
   editor="$SVN_EDITOR"
fi

svn task <<EndOF
  cd to/working/copy
  if not CheckTree(Up-to-Date)
    update
    if CheckTree(Conflicts)
       error "Please resolve conflicts"
    endif
  endif
  commit -editor="$editor"
EndOF

==============================

Example of better script support

==============================
#!/bin/sh

editor="emacs"

if [ ! -z "$SVN_EDITOR" ]; then
   editor="$SVN_EDITOR"
fi

cd to/working/copy

if ! svn check-tree="Up-to-Date" ; then
   svn update
   if svn check-tree="Conficts" ; then
      echo "Please resolve conflicts"
      exit 1
   fi
fi
svn commit -editor="$editor"

==============================

--
--thom wood
--
Received on Sat Oct 21 14:36:26 2006

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.