Add files to work copy - ignoring file types for versioning does not function

38 views
Skip to first unread message

Felix Wiemuth

unread,
Apr 11, 2010, 11:44:32 AM4/11/10
to us...@tortoisesvn.tigris.org
Add files to work copy - ignoring file types for versioning does not function
 
Hello,
 
 
I created a local repository for test issues.
I checked out a work copy on a folder.
Then I wanted to add files to this folder.
So I copied them there (files and folders with further folders and files).
Now I want to add these files for versioning, excluding files like *.obj, *.exe etc.
So I went to the properties of the toppest folder in the work copy and added a "svn:ignore" item, with the following content:
 
*.obj
*.exe
 
Then I selected "TortoiseSVN" -> "add" on the work copy folder.
But in the window which appeared ALL files were shown...
Why?? What did I do wrong?
 
I noticed that they are only not shown if I select "ignore" -> "*.exe" on each file seperately.
When I want to do this with files which are in a folder I added (e.g. "file.exe" in  "WORKCOPY/FOLDER/file.exe"),
the "ignore"-option isnt even shown.
 
Another thing: Is it wrong to add files to a work copy by drag&drop?
I read in the documentary to right-drag files, but when I tried to, the following error message occured:
"Couldnt copy files. Access denied"
 
I hope you can help me,
thanks beforehand.
 
 

Andy Levy

unread,
Apr 11, 2010, 8:31:31 PM4/11/10
to us...@tortoisesvn.tigris.org
On Sun, Apr 11, 2010 at 11:44, Felix Wiemuth <felixw...@hotmail.de> wrote:
> Add files to work copy - ignoring file types for versioning does not
> function
>
> Hello,
>
>
> I created a local repository for test issues.
> I checked out a work copy on a folder.
> Then I wanted to add files to this folder.
> So I copied them there (files and folders with further folders and files).
> Now I want to add these files for versioning, excluding files like *.obj,
> *.exe etc.
> So I went to the properties of the toppest folder in the work copy and added
> a "svn:ignore" item, with the following content:
>
> *.obj
> *.exe
>
> Then I selected "TortoiseSVN" -> "add" on the work copy folder.
> But in the window which appeared ALL files were shown...
> Why?? What did I do wrong?

Did you select Apply Recursively? Properties are not inherited from
parent directories.

> I noticed that they are only not shown if I select "ignore" -> "*.exe" on
> each file seperately.
> When I want to do this with files which are in a folder I added (e.g.
> "file.exe" in  "WORKCOPY/FOLDER/file.exe"),
> the "ignore"-option isnt even shown.

You can't ignore a file that's already known to Subversion.

> Another thing: Is it wrong to add files to a work copy by drag&drop?
> I read in the documentary to right-drag files, but when I tried to, the
> following error message occured:
> "Couldnt copy files. Access denied"

Do you have other programs (antivirus) running which might conflict
with file operations?

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2563592

To unsubscribe from this discussion, e-mail: [users-un...@tortoisesvn.tigris.org].

Bob Archer

unread,
Apr 12, 2010, 9:59:09 AM4/12/10
to us...@tortoisesvn.tigris.org
> Add files to work copy - ignoring file types for versioning does not
> function
>
> Hello,
>
>
> I created a local repository for test issues.
> I checked out a work copy on a folder.
> Then I wanted to add files to this folder.
> So I copied them there (files and folders with further folders and files).
> Now I want to add these files for versioning, excluding files like *.obj,
> *.exe etc.
> So I went to the properties of the toppest folder in the work copy and
> added a "svn:ignore" item, with the following content:
>
> *.obj
> *.exe
>
> Then I selected "TortoiseSVN" -> "add" on the work copy folder.
> But in the window which appeared ALL files were shown...
> Why?? What did I do wrong?

Where these files in subfolders or all in the top level folders. Properties are not recursive in svn... so an ignore on the root folder will not ignore files in subfolders.

What you can do is add all your folders. Then add the svn ignore and there is a check box to make it "recursive". Basically tsvn just adds the property to ever existing subfolder. Once you have done this run your add again and it should ignore the files.

Another option is to create global ignores. This will apply to ALL of your working copies on your machine.


> I noticed that they are only not shown if I select "ignore" -> "*.exe" on
> each file seperately.
> When I want to do this with files which are in a folder I added (e.g.
> "file.exe" in  "WORKCOPY/FOLDER/file.exe"),
> the "ignore"-option isnt even shown.
>
> Another thing: Is it wrong to add files to a work copy by drag&drop?
> I read in the documentary to right-drag files, but when I tried to, the
> following error message occured:
> "Couldnt copy files. Access denied"

Use right-drag when you are mvogin files within a working copy. If you just want to move files into a working copy, then regular drag-drop operations are fine.

BOb

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2572791

Felix

unread,
Apr 12, 2010, 10:37:55 AM4/12/10
to us...@tortoisesvn.tigris.org
Thanks for your answers.

@ Andy

> Did you select Apply Recursively? Properties are not inherited from
> parent directories.

Yes I did, but, how I now noticed, this only functions when the files
and folders are already controlled by svn!


> You can't ignore a file that's already known to Subversion.

The files are not under version control yet. I thought to ignore them
BEFORE adding all files, because I dont want these files to be
controlled.

@Bob

> Once you have done this run your add again and it should ignore the files.

If this would function, this would be a nice way to do it. But If try
"add" again on the toppest folder, the dialog box says that all files
are already under version control.

I dont want global ignores.

Doesnt every developer have binaries etc. that should not be
controlled? I have 5 folders to add to the workcopy, each including
some code-files to be versioned,
and also containing the folders "bin", "obj" and some ".save" files
etc. form the IDE which should not be included for version control.

I think there must be an easy way to solve this quite "normal"
problem...

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2573612

Bob Archer

unread,
Apr 12, 2010, 11:22:25 AM4/12/10
to us...@tortoisesvn.tigris.org
> Thanks for your answers.
>
> @ Andy
>
> > Did you select Apply Recursively? Properties are not inherited from
> > parent directories.
>
> Yes I did, but, how I now noticed, this only functions when the files
> and folders are already controlled by svn!

Correct. That's why I said add the folders first. Of course, in the commit dialog you can right click on any folders that you don't have the property on an add it.

> @Bob
>
> > Once you have done this run your add again and it should ignore the
> files.
>
> If this would function, this would be a nice way to do it. But If try
> "add" again on the toppest folder, the dialog box says that all files
> are already under version control.

Well sure. ADD only adds non-versioned files. But, you don't have to click on EVERY file. Just click on the folder that they are in and add the *.exe (or whatever) ignore.


> I dont want global ignores.
>
> Doesnt every developer have binaries etc. that should not be
> controlled? I have 5 folders to add to the workcopy, each including
> some code-files to be versioned,
> and also containing the folders "bin", "obj" and some ".save" files
> etc. form the IDE which should not be included for version control.


I guess so. In visual studio all these files are put into a obj and bin folder. I have just ignored those folders... which ignores all their contents.


> I think there must be an easy way to solve this quite "normal"
> problem...

As said above. The easy way is to add the property to the root folder of your WC and tell TSVN to apply it recursively. Or, just apply it to the folder where these files will occur.


BOb

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2574587

Felix

unread,
Apr 14, 2010, 11:00:05 AM4/14/10
to us...@tortoisesvn.tigris.org
Sorry, I dont seem to understand you correctly.

"The easy way is to add the property to the root folder of your WC and
tell TSVN to apply it recursively."

But thats exactly what I tried first (see above...): I added a
"svn:ignore *.exe" property to the "trunk" folder AND checked the
option "apply it recursively"! (But then the subfolders DONT have this
property because they are not controlled yet!!!)
So, then I selected "add" to put files under version control excluding
all "*.exe" in all subfolders. But ALL files were shown in the add
dialog! So nothhin was ignored.
If you mean to put all files under verison control FIRST, then I would
have to remove the *.exe-files afterwards, but I dont know how and I
think thats no good way.

I cant just select all these folders I want to ignore... because my
trunk folders has 5 more folders in it, each including obj and bin
folders AND other files to be excluded.
So I need folder AND file ignoring.

Felix

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2582386

Bob Archer

unread,
Apr 14, 2010, 11:45:17 AM4/14/10
to us...@tortoisesvn.tigris.org
> "The easy way is to add the property to the root folder of your WC and
> tell TSVN to apply it recursively."
>
> But thats exactly what I tried first (see above...): I added a
> "svn:ignore *.exe" property to the "trunk" folder AND checked the
> option "apply it recursively"! (But then the subfolders DONT have this
> property because they are not controlled yet!!!)

Add all your folders first. Then add the property. As you say, you can't add a property to unversioned folders.

What I usually do when adding a new project is to remove all the files that I don't want versioned... then add them all. After that is done you can add your ignores recursively.


> So, then I selected "add" to put files under version control excluding
> all "*.exe" in all subfolders. But ALL files were shown in the add
> dialog! So nothhin was ignored.
> If you mean to put all files under verison control FIRST, then I would
> have to remove the *.exe-files afterwards, but I dont know how and I
> think thats no good way.

Add the folders first as I said above.


> I cant just select all these folders I want to ignore... because my
> trunk folders has 5 more folders in it, each including obj and bin
> folders AND other files to be excluded.
> So I need folder AND file ignoring.
>
> Felix

You seem to be making this harder than it needs to be. Basic steps:

1. do an add from the route of your project folder.
2. Deselect the root folder which will deselect everything in it.
3. Select the folders you want included in svn
4. Do an add again5.
5. Right click on folders you want to exclude right click and choose "Add to ignore list". (the folder and all its contents will be removed.
6. Right click on a .exe in a folder you want in version control. Choose "Add to ignore list".. then choose *.exe... all of the .exe's in that folder will be removed from the list. Repeat as needed. Note... you should only need to right click on one file with the extension that you want to remove within each folder that you want included.

BOb

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2582431

Felix

unread,
Apr 14, 2010, 12:44:37 PM4/14/10
to us...@tortoisesvn.tigris.org
Hmm ok then there isnt a comfortable way ;)

"What I usually do when adding a new project is to remove all the
files that I don't want versioned... then add them all."

Ah, that´s better! The other way would at least require about 25 right
clicks.. that´s why I asked ;).

Andy Levy

unread,
Apr 14, 2010, 1:13:45 PM4/14/10
to us...@tortoisesvn.tigris.org
On Wed, Apr 14, 2010 at 12:44, Felix <FelixW...@hotmail.de> wrote:
> Hmm ok then there isnt a comfortable way ;)
>
> "What I usually do when adding a new project is to remove all the
> files that I don't want versioned... then add them all."

What about setting global-ignores in %appdata%\subversion\config ?

> Ah, that´s better! The other way would at least require about 25 right
> clicks.. that´s why I asked ;).
>
> ------------------------------------------------------
> http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2582512
>
> To unsubscribe from this discussion, e-mail: [users-un...@tortoisesvn.tigris.org].
>

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2582566

Reply all
Reply to author
Forward
0 new messages