Version Control with Subversion: Tortoise SVN – III

Hello All, I am here again with some more SVN commands which you may like or which may help you, while using SVN for any app :).

This is the continuous part of Version Control with Subversion and the previous two are listed below.

1 – Version Control with Subversion: Tortoise SVN
2 – Version Control with Subversion: Tortoise SVN – II

This time, we will check some more SVN useful commands, and let’s jump into the SVN sea, without wasting our time :-D.

svn diff <Old File Path> <New File Path>

This plays a big role in SVN commands and while managing the code. This command helps to display the differences between two revisions or paths, so that developers can check what has been changed by any other developer or by herself/himself with effect to different dates.

Options
1. -r [--revision] ARG -> ARG (some commands also take ARG1:ARG2 range), a revision argument can be NUMBER(revision number), DATE(revision at start of the date), HEAD(latest in repository), BASE(base rev of item’s working copy), COMMITTED(last commit at or before BASE), PREV(revision just before COMMITTED)
2. -c [--change] ARG -> The change made by revision ARG (like -r ARG-1:ARG). If ARG is negative this is like -r ARG:ARG-1
3. --old ARG -> Use ARG as the older target
4. --new ARG -> Use ARG as the newer target
5. --depth ARG -> Limit operation by depth ARG (’empty’, ‘files’, ‘immediates’, or ‘infinity’)
6. --diff-cmd ARG -> Use ARG as diff command
7. --internal-diff -> Override diff-cmd specified in config file
8. -x [--extensions] ARG -> Default: ‘-u’. -u (–unified), -b (–ignore-space-change), -w (–ignore-all-space), –ignore-eol-style(Ignore changes in EOL style), -p (–show-c-function).
9. --no-diff-deleted -> Do not print differences for deleted files
10. --show-copies-as-adds -> Don’t diff copied or moved files with their source
11. --notice-ancestry -> Notice ancestry when calculating differences
12. --summarize -> Show a summary of the results
13. --changelist [--cl] ARG -> Operate only on members of changelist ARG
14. --force -> Force operation to run
15. --xml -> Output in XML
16. --git -> Use git’s extended diff format

svn revert <File Name>

As the name implies, it reverts/undo all the local changes or it also used to resolve any file in conflicted state.

Options
1. --targets ARG -> Pass contents of file ARG as additional args
2. -R [--recursive] -> Descend recursively, same as –depth=infinity
3. --depth ARG -> Limit operation by depth ARG (’empty’, ‘files’, ‘immediates’, or ‘infinity’)
4. -q [--quiet] -> Print nothing, or only summary information
5. --changelist [--cl] ARG -> Operate only on members of changelist ARG

svn resolve <File Path>

This command is helpful to resolve conflicts on the files or directories.

Options
1. --targets ARG -> Pass contents of file ARG as additional args
2. -R [--recursive] -> Descend recursively, same as –depth=infinity
3. --depth ARG -> Limit operation by depth ARG (’empty’, ‘files’, ‘immediates’, or ‘infinity’)
4. -q [--quiet] -> Print nothing, or only summary information
5. --accept ARG -> Specify automatic conflict resolution source (‘base’, ‘working’, ‘mine-conflict’, ‘theirs-conflict’, ‘mine-full’, ‘theirs-full’)

svn cleanup <File Path>

This command is required to cleanup the working copy recursively. Mainly, it is needed when the working copy has been locked, while any issues/conflicts.

Options
1. --diff3-cmd ARG -> Use ARG as merge command

svn merge <Source File Path> <Target File Path>

This command is used to merge the differences between source files to a working copy path. If anyone will not provide target file path, then the changes will be applied to the current working directory.

Options
1. -r [--revision] ARG -> ARG (some commands also take ARG1:ARG2 range), a revision argument can be NUMBER(revision number), DATE(revision at start of the date), HEAD(latest in repository), BASE(base rev of item’s working copy), COMMITTED(last commit at or before BASE), PREV(revision just before COMMITTED)
2. -c [--change] ARG -> The change made by revision ARG (like -r ARG-1:ARG). If ARG is negative this is like -r ARG:ARG-1
3. --depth ARG -> Limit operation by depth ARG (’empty’, ‘files’, ‘immediates’, or ‘infinity’)
4. -q [--quiet] -> Print nothing, or only summary information
5. --force -> Force operation to run
6. --dry-run -> Try operation but make no changes
7. --diff3-cmd ARG -> Use ARG as merge command
8. --record-only -> Merge only mergeinfo differences
9. -x [--extensions] ARG -> When Subversion is invoking an external diff program, ARG is simply passed along to the program. But when Subversion is using its default internal diff implementation, or when Subversion is displaying blame annotations, ARG could be -u (–unified), -b (–ignore-space-change), -w (–ignore-all-space), –ignore-eol-style, -p (–show-c-function).
10. --ignore-ancestry -> Ignore ancestry when calculating merges
11. --accept ARG -> Specify automatic conflict resolution action (‘postpone(p)’, ‘working’, ‘base’, ‘mine-conflict(mc)’, ‘theirs-conflict(tc)’, ‘mine-full(mf)’, ‘theirs-full(tf)’, ‘edit(e)’, ‘launch(l)’)
12. --reintegrate -> Merge a branch back into its parent branch
13. --allow-mixed-revisions -> Allow merge into mixed-revision working copy. Use of this option is not recommended! Please run ‘svn update’ instead.

Ohh!! that’s a lot guys 🙂 … We went through almost all the basic commands, that could be required, on SVN usage. We listed all the options for each command, which could be possible with the main command.

In my next blog, we will go through the process of creating project, managing the project with the commands, we already went through. So, STAY TUNED for my next blog, that will cover some more commands. Hope you will like this blog.

Thanks 🙂 and will be happy to listen from you 🙂 :).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s