Pages

Showing posts with label SVN. Show all posts
Showing posts with label SVN. Show all posts

Thursday, January 9, 2014

How to add a file in local file system to SVN repository?

Assume you have folder named "foldername" in your local file system and you need add that folder with its content to SVN repository.

Following operation is a client side operation and it won't have any impact on the server:
svn add foldername

Once you commit files using following command, files, folders within the given folder will be added to the repository:
svn commit foldername

You can do both of the above given commands in one step using "svn import" as well.

Additional notes:

if you want to get rid of commit message in svn.commit.tmp, use the following command:
svn commit Sensefy -F svn-commit.tmp

If you get the following error:
svn: Commit failed (details follow):
svn: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the --message (-m) or --file (-F) options
svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no 'editor-cmd' run-time configuration option was found

use following command to set vi editor as default editor.
export SVN_EDITOR=vim

Friday, November 8, 2013

Create a patch using SVN for newly added file

I submitted my first svn patch as a contributor to Apache. :) Here's how I did that.

Go to the correct directory where you have done the changes.

Add the file to the repository:
svn add {filename} 
     E.g., svn add file1.java

First check the differences:
svn diff

Create the patch file:
svn diff > {patch name}.patch
     E.g., svn diff > patchforissue01.patch