git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-svn: commit author x commit committer issue
@ 2007-08-08 13:46 Richard MUSIL
  2007-08-08 15:42 ` Quy Tonthat
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Richard MUSIL @ 2007-08-08 13:46 UTC (permalink / raw)
  To: git

Normally, when patch is applied, git distinguishes commit author and
commit committer (relying on info from patch).
However, after the patches are committed to svn repository using:
git-svn dcommit
author and committer data are set to same values (or at least time and
date, I cannot verify it for names).
I wonder if there is any reason for this behavior, because I would
definitely like to keep original commit info (which came from patch) in
my git repository.

Richard Musil
(please cc: me)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: git-svn: commit author x commit committer issue
  2007-08-08 13:46 git-svn: commit author x commit committer issue Richard MUSIL
@ 2007-08-08 15:42 ` Quy Tonthat
  2007-08-08 17:13 ` Peter Baumann
  2007-08-16  9:20 ` Eric Wong
  2 siblings, 0 replies; 12+ messages in thread
From: Quy Tonthat @ 2007-08-08 15:42 UTC (permalink / raw)
  To: Richard MUSIL; +Cc: git

Richard MUSIL wrote:
> Normally, when patch is applied, git distinguishes commit author and
> commit committer (relying on info from patch).
> However, after the patches are committed to svn repository using:
> git-svn dcommit
> author and committer data are set to same values (or at least time and
> date, I cannot verify it for names).
> I wonder if there is any reason for this behavior, because I would
> definitely like to keep original commit info (which came from patch) in
> my git repository.

I'm sure this worked before (author and committee are different, that is).
Something went wrong recently but I haven't got time to look into the problem.
I hope someone would.

Quy

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: git-svn: commit author x commit committer issue
  2007-08-08 13:46 git-svn: commit author x commit committer issue Richard MUSIL
  2007-08-08 15:42 ` Quy Tonthat
@ 2007-08-08 17:13 ` Peter Baumann
  2007-08-09  9:45   ` Richard MUSIL
  2007-08-16  9:20 ` Eric Wong
  2 siblings, 1 reply; 12+ messages in thread
From: Peter Baumann @ 2007-08-08 17:13 UTC (permalink / raw)
  To: Richard MUSIL; +Cc: git

On Wed, Aug 08, 2007 at 03:46:19PM +0200, Richard MUSIL wrote:
> Normally, when patch is applied, git distinguishes commit author and
> commit committer (relying on info from patch).
> However, after the patches are committed to svn repository using:
> git-svn dcommit
> author and committer data are set to same values (or at least time and
> date, I cannot verify it for names).
> I wonder if there is any reason for this behavior, because I would
> definitely like to keep original commit info (which came from patch) in
> my git repository.

I think it is because in SVN, you can't differentiate between author and
committer. And git-svn just commits every local commit to svn, and after
that, it throws away your local commits and uses the info from the
reimported svn commits to recreate those thrown away commits. Thats why
you loose your author name and also your commit date.

Ok, this was a little too simplified, but describes roughly what happens
if you dcommit your changes.

-Peter

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: git-svn: commit author x commit committer issue
  2007-08-08 17:13 ` Peter Baumann
@ 2007-08-09  9:45   ` Richard MUSIL
  0 siblings, 0 replies; 12+ messages in thread
From: Richard MUSIL @ 2007-08-09  9:45 UTC (permalink / raw)
  To: Peter Baumann; +Cc: git

Peter Baumann wrote:
> On Wed, Aug 08, 2007 at 03:46:19PM +0200, Richard MUSIL wrote:
>> Normally, when patch is applied, git distinguishes commit author and
>> commit committer (relying on info from patch).
>> However, after the patches are committed to svn repository using:
>> git-svn dcommit
>> author and committer data are set to same values (or at least time and
>> date, I cannot verify it for names).
>> I wonder if there is any reason for this behavior, because I would
>> definitely like to keep original commit info (which came from patch) in
>> my git repository.
> 
> I think it is because in SVN, you can't differentiate between author and
> committer. And git-svn just commits every local commit to svn, and after
> that, it throws away your local commits and uses the info from the
> reimported svn commits to recreate those thrown away commits. Thats why
> you loose your author name and also your commit date.

I guess you are right. I have been thinking about the possibility to
store the original author and patch date into svn unversioned property.
Something like git:author and git:date. There is however one catch.
Modifying unversioned properties must be explicitly allowed on svn
repository, so this will have to be optional in git (svn.userevprops ?).

I do not know what others think about this. For me it seems quite
attractive, to be able to store development history of original actions
inside svn, especially when the case might be that commits into git
happen at different time on different machines and by different people
than the final commit to svn.

I have been trying to find out how this works in git-svn, but since Perl
is worse than Greek to me, I found out only that I am not able to do
anything here. Would anyone be interested to work on it?

Richard

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: git-svn: commit author x commit committer issue
  2007-08-08 13:46 git-svn: commit author x commit committer issue Richard MUSIL
  2007-08-08 15:42 ` Quy Tonthat
  2007-08-08 17:13 ` Peter Baumann
@ 2007-08-16  9:20 ` Eric Wong
  2007-08-16 12:13   ` Richard MUSIL
  2007-08-22 10:07   ` Guilhem Bonnefille
  2 siblings, 2 replies; 12+ messages in thread
From: Eric Wong @ 2007-08-16  9:20 UTC (permalink / raw)
  To: Richard MUSIL; +Cc: git

Richard MUSIL <richard.musil@st.com> wrote:
> Normally, when patch is applied, git distinguishes commit author and
> commit committer (relying on info from patch).
> However, after the patches are committed to svn repository using:
> git-svn dcommit
> author and committer data are set to same values (or at least time and
> date, I cannot verify it for names).
> I wonder if there is any reason for this behavior, because I would
> definitely like to keep original commit info (which came from patch) in
> my git repository.

I try to keep commits made to SVN using git-svn as much like commits
made using other SVN clients as much as possible.

Two people using git-svn (in its recommended fashion and maintaining
linear history) can have identical SHA1s in their repository even if
those two repositories had never seen each other before.  Consistency
is good.

I also want to avoid creating extra junk on the SVN repository which I
don't personally consider very important.  SVK does stuff like that with
merges, and only SVK understands the metadata it uses.  I prefer
transparency.

-- 
Eric Wong

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: git-svn: commit author x commit committer issue
  2007-08-16  9:20 ` Eric Wong
@ 2007-08-16 12:13   ` Richard MUSIL
  2007-08-17  7:58     ` Eric Wong
  2007-08-22 10:07   ` Guilhem Bonnefille
  1 sibling, 1 reply; 12+ messages in thread
From: Richard MUSIL @ 2007-08-16 12:13 UTC (permalink / raw)
  To: Eric Wong; +Cc: git

Eric Wong wrote:
> Richard MUSIL <richard.musil@st.com> wrote:
>> Normally, when patch is applied, git distinguishes commit author and
>> commit committer (relying on info from patch).
>> However, after the patches are committed to svn repository using:
>> git-svn dcommit
>> author and committer data are set to same values (or at least time and
>> date, I cannot verify it for names).
>> I wonder if there is any reason for this behavior, because I would
>> definitely like to keep original commit info (which came from patch) in
>> my git repository.
> 
> I try to keep commits made to SVN using git-svn as much like commits
> made using other SVN clients as much as possible.
> 
> Two people using git-svn (in its recommended fashion and maintaining
> linear history) can have identical SHA1s in their repository even if
> those two repositories had never seen each other before.  Consistency
> is good.

Ok, if I understand well, you are saying, that if someone commits with
distinguished author/committer and someone does not, they end up with
different SHA1s because those parts affect the calculation. I agree this
could be a breaking point.

> I also want to avoid creating extra junk on the SVN repository which I
> don't personally consider very important.  SVK does stuff like that with
> merges, and only SVK understands the metadata it uses.  I prefer
> transparency.

I made some suggestions in this thread about using revision
(unversioned) property of SVN fot git "metadata". AFAIK using rev. props
is completely transparent to other SVN clients (in this case those not
being git-svn), so they could easily ignore them.

It could be optional on git config property for commit and autodetected
for clone/pull.

The scenario I could easily imagine (though it is not something I am
currently using) is having dev teams using git internally (because its
much easier for tracking local development) and having SVN repo as a
"central hub". In such environment, there will be probably one person in
each team (dev. lead) collecting commits from others and once things are
set, he will commit all changes to svn. In that particular case, he does
not have to worry about different sha1s, because they use only one SVN
(as it was meant to be used). But he could be sad about losing all
authors info about the people commits. And my personal believe is, this
is how git-svn may enter svn world on big projects.

But you are right, it is up to you to decide. It was just an idea ;-).

Richard

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: git-svn: commit author x commit committer issue
  2007-08-16 12:13   ` Richard MUSIL
@ 2007-08-17  7:58     ` Eric Wong
  0 siblings, 0 replies; 12+ messages in thread
From: Eric Wong @ 2007-08-17  7:58 UTC (permalink / raw)
  To: Richard MUSIL; +Cc: git

Richard MUSIL <richard.musil@st.com> wrote:
> Eric Wong wrote:
> > Richard MUSIL <richard.musil@st.com> wrote:
> > I also want to avoid creating extra junk on the SVN repository which I
> > don't personally consider very important.  SVK does stuff like that with
> > merges, and only SVK understands the metadata it uses.  I prefer
> > transparency.
> 
> I made some suggestions in this thread about using revision
> (unversioned) property of SVN fot git "metadata". AFAIK using rev. props
> is completely transparent to other SVN clients (in this case those not
> being git-svn), so they could easily ignore them.
> 
> It could be optional on git config property for commit and autodetected
> for clone/pull.
> 
> The scenario I could easily imagine (though it is not something I am
> currently using) is having dev teams using git internally (because its
> much easier for tracking local development) and having SVN repo as a
> "central hub". In such environment, there will be probably one person in
> each team (dev. lead) collecting commits from others and once things are
> set, he will commit all changes to svn. In that particular case, he does
> not have to worry about different sha1s, because they use only one SVN
> (as it was meant to be used). But he could be sad about losing all
> authors info about the people commits. And my personal believe is, this
> is how git-svn may enter svn world on big projects.
> 
> But you are right, it is up to you to decide. It was just an idea ;-).

It'd be easy for git-svn to write metadata to rev-props.  Whether or not
it reads and does anything with them is another issue...  I think Sam
was working on something that allowed it to track merges on the
git-side, but we'd be introducing a third or fourth method of
non-standard merge-tracking into SVN :)

In any case, this behavior should always be optional and off by default.

-- 
Eric Wong

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: git-svn: commit author x commit committer issue
  2007-08-16  9:20 ` Eric Wong
  2007-08-16 12:13   ` Richard MUSIL
@ 2007-08-22 10:07   ` Guilhem Bonnefille
  2007-08-22 10:17     ` Guilhem Bonnefille
  1 sibling, 1 reply; 12+ messages in thread
From: Guilhem Bonnefille @ 2007-08-22 10:07 UTC (permalink / raw)
  To: Eric Wong; +Cc: Richard MUSIL, git

On 8/16/07, Eric Wong <normalperson@yhbt.net> wrote:
> Richard MUSIL <richard.musil@st.com> wrote:
> > Normally, when patch is applied, git distinguishes commit author and
> > commit committer (relying on info from patch).
> > However, after the patches are committed to svn repository using:
> > git-svn dcommit
> > author and committer data are set to same values (or at least time and
> > date, I cannot verify it for names).
> > I wonder if there is any reason for this behavior, because I would
> > definitely like to keep original commit info (which came from patch) in
> > my git repository.
>
> I try to keep commits made to SVN using git-svn as much like commits
> made using other SVN clients as much as possible.
>
> Two people using git-svn (in its recommended fashion and maintaining
> linear history) can have identical SHA1s in their repository even if
> those two repositories had never seen each other before.  Consistency
> is good.
>
> I also want to avoid creating extra junk on the SVN repository which I
> don't personally consider very important.  SVK does stuff like that with
> merges, and only SVK understands the metadata it uses.  I prefer
> transparency.

Instead of using SVN metadata, why not store the missing information
like git-svn store the SVN rev id. (in the commit log as I know).

-- 
Guilhem BONNEFILLE
-=- #UIN: 15146515 JID: guyou@im.apinc.org MSN: guilhem_bonnefille@hotmail.com
-=- mailto:guilhem.bonnefille@gmail.com
-=- http://nathguil.free.fr/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: git-svn: commit author x commit committer issue
  2007-08-22 10:07   ` Guilhem Bonnefille
@ 2007-08-22 10:17     ` Guilhem Bonnefille
  2007-08-22 21:34       ` Junio C Hamano
  0 siblings, 1 reply; 12+ messages in thread
From: Guilhem Bonnefille @ 2007-08-22 10:17 UTC (permalink / raw)
  To: Eric Wong; +Cc: Richard MUSIL, git

Oops, sory, I'm completly wrong: the git-svn-id is put on the commit
log in the Git repo, not on the SVN repo.
Please, ignore me.

On 8/22/07, Guilhem Bonnefille <guilhem.bonnefille@gmail.com> wrote:
> On 8/16/07, Eric Wong <normalperson@yhbt.net> wrote:
> > Richard MUSIL <richard.musil@st.com> wrote:
> > > Normally, when patch is applied, git distinguishes commit author and
> > > commit committer (relying on info from patch).
> > > However, after the patches are committed to svn repository using:
> > > git-svn dcommit
> > > author and committer data are set to same values (or at least time and
> > > date, I cannot verify it for names).
> > > I wonder if there is any reason for this behavior, because I would
> > > definitely like to keep original commit info (which came from patch) in
> > > my git repository.
> >
> > I try to keep commits made to SVN using git-svn as much like commits
> > made using other SVN clients as much as possible.
> >
> > Two people using git-svn (in its recommended fashion and maintaining
> > linear history) can have identical SHA1s in their repository even if
> > those two repositories had never seen each other before.  Consistency
> > is good.
> >
> > I also want to avoid creating extra junk on the SVN repository which I
> > don't personally consider very important.  SVK does stuff like that with
> > merges, and only SVK understands the metadata it uses.  I prefer
> > transparency.
>
> Instead of using SVN metadata, why not store the missing information
> like git-svn store the SVN rev id. (in the commit log as I know).
>
> --
> Guilhem BONNEFILLE
> -=- #UIN: 15146515 JID: guyou@im.apinc.org MSN: guilhem_bonnefille@hotmail.com
> -=- mailto:guilhem.bonnefille@gmail.com
> -=- http://nathguil.free.fr/
>


-- 
Guilhem BONNEFILLE
-=- #UIN: 15146515 JID: guyou@im.apinc.org MSN: guilhem_bonnefille@hotmail.com
-=- mailto:guilhem.bonnefille@gmail.com
-=- http://nathguil.free.fr/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: git-svn: commit author x commit committer issue
  2007-08-22 10:17     ` Guilhem Bonnefille
@ 2007-08-22 21:34       ` Junio C Hamano
  2007-08-23  5:05         ` Eric Wong
  0 siblings, 1 reply; 12+ messages in thread
From: Junio C Hamano @ 2007-08-22 21:34 UTC (permalink / raw)
  To: Guilhem Bonnefille; +Cc: Eric Wong, Richard MUSIL, git

"Guilhem Bonnefille" <guilhem.bonnefille@gmail.com> writes:

> Oops, sory, I'm completly wrong: the git-svn-id is put on the commit
> log in the Git repo, not on the SVN repo.
> Please, ignore me.

I do not think it is wrong to tack that to the commit message
you push it back to SVN... am I missing something?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: git-svn: commit author x commit committer issue
  2007-08-22 21:34       ` Junio C Hamano
@ 2007-08-23  5:05         ` Eric Wong
  2007-08-23  8:51           ` Richard MUSIL
  0 siblings, 1 reply; 12+ messages in thread
From: Eric Wong @ 2007-08-23  5:05 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Guilhem Bonnefille, Richard MUSIL, git

Junio C Hamano <gitster@pobox.com> wrote:
> "Guilhem Bonnefille" <guilhem.bonnefille@gmail.com> writes:
> 
> > Oops, sory, I'm completly wrong: the git-svn-id is put on the commit
> > log in the Git repo, not on the SVN repo.
> > Please, ignore me.
> 
> I do not think it is wrong to tack that to the commit message
> you push it back to SVN... am I missing something?

It's actually possible to add a revprop in SVN that is not immediately
visible to SVN users.

-- 
Eric Wong

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: git-svn: commit author x commit committer issue
  2007-08-23  5:05         ` Eric Wong
@ 2007-08-23  8:51           ` Richard MUSIL
  0 siblings, 0 replies; 12+ messages in thread
From: Richard MUSIL @ 2007-08-23  8:51 UTC (permalink / raw)
  To: Eric Wong; +Cc: Junio C Hamano, Guilhem Bonnefille, git

Eric Wong wrote:
> Junio C Hamano <gitster@pobox.com> wrote:
>> "Guilhem Bonnefille" <guilhem.bonnefille@gmail.com> writes:
>>
>>> Oops, sory, I'm completly wrong: the git-svn-id is put on the commit
>>> log in the Git repo, not on the SVN repo.
>>> Please, ignore me.
>> I do not think it is wrong to tack that to the commit message
>> you push it back to SVN... am I missing something?
> 
> It's actually possible to add a revprop in SVN that is not immediately
> visible to SVN users.

I would say revprops would be great, but as of now, they are not by
default available on svn repo. Which makes their usage only optional for
git. (But for author info I believe this is acceptable.)

Richard

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-08-23  8:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-08 13:46 git-svn: commit author x commit committer issue Richard MUSIL
2007-08-08 15:42 ` Quy Tonthat
2007-08-08 17:13 ` Peter Baumann
2007-08-09  9:45   ` Richard MUSIL
2007-08-16  9:20 ` Eric Wong
2007-08-16 12:13   ` Richard MUSIL
2007-08-17  7:58     ` Eric Wong
2007-08-22 10:07   ` Guilhem Bonnefille
2007-08-22 10:17     ` Guilhem Bonnefille
2007-08-22 21:34       ` Junio C Hamano
2007-08-23  5:05         ` Eric Wong
2007-08-23  8:51           ` Richard MUSIL

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).