You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David Casti <da...@neosynapse.net> on 2002/11/10 14:42:44 UTC

Repository stuck?

Hello,

I am running subversion 0.15 on a Mandrake 9 system.  I have created a new 
repository and imported several projects.  Then I created a working 
directory and switched many of the subdirectories to other projects in the 
repository (an outstanding feature of subversion, I must say).

I have updated a file in one of the projects.  Now I am ready to check in.

First, I run 'svn status -u', and receive the error --

[root@mail defender]# svn status -u
subversion/libsvn_fs/err.c:148: (apr_err=160006, src_err=0)
svn: Invalid filesystem revision number
svn: reference to non-existent revision `10' in filesystem 
`/home/subversion/db'

-- Thinking that I may be able to get around this problem by checking out a 
new copy and working on that, I try --

[root@mail tmp]# svn co file:///home/subversion/trunks/defender
subversion/libsvn_wc/adm_files.c:1058: (apr_err=155000, src_err=0)
svn: Obstructed update
svn: revision 8 doesn't match existing revision 7 in 'defender'

-- OK, maybe my repository database is hosed.  Let's recover --

[root@mail tmp]# /usr/local/BerkeleyDB.4.0/bin/db_recover -v -h 
/home/subversion/db
db_recover: Finding last valid log LSN: file: 29 offset 990376
db_recover: Checkpoint at: [29][990328]
db_recover: Checkpoint LSN: [29][990328]
db_recover: Previous checkpoint: [29][989136]
db_recover: Checkpoint at: [29][989136]
db_recover: Checkpoint LSN: [29][989136]
db_recover: Previous checkpoint: [29][987944]
db_recover: Recovery complete at Sun Nov 10 14:33:52 2002
db_recover: Maximum transaction id 80000000 Recovery checkpoint [29][990328]

-- no change.  I am completely stuck: can't check out, can't update, can't 
get status, can't commit...  So, two questions:

1. How do I recover from this state?
2. Any ideas how I got into it, so I can avoid a repeat?

Thanks,
David.


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

Re: Repository stuck?

Posted by Philip Martin <ph...@codematters.co.uk>.
David Casti <da...@neosynapse.net> writes:

> At 08:07 PM 11/10/2002, Karl Fogel wrote:
> 
> >Do you remember exactly how you arranged things (that is, what was
> >switched where)?  I wonder if you didn't accidentally point some
> >subdirectories at different repositories, or something... Anyway, a
> >complete description of your repository and working copy situation
> >will probably clarify here.
> 
> The correct directory structure looks like this:
> 
> /defender (base project)
> /defender/common (part of defender base project)
> /defender/client (subproject of defender)
> /defender/server (subproject of defender)
> /defender/neo_modules (base project)
> /defender/neo_modules/neo/defender (subproject of neo_modules)
> 
> So, here's the repository configuration:
> 
> /home/subversion/ is the top level of the repository
> /home/subversion/trunks was created by 'svn mkdir'
> /home/subversion/trunks/defender was created by 'svn import'
> /home/subversion/trunks/defender-client was created by 'svn import'
> /home/subversion/trunks/defender-server was created by 'svn import'
> /home/subversion/trunks/neo_modules was created by 'svn import'
> /home/subversion/trunks/neo_modules-neo-defender was created by 'svn import'
> 
> As each of the subprojects were imported, a "stub" empty directory was
> left behind, to be attached by 'svn switch'.  So, my checkout script
> does this --
> 
> 
> svn co file:///home/subversion/trunks/defender defender
> (this gives /defender and /defender/common, as well as empty
> directories /defender/client, /defender/server, /defender/neo_modules)
> 
> 
> svn switch file:///home/subversion/trunks/defender-client defender/client
> (this populates /defender/client)

I can run the following script without problem:

export REPO=file://`pwd`/repo
rm -rf repo defender defender-client defender-server
svnadmin create repo
svn mkdir $REPO/trunks

mkdir defender-client
mkdir defender-client/sub
echo zig >> defender-client/zig.c
echo zag >> defender-client/sub/zag.c
svn import $REPO/trunks defender-client defender-client

mkdir defender-server
mkdir defender-server/sub
echo foo >> defender-server/foo.c
echo bar >> defender-server/sub/bar.c
svn import $REPO/trunks defender-server defender-server

svn mkdir $REPO/trunks/defender
svn mkdir $REPO/trunks/defender/client
svn mkdir $REPO/trunks/defender/server

svn co $REPO/trunks/defender defender
svn sw $REPO/trunks/defender-client defender/client
svn sw $REPO/trunks/defender-server defender/server

echo x >> defender/client/zig.c
echo y >> defender/client/sub/newA.c
svn add defender/client/sub/newA.c

echo x >> defender/server/sub/bar.c
echo y >> defender/server/newB.c
svn add defender/server/newB.c

svn st -u defender
svn ci defender
svn st -u defender
svn up defender

Does that reproduce what you did?  If not, how is it different?

-- 
Philip Martin

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

Re: Repository stuck?

Posted by David Casti <da...@neosynapse.net>.
At 08:07 PM 11/10/2002, Karl Fogel wrote:

>Do you remember exactly how you arranged things (that is, what was
>switched where)?  I wonder if you didn't accidentally point some
>subdirectories at different repositories, or something... Anyway, a
>complete description of your repository and working copy situation
>will probably clarify here.

The correct directory structure looks like this:

/defender (base project)
/defender/common (part of defender base project)
/defender/client (subproject of defender)
/defender/server (subproject of defender)
/defender/neo_modules (base project)
/defender/neo_modules/neo/defender (subproject of neo_modules)

So, here's the repository configuration:

/home/subversion/ is the top level of the repository
/home/subversion/trunks was created by 'svn mkdir'
/home/subversion/trunks/defender was created by 'svn import'
/home/subversion/trunks/defender-client was created by 'svn import'
/home/subversion/trunks/defender-server was created by 'svn import'
/home/subversion/trunks/neo_modules was created by 'svn import'
/home/subversion/trunks/neo_modules-neo-defender was created by 'svn import'

As each of the subprojects were imported, a "stub" empty directory was left 
behind, to be attached by 'svn switch'.  So, my checkout script does this --

svn co file:///home/subversion/trunks/defender defender
(this gives /defender and /defender/common, as well as empty directories 
/defender/client, /defender/server, /defender/neo_modules)

svn switch file:///home/subversion/trunks/defender-client defender/client
(this populates /defender/client)

svn switch file:///home/subversion/trunks/defender-server defender/server
(this populates /defender/server)

svn switch file:///home/subversion/trunks/neo_modules defender/neo_modules
(this populates /defender/neo_modules, which includes an empty directory at 
/defender/neo_modules/neo/defender)

svn switch file:///home/subversion/trunks/neo_modules-neo-defender 
defender/neo_modules/neo/defender
(this populates /defender/neo_modules/neo/defender)

All this checking out and switching works great.  I can svn status -u to 
see what is switched and what is not, etc.  The problems come after I've 
started to make changes and try a status, update, or commit.

Thanks,
David.


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

Re: Repository stuck?

Posted by David Casti <da...@neosynapse.net>.
At 08:42 PM 11/10/2002, Philip Martin wrote:

> > -- Thinking that I may be able to get around this problem by checking
> > out a new copy and working on that, I try --
>
>When you check-out over an existing working copy the revision and URL
>must match, so 'svn co -r7'.

I thought I was checking out a brand new copy, but you are right of 
course.  I had a stale /tmp/defender directory left over from some earlier 
checkout attempts.  Once that directory was removed, I was able to check 
out a new copy of revision 8.

SO, I am definitely not hosed.  Even if there is problem issue with 
switching & committing, worst-case would be merging things back together by 
hand with diff.

>Does status without -u work?

Yes, it does --

[root@mail defender]# svn status
   L    .
   L S  client
   L    client/dead
?      client/log
   L    client/queue
?      client/queue/.housekeeping.lock
M      client/queue_manager.py
?      client/queue_manager.pyc
?      client/stage
   L    client/tests
   L    common
   L    common/etc.config
M      common/etc.config/defender_conf.py
   L    common/etc.config/razor
   L    common/etc.config/razor/.pyzor
   L    common/etc.config/razor/.razor
   L    common/src
?      instantiate.py
!      instantiate.sh
   L S  neo_modules
?      neo_modules/FixedPoint.pyc
?      neo_modules/echod_lib.pyc
?      neo_modules/kjbuckets0.pyc
   L    neo_modules/neo
?      neo_modules/neo/__init__.pyc
?      neo_modules/neo/constants.pyc
?      neo_modules/neo/debug.pyc
   L S  neo_modules/neo/defender
?      neo_modules/neo/defender/UnMIME.pyc
?      neo_modules/neo/defender/__init__.pyc
M      neo_modules/neo/defender/defender.py
?      neo_modules/neo/defender/defender.pyc
?      neo_modules/neo/defender/errors.py
?      neo_modules/neo/defender/errors.pyc
?      neo_modules/neo/defender/imapaux.pyc
?      neo_modules/neo/defender/weblib.pyc
?      neo_modules/neo/fast_data_access.pyc
   L    neo_modules/neo/heidelberg
?      neo_modules/neo/mix_table.pyc
?      neo_modules/neo/utilities.pyc
?      neo_modules/neo/xml_data_access.pyc
?      neo_modules/xmlrpclib.pyc
?      neo_modules/xmlrpcserver.pyc
   L S  server
M      server/create_user.py
M      server/housekeeping.py
M      server/launch.py
?      server/launch.pyc
   L    server/spamassassin-config
   L    server/src
M      server/test.py
!      server/tests
   L    server/web
?      server/web/auth.htm
?      server/web/client.htm
   L    server/web/images
   L    server/web/main
!      server/web/main/auth.htm
   L    server/web/main/help
   L    server/web/main/images
   L    server/web/signup
?      server/xml_log

>You may also find that some commands
>work if you specify files or subdirectories within the working copy,
>rather than trying to operate on the whole working copy.

OK, if I go down into a switched directory, I get something like this --

[root@mail defender]# cd server/
[root@mail server]# svn status -u
subversion/libsvn_fs/err.c:148: (apr_err=160006, src_err=0)
svn: Invalid filesystem revision number
svn: reference to non-existent revision `10' in filesystem 
`/home/subversion/db'

> > 2. Any ideas how I got into it, so I can avoid a repeat?
>
>No.  Please tell us what you switched.  Switch still has problems, see
>issue 891 for example.

See my message to Karl describing my setup & what is switched.  I'll also 
take a look at issue 891.

Thanks,
David.


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

Re: Repository stuck?

Posted by Philip Martin <ph...@codematters.co.uk>.
David Casti <da...@neosynapse.net> writes:

> -- Thinking that I may be able to get around this problem by checking
> out a new copy and working on that, I try --
> 
> 
> [root@mail tmp]# svn co file:///home/subversion/trunks/defender
> subversion/libsvn_wc/adm_files.c:1058: (apr_err=155000, src_err=0)
> svn: Obstructed update
> svn: revision 8 doesn't match existing revision 7 in 'defender'

When you check-out over an existing working copy the revision and URL
must match, so 'svn co -r7'.  However it won't work if part of the
target working copy is switched, since the URL won't match, and it
won't work in a mixed revision working copy, since at some point the
revision won't match.  You may be able to checkout individual
subdirectories of your working copy.  I don't think doing any of this
is going to help in your case.

> -- OK, maybe my repository database is hosed.  Let's recover --

No, your database is OK.

> [root@mail tmp]# /usr/local/BerkeleyDB.4.0/bin/db_recover -v -h
> 
> /home/subversion/db
> db_recover: Finding last valid log LSN: file: 29 offset 990376
> db_recover: Checkpoint at: [29][990328]
> db_recover: Checkpoint LSN: [29][990328]
> db_recover: Previous checkpoint: [29][989136]
> db_recover: Checkpoint at: [29][989136]
> db_recover: Checkpoint LSN: [29][989136]
> db_recover: Previous checkpoint: [29][987944]
> db_recover: Recovery complete at Sun Nov 10 14:33:52 2002
> db_recover: Maximum transaction id 80000000 Recovery checkpoint [29][990328]
> 
> -- no change.  I am completely stuck: can't check out, can't update,
> can't get status, can't commit...  So, two questions:

Does status without -u work?  You may also find that some commands
work if you specify files or subdirectories within the working copy,
rather than trying to operate on the whole working copy.

> 1. How do I recover from this state?

Run diff and save the output to create a patch.  Delete the working
copy.  Checkout a new working copy.  Apply the patch.  Before you do
that, please tell us what you switched.  The 'svn info' command will
tell you what URL is associated with particular files/directories.
The status command, if it works, should show 'S' for switched
files/directories.

> 2. Any ideas how I got into it, so I can avoid a repeat?

No.  Please tell us what you switched.  Switch still has problems, see
issue 891 for example.

-- 
Philip Martin

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

Re: Repository stuck?

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
David Casti <da...@neosynapse.net> writes:
> I am running subversion 0.15 on a Mandrake 9 system.  I have created a
> new repository and imported several projects.  Then I created a
> working directory and switched many of the subdirectories to other
> projects in the repository (an outstanding feature of subversion, I
> must say).

Do you remember exactly how you arranged things (that is, what was
switched where)?  I wonder if you didn't accidentally point some
subdirectories at different repositories, or something... Anyway, a
complete description of your repository and working copy situation
will probably clarify here.

-K

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