List svn diffs for all files in specific revison - bash

There is a command for listing all files in a certain revision:
svn log --summarize -r119977:r119978
M /tradefed/DeathStarService/trunk/CMakeLists.txt
M /tradefed/DeathStarService/trunk/build.sh
...
There is a command for seeing difference for a file in a certain revision:
svn diff trunk/build.sh -r119977:r119978
Is there a command-line to see differences in all files in a certain revision?

Just omit the file specification from the diff command.
svn diff -r119977:r119978

Related

List of all files in a commit for every commit

I'd like to know the name and status of every file in every commit, if the same file is modified twice then it should appear twice in the list.
The following command only prints each file once.
git diff --name-status <START> <END>
You'd have to output info on a series of commits here, not on a diff, so your diff command seems not to be the best tool.
I'll suggest the following (feel free to adapt the format, or even use --pretty=format:"" to just output files lists (one per commit)
git log --name-status --pretty=format:"%h %s" <start>^..<end>

Comparing two files from two revisions in git diff in git bash for windows?

So I'm running:
git diff <rev-hash-1> <rev-hash-2> -- ./proj/MAP.csv
and all I get is blank output.
Per the documentation I'm using the following command format:
git diff [<options>] <commit> <commit> [--] [<path>…​]
the directory above ./proj is the root of the local repo where .git lives.
I've also tried the same command with the following paths, but it still comes back blank:
.\proj\MAP.csv
.\proj\MAP.csv .\proj\MAP.csv
./proj/MAP.csv ./proj/MAP.csv
./proj/MAP.csv
proj/MAP.csv
proj/MAP.csvproj/MAP.csv``
Is there anything else you need to make this work in the following version of git bash for Windows?
$ git --version
git version 2.19.0.windows.1

How to svn diff two files in different branch and from two specific revison?

I can use this get the diff between a specific revision number and latest version for a certain file
svn diff -r<revision number> --diff-cmd='meld' <svn_url>
But if I have two files, in two different branch, then I want to diff them from two specific revisions. How do I do that without checking out files?
Thanks!
usage :
svn diff --diff-cmd meld OLD-URL[#OLDREV] NEW-URL[#NEWREV]
reference :
svn help diff, 4-th form:
example :
svn diff --diff-cmd meld http://server/project/branches/branch1/file1#15 http://server/project/branches/branch2/file1#27

SVN export files changed since date or revision (Windows svn.exe)

I have a repository of sql scripts, some of which change for each of our monthly releases (different scripts change each month).
I am trying to automate the compilation of deployment packages and want to be able to export all the scripts which have changed since the last release, which has a known date and known revision.
SVN Branches are per release, SVN Tags are per build.
I have googled and know that svn diff --summarize -r {2012-05-01} svn://server/path/to/ > files.txt gives me a list of all the changes but how do I then use that list to export only those files using Windows CMD - all the examples I have found are for Linux and use Linux commands.
Is there any other direct way of doing this in SVN? (using SVN Export?)
Use revision number as start revision, not date: it's more bullet-proof
Use revision range, even if end revision is HEAD: it's more bullet-proof
You can have Bash even on Windows, and use Bash-scripts
You can install Ruby and use Ruby script (or compile Ruby to exe)
At last
You can install TortoiseSVN and prepare tree in GUI by hand
or
Write own parser of diff output (PoserShell will do it)
>svn diff --summarize -r 26:34 http://mayorat.ursinecorner.ru:8088/svn/Hello/trunk/
A http://mayorat.ursinecorner.ru:8088/svn/Hello/trunk/Dr%C3%A6p%C3%A6r.ma%C3%BEar.sv%C3%A6nskan.man.eller.smalensk%C3%A6n.txt
M http://mayorat.ursinecorner.ru:8088/svn/Hello/trunk/Hello.en.txt
M http://mayorat.ursinecorner.ru:8088/svn/Hello/trunk/Hello.fr.txt
M http://mayorat.ursinecorner.ru:8088/svn/Hello/trunk/Hello.de.txt
M http://mayorat.ursinecorner.ru:8088/svn/Hello/trunk
(copy all files, which have A|M in fist char of line, or pre-grep all strings, which have trailing slash after path-base /filter last string in my example/)

extract all files changed in a git commit

I need to make a patch for someone (they are not using git) - a zip of the files changed by a commit.
I thought something like
git archive --format=zip commitguid > myfiles.zip
but this extracts the entire thing, not just the changed files. Is there any way to do this?
And to make it more complicated - is there any way of doing this with multiple commits (yes I should have branched before making the changes but that's hindsight)
EDIT
Based on #Amber solution below I can do this in 2 steps in Git Bash for windows with 7Zip installed in c:\data\progs.
git diff --name-only a-sha b-sha > tmp.txt
/C/data/progs/7za.exe a myzip.zip #tmp.txt
git diff --name-only <oldsha> <newsha> | zip dest.zip -#
filling in the proper SHAs/refs. For instance, to create a zip of only the files that changed between the master and feature branches:
git diff --name-only master feature | zip dest.zip -#
See also git help format-patch. It produces a diff patch of all changes in a commit along with commit author, date, message, and some nice diff stats. You could zip and send that.
I found this solution to the question (on github-gist, from user rmkpatchaa).
It doesn't require any external tools and is a one line command in a windows Git Bash window:
git archive --output=changes.zip HEAD $(git diff --name-only SHA1 SHA2 --diff-filter=ACMRTUXB)
It creates a standard zip archive with only the files changed between the two commits, no extra git stuff or anything, and doesn't require any extra tool on the receiving side.

Resources