You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Thom Wood <th...@collab.net> on 2001/03/30 02:12:43 UTC

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

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
--

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

Posted by Ben Collins-Sussman <su...@newton.ch.collab.net>.
Or, because Greg Stein has already started stubbing out SWIG bindings,
you can rest assured that someday we'll have SVN library bindings for
Perl, Python, Guile... and even Ruby.  I *know* that Ruby will make you
happy, Thom.  :)


Thom Wood <th...@collab.net> writes:

> 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
> --