How do I list the file names/paths that are committed, using a revision number?
Asked
Active
Viewed 1.5e+01k times
170
-
Are you talking about the person doing the commit? – lockdown Jun 09 '11 at 16:43
-
1doing a svn log | grep 'username', lists all my check-ins, I want to see the file names along with the revisions. – Satish Jun 09 '11 at 16:45
4 Answers
261
svn log --verbose -r 42

phihag
- 278,196
- 72
- 453
- 469
-
2This lists files for that particular revision, adding username instead of revision lists all files and revisions for the user svn log --verbose --username 'username' – Satish Jun 09 '11 at 16:58
-
8"adding username instead of revision lists all files and revisions for the user" No, it doesn't. The `--username` option is for authentication, not to filter the listed revisions. – slowdog Jun 09 '11 at 17:54
49
To just get the list of the changed files with the paths, use
svn diff --summarize -r<rev-of-commit>:<rev-of-commit - 1>
For example:
svn diff --summarize -r42:41
should result in something like
M path/to/modifiedfile
A path/to/newfile

trapicki
- 1,881
- 1
- 18
- 24
-
-
This answer is preferable in that it only prints one line per file, and the paths are relative to the point of command execution; whereas svn log prints header lines and footer lines and the paths are relative to the root of the repository. – Jeff Oct 27 '16 at 05:17
3
From remote repo:
svn log -v -r 42 --stop-on-copy --non-interactive --no-auth-cache --username USERNAME --password PASSWORD http://repourl/projectname/

ZiTAL
- 3,466
- 8
- 35
- 50
0
A nice short hand for previous version is the -c option .. e.g -c r42 means the changes in revision 42 (saves on having to work out the 41 for 42...)
So say you want to find say the files involved in the last 100 commits by a particular user - foo - you could use this to list them -
svn log . | grep '| foo |' | head -100 | cut -d '|' -f 1 | while read rev;
do echo $rev; svn diff --summarize -c $rev . ; done
Giving a result like this -
r77504
M PathA/Data.xml
r77103
M PathB/SubPathB/Home.xml
M PathB/SubPathC/YaDa.xml
r76498
M PathA/Data.xml

Mr R
- 754
- 7
- 19