Log In | Users | Register

Subversion: Frequently asked questions and answers

Q: The tkdiff file command can't deal with the newest version of Subversion. It claims that " file is not part of a revision control system"

A: The TkDiff? versions currently installed at CSCS do not work with Subversion version 1.7 and above. Use the following command instead:

svn diff --diff-cmd tkdiff file

Q: How do I activate keyword substitution?

A: To activate the substitution of the keywords "Revision" and "Id" (others available are "Date", "Author", "HeadURL"), run the following command:

svn propset svn:keywords "Revision Id" file

Q: Subversion imports my bash script (or some other file) as binary although it is really a text file. As a consequence, I cannot make any diffs. How can I change this?

A: Subversion is set up to automatically set the mime type if it (thinks it) recognizes a file type. If a mime-type property is set and does not start with "text/", Subersion assumes the file to be binary and refuses line-based diffs. Therefore the solution is to remove the property with the command:

svn propdel svn:mime-type file

Q: How can I undo a commit?

A: There is no undo command. The simplest way to "undo" a commit is to reverse-merge the change and to commit the result. Let's assume you want to undo the commit that produced revision 303. To apply the change reversely, use the revision number with a minus sign in the -c option:

svn merge -c -303 repository-path

Check the result with svn status, svn diff as needed, then commit the result:

svn commit -m "Undoing change committed in r303."

Q: (the above are my own questions, please add here any frequent problem you might come across together with the answer) spacer

This site is managed by the Center for Climate Systems Modeling (C2SM).
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems? Send feedback!