简体   繁体   中英

svn - how to ignore directory

I got a versioned sub-directory filled up with many kinds of files and directories, *.c, *.h, *.a, *.so ..., etc. Besides, this stuff is partially modified every time once project is built, and very BIG such that when I commit from parent directory, this sub-directory slows down the progress very much.

The reason for svn being slow is obvious because svn need to parse into this sub-directory and list all of them in the commit dialog.

I need some way making svn ignore this sub-directory so that commit progress can speed up, and this way is limited only to local part, not server part (although I have never had to commit it, and might neither in the future, others do.)

Here is what I have done and went failed:

  • In commit dialog: right-click -> move to changelist -> ignore-on-commit.

    This method offers grouping feature, letting user to identify stuff more quickly, but no help on ignoring file/directory.

  • Right-click sub-directory -> TortoiseSVN -> Delete and add to ignore list.

    This method will delete sub-directory and this is not what I want.

  • Runtime Configuration Area - global-ignores option.

    Global-ignores subjects to extensions, and sub-directory contains *.c files as well. If I added *.c to global-ignores list, I will not able to commit *.c files in other directories!

EDIT: svn version is 1.6.17

Storing generated binaries in version control is normally discouraged, even when done right. My suggestion would be to completely remove every generated folder output from the repository and them add it to the parent folder's svn:ignore property so it's a fully local directory. Then, find a completely different mechanism to distribute binary releases; if it needs to be done within subversions, it'd suggest a new hierarchy in the repository, eg /branches/releases .

If fixing broken procedures is prohibited or discouraged (in my experience, "we've always done things this way" is law in many organisations), you can try doing a sparse checkout that doesn't include those folders or (if that doesn't work) configure your local build to generate its output elsewhere; at most, that'd mean dealing with a single file in the ignore-on-commit changelist.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM