You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Steven Lee <st...@gmail.com> on 2012/08/19 17:08:34 UTC
Corrupt .svn directory using Subversion 1.7
I am using Subversion 1.7.0. I wanted to exclude a directory from my
working copy so I entered "svn update --set-depth exclude foodir". In
the middle, I decided to cancel this operation. Now I'm in a state
where some files under foodir are missing but SVN thinks all of the
files are there. I tried to do a 'svn revert' and 'svn checkout' but
nothing happens because it thinks the files are already there. 'svn
status' thinks nothing has changed but 'svn ls' shows that some
files/directories are missing from my working copy.
Prior to Subversion 1.7, I would have been able to simply remove the
.svn directory /in that directory/ and check out the files again. But
now, I have to remove the .svn directory at the top level and check out
all of the files again. The repository is huge so I want to avoid that,
and plus all of my timestamps on the files/directories would be updated
which is undesirable. Is there a simpler workaround? Is it possible to
just fix or just re-checkout the files for that directory?
-Steven
Re: AW: Corrupt .svn directory using Subversion 1.7
Posted by Philip Martin <ph...@wandisco.com>.
Steven Lee <st...@gmail.com> writes:
> svn up --set-depth empty foodir
>
> cleared out 'foodir', but
>
> svn up --set-depth infinity foodir
>
> did not bring any files back.
You will have to look at the SQLite database to provide more
information. Something like this may show what is going on:
sqlite .svn/wc.db "select local_relpath, presence, revision, depth from nodes where local_relpath like 'foodir%'"
after the '--set-depth empty' there should be only one line for foodir,
then after the '--set-depth infinity' there should be additional lines
for the children in foodir.
> 'svn checkout' did not work either.
What does that mean?
>
> -Steven
>
>
> On 8/20/2012 4:21 AM, Philip Martin wrote:
>> Steven Lee <st...@gmail.com> writes:
>>
>>> On Aug 19, 2012 11:45 PM, "Steven Lee" <st...@gmail.com> wrote:
>>>> Yes, I tried "svn update --set-depth infinity" and nothing happened.
>>> Many of the files are still missing from my working copy. It does seem
>>> like that should have worked.
>>> Just to be clear, I tried "svn update --set-depth infinity" in the foodir
>>> directory and "svn update --set-depth infinity foodir" in foodir's parent
>>> directory.
>> The problem is that in 1.7 the operation you interrupted is not properly
>> atomic so foodir is probably still marked as depth infinity despite
>> haoving missing children.
>>
>> sqlite .svn/wc.db "select local_relpath, depth from nodes where local_relpath like 'foodir%'"
>>
>> So you probably have to do:
>>
>> svn up --set-depth empty foodir
>>
>> before
>>
>> svn up --set-depth infinity foodir
>>
>> will work.
>>
>
>
--
Philip
RE: AW: Corrupt .svn directory using Subversion 1.7
Posted by Bob Archer <Bo...@amsi.com>.
> On 8/20/2012 4:21 AM, Philip Martin wrote:
> > Steven Lee <st...@gmail.com> writes:
> >
> >> On Aug 19, 2012 11:45 PM, "Steven Lee" <st...@gmail.com> wrote:
> >>> Yes, I tried "svn update --set-depth infinity" and nothing happened.
> >> Many of the files are still missing from my working copy. It does
> >> seem like that should have worked.
> >> Just to be clear, I tried "svn update --set-depth infinity" in the
> >> foodir directory and "svn update --set-depth infinity foodir" in
> >> foodir's parent directory.
> > The problem is that in 1.7 the operation you interrupted is not
> > properly atomic so foodir is probably still marked as depth infinity
> > despite haoving missing children.
> >
> > sqlite .svn/wc.db "select local_relpath, depth from nodes where
> local_relpath like 'foodir%'"
> >
> > So you probably have to do:
> >
> > svn up --set-depth empty foodir
> >
> > before
> >
> > svn up --set-depth infinity foodir
> >
> > will work.
> >
> svn up --set-depth empty foodir
>
> cleared out 'foodir', but
>
> svn up --set-depth infinity foodir
>
> did not bring any files back. 'svn checkout' did not work either.
>
> -Steven
>
>
It seems like all this time spent trying to fix it is taking much more time than just doing a fresh checkout. (Yes, I know you said the checkout was pretty big).
BOb
Re: AW: Corrupt .svn directory using Subversion 1.7
Posted by Steven Lee <st...@gmail.com>.
svn up --set-depth empty foodir
cleared out 'foodir', but
svn up --set-depth infinity foodir
did not bring any files back. 'svn checkout' did not work either.
-Steven
On 8/20/2012 4:21 AM, Philip Martin wrote:
> Steven Lee <st...@gmail.com> writes:
>
>> On Aug 19, 2012 11:45 PM, "Steven Lee" <st...@gmail.com> wrote:
>>> Yes, I tried "svn update --set-depth infinity" and nothing happened.
>> Many of the files are still missing from my working copy. It does seem
>> like that should have worked.
>> Just to be clear, I tried "svn update --set-depth infinity" in the foodir
>> directory and "svn update --set-depth infinity foodir" in foodir's parent
>> directory.
> The problem is that in 1.7 the operation you interrupted is not properly
> atomic so foodir is probably still marked as depth infinity despite
> haoving missing children.
>
> sqlite .svn/wc.db "select local_relpath, depth from nodes where local_relpath like 'foodir%'"
>
> So you probably have to do:
>
> svn up --set-depth empty foodir
>
> before
>
> svn up --set-depth infinity foodir
>
> will work.
>
RE: AW: Corrupt .svn directory using Subversion 1.7
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: Johan Corveleyn [mailto:jcorvel@gmail.com]
> Sent: maandag 20 augustus 2012 22:10
> To: Philip Martin
> Cc: Steven Lee; Markus Schaber; users@subversion.apache.org
> Subject: Re: AW: Corrupt .svn directory using Subversion 1.7
>
> On Mon, Aug 20, 2012 at 1:21 PM, Philip Martin
> <ph...@wandisco.com> wrote:
> > Steven Lee <st...@gmail.com> writes:
> >
> >> On Aug 19, 2012 11:45 PM, "Steven Lee" <st...@gmail.com> wrote:
> >>>
> >>> Yes, I tried "svn update --set-depth infinity" and nothing happened.
> >> Many of the files are still missing from my working copy. It does seem
> >> like that should have worked.
> >>>
> >>
> >> Just to be clear, I tried "svn update --set-depth infinity" in the
foodir
> >> directory and "svn update --set-depth infinity foodir" in foodir's
parent
> >> directory.
> >
> > The problem is that in 1.7 the operation you interrupted is not properly
> > atomic so foodir is probably still marked as depth infinity despite
> > haoving missing children.
>
> Can / should this be fixed? Should an issue be created for this?
svn update --set-depth exclude was not atomic in 1.7, but is fully atomic on
current trunk. (Fixed about one and a half month ago)
svn update --set-depth infinity is not atomic, but is fully able to recover
from problems by restarting the same operation. Until the operation is
completed on some subtree the directory is marked incomplete and this will
make the next update (after interruption) load missing children.
(This 'incomplete' behavior was implemented far before 1.0)
Bert
Re: AW: Corrupt .svn directory using Subversion 1.7
Posted by Philip Martin <ph...@wandisco.com>.
Johan Corveleyn <jc...@gmail.com> writes:
> On Mon, Aug 20, 2012 at 1:21 PM, Philip Martin
> <ph...@wandisco.com> wrote:
>> Steven Lee <st...@gmail.com> writes:
>>
>>> On Aug 19, 2012 11:45 PM, "Steven Lee" <st...@gmail.com> wrote:
>>>>
>>>> Yes, I tried "svn update --set-depth infinity" and nothing happened.
>>> Many of the files are still missing from my working copy. It does seem
>>> like that should have worked.
>>>>
>>>
>>> Just to be clear, I tried "svn update --set-depth infinity" in the foodir
>>> directory and "svn update --set-depth infinity foodir" in foodir's parent
>>> directory.
>>
>> The problem is that in 1.7 the operation you interrupted is not properly
>> atomic so foodir is probably still marked as depth infinity despite
>> haoving missing children.
>
> Can / should this be fixed? Should an issue be created for this?
I believe it was fixed in 1.8 by r1365997.
--
Philip
Re: AW: Corrupt .svn directory using Subversion 1.7
Posted by Johan Corveleyn <jc...@gmail.com>.
On Mon, Aug 20, 2012 at 1:21 PM, Philip Martin
<ph...@wandisco.com> wrote:
> Steven Lee <st...@gmail.com> writes:
>
>> On Aug 19, 2012 11:45 PM, "Steven Lee" <st...@gmail.com> wrote:
>>>
>>> Yes, I tried "svn update --set-depth infinity" and nothing happened.
>> Many of the files are still missing from my working copy. It does seem
>> like that should have worked.
>>>
>>
>> Just to be clear, I tried "svn update --set-depth infinity" in the foodir
>> directory and "svn update --set-depth infinity foodir" in foodir's parent
>> directory.
>
> The problem is that in 1.7 the operation you interrupted is not properly
> atomic so foodir is probably still marked as depth infinity despite
> haoving missing children.
Can / should this be fixed? Should an issue be created for this?
--
Johan
Re: AW: Corrupt .svn directory using Subversion 1.7
Posted by Philip Martin <ph...@wandisco.com>.
Steven Lee <st...@gmail.com> writes:
> On Aug 19, 2012 11:45 PM, "Steven Lee" <st...@gmail.com> wrote:
>>
>> Yes, I tried "svn update --set-depth infinity" and nothing happened.
> Many of the files are still missing from my working copy. It does seem
> like that should have worked.
>>
>
> Just to be clear, I tried "svn update --set-depth infinity" in the foodir
> directory and "svn update --set-depth infinity foodir" in foodir's parent
> directory.
The problem is that in 1.7 the operation you interrupted is not properly
atomic so foodir is probably still marked as depth infinity despite
haoving missing children.
sqlite .svn/wc.db "select local_relpath, depth from nodes where local_relpath like 'foodir%'"
So you probably have to do:
svn up --set-depth empty foodir
before
svn up --set-depth infinity foodir
will work.
--
Philip
Re: AW: Corrupt .svn directory using Subversion 1.7
Posted by Steven Lee <st...@gmail.com>.
On Aug 19, 2012 11:45 PM, "Steven Lee" <st...@gmail.com> wrote:
>
> Yes, I tried "svn update --set-depth infinity" and nothing happened.
Many of the files are still missing from my working copy. It does seem
like that should have worked.
>
Just to be clear, I tried "svn update --set-depth infinity" in the foodir
directory and "svn update --set-depth infinity foodir" in foodir's parent
directory.
> On a related note, I am able to "svn checkout ... foodir" elsewhere, and
all of the files under foodir are retrieved. It's just when I do the same
command under that directory that I can't seem to get the files.
>
> -Steven
Re: AW: Corrupt .svn directory using Subversion 1.7
Posted by Steven Lee <st...@gmail.com>.
Yes, I tried "svn update --set-depth infinity" and nothing happened. Many
of the files are still missing from my working copy. It does seem like
that should have worked.
On a related note, I am able to "svn checkout ... foodir" elsewhere, and
all of the files under foodir are retrieved. It's just when I do the same
command under that directory that I can't seem to get the files.
-Steven
On Aug 19, 2012 11:32 PM, "Markus Schaber" <m....@3s-software.com>
wrote:
> Hi, Steven,
>
>
> Von: Steven Lee [mailto:stlee987@gmail.com]
>
> > I am using Subversion 1.7.0. I wanted to exclude a directory from my
> working copy so I entered "svn update --set-depth exclude foodir". In the
> middle, I decided to cancel this operation. Now I'm in a state where some
> files under foodir are missing but SVN thinks all of the files are there.
> I tried to do a 'svn revert' and 'svn checkout' but nothing happens
> because it thinks the files are already there. 'svn status' thinks nothing
> has changed but 'svn ls' shows that some files/directories are missing from
> my working copy.
>
> > Prior to Subversion 1.7, I would have been able to simply remove the
> .svn directory in that directory and check out the files again. But now, I
> have to remove the .svn directory at the top level and check out all of the
> files again. The repository is huge so I want to avoid that, and plus all
> of my timestamps on the files/directories would be updated which is
> undesirable. Is there a simpler workaround? Is it possible to just fix or
> just re-checkout the files for that directory?
>
> Did ou try "svn update --set-depth infinity foodir"?
>
>
>
>
AW: Corrupt .svn directory using Subversion 1.7
Posted by Markus Schaber <m....@3s-software.com>.
Hi, Steven,
Von: Steven Lee [mailto:stlee987@gmail.com]
> I am using Subversion 1.7.0. I wanted to exclude a directory from my working copy so I entered "svn update --set-depth exclude foodir". In the middle, I decided to cancel this operation. Now I'm in a state where some files under foodir are missing but SVN thinks all of the files are there. I tried to do a 'svn revert' and 'svn checkout' but nothing happens because it thinks the files are already there. 'svn status' thinks nothing has changed but 'svn ls' shows that some files/directories are missing from my working copy.
> Prior to Subversion 1.7, I would have been able to simply remove the .svn directory in that directory and check out the files again. But now, I have to remove the .svn directory at the top level and check out all of the files again. The repository is huge so I want to avoid that, and plus all of my timestamps on the files/directories would be updated which is undesirable. Is there a simpler workaround? Is it possible to just fix or just re-checkout the files for that directory?
Did ou try "svn update --set-depth infinity foodir"?
Re: Corrupt .svn directory using Subversion 1.7
Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag Steven Lee,
am Sonntag, 19. August 2012 um 17:08 schrieben Sie:
> I am using Subversion 1.7.0. I wanted to exclude a directory from my
> working copy so I entered "svn update --set-depth exclude foodir". In
> the middle, I decided to cancel this operation. Now I'm in a state
> where some files under foodir are missing but SVN thinks all of the
> files are there.
--set-depth exclude foodir should have prevented the whole folder from
being updated, so if it's there it's because of a former checkout and
it's contents will be ignored because you told the working copy to do
so. What are you really trying to achieve? Do you want foodir being
updated or not?
> I tried to do a 'svn revert' and 'svn checkout' but
> nothing happens because it thinks the files are already there.
svn checkout won't work in a already existing working copy and svn
revert --recursive . will revert only those files missing besides
those you excluded in foodir.
> 'svn
> status' thinks nothing has changed but 'svn ls' shows that some
> files/directories are missing from my working copy.
Please provide exact error messages as at least I don't seem to
understand what/where your problem is depending on what you actually
want to do.
> Prior to Subversion 1.7, I would have been able to simply remove the
> .svn directory /in that directory/ and check out the files again.
If you really did a checkout you created two distinct working copies,
which may or may not work as expected. You should have used at least
update and even with that if you just have deleted the .svn directory
you would have got conflicts with maybe already existing files and
directories. I doubt this was ever an supported use case.
> But
> now, I have to remove the .svn directory at the top level and check out
> all of the files again.
No, you can always update and provide a new value for --set-depth or
just use the --depth arg. See svn help update for details.
> The repository is huge so I want to avoid that,
> and plus all of my timestamps on the files/directories would be updated
> which is undesirable.
Backup the files including the timestamps, update your working copy
and copy the the backups over again.
> Is there a simpler workaround? Is it possible to
> just fix or just re-checkout the files for that directory?
svn update --set-depth inifinity will update your working copy and
foodir.
Mit freundlichen Grüßen,
Thorsten Schöning
--
Thorsten Schöning E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme http://www.AM-SoFT.de/
Telefon.............030-2 1001-310
Fax...............05151- 9468- 88
Mobil..............0178-8 9468- 04
AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow