You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ronan Lucio <ro...@tiper.com.br> on 2006/11/23 20:46:43 UTC

Cloaking

Hello,

I have googled about this issue and looked into mailinglist archives
but I didn´t find the answer.

We have a project that is a website.
This project have a subfolder "photos" that have thousands of files
that shouldn´t be downloaded and the user does a "svn update"

Does anybody knows how can I set this directory to not be
controled by subversion?

Thank you,
Ronan

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

Re: Cloaking

Posted by Ronan Lucio <ro...@tiper.com.br>.
Ryan,

Ryan Schmidt escreveu:
> Simply do not "svn add photos". Furthermore, "svn propset svn:ignore 
> photos ." so that Subversion doesn't show "photos" as an unversioned 
> directory in "svn status".
>
> Alternately, if you would like to have the directory "photos" in the 
> repository, but have it be empty, then "svn add --non-recursive 
> photos" and "svn propset svn:ignore '*' photos" so Subversion doesn't 
> try to version its contents.

Thank you very much for your attention.

I´ve being reading the Subversion Book (http://svnbook.red-bean.com/)
but it has too many information to be understand in one time that
my mind is in a mess.

First let me understand a thing:
I imported the repository:

"svn import /svn/project /home/project" (I´m in the server)

Everything seems to be fine. If I type http://server/svn/project
in the browser, I see the files and directories there.

But (still in the server), if I type "ls /svn" the directory project
doens´t appear in the list

So, if I type:

cd /svn
svn propset svn:ignore project/site/photos

I get an error (It´s in portuguese, but it´s something like
"Explicit target required").

So I tried:
svn propset svn:ignore file:///svn/project/site/photos

What´s wrong here?

Thanks in advance,
Ronan

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

Re: Cloaking

Posted by Ronan Lucio <ro...@tiper.com.br>.
Ryan,

Thank you very much once more for you special attention and pacience,
Now the things get clear in my mind.

The problem about the book, IMHO, is that it aims to be a complete guide.
This is nice because we´d need that information in some situations, but the
Quick Guide miss too many things and it just give a view about few thing
in subversion.

So, the beginner have to read the book and that so many information
makes some confusing in the beginner´s mind.

I´d suggest first, more objectivity in the book or a Quick Guide that
offers better understandment about subversion.

But it´s OK, I understand that it isn´t the write place to discuss
this issue, and that Open Source lives with colaborations.
It´s just thoughts.

Thanks in advance,
Ronan

Ryan Schmidt escreveu:
> On Nov 24, 2006, at 11:51, Ronan Lucio wrote:
>
>> I´m trying to do an "in-place" import.
>>
>> Now I removed our repository and created a new one.
>> So, at this time nothing was imported, yet.
>>
>> Let´s inform what I did and what´s my doubt:
>>
>> Trying to do an "in-place" import:
>>
>> # svnadmin /opt/svn/repos
>
> I assume you meant "svnadmin create /opt/svn/repos"
>
>
>> # svn mkdir file:///opt/svn/repos/project
>> # cd /home
>> # svn checkout file:///opt/svn/repos/project
>> # cd project
>>
>> (Though somethings are different from the FAQ, it only worked
>> this way. Following the FAQ it´s created a project inside another,
>> like /home/project/project)
>>
>> # svn add templates includes
>>
>> At this point, if I type "svn propset svn:ignore '*' site/photos" I 
>> receive
>> an error saying that site/photos isn´t a workcopy.
>
> That's correct; site/photos isn't a working copy yet.
>
>> And if I "add site", photos will be added, too, once it´s a site´s
>> subdirectory.
>
> True! In this case, you should add the "site" directory 
> non-recursively, like this:
>
> svn add --non-recursive site
>
> Then, as before, you have two options. (Which one you choose is up to 
> you or your project's requirements.) Either you add the "photos" 
> directory but leave it empty. If you want that, then you would:
>
> # go into the site directory
> cd site
> # add the photos directory non-recursively (add an empty photos 
> directory, basically)
> svn add --non-recursive photos
> # ignore everything in the photos directory
> svn propset svn:ignore '*' photos
>
> On the other hand, you could leave the photos directory out entirely. 
> If that's what you want:
>
> # ignore the photos directory in the site directory
> svn propset svn:ignore photos site
>
>
>> PS: I have read almost the whole Subversion Book, but it´s
>> so many information to be understood. In the other side, many
>> things aren´t clear enough in the book, for new user.
>> For exemplo: The session svn:ignore doesn´t have enough examples.
>
> I think the book is fairly good, but I admit it's hard for someone who 
> already knows the product to write a guide that properly explains it 
> to someone who does not. There is a separate mailing list for the 
> book; if you have suggestions for how the book could be improved for 
> newcomers, I'm sure they would appreciate it.
>
> http://svnbook.red-bean.com/
>
> (scroll down to "Feedback/Contributing")
>
>
>

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

Re: Cloaking

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Nov 24, 2006, at 11:51, Ronan Lucio wrote:

> I´m trying to do an "in-place" import.
>
> Now I removed our repository and created a new one.
> So, at this time nothing was imported, yet.
>
> Let´s inform what I did and what´s my doubt:
>
> Trying to do an "in-place" import:
>
> # svnadmin /opt/svn/repos

I assume you meant "svnadmin create /opt/svn/repos"


> # svn mkdir file:///opt/svn/repos/project
> # cd /home
> # svn checkout file:///opt/svn/repos/project
> # cd project
>
> (Though somethings are different from the FAQ, it only worked
> this way. Following the FAQ it´s created a project inside another,
> like /home/project/project)
>
> # svn add templates includes
>
> At this point, if I type "svn propset svn:ignore '*' site/photos" I  
> receive
> an error saying that site/photos isn´t a workcopy.

That's correct; site/photos isn't a working copy yet.

> And if I "add site", photos will be added, too, once it´s a site´s
> subdirectory.

True! In this case, you should add the "site" directory non- 
recursively, like this:

svn add --non-recursive site

Then, as before, you have two options. (Which one you choose is up to  
you or your project's requirements.) Either you add the "photos"  
directory but leave it empty. If you want that, then you would:

# go into the site directory
cd site
# add the photos directory non-recursively (add an empty photos  
directory, basically)
svn add --non-recursive photos
# ignore everything in the photos directory
svn propset svn:ignore '*' photos

On the other hand, you could leave the photos directory out entirely.  
If that's what you want:

# ignore the photos directory in the site directory
svn propset svn:ignore photos site


> PS: I have read almost the whole Subversion Book, but it´s
> so many information to be understood. In the other side, many
> things aren´t clear enough in the book, for new user.
> For exemplo: The session svn:ignore doesn´t have enough examples.

I think the book is fairly good, but I admit it's hard for someone  
who already knows the product to write a guide that properly explains  
it to someone who does not. There is a separate mailing list for the  
book; if you have suggestions for how the book could be improved for  
newcomers, I'm sure they would appreciate it.

http://svnbook.red-bean.com/

(scroll down to "Feedback/Contributing")

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


Re: Cloaking

Posted by Ronan Lucio <ro...@tiper.com.br>.
Ryan,

>> "svn import /svn/project /home/project" (I´m in the server)
>
> So /svn/project contains your existing code, and /home/project is a 
> repository you created? Ok

I´m sorry. It was a mistake of mine. I´d like to say:
# svn import /home/project /svn/project

Anyway, as your tip and how our project is an website,
I´m trying to do an "in-place" import.

Now I removed our repository and created a new one.
So, at this time nothing was imported, yet.

Let´s inform what I did and what´s my doubt:

Trying to do an "in-place" import:

# svnadmin /opt/svn/repos

# svn mkdir file:///opt/svn/repos/project
# cd /home
# svn checkout file:///opt/svn/repos/project
# cd project

(Though somethings are different from the FAQ, it only worked
this way. Following the FAQ it´s created a project inside another,
like /home/project/project)

# svn add templates includes

At this point, if I type "svn propset svn:ignore '*' site/photos" I receive
an error saying that site/photos isn´t a workcopy.
And if I "add site", photos will be added, too, once it´s a site´s
subdirectory.

PS: I have read almost the whole Subversion Book, but it´s
so many information to be understood. In the other side, many
things aren´t clear enough in the book, for new user.
For exemplo: The session svn:ignore doesn´t have enough examples.

Any help would be appreciated,

Thanks,
Ronan

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

Re: Cloaking

Posted by Ryan Schmidt <su...@ryandesign.com>.
Please use "Reply To All" so that your reply also gets to the list,  
not just to me.


On Nov 23, 2006, at 16:16, Ronan Lucio wrote:

> Ryan,
>
> Ryan Schmidt escreveu:
>> Simply do not "svn add photos". Furthermore, "svn propset  
>> svn:ignore photos ." so that Subversion doesn't show "photos" as  
>> an unversioned directory in "svn status".
>>
>> Alternately, if you would like to have the directory "photos" in  
>> the repository, but have it be empty, then "svn add --non- 
>> recursive photos" and "svn propset svn:ignore '*' photos" so  
>> Subversion doesn't try to version its contents.
>
> Thank you very much for your attention.
>
> I´ve being reading the Subversion Book (http://svnbook.red-bean.com/)
> but it has too many information to be understand in one time that
> my mind is in a mess.
>
> First let me understand a thing:
> I imported the repository:
>
> "svn import /svn/project /home/project" (I´m in the server)

So /svn/project contains your existing code, and /home/project is a  
repository you created? Ok.


> Everything seems to be fine. If I type http://server/svn/project
> in the browser, I see the files and directories there.

That may be, but Subversion has nothing to do with it. Subversion  
hasn't made any changes to /svn/project; it has merely imported it  
into the repository at /home/project.


> But (still in the server), if I type "ls /svn" the directory project
> doens´t appear in the list
>
> So, if I type:
>
> cd /svn
> svn propset svn:ignore project/site/photos
>
> I get an error (It´s in portuguese, but it´s something like
> "Explicit target required").
>
> So I tried:
> svn propset svn:ignore file:///svn/project/site/photos
>
> What´s wrong here?

A couple things...


First of all, your "svn import" command has imported the various  
photos into the repository. Therefore, anyone who checks out a  
working copy will receive them. To meet your goal of *not* having the  
photos checked out, you should *not* import them to begin with. An in- 
place import could help with this; read about it here:

http://subversion.tigris.org/faq.html#in-place-import


What's wrong with your svn propset command is that it requires three  
arguments: the property to set ("svn:ignore"), the value of that  
property (you didn't provide one), and the path of the object on  
which you want to set this property (you provided a URL which doesn't  
make sense; either provide a URL to something in the repository, e.g.  
file:///home/project/something, or better yet, a path to an item in  
the working copy. That way you can preview the change before  
committing it. As I showed in my first message, I guess you either  
want to ignore the "photos" directory and not add the "photos"  
directory, or you want to add the "photos" directory and ignore  
everything in it.


Another thing that's wrong is that you have merely imported; you have  
not yet checked out a working copy, which you will more than likely  
want to do.


It will help for you to read and understand more of the book. If  
reading onscreen is difficult, printed books are available too, and  
not just in English. Here are some:

http://subversion.tigris.org/links.html#books


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


Re: Cloaking

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Nov 23, 2006, at 14:46, Ronan Lucio wrote:

> I have googled about this issue and looked into mailinglist archives
> but I didn´t find the answer.
>
> We have a project that is a website.
> This project have a subfolder "photos" that have thousands of files
> that shouldn´t be downloaded and the user does a "svn update"
>
> Does anybody knows how can I set this directory to not be
> controled by subversion?

Simply do not "svn add photos". Furthermore, "svn propset svn:ignore  
photos ." so that Subversion doesn't show "photos" as an unversioned  
directory in "svn status".

Alternately, if you would like to have the directory "photos" in the  
repository, but have it be empty, then "svn add --non-recursive  
photos" and "svn propset svn:ignore '*' photos" so Subversion doesn't  
try to version its contents.



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