tags:

views:

234

answers:

4

In CVS I could do the following

cvs -n update

And it would should me what would happen if I ran an update but without changing anything. I mainly use this to check if I am going to get a lot of conflicts.

In svn I would like to do the same but with the switch command

ie:

svn -n switch url1 url2

My understanding is that there is a --dry-run switch which goes through the motions but doesn't actually give any output. So it is half of the way there :)

How can I get it to do a dry run and show what the results would be (which files will be Modified, which Updated, Deleted, Added and Conflicting).

Thanks

Update: Regarding those who have suggested I use --dry-run I have tried the following

svn switch url --dry-run

and I get

Subcommand 'switch' doesn't accept option '--dry-run'

In theory it sounds good but it doesn't seem to work, am I doing something wrong?

A: 

The --verbose option might be what you're looking for

Steef
A: 

As far as I was aware, dry-run will show you what it will do, including what will be conflicted, etc.

http://svnbook.red-bean.com/en/1.4/svn.branchmerge.copychanges.html (search for "dry-run" on that page)

nickf
see my update regarding --dry-run
hhafez
+1  A: 

Use --dry-run

--dry-run
Goes through all the motions of running a command, but makes no actual changes—either on disk or in the repository.

From: Subversion Complete Reference

Well your question was (and still is so far)

How to make SVN perform a command without making changes

The answer is: Use --dry-run

The fact the --dry-run does not work with the switch command is tough luck, but @Don gave you a nice workaround

Use merge and --dry-run with the same URLs you will use for the switch. It should give you the information you are looking for even though you'll be using switch instead of merge in the end.

Of course you can also file a bug/enhancement report with subversion.

lothar
see my update regarding --dry-run
hhafez
@hhafez Please read the reference guide. --dry-run may not apply to all svn commands, but most (switch is obviously an exception)
lothar
+3  A: 

Use merge and --dry-run with the same URLs you will use for the switch. It should give you the information you are looking for even though you'll be using switch instead of merge in the end.

Don