Subclipse svn:ignore

后端 未结 12 2066
慢半拍i
慢半拍i 2020-11-29 15:43

I\'m new to Eclipse. I\'m using subclipse for connecting to my SVN. There are some folders and files I would like to add to svn:ignore, but it\'s grayed out. Is there an e

相关标签:
12条回答
  • 2020-11-29 16:12

    What worked for me was following : (eclipse 3.3.6 Subclipse 2.4)

    • set svn:ignore property via tortoise : ( .settings .classpath .project target .apt_src one item at one line)
    • deleted the project from the eclipse
    • fresh checkout from the svn
    • import the project in eclipse (simple reimporting the project in eclipse did not worked for me)
    0 讨论(0)
  • 2020-11-29 16:13

    I just figured out how to do this:

    It appears that when you add a parent folder to version control, Eclipse adds all sub-folders. Once the sub-folders are added to version control, it is not possible to ignore them.

    Here's how to do it:

    Right click on the top level folder and add to version control Right click on the child folder you want to ignore, revert Right click on the child folder you want to ignore, svn:ignore (which will now be available)

    0 讨论(0)
  • 2020-11-29 16:15

    This is quite frustrating, but it's a containment issue (the .svn folders keep track also of ignored files). Any item that needs to be ignored is to be added to the ignore list of the immediate parent folder.

    So, I had a new sub-folder with a new file in it and wanted to ignore that file but I couldn't do it because the option was grayed out. I solved it by committing the new folder first, which I wanted to (it was a cache folder), and then adding that file to the ignore list (of the newly added folder ;-), having the chance to add a pattern instead of a single file.

    0 讨论(0)
  • 2020-11-29 16:16

    You can't svn:ignore a file that is already commited to repository.

    So you must:

    1. Delete the file from the repository.
    2. Update your project (the working copy) to the head revision.
    3. Recreate the file in Eclipse.
    4. Set svn:ignore on the file via Team->Add to svn:ignore.
    5. Restart eclipse to reflect changes.

    Good luck!

    0 讨论(0)
  • 2020-11-29 16:16

    If you are trying to share a project in SVN with Eclipse for the first time, you might want to avoid certain files to be commited. In order to do so, go to Preferences->Team->Ignored Resources. In this screen you just need to add a pattern to ignore the kind of files you don't want to commit.

    Eclipse preferences

    0 讨论(0)
  • 2020-11-29 16:16

    This is just a WAG as I am not a Subclipse user, but have you ensured that the folders containing what you're trying to ignore have themselves been added to SVN? You can't svn:ignore something inside a folder that's not under version control.

    0 讨论(0)
提交回复
热议问题