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

8 messages from 2011-05-28 to 2011-05-31. Participants: Jakub Narebski, Arnaud Lacurie, Ævar Arnfjörð Bjarmason, Dave Zarzycki, Eric Wong, Michael Haggerty.
Thread: https://gitlist.dev/t/27489

## Jakub Narebski, 2011-05-28 09:54

Subject: [RFD] Proposal for git-svn: storing SVN metadata (git-svn-id) in notes
Message-ID: <201105281154.25223.jnareb@gmail.com>
URL: https://gitlist.dev/e/201105281154.25223.jnareb%40gmail.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)?

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, 2011-05-28 13:30

Subject: Re: [RFD] Proposal for git-svn: storing SVN metadata (git-svn-id) in notes
Message-ID: <BANLkTimsmTHdJQNWsvmJxfCPUp5DV+nmYw@mail.gmail.com>
URL: https://gitlist.dev/e/BANLkTimsmTHdJQNWsvmJxfCPUp5DV%2BnmYw%40mail.gmail.com
In-Reply-To: <201105281154.25223.jnareb@gmail.com>

```
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, 2011-05-28 15:55

Subject: Re: [RFD] Proposal for git-svn: storing SVN metadata (git-svn-id) in notes
Message-ID: <BANLkTinorqTQOBw46mYJYfEWTEXC+Myzpw@mail.gmail.com>
URL: https://gitlist.dev/e/BANLkTinorqTQOBw46mYJYfEWTEXC%2BMyzpw%40mail.gmail.com
In-Reply-To: <201105281154.25223.jnareb@gmail.com>

```
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, 2011-05-28 16:37

Subject: Re: [RFD] Proposal for git-svn: storing SVN metadata (git-svn-id) in notes
Message-ID: <201105281837.56655.jnareb@gmail.com>
URL: https://gitlist.dev/e/201105281837.56655.jnareb%40gmail.com
In-Reply-To: <BANLkTinorqTQOBw46mYJYfEWTEXC+Myzpw@mail.gmail.com>

```
On Sat, 28 May 2011, Ævar Arnfjörð Bjarmason wrote:
> 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.

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, 2011-05-29 06:37

Subject: Re: [RFD] Proposal for git-svn: storing SVN metadata (git-svn-id) in notes
Message-ID: <0DF6602C-9DF3-42B3-AFB1-CDAA71D9E2F0@apple.com>
URL: https://gitlist.dev/e/0DF6602C-9DF3-42B3-AFB1-CDAA71D9E2F0%40apple.com
In-Reply-To: <BANLkTinorqTQOBw46mYJYfEWTEXC+Myzpw@mail.gmail.com>

```
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, 2011-05-31 04:53

Subject: Re: [RFD] Proposal for git-svn: storing SVN metadata (git-svn-id) in notes
Message-ID: <20110531045324.GA13661@dcvr.yhbt.net>
URL: https://gitlist.dev/e/20110531045324.GA13661%40dcvr.yhbt.net
In-Reply-To: <201105281154.25223.jnareb@gmail.com>

```
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, 2011-05-31 07:20

Subject: Re: [RFD] Proposal for git-svn: storing SVN metadata (git-svn-id) in notes
Message-ID: <201105310920.13323.jnareb@gmail.com>
URL: https://gitlist.dev/e/201105310920.13323.jnareb%40gmail.com
In-Reply-To: <20110531045324.GA13661@dcvr.yhbt.net>

```
On Tue, 31 May 2011, Eric Wong wrote:
> 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.

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, 2011-05-31 08:25

Subject: Re: [RFD] Proposal for git-svn: storing SVN metadata (git-svn-id) in notes
Message-ID: <4DE4A617.9020907@alum.mit.edu>
URL: https://gitlist.dev/e/4DE4A617.9020907%40alum.mit.edu
In-Reply-To: <20110531045324.GA13661@dcvr.yhbt.net>

```
On 05/31/2011 06:53 AM, Eric Wong wrote:
> 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/

```
