You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Jeff Cave <je...@sunergon.com> on 2003/06/18 18:18:12 UTC
"svn diff" vs "diff" - want diff to look like svn diff
This is a little off topic but it is driving me nuts and I don't know where else to turn.
I would like to have the output of gnu's "diff" to look like the output of "svn diff". Now I am basing this on the assumption that svn diff is based on diff and therefore should be able to produce the same output. For some reason, I can't get the right combination of switches to do this.
A list of the needed options for diff, or a good diff reference (not the man page, I already have that ;-), would be apreciated. I would also love a guide to what I can do with diff.
Example of what I am getting:
c:\dev> svn diff rate.src
Index: rate.src
===================================================================
--- rate.src (revision 4)
+++ rate.src (working copy)
@@ -13,6 +13,15 @@
Widgets 12
-Dongles 113
+Dongles 13
Dingles 14
c:\dev> diff ./rate.src ./.svn/text-base/rate.src.svn-base
16,17d15
< Dongles 13
> Dongles 113
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: "svn diff" vs "diff" - want diff to look like svn diff
Posted by Branko Čibej <br...@xbc.nu>.
cmpilato@collab.net wrote:
>"Jeff Cave" <je...@sunergon.com> writes:
>
>
>
>>This is a little off topic but it is driving me nuts and I don't
>>know where else to turn.
>>
>>I would like to have the output of gnu's "diff" to look like the
>>output of "svn diff".
>>
>>
>
>If you run gnu diff with the -u option, you'll find that the output is
>quite similar to that of 'svn diff'. Otherwise, I don't think that
>'svn diff' yet has a mode for generating output like the default gnu
>diff output.
>
>
And I fervently hope it never gets such a mode. Besides "diff -e",
that's the most confusing diff output ever.
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: "svn diff" vs "diff" - want diff to look like svn diff
Posted by cm...@collab.net.
"Jeff Cave" <je...@sunergon.com> writes:
> This is a little off topic but it is driving me nuts and I don't
> know where else to turn.
>
> I would like to have the output of gnu's "diff" to look like the
> output of "svn diff".
If you run gnu diff with the -u option, you'll find that the output is
quite similar to that of 'svn diff'. Otherwise, I don't think that
'svn diff' yet has a mode for generating output like the default gnu
diff output.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: "svn diff" vs "diff" - want diff to look like svn diff
Posted by Ben Collins-Sussman <su...@collab.net>.
"Jeff Cave" <je...@sunergon.com> writes:
> I would like to have the output of gnu's "diff" to look like the
> output of "svn diff". Now I am basing this on the assumption that
> svn diff is based on diff
Nope, not anymore. svn used to make external calls to GNU diff, but
now it generates diffs internally, thanks to Sander.
> c:\dev> diff ./rate.src ./.svn/text-base/rate.src.svn-base
> 16,17d15
> < Dongles 13
> > Dongles 113
Try 'diff -u'. :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: "svn diff" vs "diff" - want diff to look like svn diff
Posted by Greg Hudson <gh...@MIT.EDU>.
We use an internal diff library. But the option you want is "-u". Not
every native diff program has it, so you may have to go out and build
gnu diff in order to get it. If you don't have the "-u" option and
don't want to build gnu diff, the "-c" option may make you almost as
happy.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: "svn diff" vs "diff" - want diff to look like svn diff
Posted by David Kimdon <dw...@debian.org>.
On Wed, Jun 18, 2003 at 12:18:12PM -0600, Jeff Cave wrote:
> For some reason, I can't get the right combination
> of switches to do this.
It looks to me like you are looking for the '-u' option to GNU diff
which will tell it to create a unified diff.
-David
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org