threads / discuss / 27489

[RFD] Proposal for git-svn: storing SVN metadata (git-svn-id) in notes

Subject: [RFD] Proposal for git-svn: storing SVN metadata (git-svn-id) in notes

## tl;dr

8 messages between May 28, 2011 and May 31, 2011.

replies: 7people: 6as markdown or json

Jakub Narebski· May 28, 2011, 09:54 UTC · lore

Now that git supports annotating comments with `git notes` utility, could we have an option to git-svn which would make it store SVN metadata, i.e. git-svn-id: lines using git-notes (separate svnmetadata or git-svn notes ref)?

This way we wouldn't have those ugly git-svn-id lines in log (unless requested), and droping them would be as simple as deleting ref - no history rewriting required.

Of course this requires git-svn to make use of those notes to get SVN metadata...

Eric, from what I remember you don't have time nor inclination for adding new features to git-svn, is it?

-- 
Jakub Narebski
Poland
Arnaud Lacurie· May 28, 2011, 13:30 UTC · re: Jakub Narebski · lore

Re: [RFD] Proposal for git-svn: storing SVN metadata (git-svn-id) in notes

2011/5/28 Jakub Narebski <jnareb@gmail.com>:
> Now that git supports annotating comments with `git notes` utility,
> could we have an option to git-svn which would make it store SVN
> metadata, i.e. git-svn-id: lines using git-notes (separate svnmetadata
> or git-svn notes ref)?

I think that it's a great idea, it would make git-svn more like git itself without poisoning the git log indeed. We're trying to do this with the gate between git and mediawiki : http://www.spinics.net/lists/git/msg158701.html. When it's done, feel free to have a look at the code. Doing it with git-svn should be similar.

-- 
Arnaud Lacurie
Ævar Arnfjörð Bjarmason· May 28, 2011, 15:55 UTC · re: Jakub Narebski · lore

Re: [RFD] Proposal for git-svn: storing SVN metadata (git-svn-id) in notes

2011/5/28 Jakub Narebski <jnareb@gmail.com>:
> Now that git supports annotating comments with `git notes` utility,
> could we have an option to git-svn which would make it store SVN
> metadata, i.e. git-svn-id: lines using git-notes (separate svnmetadata
> or git-svn notes ref)?

One good thing about git-svn's current system is that you can easily share your repository with someone else, and they can bootstrap from the same commits.

Has the sharing of git-notes been improved to the point where that could be done similarly transparently?

Jakub Narebski· May 28, 2011, 16:37 UTC · re: Ævar Arnfjörð Bjarmason · lore

Re: [RFD] Proposal for git-svn: storing SVN metadata (git-svn-id) in notes

On Sat, 28 May 2011, Ævar Arnfjörð Bjarmason wrote:
> 2011/5/28 Jakub Narebski <jnareb@gmail.com>:
Show 8 quoted lines
> > Now that git supports annotating comments with `git notes` utility,
> > could we have an option to git-svn which would make it store SVN
> > metadata, i.e. git-svn-id: lines using git-notes (separate svnmetadata
> > or git-svn notes ref)?
> 
> One good thing about git-svn's current system is that you can easily
> share your repository with someone else, and they can bootstrap from
> the same commits.
How it works with svn-dcommit rewriting commits?
 
> Has the sharing of git-notes been improved to the point where that
> could be done similarly transparently?
 
First, the idea was to do it optionally.  In addition to existing and
discouraged `svn.noMetadata` / `--no-metadata` git-svn would acquire
`svn.metadata` / `--metadata` / `--svn-metadata` = none | notes | commits
that would as one option put 'git-svn-id:' lines or their equivalent
to git notes.

Second, from what I understand from the very beginning git-notes was designed in such way that sharing notes is sharing ref. git-replace shares this feature.

But please take above with a grain of salt, having never used notes before, and not being developer of this subsystem.

-- 
Jakub Narebski
Poland
Dave Zarzycki· May 29, 2011, 06:37 UTC · re: Ævar Arnfjörð Bjarmason · lore

Re: [RFD] Proposal for git-svn: storing SVN metadata (git-svn-id) in notes

On May 28, 2011, at 8:55 AM, Ævar Arnfjörð Bjarmason wrote:
> One good thing about git-svn's current system is that you can easily
> share your repository with someone else, and they can bootstrap from
> the same commits.
I wish that was practical for some projects.
It would be a huge improvement if git-svn could fully incorporate *all* of the metadata that it needs into native git objects (notes/tags/something). That way a git clone of a git-svn repository doesn't need to re-bootstrap anything. :-)
For example, a project that I follow has 26k branches (one per bug fix due to organizational workflow/policy). The project took five days to "git svn clone -s" and the re-bootstrap after blowing away the .git/svn directory is similarly painful. Why? Well, let's consider how much data must be rebuilt:
$ git svn gc
$ find */.git/svn -type f -name unhandled.log.gz -print0 | xargs -0 rm
$ du -sh .git/svn
445M	.git/svn
$ find .git/svn | wc -l
   52467
$ 
Crazy, huh?
davez
P.S. -- To the credit of git, the space savings are incredible for this project. The svn repository is 33.6 GiB vs 133.2 MiB for git (minus git-svn and git-reflog overhead). That's ~260x!
Eric Wong· May 31, 2011, 04:53 UTC · re: Jakub Narebski · lore

Re: [RFD] Proposal for git-svn: storing SVN metadata (git-svn-id) in notes

Jakub Narebski <jnareb@gmail.com> wrote:
> Eric, from what I remember you don't have time nor inclination for 
> adding new features to git-svn, is it?

Yes, that's mostly the case. I suggest anybody interested in working on git-svn further to split out the Perl modules into separate files before doing any more work on it.

-- 
Eric Wong
Jakub Narebski· May 31, 2011, 07:20 UTC · re: Eric Wong · lore

Re: [RFD] Proposal for git-svn: storing SVN metadata (git-svn-id) in notes

On Tue, 31 May 2011, Eric Wong wrote:
> Jakub Narebski <jnareb@gmail.com> wrote:
Show 6 quoted lines
> > Eric, from what I remember you don't have time nor inclination for 
> > adding new features to git-svn, is it?
> 
> Yes, that's mostly the case.  I suggest anybody interested in working on
> git-svn further to split out the Perl modules into separate files before
> doing any more work on it.

Could you please at least review patches? Would you have enough time (and inclination) to do at least this?

TIA
-- 
Jakub Narebski
Poland
Michael Haggerty· May 31, 2011, 08:25 UTC · re: Eric Wong · lore

Re: [RFD] Proposal for git-svn: storing SVN metadata (git-svn-id) in notes

On 05/31/2011 06:53 AM, Eric Wong wrote:
Show 7 quoted lines
> Jakub Narebski <jnareb@gmail.com> wrote:
>> Eric, from what I remember you don't have time nor inclination for 
>> adding new features to git-svn, is it?
> 
> Yes, that's mostly the case.  I suggest anybody interested in working on
> git-svn further to split out the Perl modules into separate files before
> doing any more work on it.

What kind of design documentation is available for git-svn? Is there any documentation about the format and contents of the files that git-svn uses?

Such documentation would make it a lot easier for new developers to get involved.

Michael
-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/

← back to recent threads