svn ignore file-content seemed to be ignored :

clock icon

asked 7 months ago

message

1 Answers

eye

15 Views

I'm administaring three SLES-servers with a vufind-project that had been running under svn. The servers are: a catalog-web-server, an index-server and a test-server.

Last week vufind-project on the catalog- and index-server were upgraded to a new development-level by copying-over of the complete vufind-folder from the test-server and doing some server-specific configuration-changes afterwards. Sadly, this was done outside of svn, resulting in a less than happy svn-database on the catalog- and index-server...

Thus far, I've done these steps to get a working svn-environment based on the current vufind-project-folders of the catalog- and index-server up and running: - deleted the old repository - created a new repository with the same name as the old (so that we can still use all configurations we've set up for using Tortoise-SVN via PCs later when everything is working again) - imported the complete current folder (/usr/local/vufind) into the repository - checked out a new working copy into a different directory (/_kate/local/vufind)

It seems that the new working copy doesn't suffer from any of the problems that the original current folder has (like revision numbers that were way too high etc.), but now I've got all files and folders of the vufind-project revisioned, so I really need to unrevision a lot of them.

Following the advice I found here

http://superchlorine.com/2013/08/getting-svn-to-ignore-files-and-directories/

I made my own ignore-file called _svn-ing which looks like this

cache
compile
covers
index
logs
spellShingle
spellchecker
*.log
*.mrc
*.tmp
customRules.bin
java_fixes.csh
man_import.sh

and called it up from the /_kate/local/vufind-folder with this command-line:

svn propset svn:ignore --recursive --file _svn-ign . > svn-ignore-ausgabe.txt 2>&

Contrary to my expectations not only the files and folders listed in the files got property 'svn:ignore' set on but every file and folder in the vufind-folder.

If it were helpful I could post the content of the file svn-ignore-ausgabe.txt but I didn't want to put 291 lines without asking first. But perhaps someone here has an idea already were my error lies.

Thanks Kate

1 Answers

It not clear what was the first step which 'broke' the working copy you have, however I guess that you should use vendor branching strategy to avoid such issues in future. (I may be wrong here because I don't understand those steps that you describe as "resulting in a less than happy svn-database").

As of svn:ignore property, it affects unversioned items in your working copy only:

Subversion's support for ignorable file patterns extends only to the one-time process of adding unversioned files and directories to version control. Once an object is under Subversion's control, the ignore pattern mechanisms no longer apply to it. In other words, don't expect Subversion to avoid committing changes you've made to a versioned file simply because that file's name matches an ignore pattern—Subversion always notices all of its versioned objects.

You have to set svn:ignore or svn:global-ignores (requires SVN 1.8+ client) before you add your project's items to Subversion repository. I.e. the workflow should be as follows:

  1. svn checkout a working copy of a repository path where you plan to put your project's items,
  2. In the working copy, run svn propset svn:ignore --recursive --file _svn-ign . > svn-ignore-ausgabe.txt 2>&,
  3. Use svn add to your project's items to version-control. You'll notice that items that match the ignore pattern from svn:ignore are not added.
  4. svn commit new revision to the repository.

Read SVNBook!

Write your answer for this question.

Top Questions