Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Hey, imagine a plain webapp with a log4j.properties which is under version control. I can't add it to svn:ignore because its a mandatory file. If i make custom changes for development and i don't want to commit them, i have to watch out for accidently commits. For one file it's easy to handle, with 3 or more files it becomes creepy.

Is there a way to disable these files temporary from svn commit? So its easiert to commit? I'm working with svn and subclipse.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
795 views
Welcome To Ask or Share your Answers For Others

1 Answer

The typical way to handle situations like this is to do the following:

  1. Make a copy of the file, under a name that indicates that it is a template
  2. Commit the template to your repository
  3. Ignore the original file

This way, you will have a fresh copy lying around, and during deployment you can copy the file back from the template to the real file.

This way you don't risk committing bad changes to this file, and at least for other version control system, you don't risk someone checking the file out and forgetting the lock.

There is no way in Subversion to indicate that a file is only-commit-first-time type of thing, so when you added it to your repository, you told Subversion to keep a track of changes in that file. Unless you manually make sure (or write a tool, or change your tools) to never commit changes to this file, Subversion will not help you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...