[rancid] [PATCH 1/2] Better support for subversion repositories

john heasley heas at shrubbery.net
Wed Nov 30 21:59:34 UTC 2011


Wed, Nov 30, 2011 at 08:10:28PM +0200, Zenon Mousmoulas:
> On Tue, 29 Nov 2011 22:28:38 +0000, john heasley <heas at shrubbery.net>
> wrote:
> > Mon, Nov 28, 2011 at 03:36:45PM +0200, Zenon Mousmoulas:
> >> Improve subversion support:
> >> - Support arbitrary subversion URLs as (pre-provisioned) repositories.
> >> - Do not overwrite an existing local repository.
> >> - Avoid "svn: Directory '<GROUP>' is out of date" message.
> >>   Included for completeness, copied from Debian patch
> >>   by Nicolas DEFFAYET <nicolas-ml at deffayet.com>:
> >>  
> http://patch-tracker.debian.org/patch/series/dl/rancid/2.3.6-1/09_svn.dpatch
> >> 
> >> +++ rancid-2.3.6-grnet/bin/control_rancid.in	2011-11-26
> >> 00:12:08.000000000 +0200
> >> @@ -167,6 +167,12 @@
> >>      fi
> >>  fi
> >>  
> >> +# svn update to avoid 'Out of date' error
> >> +if [ $RCSSYS = svn ]
> >> +then
> >> +    svn update
> >> +fi
> > 
> > why is this necessary?  it should never be out of date, unless someone
> has
> > altered the repository, in which case you want to be alerted to that.
> 
> We "inherited" this due to merging with the Debian patch I
> mentioned earlier, while forward porting our changes to 2.3.6. Since
> we initially tried to apply our changes on top of the Debian package
> for 2.3.6 (rather than vanilla 2.3.6), we had a conflict with the
> other hunk from this Debian patch:
> 
> --- rancid~/bin/rancid-cvs.in
> +++ rancid/bin/rancid-cvs.in
> @@ -131,6 +131,8 @@
>  	    svn import -m "$GROUP" . file:///$CVSROOT/$GROUP
>  	    cd $BASEDIR
>  	    svn checkout file:///$CVSROOT/$GROUP $GROUP
> +	    cd $DIR
> +	    svn update
>  	fi
>      fi
>      cd $DIR
> 
> So rather than sending only this change (which is required and has
> been tested) we opted for merging with the Debian patch.
> 
> I am not sure however when the change you noted would be necessary and
> I certainly can not object to your reasoning against it. Therefore I
> suppose we can drop this hunk.

there are three cases that i am aware of - 1) someone changes the respository
from another working set, 2) host crashes leaving files mangled (rare), or
3) when svn:ignore property is altered.  i dont understand why changing that
property on the directory requires an update, but it does and that was added
to 2.3.6.

> I can send an updated patch if you are OK with the rest of the
> changes.
> 
> Cheers,
> Z.


More information about the Rancid-discuss mailing list