Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make SVN perform a command without making changes

Tags:

svn

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?

like image 495
hhafez Avatar asked Jun 02 '09 22:06

hhafez


People also ask

Which command in svn is used to ensure that no multiple people are editing same file at a given time?

To prevent other people from committing changes to the file while he is modifying it (as well as alerting them that he is about to change it), he locks the file in the repository using the svn lock command. The preceding example demonstrates a number of new things.

Which command is used to retrieve all the changes from the svn repository but without applying them to your local branch?

The svn shelve command stores your changes without submitting them.

Where are svn commands executed?

svn.exe. If you want to run Subversion commands from the command prompt, you should run the svn.exe command line client.

What is svn commit?

svn commit will send any lock tokens that it finds and will release locks on all PATH s committed (recursively) unless --no-unlock is passed. Tip. If you begin a commit and Subversion launches your editor to compose the commit message, you can still abort without committing your changes.


2 Answers

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.

like image 59
Don Avatar answered Oct 22 '22 08:10

Don


On svn update, you can use svn status --show-updates to show all items you will update.

For merges, you can use --dry-run any problems.

like image 38
Gustavo Coelho Avatar answered Oct 22 '22 09:10

Gustavo Coelho