Re: [PATCH v2 11/11] vcs-svn,svn-fe: add an option to write svnrev notes
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jul 25, 2011, 21:39 UTC
- Message-ID
- <20110725213923.GC8708@elie.dc0b.debconf.org>
- In-Reply-To
- <1310559673-5026-12-git-send-email-divanorama@gmail.com>
Hi,
Dmitry Ivankov wrote:
Show 12 quoted lines
> There are already a few options to determine svn revision from which > a git commit imported with svn-fe came from. One is to make svn-fe > write a git-svn-id: line to commit messages. Another one is to calc > distance to the root commit. The former includes a "url" and is for > git-svn compatibility, the latter is obviously slow and a bit fragile. > > $ svn-fe --notes_ref=notes_tree --ref=branch... > will write annotations for branch commits to the notes_tree, each > annotation is a simple "rN" string. Then these annotations can be > viewed manually or used in incremental import to detect the last > imported revision or to (re)create the import marks for further > imports.
Wouldn't another way be to look at the mark numbers?
I am not sure I like this. svn-fe is supposed to be a generally useful tool, and this patch hard-codes the particular note format rN. If it is needed, maybe it would be possible to do something like
--notes-ref=refs/notes/svn-rev --note='project foo, r%N'
As a bonus, that would allow including more information using different flag characters in the note in the future.