SVN - Deleted lines of code - tortoisesvn

How to find the deleted lines of code between two date range in SVN. I am using Tortoise SVN.

You can use the diff command to do so and grep in the output the "-" sign which is indicating a line has been deleted.
svn diff -rRange URL1 URL2

You want to "diff" between two files.
To find the dates, you can look at the revision logs.

Related

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 can I open for edit 10k perforce files using list of files as parameter?

I have 10k perforce files mentioned in my file.txt.
I need to open them using p4 edit command.
I expect some command like "p4 edit ?????file.txt". Can you help me to check these files out?
You can use the -x flag on p4. This is assuming a UNIX shell.
cat file.txt | p4 -x - edit
I assume you have some copy of directories structure where you have changes, and now you need to add those files to a change list. Which is impossible to do without checking them out. Am I right?
If I needed to change that much amount of files, I would do like this:
Copy all files I wanted to check in replacing read-only files (Wondows Explorer can do that)
In P4V go to a directory you need to check out files in, and then call "Reconcile offline work".
In appeared dialog choose all files.
Get new changelist with changed files being checked out.
I used this solution a couple of times - it works for added, changed and deleted files.
Just use below command to edit all files present in file.txt
p4 -x file.txt edit

How to get diff between all files inside 2 folders that are on the web?

So I want to compare this folder http://cloudobserver.googlecode.com/svn/branches/v0.4/Boost.Extension.Tutorial/libs/boost/extension/ with this http://svn.boost.org/svn/boost/sandbox/boost/extension/. I want to get a diff file as a result. These folders are under svn control but I'd prefer git styled diff file (like one shown here) I tried git diff but it seems not to work that way for web folders. So how to do the same thing with one command on Linux?
Update:
So we had a great answer. But it works strangely - it seems to me it shows that all files (same files) have all theire contents replaced with very same contents (while I know for sure that there were only like 3-4 code lines changed at all)...
Update 2:
To achieve what I really needed (dif file with only really changed lines, with git styling, on Linux) do:
$ svn export http://cloudobserver.googlecode.com/svn/branches/v0.4/Boost.Extension.Tutorial/libs/boost/extension/ repos2 --native-eol CRLF
$ svn export http://svn.boost.org/svn/boost/sandbox/boost/extension/ repos --native-eol CRLF
$ git diff repos repos2 > fileWithReadableDiff.diff
Once you have the source trees, e.g.
diff -ENwbur repos1/ repos2/
Even better
diff -ENwbur repos1/ repos2/ | kompare -o -
and have a crack at it in a good gui tool :)
-Ewb ignore the bulk of whitespace changes
-N detect new files
-u unified
-r recurse
You urls are not in the same repository, so you can't do it with the svn diff command.
svn: 'http://svn.boost.org/svn/boost/sandbox/boost/extension' isn't in the same repository as 'http://cloudobserver.googlecode.com/svn'
Another way you could do it, is export each repos using svn export, and then use the diff command to compare the 2 directories you exported.
// Export repositories
svn export http://svn.boost.org/svn/boost/sandbox/boost/extension/ repos1
svn export http://cloudobserver.googlecode.com/svn/branches/v0.4/Boost.Extension.Tutorial/libs/boost/extension/ repos2
// Compare exported directories
diff repos1 repos2 > file.diff

svn export changes and save locally

What's the best way to export changes between 2 SVN revisions and save the changes (files/folders) locally?
Possibly through the command-line?
Thanks
How about this
svn checkout -r {2006-02-17}
http://svnbook.red-bean.com/en/1.4/svn.tour.revs.specifiers.html
esssentially you would "checkout" two folders based on dates.
EDIT: A simple folder compare at that point would give you what files changed, and what changed in the files.
EDIT2: Perhaps something along the lines of :
svn diff -r BASE:HEAD foo.c
or
svn diff -r HEAD
Not sure if you can do something like
svn diff -r BASE:HEAD
where you can update base to a number and head to a number.
My suspicion is that since this works:
svn diff -r BASE:14 foo.c
you should be able to replace base and head with numbers and just compare all the files.
I'm really not sure though.

SVN Command Clean List of Files Changed Between Branches

I'm trying to find the proper command in subversion to see a list of all the files that have changed (don't need to see the changes really) between branch/tag A and branch/tag B, etc.
How about svn diff --summarize <A> <B>
You may also use svn diff --help to get more options
and svn status --help to get explanations on all possible modification description letters ('A', 'M' etc.)
SVN DIFF is what you are looking for. Should be able to specify the urls to the different branches
svn diff http://domain.com/tags/A http://domain.com/tags/B

Resources