You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by anatoly techtonik <te...@gmail.com> on 2010/08/24 16:34:57 UTC
git diff format support
Hello again,
I am struggling with "svn diff" output format, which doesn't contain
information about added, copied and renamed files. This information is
needed for generating complete code review diffs for Rietveld project.
It would be nice if `svn diff` supported additional -g, --git option
to generate output that contains this info -
http://mercurial.selenic.com/wiki/GitExtendedDiffFormat
Please, CC.
--
anatoly t.
Re: git diff format support
Posted by anatoly techtonik <te...@gmail.com>.
On Wed, Aug 25, 2010 at 12:21 PM, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> Stefan Sperling wrote on Tue, Aug 24, 2010 at 23:03:24 +0200:
>> On Tue, Aug 24, 2010 at 07:51:28PM +0300, anatoly techtonik wrote:
>> > Good to know. Is it worth to rename it to `svn diff --git` for
>> > unification with Mercurial?
>>
>> I suppose we could rename the option to "--git", yes.
>> Do you want to send a patch that does so?
>
> If yes, make sure to update all the tests too...
My primary development platform is Windows. How much time and space it
will take to setup development environment to be able to compile and
run tests?
Please, CC.
--
anatoly t.
Re: git diff format support
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Stefan Sperling wrote on Tue, Aug 24, 2010 at 23:03:24 +0200:
> On Tue, Aug 24, 2010 at 07:51:28PM +0300, anatoly techtonik wrote:
> > Good to know. Is it worth to rename it to `svn diff --git` for
> > unification with Mercurial?
>
> I suppose we could rename the option to "--git", yes.
> Do you want to send a patch that does so?
If yes, make sure to update all the tests too...
> See http://subversion.apache.org/docs/community-guide/general.html#patches
>
> Thanks,
> Stefan
Re: git diff format support
Posted by Stefan Sperling <st...@elego.de>.
On Tue, Aug 24, 2010 at 07:51:28PM +0300, anatoly techtonik wrote:
> Good to know. Is it worth to rename it to `svn diff --git` for
> unification with Mercurial?
I suppose we could rename the option to "--git", yes.
Do you want to send a patch that does so?
See http://subversion.apache.org/docs/community-guide/general.html#patches
Thanks,
Stefan
Re: git diff format support
Posted by anatoly techtonik <te...@gmail.com>.
Good to know. Is it worth to rename it to `svn diff --git` for
unification with Mercurial?
Please, CC.
On Tue, Aug 24, 2010 at 7:44 PM, Jon Foster <Jo...@cabot.co.uk> wrote:
> Hi,
>
> There is a --git-diff option in Subversion Trunk, so this will
> probably be available in Subversion 1.7.
>
> Kind regards,
>
> Jon
>
> -----Original Message-----
> From: anatoly techtonik [mailto:techtonik@gmail.com]
> Sent: 24 August 2010 17:35
> To: Subversion Development
> Subject: git diff format support
>
> Hello again,
>
> I am struggling with "svn diff" output format, which doesn't contain
> information about added, copied and renamed files. This information is
> needed for generating complete code review diffs for Rietveld project.
> It would be nice if `svn diff` supported additional -g, --git option
> to generate output that contains this info -
> http://mercurial.selenic.com/wiki/GitExtendedDiffFormat
>
> Please, CC.
> --
> anatoly t.
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
>
> **********************************************************************
> This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Cabot Communications Ltd.
>
> If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone.
>
> Cabot Communications Limited
> Verona House, Filwood Road, Bristol BS16 3RY, UK
> +44 (0) 1179584232
>
> Co. Registered in England number 02817269
>
> Please contact the sender if you believe you have received this email in error.
>
> **********************************************************************
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
Re: git diff format support
Posted by Stefan Sperling <st...@elego.de>.
On Tue, Aug 24, 2010 at 05:44:50PM +0100, Jon Foster wrote:
> Hi,
>
> There is a --git-diff option in Subversion Trunk, so this will
> probably be available in Subversion 1.7.
Yes. But there are some restrictions, most notably with renames.
Our git-style diffs show adds, deletes, and copies properly.
But renames are shown as copy+delete, just like elsewhere in Subversion.
See the example below. We'll need better rename support to improve this.
It's anticipated that at least local renames (i.e. in the working copy)
will be recognized as renames rather than copy+delete in Subversion 1.8.
Stefan
$ svn cp alpha alpha2
A alpha2
$ svn mv beta beta2
A beta2
D beta
$ svn diff --git-diff --show-copies-as-adds
Index: alpha2
===================================================================
diff --git a/alpha2 b/trunk/alpha
copy from alpha2
copy to trunk/alpha
--- a/alpha2 (revision 0)
+++ b/alpha2 (working copy)
@@ -0,0 +1 @@
+alpha
Index: beta
===================================================================
diff --git a/beta b/beta
deleted file mode 10644
--- a/beta (revision 2)
+++ /dev/null (working copy)
@@ -1 +0,0 @@
-beta
Index: beta2
===================================================================
diff --git a/beta2 b/trunk/beta
copy from beta2
copy to trunk/beta
--- a/beta2 (revision 0)
+++ b/beta2 (working copy)
@@ -0,0 +1 @@
+beta
RE: git diff format support
Posted by Jon Foster <Jo...@cabot.co.uk>.
Hi,
There is a --git-diff option in Subversion Trunk, so this will
probably be available in Subversion 1.7.
Kind regards,
Jon
-----Original Message-----
From: anatoly techtonik [mailto:techtonik@gmail.com]
Sent: 24 August 2010 17:35
To: Subversion Development
Subject: git diff format support
Hello again,
I am struggling with "svn diff" output format, which doesn't contain
information about added, copied and renamed files. This information is
needed for generating complete code review diffs for Rietveld project.
It would be nice if `svn diff` supported additional -g, --git option
to generate output that contains this info -
http://mercurial.selenic.com/wiki/GitExtendedDiffFormat
Please, CC.
--
anatoly t.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
**********************************************************************
This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Cabot Communications Ltd.
If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone.
Cabot Communications Limited
Verona House, Filwood Road, Bristol BS16 3RY, UK
+44 (0) 1179584232
Co. Registered in England number 02817269
Please contact the sender if you believe you have received this email in error.
**********************************************************************
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________