[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: "The system cannot find the file specified" during update

From: Ruslan Sivak <russ_at_vshift.com>
Date: Tue, 21 Oct 2008 20:07:57 -0400

Ryan Schmidt wrote:
> On Oct 21, 2008, at 13:57, Ruslan Sivak wrote:
>
>> Ryan Schmidt wrote:
>>
>>> On Oct 21, 2008, at 11:27, Ruslan Sivak wrote:
>>>
>>>>>> I guess this goes back to my issue of committing the files. The
>>>>>> changes happen directly on the file system, and nightly I issue
>>>>>> an svn commit as part of a batch process. The problem, however,
>>>>>> is that it doesn't commit deletiions. Is there still no way to
>>>>>> pass a parameter to the svn executable to tell it to commit the
>>>>>> deletions as well?
>>>>>
>>>>> Run "svn rm" for each file you want to delete. Then "svn ci".
>>>>
>>>> This will add a lot of complexity to my application. It will also
>>>> add extra revisions which we don't necessarily need. For example,
>>>> someone uploads a photo for the photo gallery. I would then resize
>>>> the photo, and all the original and all the new sizes into the
>>>> repository. The person then decides to replace that photo with a
>>>> different one. I now delete the old photos, commit, upload the new
>>>> photo, resize, add the files, commit again.
>>>> Not only is this a lot more complicated, but it wastes repository
>>>> space.
>>>
>>> Extra revisions shouldn't be a problem at all, though I don't see
>>> why there would be extra revisions. You said you issue a nightly
>>> commit as part of a batch process. Presumably before you commit, you
>>> run "svn add" on new files you discover. So, just also run "svn rm"
>>> on the files that need to be marked as deleted in the repository,
>>> and then run your single "svn commit".
>>>
>>> I also don't understand your assertion of wasting repository space.
>>> Anything you add to the repository takes up space in the repository.
>>> If you delete it with "svn rm", that space is not reclaimed; it's
>>> still used, and the file is still there in the repository history.
>>> This is how Subversion is designed to work. If you don't want
>>> deleted files taking up space, then you may need to look into a tool
>>> other than Subversion.
>>
>> The problem here is that my script is very simple.
>>
>> svn add .
>
> That only adds the directory, which is presumably already under
> version control. Maybe you mean "svn add *" which would add all files
> in the directory? Or do you only ever add entire directories worth of
> photos, never individual files?
>
Actually my code looks something like this
svn add --force .
svn commit -m "daily prd commit"

This adds everything under the current directory recursively and then
commits everything.
>> svn commit .
>>
>> So in order to delete things, I would need to do somethign like
>> svn st
>> figure out which files are deleted
>> svn rm deleted files
>> svn commit
>>
>> This is a lot more complicated, and currently I don't see a way to do
>> it. Tortoise lets you commit deletions easily, but I don't see an
>> easy way to script it.
>
> Off the top of my head:
>
> svn st | sed -n 's/^\! //p' | xargs svn rm
>
> That might not be compatible with filenames or paths that have spaces
> in them.
>
> It also assumes you have Unix-like utilities like sed and xargs
> available to you. If your server runs Windows, you'll have to find
> Windows versions of those utilities, or maybe use Cygwin or move to a
> Linux server.
>
Looks like after I installed UnixUtils and changed the code slightly

svn st --depth=infinity | sed -n "s/^\! //p" | xargs svn rm

it seems to work. What if the file name has a spaces in it? Does
anyone have a regex for that?

>
>> P.S. When I talked about wasting space, I meant doing a commit every
>> time there was a change, not a nightly commit.
>
> Each commit should take a fixed amount of space for some
> administrative information, plus the space for the changes you're
> committing. That fixed amount of space should be small, but if you
> have many files (i.e. thousands) in a single directory, it could be
> larger than one would like.
>
>
What I mean is if I commit things immediately, and the file happens to
change several times a day, I only want the last change in the
repository. I don't necessarily want all the intermediate revisions.

Russ

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-10-22 02:08:32 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.