Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subversion: How to preview a commit?

Tags:

svn

Is there a way to list all files that will be modified, added, and deleted in my local copy, so I can sanity check before commit?

like image 807
zer0stimulus Avatar asked Jan 23 '13 21:01

zer0stimulus


People also ask

How do I view changes in svn?

To get an overview of your changes, use the svn status command. You may use svn status more than any other Subversion command. If you run svn status at the top of your working copy with no arguments, it detects all file and tree changes you've made.

How can I see last commit in svn?

To find information about the history of a file or directory, use the svn log command. svn log will provide you with a record of who made changes to a file or directory, at what revision it changed, the time and date of that revision, and, if it was provided, the log message that accompanied the commit.

What is the use of svn commit command?

The svn commit command sends changes from your working copy to the respository. A log message (even if empty) must be provided. The message can be given on the command line, from a file, or an editor may be launched as the commit proceeds.


2 Answers

It is indeed a good practice before each commit.

On Windows, you should go with TortoiseSVN. Combined with compare tool (Beyond Compare, etc.) is your winner tool.

On Linux, you can use both

  • svn status (or shorthand svn st) to see modified / deleted / added files
  • and svn diff <file> to see changes. I use the following command to see differences in more nice form: svn diff <file> | vim -
like image 177
dimba Avatar answered Oct 17 '22 23:10

dimba


If you are using TortoiseSVN the best way to do this is right click on your local copy. Select "TortoiseSVN"--> "Check for modifications".

This will give you the list of what you need.

If not, as someone suggested, use svn status on the command line.

This is give you what you are looking for....

like image 21
Geddon Avatar answered Oct 17 '22 23:10

Geddon