I'm bad dumb and having no google fu. How do you get diff (on os x if it matters...) to look like svn diffs? Couldn't figure it out from the man page either. :(
What I want
Index: test.txt
===================================================================
--- test.txt (revision 365)
+++ test.txt (working copy)
@@ -1,7 +1,9 @@
This
is
the
-original
+updated
+and
+awesomer
file.
-Unf.
+Duh.
Just hold down the Shift key while you right click on the file. Then select TortoiseSVN → Diff with URL. In the following dialog, specify the URL in the repository with which you want to compare your local file to.
Pick the two revisions you want to compare then use Context Menu → Compare Revisions. If you want to compare the same item in two different trees, for example the trunk and a branch, you can use the repository browser to open up both trees, select the file in both places, then use Context Menu → Compare Revisions.
The svn diff command reveals the differences between your working copy and the copy in the master SVN repository.
You want the -u flag.
diff -u file1 file2
From the diff
man page:
-u -U NUM --unified[=NUM]
Output NUM (default 3) lines of unified context.
It's not exactly the same (no big row of equals signs, for example), but it should do what you want. Your example from above:
--- file1 2009-10-16 15:14:24.000000000 -0700
+++ file2 2009-10-16 15:14:50.000000000 -0700
@@ -1,7 +1,9 @@
This
is
the
-original
+updated
+and
+awesomer
file.
-Unf.
+Duh.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With