You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2003/07/26 01:43:29 UTC

Re: How to backup a running script? and how to recover out-of-sync file?

"Cedric Williams" <Ce...@tceq.state.tx.us> writes:

> 5 - After the commit succeeded, svn changed the .svn/entries file to
> have the checksum information for the checked-in version of the
> script (which has the $Id$ tag, though not expanded since the
> repository stores the tag info in the props)
> 6 - Then svn tried to replace the current WC version with the
> repository version + expanded tag - **this failed** (script was in
> use at the time and could not be overwritten - but this was not the
> real problem)
> 7 - svn failed, notified the bonehead user, and quit
> 8 - svn never copied the repository version to .svn/text-base, but
> left the prior version of the script (now revision HEAD - 2) THIS
> was the real problem - the .svn/entries file had the checksum for
> the HEAD - 1 copy, but .svn/text-base had the version of the file
> prior to that on the drive
[...]
> A - Should svn handle the move-previous-to-text-base before trying
> to do keyword expansion (since that might fail)?
> B - Should svn cleanup be able to recognize / handle the situation
> when a checkin hasn't completed moving files around, and implement
> (or suggest) some strategy to get the .svn directory back in shape?

After the failed commit was the working copy locked, that's a
Subversion lock where 'svn st' shows state 'L'? 

In principle Subversion's log file mechanism should have meant that
the failed commit left the working copy locked.  However I think I see
a bug that would have unlocked the working copy.  Look at the
svn_wc_adm_close at the end of svn_client_commit, that will have the
effect of removing the lock even if an error occurred.  There is a
comment there (one I think I added when I did the access baton
conversion) questioning the logic.  I think the correct behaviour in
your case would be for the lock, and log file, to remain.  Then there
is a chance that 'svn cleanup' would have fixed the working copy.

I don't really understand why there is special 'cleanup:' handling in
svn_client_commit, I guess it is to ensure that a failed commit always
calls abort_edit.  Anyone know the history?  I think it is an error
both to remove the locks, and to clear the temporary files, if a
commit error occurs.

-- 
Philip Martin

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

Re: How to backup a running script? and how to recover out-of-sync file?

Posted by Philip Martin <ph...@codematters.co.uk>.
Jack Repenning <jr...@collab.net> writes:

> At 2:43 AM +0100 7/26/03, Philip Martin wrote:
>>After the failed commit was the working copy locked, that's a
>>Subversion lock where 'svn st' shows state 'L'?
>
> This wasn't actually a failed commit, I think.

By "failed commit" I meant "'svn commit' producing an error".

> As the messages
> announced, the commit itself worked, it was only the fix-up of the WC
> (and text-base) that choked.

I realised that, I thought I explained the failure mechanism in my
mail :-/

-- 
Philip Martin

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

Re: How to backup a running script? and how to recover out-of-sync file?

Posted by Jack Repenning <jr...@collab.net>.
At 2:43 AM +0100 7/26/03, Philip Martin wrote:
>After the failed commit was the working copy locked, that's a
>Subversion lock where 'svn st' shows state 'L'?

This wasn't actually a failed commit, I think.  As the messages 
announced, the commit itself worked, it was only the fix-up of the WC 
(and text-base) that choked.


-- 
-==-
Jack Repenning
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
o: 650.228.2562
c: 408.835-8090

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

Re: How to backup a running script? and how to recover out-of-sync file?

Posted by Jack Repenning <jr...@collab.net>.
At 2:43 AM +0100 7/26/03, Philip Martin wrote:
>After the failed commit was the working copy locked, that's a
>Subversion lock where 'svn st' shows state 'L'?

This wasn't actually a failed commit, I think.  As the messages 
announced, the commit itself worked, it was only the fix-up of the WC 
(and text-base) that choked.


-- 
-==-
Jack Repenning
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
o: 650.228.2562
c: 408.835-8090

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