From: Chris Ortman <hidden> Date: 2016-06-15 22:44:05
Something that would really benefit the folks who use git to manage a
subversion repository (such as myself) would be a special format-patch
command for git-svn that creates a tortoise svn compatible diff file.
Thanks.
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:44:05
Hi,
On Tue, 15 Jan 2008, Chris Ortman wrote:
Something that would really benefit the folks who use git to manage a
subversion repository (such as myself) would be a special format-patch
command for git-svn that creates a tortoise svn compatible diff file.
How does the output of "git format-patch" differ from that? (I do not use
TortoiseSVN, and I guess a lot of people on this list don't, either...)
Ciao,
Dscho
b/Facilities/EventWiring/Castle.Facilities.EventWiring.Tests/Castle.Facilities.EventWiring.Tests-vs2005.csproj
becomes
Index: Facilities/EventWiring/Castle.Facilities.EventWiring.Tests/Castle.Facilities.EventWiring.Tests-vs2005.csproj
and
index a0a0d38..9676e16 100644
becomes
===================================================================
and
From: Chris Ortman <hidden> Date: 2016-06-15 22:44:05
Sure, but I will probably need some guidance.
Are you thinking to just create the standard patch but then regex
replace the necessary lines or something different?
Thanks
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:44:05
Hi,
On Tue, 15 Jan 2008, Chris Ortman wrote:
Are you thinking to just create the standard patch but then regex
replace the necessary lines or something different?
I was thinking exactly that. TortoiseSVN's diff format is not important
enough to git to merit a core-level change (in git), but it should be easy
enough even to write a "sed" command line with three expressions to effect
the transformation you desire.
Ciao,
Dscho
Chris,
You want to use format-patch's --no-prefix option.
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:44:05
Him
On Tue, 15 Jan 2008, Chris Ortman wrote:
Should this be a new command in git-svn.perl? or something in contrib?
I'd just start with an alias at first, and if it develops into something
you're happy with, send it here and let others comment on it -- also where
it should go.
Possibly the best place really would be git-svn, but it might also be less
interesting for other people, given that git-svn does not work in msysGit
yet (and your use case was for TortoiseSVN, which is Windows-only).
Ciao,
Dscho
From: Chris Ortman <hidden> Date: 2016-06-15 22:44:05
Myself and many others have excellent luck with the cygwin version.
But the reasoning behind wanting this isn't so much for the developer
that is creating the patch as it is for the person receiving it. Most
of the projects I work on use tortoise to apply the patches and don't
typically have patch.exe
If something like this was to be accepted and become part of standard
git is there a requirement that it be written in perl or is some other
scripting language fine?
Thanks
Something that would really benefit the folks who use git to manage a
subversion repository (such as myself) would be a special format-patch
command for git-svn that creates a tortoise svn compatible diff file.
Isn't it that TortoiseSVN is simply being too strict about the
diff format it accepts? Since even GNU patch reads and applies
them fine (I didn't test it thoroughly though), I would assume git
diffs follow some sort of standard (couldn't find it though) for
the unified diff format, or at least was designed to not break
patch. So in the long term, I think this is rather or at least
also something to be addressed in TortoiseSVN.
jlh
From: Jan Hudec <hidden> Date: 2016-06-15 22:44:05
On Tue, Jan 15, 2008 at 13:04:23 -0600, Chris Ortman wrote:
Myself and many others have excellent luck with the cygwin version.
But the reasoning behind wanting this isn't so much for the developer
that is creating the patch as it is for the person receiving it. Most
of the projects I work on use tortoise to apply the patches and don't
typically have patch.exe
Note, that tortoise might actually use the version numbers, so bonus points
for actually finding them (where applicable -- if the patch is not based on
subversion revision, you can't get them).
If something like this was to be accepted and become part of standard
git is there a requirement that it be written in perl or is some other
scripting language fine?
Git currently uses C, shell, perl and tcl/tk. There would probably be some
resistance to adding more dependencies, but that would not apply to the
contrib directory (so useful things written in something else are likely to
end up there).
--
Jan 'Bulb' Hudec [off-list ref]
From: Chris Ortman <hidden> Date: 2016-06-15 22:44:05
You are correct about Tortoise in that it is too strict.
I looked through their code and they have written their own patch
program which keys off these Index: lines
http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/src/TortoiseMerge/Patch.cpp
I think it could go either way as to if git-svn creates a different
format patch or tsvn accepts multiple formats, but I anticipated
git-svn would be easier to extend so I started here.
When --no-prefix is used, we should probably do:
Index: <filename>
instead of
diff --git <filename> <filename>
If nothing else, --no-prefix generates patches that git-apply can't apply
but thinks that it should be able to because of the "diff --git" line.
and
index a0a0d38..9676e16 100644
becomes
===================================================================
Can't tell if this matters, or if this is meant to underline the Index
line, and if we can leave some extra info after it. The source link you
sent requires a login; is this line actually important to recognition, or
is it just different in the generated patches?
This (putting a description of the revision at the end) would be nice in
general for those of us who can't remember what arguments we gave to git
diff and can't get back to them without quitting less and no longer having
the diff.
Of course, it would take a lot of magic to get git to describe things with
the svn revision info in a non-svn-specific command, but that may not be
necessary if tortoise is willing to apply patches where the base revision
is unknown. Or git-svn could just make a lot of tags like "revision 4715".
-Daniel
*This .sig left intentionally blank*
From: Chris Ortman <hidden> Date: 2016-06-15 22:44:05
I'm sorry I completely forgot there was username / password on that link
username: guest
password: ''
Tortoise does care about the line of equals signs, although it seems
like an unecessary one from my understanding.
From the best I can tell it doesn't look like tortoise actually cares
that the svn revision be something valid, just that something is there
as a placeholder
From: Daniel Barkalow <hidden> Date: 2016-06-15 22:44:05
On Tue, 15 Jan 2008, Chris Ortman wrote:
You are correct about Tortoise in that it is too strict.
I looked through their code and they have written their own patch
program which keys off these Index: lines
http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/src/TortoiseMerge/Patch.cpp
I think it could go either way as to if git-svn creates a different
format patch or tsvn accepts multiple formats, but I anticipated
git-svn would be easier to extend so I started here.
I think it would be worthwhile for tsvn to be less picky in some ways. It
should at least be able to accept GNU diff, since sometimes people send
maintainers patches prepared by hand (diff -u file.c.orig file.c), and
there are comments in there that suggest that they're trying to support
non-svn-generated diffs, although they seem to think that such diffs look
like:
Index: filename
============
@@ -xxx,xxx +xxx,xxx @@
...
which isn't anything I've ever seen. You're much more likely to get:
...junk...
--- junk+++ filename junk
@@ -xxx,xxx +xxx,xxx @@
And that should be easy enough to parse as an alternative format in tsvn.
(I'd send them a patch to do it, but they wouldn't be able to apply it...)
-Daniel
*This .sig left intentionally blank*
Did there ever become a way of generating svn format diffs from git?
A project is having a hard time applying my format-patch --no-prefix
diffs, but I don't have a tortoiseSVN machine to figure out why..
On Wed, Jan 16, 2008 at 2:20 AM, Daniel Barkalow [off-list ref] wrote:
On Tue, 15 Jan 2008, Chris Ortman wrote:
quoted
You are correct about Tortoise in that it is too strict.
> I looked through their code and they have written their own patch
> program which keys off these Index: lines
> http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/src/TortoiseMerge/Patch.cpp
>
> I think it could go either way as to if git-svn creates a different
> format patch or tsvn accepts multiple formats, but I anticipated
> git-svn would be easier to extend so I started here.
I think it would be worthwhile for tsvn to be less picky in some ways. It
should at least be able to accept GNU diff, since sometimes people send
maintainers patches prepared by hand (diff -u file.c.orig file.c), and
there are comments in there that suggest that they're trying to support
non-svn-generated diffs, although they seem to think that such diffs look
like:
Index: filename
============
@@ -xxx,xxx +xxx,xxx @@
...
which isn't anything I've ever seen. You're much more likely to get:
...junk...
--- junk
+++ filename junk
@@ -xxx,xxx +xxx,xxx @@
And that should be easy enough to parse as an alternative format in tsvn.
(I'd send them a patch to do it, but they wouldn't be able to apply it...)
-Daniel
*This .sig left intentionally blank*
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Jan Hudec <hidden> Date: 2016-06-15 22:44:22
On Tue, Mar 11, 2008 at 17:38:22 +0000, Nigel Magnay wrote:
Did there ever become a way of generating svn format diffs from git?
There was a talk about it, but I am not sure anything was actually written.
Would be quite easy to add the Index: and equals line with a few lines of
perl.
A project is having a hard time applying my format-patch --no-prefix
diffs, but I don't have a tortoiseSVN machine to figure out why..
You quoted quite precise explanation below.
On Wed, Jan 16, 2008 at 2:20 AM, Daniel Barkalow [off-list ref] wrote:
quoted
On Tue, 15 Jan 2008, Chris Ortman wrote:
quoted
You are correct about Tortoise in that it is too strict.
> I looked through their code and they have written their own patch
> program which keys off these Index: lines
> http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/src/TortoiseMerge/Patch.cpp
>
> I think it could go either way as to if git-svn creates a different
> format patch or tsvn accepts multiple formats, but I anticipated
> git-svn would be easier to extend so I started here.
I think it would be worthwhile for tsvn to be less picky in some ways. It
should at least be able to accept GNU diff, since sometimes people send
maintainers patches prepared by hand (diff -u file.c.orig file.c), and
there are comments in there that suggest that they're trying to support
non-svn-generated diffs, although they seem to think that such diffs look
like:
Index: filename
============
@@ -xxx,xxx +xxx,xxx @@
...
which isn't anything I've ever seen. You're much more likely to get:
...junk...
--- junk
+++ filename junk
@@ -xxx,xxx +xxx,xxx @@
And that should be easy enough to parse as an alternative format in tsvn.
(I'd send them a patch to do it, but they wouldn't be able to apply it...)
-Daniel
*This .sig left intentionally blank*
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Daniel Barkalow <hidden> Date: 2016-06-15 22:44:22
On Tue, 11 Mar 2008, Nigel Magnay wrote:
Did there ever become a way of generating svn format diffs from git?
A project is having a hard time applying my format-patch --no-prefix
diffs, but I don't have a tortoiseSVN machine to figure out why..
Not really, so far as I know. I looked at it a bit, but didn't get too
far.
-Daniel
*This .sig left intentionally blank*