You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Fraser Campbell <fr...@wehave.net> on 2003/12/04 03:43:37 UTC

how to solve status ~ ?

Hi,

I am managing a server using subversion, basically I check in all configs 
files and website content.  I have the following output from svn status on 
the root directory of the server:

M      home/sites/somwhere.com/web/index.html
~      usr
M      etc/apache/domains/www.somewhere.com.conf
M      etc/postfix/main.cf

I previously had a situation like this and was advised to move the offending 
directory and then run cleanup ... that's fine but in this case the offending 
directory is actually /usr on a server that's 1.5 hours drive from here.

Is there any way (hopefully easy) to resolve this situation.  I just want 
subversion to forget that I ever told it to add usr, it's only in the working 
copy not in the repository yet.

I had wanted to add /usr/something/ at somepoint but forgot to use the -N 
option when adding.  I believe I made the mistake of cancelling the command 
(CRTL-C)  instead of reverting (wish I could remember).

If anyone could help me out with this (again) it would be greatly appreciated.

Thanks!
-- 
Fraser Campbell <fr...@wehave.net>                 http://www.wehave.net/
Georgetown, Ontario, Canada                               Debian GNU/Linux


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

Re: how to solve status ~ ?

Posted by Fraser Campbell <fr...@wehave.net>.
On December 6, 2003 10:34 am, John Szakmeister wrote:

> In general when you do an add, and you want to undo it, you would use 'svn
> revert'.  Unfortunately, it looks like you're now missing .svn/ directories
> that should be in usr/ and have caused this obstruction problem.

Precisely.

> Currently, I don't think there is any command we can use to remove the
> problem directory from version control without moving the directory in
> question, and then doing an 'svn revert'.  This problem might make the case
> for having an option for 'revert' that goes ahead and unschedules the
> directory anyway (a --force option of sorts).

That sounds very useful.

> In order to avoid propagating misuse of the tool, I'm going to send you a
> solution to his problem in a private email.

Worked great thanks.  I swear one of these days I'll stop doing stupid things 
with subversion :-)

-- 
Fraser Campbell <fr...@wehave.net>                 http://www.wehave.net/
Georgetown, Ontario, Canada                               Debian GNU/Linux


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

Re: how to solve status ~ ?

Posted by John Szakmeister <jo...@szakmeister.net>.
On Saturday 06 December 2003 09:04, Fraser Campbell wrote:
> I hate to beg but does anyone have a recommendation for how to get rid of
> the stuck directory so that I can begin using subversion again?
>
> Thanks!
>
> On December 3, 2003 10:43 pm, Fraser Campbell wrote:
> > Hi,
> >
> > I am managing a server using subversion, basically I check in all configs
> > files and website content.  I have the following output from svn status
> > on the root directory of the server:
> >
> > M      home/sites/somwhere.com/web/index.html
> > ~      usr
> > M      etc/apache/domains/www.somewhere.com.conf
> > M      etc/postfix/main.cf
> >
> > I previously had a situation like this and was advised to move the
> > offending directory and then run cleanup ... that's fine but in this case
> > the offending directory is actually /usr on a server that's 1.5 hours
> > drive from here.

In general that's the approach you want to take.  '~' means that there is an 
obstruction, i.e., an unversioned file or directory that has the same name as 
a versioned resource.

> > Is there any way (hopefully easy) to resolve this situation.  I just want
> > subversion to forget that I ever told it to add usr, it's only in the
> > working copy not in the repository yet.
> >
> > I had wanted to add /usr/something/ at somepoint but forgot to use the -N
> > option when adding.  I believe I made the mistake of cancelling the
> > command (CRTL-C)  instead of reverting (wish I could remember).

In general when you do an add, and you want to undo it, you would use 'svn 
revert'.  Unfortunately, it looks like you're now missing .svn/ directories 
that should be in usr/ and have caused this obstruction problem.

Currently, I don't think there is any command we can use to remove the problem 
directory from version control without moving the directory in question, and 
then doing an 'svn revert'.  This problem might make the case for having an 
option for 'revert' that goes ahead and unschedules the directory anyway (a 
--force option of sorts).

In order to avoid propagating misuse of the tool, I'm going to send you a 
solution to his problem in a private email.  I'd like to see a solution that 
addresses this situation in the future since it seems that there are a number 
of people who have been versioning their systems, and may face the same 
problem of being unable to remove this resource from version control without 
moving the obstruction.

-John



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

Re: how to solve status ~ ?

Posted by Fraser Campbell <fr...@wehave.net>.
On December 6, 2003 09:03 pm, John Szakmeister wrote:

> I think we need to look at forcing this to revert even if the directory is
> unversioned.  I can see this happening again, especially in situations like
> Fraser's.

I can see it happening again as well, I just hope it won't be me next time :-(  
Thanks again for the spot-on help though John!

-- 
Fraser Campbell <fr...@wehave.net>                 http://www.wehave.net/
Georgetown, Ontario, Canada                               Debian GNU/Linux


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

Re: Workaround -- Re: how to solve status ~ ?

Posted by Philip Martin <ph...@codematters.co.uk>.
John Szakmeister <jo...@szakmeister.net> writes:

>>     1)  check out the existing repository to a new WC.
>>     2)  create (mkdir) the directory and 'svn add ; svn commit' the
>>             directory
>>     3)  'cp -a' the .svn directory from the temp WC to the "real" WC
>>     4)  operation on the real WC as usual (ie adding files in the
>>             directory, and so forth)
>
> My only concern here would be the lack of disk space to do such a thing.

    1) svn mkdir URL
    2) svn co URL temp_WC
    3) cp -a temp_WC/.svn real_WC

Uses very little disk space.

-- 
Philip Martin

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

Re: Workaround -- Re: how to solve status ~ ?

Posted by John Szakmeister <jo...@szakmeister.net>.
On Wednesday 10 December 2003 15:23, Derrick 'dman' Hudson wrote:
> On Wed, 10 Dec 2003 14:32:47 -0500, Derrick 'dman' Hudson wrote:
> > On Sat, 6 Dec 2003 21:03:44 -0500, John Szakmeister wrote:
> >> The problem is that usr/ was scheduled for addition, and then somehow
> >> the .svn/ directories got nuked underneath it.  This left him in an
> >> unrecoverable state because he couldn't rename usr/ on his server.
> >>
> >> I think we need to look at forcing this to revert even if the directory
> >> is unversioned.  I can see this happening again, especially in
> >> situations like Fraser's.
> >
> > I agree.  I have this problem too.
>
> [...]
>
> Well, this workaround works for my problem (tried to add directory
> without write permission in WC) :
>
>     1)  check out the existing repository to a new WC.
>     2)  create (mkdir) the directory and 'svn add ; svn commit' the
>             directory
>     3)  'cp -a' the .svn directory from the temp WC to the "real" WC
>     4)  operation on the real WC as usual (ie adding files in the
>             directory, and so forth)

My only concern here would be the lack of disk space to do such a thing.

-John


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

Workaround -- Re: how to solve status ~ ?

Posted by Derrick 'dman' Hudson <dm...@dman13.dyndns.org>.
On Wed, 10 Dec 2003 14:32:47 -0500, Derrick 'dman' Hudson wrote:
> On Sat, 6 Dec 2003 21:03:44 -0500, John Szakmeister wrote:
> 
>> The problem is that usr/ was scheduled for addition, and then somehow 
>> the .svn/ directories got nuked underneath it.  This left him in an 
>> unrecoverable state because he couldn't rename usr/ on his server.
>> 
>> I think we need to look at forcing this to revert even if the directory is 
>> unversioned.  I can see this happening again, especially in
>> situations like Fraser's.
> 
> I agree.  I have this problem too.
[...]

Well, this workaround works for my problem (tried to add directory
without write permission in WC) :

    1)  check out the existing repository to a new WC.
    2)  create (mkdir) the directory and 'svn add ; svn commit' the
            directory
    3)  'cp -a' the .svn directory from the temp WC to the "real" WC
    4)  operation on the real WC as usual (ie adding files in the
            directory, and so forth)


-- 
Dishonest money dwindles away,
but he who gathers money little by little makes it grow.
        Proverbs 13:11
 
www: http://dman13.dyndns.org/~dman/            jabber: dman@dman13.dyndns.org


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

Re: how to solve status ~ ?

Posted by Derrick 'dman' Hudson <dm...@dman13.dyndns.org>.
On Sat, 6 Dec 2003 21:03:44 -0500, John Szakmeister wrote:

> The problem is that usr/ was scheduled for addition, and then somehow 
> the .svn/ directories got nuked underneath it.  This left him in an 
> unrecoverable state because he couldn't rename usr/ on his server.
> 
> I think we need to look at forcing this to revert even if the directory is 
> unversioned.  I can see this happening again, especially in situations like 
> Fraser's.

I agree.  I have this problem too.  I like to store stuff in /etc in
version control.  I've been using CVS but wanted to start using svn
alongside it.

Here is the scenario I have, which you can reproduce :

    1)  create a repository,  as a normal user checkout the repository
            in /tmp.
    2)  as root, move the .svn directory from the WC in /tmp to /etc
    3)  
            $ cd /etc
            $ svn add apache2
                [error message, I don't recall exactly what it said]
            $ su root
            # chown dman apache2    # temporary so svn can create .svn
                                    # directory
            # exit
            $ svn add apache2
                [error - apache2 already scheduled for addition]
            $ svn [whatever]
                [errors]
            $ su root
            # chown root apache2    # restore

It's not uncommon for me to forget to update the permissions until I
get the error from CVS.  With CVS, at least, I can easily correct that
situation.  It would be great if there was a way to fix this with svn.
I guess the better approach is to have a "mirror" WC in which I can
create and add directories, then move the .svn directory to /etc.  I'd
rather not run svn (or cvs, etc.) as root, just as good practice.

-D

-- 
\begin{humor}
Disclaimer:
If I receive a message from you, you are agreeing that:
   1. I am by definition, "the intended recipient"
   2. All information in the email is mine to do with as I see fit and make
        such financial profit, political mileage, or good joke as it lends
        itself to. In particular, I may quote it on USENET or the WWW.
   3. I may take the contents as representing the views of your company.
   4. This overrides any disclaimer or statement of confidentiality that may
        be included on your message
\end{humor}
 
www: http://dman13.dyndns.org/~dman/            jabber: dman@dman13.dyndns.org


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

Re: how to solve status ~ ?

Posted by John Szakmeister <jo...@szakmeister.net>.
On Saturday 06 December 2003 16:18, Julian Foad wrote:
> Fraser Campbell wrote:
> > I hate to beg but does anyone have a recommendation for how to get rid of
> > the stuck directory so that I can begin using subversion again?
>
> [...]
>
> > On December 3, 2003 10:43 pm, Fraser Campbell wrote:
>
> [...]
>
> >>I am managing a server using subversion, basically I check in all configs
> >>files and website content.  I have the following output from svn status
> >> on the root directory of the server:
> >>
> >>M      home/sites/somwhere.com/web/index.html
> >>~      usr
> >>M      etc/apache/domains/www.somewhere.com.conf
> >>M      etc/postfix/main.cf
> >>
> >>I previously had a situation like this and was advised to move the
> >>offending directory and then run cleanup ... that's fine but in this case
> >>the offending directory is actually /usr on a server that's 1.5 hours
> >> drive from here.
>
> OK, so don't move the directory, but you might need to run "svn cleanup" in
> the root directory.  All that does is remove locks that have been left
> behind by a Subversion operation that was aborted by Ctrl-C etc., and you
> only need to do a "cleanup" if Subversion otherwise exits with an error
> saying that something is locked.

I was able to re-create the problem on my local machine, and this presents an 
interesting situation.  In this case, the WC was not locked.  Running 'svn 
cleanup' caused to iterate through the directories, and then failed with an 
error on 'usr', leaving everything in a locked state.  'svn revert' failed 
because it expected a versioned resource to be there, but found an 
unversioned usr/ directory instead.

> >>Is there any way (hopefully easy) to resolve this situation.  I just want
> >>subversion to forget that I ever told it to add usr, it's only in the
> >>working copy not in the repository yet.
>
> I think the command you want is "svn revert".
>
> > cd /
> > svn cleanup
> > svn revert -R usr
>
> If, as you say, "usr" has not yet been committed to the repository, then
> that should return "usr" to being unversioned.
>
> If this fails, give us some more details such as the output of "svn status
> -v usr", "svn log -v usr", "svn list -v usr", and (non-svn) "ls -ld usr"
> (to show its permissions).

The problem is that usr/ was scheduled for addition, and then somehow 
the .svn/ directories got nuked underneath it.  This left him in an 
unrecoverable state because he couldn't rename usr/ on his server.

I think we need to look at forcing this to revert even if the directory is 
unversioned.  I can see this happening again, especially in situations like 
Fraser's.

-John


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

Re: how to solve status ~ ?

Posted by Julian Foad <ju...@btopenworld.com>.
Fraser Campbell wrote:
> I hate to beg but does anyone have a recommendation for how to get rid of the 
> stuck directory so that I can begin using subversion again?
[...]
> On December 3, 2003 10:43 pm, Fraser Campbell wrote:
[...]
>>I am managing a server using subversion, basically I check in all configs
>>files and website content.  I have the following output from svn status on
>>the root directory of the server:
>>
>>M      home/sites/somwhere.com/web/index.html
>>~      usr
>>M      etc/apache/domains/www.somewhere.com.conf
>>M      etc/postfix/main.cf
>>
>>I previously had a situation like this and was advised to move the
>>offending directory and then run cleanup ... that's fine but in this case
>>the offending directory is actually /usr on a server that's 1.5 hours drive
>>from here.

OK, so don't move the directory, but you might need to run "svn cleanup" in the root directory.  All that does is remove locks that have been left behind by a Subversion operation that was aborted by Ctrl-C etc., and you only need to do a "cleanup" if Subversion otherwise exits with an error saying that something is locked.

>>Is there any way (hopefully easy) to resolve this situation.  I just want
>>subversion to forget that I ever told it to add usr, it's only in the
>>working copy not in the repository yet.

I think the command you want is "svn revert".

> cd /
> svn cleanup
> svn revert -R usr

If, as you say, "usr" has not yet been committed to the repository, then that should return "usr" to being unversioned.

If this fails, give us some more details such as the output of "svn status -v usr", "svn log -v usr", "svn list -v usr", and (non-svn) "ls -ld usr" (to show its permissions).

- Julian


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

Re: how to solve status ~ ?

Posted by Holger Krekel <py...@devel.trillke.net>.
Fraser Campbell wrote:
> I hate to beg but does anyone have a recommendation for how to get rid of the 
> stuck directory so that I can begin using subversion again?
> 
> Thanks!
> 
> On December 3, 2003 10:43 pm, Fraser Campbell wrote:
> > Hi,
> >
> > I am managing a server using subversion, basically I check in all configs
> > files and website content.  I have the following output from svn status on
> > the root directory of the server:
> >
> > M      home/sites/somwhere.com/web/index.html
> > ~      usr
> > M      etc/apache/domains/www.somewhere.com.conf
> > M      etc/postfix/main.cf
> >
> > I previously had a situation like this and was advised to move the
> > offending directory and then run cleanup ... that's fine but in this case
> > the offending directory is actually /usr on a server that's 1.5 hours drive
> > from here.

Hmmm, i am not sure i understand your problem completly but have you
tried to 'svn revert usr' ? 

    holger

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

Re: how to solve status ~ ?

Posted by Fraser Campbell <fr...@wehave.net>.
I hate to beg but does anyone have a recommendation for how to get rid of the 
stuck directory so that I can begin using subversion again?

Thanks!

On December 3, 2003 10:43 pm, Fraser Campbell wrote:
> Hi,
>
> I am managing a server using subversion, basically I check in all configs
> files and website content.  I have the following output from svn status on
> the root directory of the server:
>
> M      home/sites/somwhere.com/web/index.html
> ~      usr
> M      etc/apache/domains/www.somewhere.com.conf
> M      etc/postfix/main.cf
>
> I previously had a situation like this and was advised to move the
> offending directory and then run cleanup ... that's fine but in this case
> the offending directory is actually /usr on a server that's 1.5 hours drive
> from here.
>
> Is there any way (hopefully easy) to resolve this situation.  I just want
> subversion to forget that I ever told it to add usr, it's only in the
> working copy not in the repository yet.
>
> I had wanted to add /usr/something/ at somepoint but forgot to use the -N
> option when adding.  I believe I made the mistake of cancelling the command
> (CRTL-C)  instead of reverting (wish I could remember).
>
> If anyone could help me out with this (again) it would be greatly
> appreciated.
>
> Thanks!

-- 
Fraser Campbell <fr...@wehave.net>                 http://www.wehave.net/
Georgetown, Ontario, Canada                               Debian GNU/Linux


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