You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Darren Oakey <da...@smb.com.au> on 2004/10/11 00:28:44 UTC

SVN Checkin - please help

I am using subversion as the end step repository in a build process.  I
am trying to do something which seems incredibly simple, but I've found
it to be reasonably impossible :(
 
I have a build machine, where people merge in their changes.  We do the
build, when it all works, we check it in as the next release.    The
buildmachine scripts are the only ones allowed to check in.
 
All I want to do is call
    [some command line]
 
That checks in ALL changes that have been made to the buildarea.   This
means deletions, updates, additions.  There will never be a merge
conflict, because only one machine has the rights to check in.   All I
want to do is use SVN to track the history of the buildarea.
 
However, I can't get it to work :(   Everything works fine until someone
creates a new directory, and then the whole process stops because the
commit says the directory isn't in svn, the repository gets locked, I
can't seem to even clean it up without deleting the directory?!?     I
looked at add, but there doesn't seem to be a recursive "add everything
new under this directory?
 
This process ALL happens automatically, there is no user with write
access to SVN, and there is no way of manually adding new directories.
Also, since it's an automatic process, even if one checkin fails, I want
to unlock and continue with the next, or do it again or something -  I
definitely DON'T want the repository locked so that nothing after it
works either!
 
PLEASE HELP - because at the moment, it keeps failing, and changes just
aren't getting tracked :(

The information contained in this message is confidential and intended only for the named recipient(s). If you are not the intended recipient, any use, reading, copying, distributing or disclosure of this information is unauthorised and prohibited. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of SMB Fleet Management Pty Ltd. If you have received this message in error, please contact SMB Fleet Management on +61 2 9452 9600 and destroy the original message. 


Re: SVN Checkin - please help

Posted by kf...@collab.net.
"Darren Oakey" <da...@smb.com.au> writes:
> However, I can't get it to work :(   Everything works fine until someone
> creates a new directory, and then the whole process stops because the
> commit says the directory isn't in svn, the repository gets locked, I
> can't seem to even clean it up without deleting the directory?!?     I
> looked at add, but there doesn't seem to be a recursive "add everything
> new under this directory?

Tell us what commit actually says -- that is, the verbatim error
message :-).  And when you say someone "creates" a new directory, you
mean they do "mkdir" in a working copy, or "mkdir" then "svn add", or
or something else?

You can detect new files and directories using 'svn status', then use
'svn add' to add them to version control.

> This process ALL happens automatically, there is no user with write
> access to SVN, and there is no way of manually adding new directories.
> Also, since it's an automatic process, even if one checkin fails, I want
> to unlock and continue with the next, or do it again or something -  I
> definitely DON'T want the repository locked so that nothing after it
> works either!

Wait -- the *repository* is locked??  How?  What error message does
Subversion give to indicate this?

Are you sure you don't mean "working copy" instead of "repository"?

> PLEASE HELP - because at the moment, it keeps failing, and changes just
> aren't getting tracked :(

To help, we'll need a lot more concrete detail.  The actual actions,
the actual errors you're seeing... Basically, a transcript, not a
prose description.

Thanks,
-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: SVN Checkin - please help

Posted by Mike Mason <mg...@thoughtworks.net>.
Darren Oakey wrote:

> I am using subversion as the end step repository in a build process.  
> I am trying to do something which seems incredibly simple, but I've 
> found it to be reasonably impossible :(
>  
> I have a build machine, where people merge in their changes.  We do 
> the build, when it all works, we check it in as the next release.    
> The buildmachine scripts are the only ones allowed to check in.


This seems non-standard - most development teams have everyone check 
into version control on their own, and then when you want to make a 
release you create a branch, perform final fit-and-finish and fixes on 
the branch, then release it. I know this isn't the problem you're having 
(and I'll come on to that in a minute) but it might be worth thinking 
about changing your process to better leverage the collaborative nature 
of source control.

>  
> All I want to do is call
>     [some command line]
>  
> That checks in ALL changes that have been made to the buildarea.   
> This means deletions, updates, additions.  There will never be a merge 
> conflict, because only one machine has the rights to check in.   All I 
> want to do is use SVN to track the history of the buildarea.
>  
> However, I can't get it to work :(   Everything works fine until 
> someone creates a new directory, and then the whole process stops 
> because the commit says the directory isn't in svn, the repository 
> gets locked, I can't seem to even clean it up without deleting the 
> directory?!?     I looked at add, but there doesn't seem to be a 
> recursive "add everything new under this directory?
>

If you do "svn add mydirectory" Subversion will schedule addition of 
that directory and all of its contents automatically. I think your 
add/delete script needs to detect new directories and do "svn add" on 
them, and you'll be set. You can do this with a script that parses the 
output of "svn status" and adds anything that has a ? next to it.

What do you mean by "repository gets locked" ? Do you mean the working 
directory gets locked, or the actual Subversion repository itself?

> This process ALL happens automatically, there is no user with write 
> access to SVN, and there is no way of manually adding new 
> directories.  Also, since it's an automatic process, even if one 
> checkin fails, I want to unlock and continue with the next, or do it 
> again or something -  I definitely DON'T want the repository locked so 
> that nothing after it works either!
>  
> PLEASE HELP - because at the moment, it keeps failing, and changes 
> just aren't getting tracked :(


I think you'll have much more success with developers adding new 
directories themselves, rather than doing everything on your 
build/integration machine. Does this book chapter help paint the picture 
for you? http://svnbook.red-bean.com/svnbook-1.0/ch02.html

Cheers,
Mike.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org