r208766 - clang-format: Add clang-format-diff usage examples for SVN.

Daniel Jasper djasper at google.com
Wed May 14 02:36:12 PDT 2014


Author: djasper
Date: Wed May 14 04:36:11 2014
New Revision: 208766

URL: http://llvm.org/viewvc/llvm-project?rev=208766&view=rev
Log:
clang-format: Add clang-format-diff usage examples for SVN.

Modified:
    cfe/trunk/docs/ClangFormat.rst
    cfe/trunk/tools/clang-format/clang-format-diff.py

Modified: cfe/trunk/docs/ClangFormat.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ClangFormat.rst?rev=208766&r1=208765&r2=208766&view=diff
==============================================================================
--- cfe/trunk/docs/ClangFormat.rst (original)
+++ cfe/trunk/docs/ClangFormat.rst Wed May 14 04:36:11 2014
@@ -177,5 +177,11 @@ So to reformat all the lines in the late
 
   git diff -U0 HEAD^ | clang-format-diff.py -i -p1
 
+In an SVN client, you can do:
+
+.. code-block:: console
+
+  svn diff --diff-cmd=diff -x-U0 | clang-format-diff.py -i
+
 The :option:`-U0` will create a diff without context lines (the script would format
 those as well).

Modified: cfe/trunk/tools/clang-format/clang-format-diff.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format/clang-format-diff.py?rev=208766&r1=208765&r2=208766&view=diff
==============================================================================
--- cfe/trunk/tools/clang-format/clang-format-diff.py (original)
+++ cfe/trunk/tools/clang-format/clang-format-diff.py Wed May 14 04:36:11 2014
@@ -15,9 +15,10 @@ ClangFormat Diff Reformatter
 
 This script reads input from a unified diff and reformats all the changed
 lines. This is useful to reformat all the lines touched by a specific patch.
-Example usage for git users:
+Example usage for git/svn users:
 
   git diff -U0 HEAD^ | clang-format-diff.py -p1 -i
+  svn diff --diff-cmd=diff -x-U0 | clang-format-diff.py -i
 
 """
 





More information about the cfe-commits mailing list