Tortoise SVN commit query - tortoisesvn

I am new to tortoise SVN and I did SVN commit for multiple files related to each other seperately. This has created a separate revision number for each file. How can I correct this? Ideally I would want all the files to have same revision number.
Appreciate any help..

Use re-basing.
Move your original branch first:
AT_root=/Abhishek_Tiwaris_repository_root
svn mv $AT_root/Abhishek_Tiwaris_branch $AT_root/Abhishek_Tiwaris_branch-old
svn copy $AT_root/trunk $AT_root/Abhishek_Tiwaris_branch
svn up
Rebase merge.
svn merge $AT_root/Abhishek_Tiwaris_branch-old
svn commit
Remove the old branch
svn delete $AT_root/Abhishek_Tiwaris_branch-old
Check the log
svn log -vg --stop-on-copy

Related

how to generate a patch which is a totally new file?

When using git, I have a totally new file.
git diff
will show nothing.
I need to generate the diff content for other people.
ex:
git diff > 001.patch
How to let the 001.patch contains the new file's content?
A totally new file isn't tracked, and therefore wouldn't be shown by git diff. I'd stage it by using git add ./path/to/my/new/file.txt, along with git adding any other changes you may have, and then use git diff --cached.
git diff --no-index /dev/null /path/to/your/file.txt >001.patch After applying the patch they'll have an unstaged new file though.

How to ignore .*o*.cmd on a local linux repository?

I would like to ignore all files like .sddr09.o.cmd or .karma.o.cmd etc onto a kernel svn repository.
I try somme commands like :
svn propset svn:ignore '*.cmd' . --recursive
or
svn propset svn:ignore '*.o.cmd' . --recursive
or
svn propset svn:ignore '.*.o.cmd' . --recursive
but no one success to prevent from commit these files.
So I try to use the dontdiff file located in linux/Documentation/dontdiff appending
*.cmd
*.o.cmd
.*.o.cmd
at the end of the file
and I use the following command line :
svn propset svn:ignore -R -F Documentation/dontdiff .
but no more success.
Any Idea ?
You mention in the comments that you've already added these files, so the first step is to undo that. Presumably you used svn add to add the files, so you'll need to use the inverse of that: svn delete.
svn delete --keep-local path/to/file
The --keep-local will tell SVN not to undo any modifications you've made. If you do want to reset the files to their original state (or delete them if they didn't exist before), you can omit the option.
You can confirm this with svn status. The files in question should not have anything in the first column.
After that, you should be able to run the svn ignore commands that you included in your question.

Calling svn diff on some revision and previous revision, with no local copy

I have no local copies of any files from the SVN repository. I do have a full path URL to some file in SVN. How can I see the difference between revision 1234 of that file, and it's previous revision, whatever it may be?
svn diff -c 1234 $URL
Assuming you are using a version of Subversion newer than 1.4 when -c was added. Otherwise you need to do:
svn diff -r 1233:1234 $URL
If you want to see a diff including changes across multiple revisions you can just expand the revision numbers you provide to -r.
You can see detailed documentation of the diff subcommand in the SVN Book.

How do I revert back to a previous SVN commit?

Suppose I'm at revision 50.
But, I want to revert back to revision 45, and commit back as the stable version.
How do I do that, in the most simple way?
What if I want to do that with one file?
What if I want to do that with the entire repository?
I'm not sure what you mean by "commit back as the stable version", but depending on what you're trying to accomplish I recommend:
svn update -r45
This will rebase your working copy at revision 45.
or:
svn merge -c -50,-49,-48,-47,-46
This will update (by reverse-merging) your working copy by removing all the changes between 45 and 50. Now if you make changes and commit, it will be like you have removed 46-50 from the repository and made the HEAD revision (51?) to be r45 + your change.
Reverse merge those revisions that you want to undo. This can be done on one or multiple files. By reverse merging, your working copy gets changed to the state without that revision, which you then can commit.
You can simply do an update to revision using
svn up -r 45
But this will not let you commit the changes as SVN needs you to update your working copy to HEAD before you can commit. What you can do instead is
svn merge -r HEAD:45 yourFile
svn ci yourFile -m "Reverting back to rev 45"
I think one simple way should be this:
checkout revision 45 to a temporary directory
copy one or alle files to your working directory
commit

I SVN updated, but I realize I messed up

How do I rollback to a previous revision? So that my files are back to revision 400?
How about:
svn merge -r [current_version]:[previous_version] [repository_url]
svn commit -m “Reverting previous commit and going back to revision [previous_version].”
taken from http://mybravenewworld.wordpress.com/2007/11/13/subversion-how-to-revert-a-bad-commit/
svn update -r 400
Run the following command:
svn -r rev-no up file-name

Resources