git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git svn and SVN property svn:original-date
@ 2017-03-22 23:26 Craig McQueen
  2017-03-23  2:56 ` Eric Wong
  0 siblings, 1 reply; 4+ messages in thread
From: Craig McQueen @ 2017-03-22 23:26 UTC (permalink / raw)
  To: git@vger.kernel.org

When doing "git svn dcommit", the SVN revision just has the date/time stamp of the time of the dcommit.

Apparently SVN revisions can have an "svn:original-date" property, which would be good to set on dcommit, to preserve the timestamp from the git repository.

https://subversion.apache.org/docs/api/1.7/group__svn__props__revision__props.html#ga8f17351dd056149da9cb490f1daf4018
"The svn:date property must be monotonically increasing, along with the revision number. In certain scenarios, this may pose a problem when the revision represents a commit that occurred at a time which does not fit within the sequencing required for svn:date. This can happen, for instance, when the revision represents a commit to a foreign version control system, or possibly when two Subversion repositories are combined. This property [svn:original-date] can be used to record the TRUE, original date of the commit."

-- 
Craig McQueen


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

* Re: git svn and SVN property svn:original-date
  2017-03-22 23:26 git svn and SVN property svn:original-date Craig McQueen
@ 2017-03-23  2:56 ` Eric Wong
  2017-03-23  4:18   ` Craig McQueen
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Wong @ 2017-03-23  2:56 UTC (permalink / raw)
  To: Craig McQueen; +Cc: git

Craig McQueen <craig.mcqueen@innerrange.com> wrote:
> When doing "git svn dcommit", the SVN revision just has the date/time stamp of the time of the dcommit.

Yeah, that's sometimes annoying to me, too.

> Apparently SVN revisions can have an "svn:original-date" property, which would be good to set on dcommit, to preserve the timestamp from the git repository.
> 
> https://subversion.apache.org/docs/api/1.7/group__svn__props__revision__props.html#ga8f17351dd056149da9cb490f1daf4018

Any idea if which versions of SVN it's supported in and how
recent the feature is?

Perhaps we can enable it everywhere, and maybe only old clients
won't understand it, but won't fail; and we could start using
it as the author date with "git svn fetch".

OTOH, that would break the (perhaps unofficial)
independently-created-git-svn-mirrors-should-have-same-oids-by-default
rule when people run different versions of git, so maybe it
could be an option...

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

* RE: git svn and SVN property svn:original-date
  2017-03-23  2:56 ` Eric Wong
@ 2017-03-23  4:18   ` Craig McQueen
  2017-03-23 17:31     ` Eric Wong
  0 siblings, 1 reply; 4+ messages in thread
From: Craig McQueen @ 2017-03-23  4:18 UTC (permalink / raw)
  To: Eric Wong; +Cc: git@vger.kernel.org

Eric Wong wrote:
> Craig McQueen <craig.mcqueen@innerrange.com> wrote:
> > When doing "git svn dcommit", the SVN revision just has the date/time
> stamp of the time of the dcommit.
> 
> Yeah, that's sometimes annoying to me, too.
> 
> > Apparently SVN revisions can have an "svn:original-date" property, which
> would be good to set on dcommit, to preserve the timestamp from the git
> repository.
> >
> >
> https://subversion.apache.org/docs/api/1.7/group__svn__props__revision
> > __props.html#ga8f17351dd056149da9cb490f1daf4018
> 
> Any idea if which versions of SVN it's supported in and how recent the
> feature is?

I see discussion about it in 2003, so I guess it's been there right from 1.0.0.

> Perhaps we can enable it everywhere, and maybe only old clients won't
> understand it, but won't fail; and we could start using it as the author date
> with "git svn fetch".

Using it for author date sounds sensible.

> OTOH, that would break the (perhaps unofficial) independently-created-git-
> svn-mirrors-should-have-same-oids-by-default
> rule when people run different versions of git, so maybe it could be an
> option...

Hmm, good question. Maybe it should be an option, though I hope it would be enabled by default (since the feature would be more metadata-preserving, which is a good thing), with an option to disable it to allow backwards compatibility with people running an older version of git. That's my opinion anyway, and I realise my opinion is not necessarily well-informed regarding all considerations.

Note, I'm unclear as to whether Subversion is willing to store timezone information in svn:original-date. But I guess having git author date correspond to svn:original-date is an improvement for preserving more metadata, even if the timezone is lost in the process.

-- 
Craig McQueen


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

* Re: git svn and SVN property svn:original-date
  2017-03-23  4:18   ` Craig McQueen
@ 2017-03-23 17:31     ` Eric Wong
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Wong @ 2017-03-23 17:31 UTC (permalink / raw)
  To: Craig McQueen; +Cc: git

Craig McQueen <craig.mcqueen@innerrange.com> wrote:
> Eric Wong wrote:
> > Craig McQueen <craig.mcqueen@innerrange.com> wrote:
> > > Apparently SVN revisions can have an "svn:original-date" property, which
> > would be good to set on dcommit, to preserve the timestamp from the git
> > repository.
> > >
> > >
> > https://subversion.apache.org/docs/api/1.7/group__svn__props__revision
> > > __props.html#ga8f17351dd056149da9cb490f1daf4018
> > 
> > Any idea if which versions of SVN it's supported in and how recent the
> > feature is?
> 
> I see discussion about it in 2003, so I guess it's been there right from 1.0.0.
> 
> > Perhaps we can enable it everywhere, and maybe only old clients won't
> > understand it, but won't fail; and we could start using it as the author date
> > with "git svn fetch".
> 
> Using it for author date sounds sensible.

OK, I'd be inclined to accept a patch + tests for that;
my plate might be full with non-git stuff until April.

> > OTOH, that would break the (perhaps unofficial) independently-created-git-
> > svn-mirrors-should-have-same-oids-by-default
> > rule when people run different versions of git, so maybe it could be an
> > option...
> 
> Hmm, good question. Maybe it should be an option, though I
> hope it would be enabled by default (since the feature would
> be more metadata-preserving, which is a good thing), with an
> option to disable it to allow backwards compatibility with
> people running an older version of git. That's my opinion
> anyway, and I realise my opinion is not necessarily
> well-informed regarding all considerations.

Given git-svn behavior hasn't changed much in over a decade, I'd
rather be conservative with regards to changing any existing
behavior.  We could offer one warning about it to inform users
about it if original-date is seen, however.

> Note, I'm unclear as to whether Subversion is willing to store
> timezone information in svn:original-date. But I guess having
> git author date correspond to svn:original-date is an
> improvement for preserving more metadata, even if the timezone
> is lost in the process.

Can you find any examples of it in the wild?  I prefer having
real-world examples to look at.  Thanks.

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

end of thread, other threads:[~2017-03-23 17:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-22 23:26 git svn and SVN property svn:original-date Craig McQueen
2017-03-23  2:56 ` Eric Wong
2017-03-23  4:18   ` Craig McQueen
2017-03-23 17:31     ` Eric Wong

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).