svn log $url -r $revision -v | egrep " [RAMD] \/" | sed s/^.....//

output list of modifications for an svn revision

url can be a working copy or url to a svn repository, revision is any valid revision number for that branch.
Sample Output
/path/to/file.txt
/path/to/another/file.txt

4
By: nitehawk
2009-04-27 19:50:06

These Might Interest You

  • This is the simple revision number on stdout, that can be fed to any useful/fun script of yours. Setting LC_ALL is useful if you use another locale, in which case "Revision" is translated and cannot be found. I use this with doxygen to insert my source files revisions into the doc. An example in Doxyfile: FILE_VERSION_FILTER = "function svn_filter { LC_ALL=C svn info $1 | grep Revision | awk '{print $2}'; }; svn_filter" Share your ideas about what to do with the revision number ! Show Sample Output


    -2
    LC_ALL=C svn info | grep Revision | awk '{print $2}'
    chickenkiller · 2009-02-16 14:53:52 1
  • Git uses secure hash sums for its revision numbers. I'm sure this is fine and dandy for ultra-secure computing, but it's less than optimal for humans. Thus, this will give you sequential revision numbers in Git all the way from the first commit.


    -1
    git rev-list --reverse HEAD | awk "/$(git log -n 1 --pretty="format:%h")/ {print NR}"
    atoponce · 2011-11-15 21:49:32 0
  • M - current revision, N - older revision


    1
    svn diff -r M:N file.php | patch -p0
    ruslan · 2011-03-29 04:15:02 2
  • Advanced revision to the command 8776 . This revision follows symbolic links. The quotation-marks surrounding $(which $1) allows for graceful handling of errors ( ie. readlink does not complain incase 'which' command generates (null) output) Show Sample Output


    1
    whichpkg () { dpkg -S $1 | egrep -w $(readlink -f "$(which $1)")$; }
    b_t · 2011-07-17 13:39:56 0
  • Print a git log (in reverse order) giving a reference relative to HEAD. HEAD (the current revision) can also be referred to as HEAD~0 The previous revision is HEAD~1 then HEAD~2 etc. . Add line numbers to the git output, starting at zero: ... | nl -v0 | ... . Insert the string 'HEAD~' before the number using sed: ... | sed 's/^ \+/&HEAD~/' . Thanks to bartonski for the idea :-) Show Sample Output


    1
    git log --oneline | nl -v0 | sed 's/^ \+/&HEAD~/'
    flatcap · 2015-11-23 21:35:57 0
  • Get the list of changed files between revision 43 and HEAD revision: svn diff . -r43:HEAD --summarize Strip extra 8 characters from every line: cut -c9-99999 Copy the listed files to home/me/destination: cpio -pvdmu ~/destination Make a plain copy (-p), list files being copied (-v), create needed directories (-d), preserve modification time (-m), overwrite unconditionally (-u) Show Sample Output


    0
    svn diff . -r43:HEAD --summarize | cut -c9-99999 | cpio -pvdmu ~/destination
    Sebasg · 2012-12-26 05:02:59 0

What Others Think

I've always wanted such a capability from command-line svn. The command line interface is a bit spartan.
bwoodacre · 472 weeks and 5 days ago
Updated this command so it actually works for commits that have more then a 1 line commit message.
nitehawk · 472 weeks and 3 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: