git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 11/11] vcs-svn,svn-fe: add an option to write svnrev notes

From
Dmitry Ivankov <divanorama@gmail.com>
Date
Jul 28, 2011, 06:03 UTC
Message-ID
<CA+gfSn9MGiBJ-vhj25wMa5Jwu0hWo0Uyv2wiYst09+M6VX1SQA@mail.gmail.com>
In-Reply-To
<20110725213923.GC8708@elie.dc0b.debconf.org>

Sorry for a way too slow response. This patch is probably the most unbaked one, so I'll start here.

On Tue, Jul 26, 2011 at 3:39 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 18 quoted lines
> Hi,
>
> Dmitry Ivankov wrote:
>
>> 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?

If marks file is absent (after clone for example), we'll need to look at notes anyway. If it is present and has a mark for latest revision we can hope it is valid and not regenerate it. If for some reason notes are lost and marks are present, it's possible to recreate notes from marks though, at least "rN" ones.

Show 8 quoted lines
> 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.

Format string looks nice. While the whole notes thing may need more thinking. The main reason I wrote these in svn-fe is that it's more atomic to write note just after writing a commit. Also "checkpoint" will create notes for current status (and will write marks too, but weren't we going to consider notes as a primary data copy? it can be cloned for example).

One more consideration is that copy-from information most likely will be written by svn-fe (nothing else knows it anyway) to some notes, so we'll need some notes writing in svn-fe.

Previous: Jonathan NiederNext: Jonathan Nieder
Message 23 of 24 in “vcs-svn,svn-fe add a couple of options”
  1. 00/11 vcs-svn,svn-fe add a couple of optionsDmitry Ivankov, Jul 13, 2011
  2. 01/11 svn-fe: add man target to MakefileDmitry Ivankov, Jul 13, 2011
  3. Jonathan NiederJul 24, 2011
  4. 02/11 test-svn-fe: use parse-optionsDmitry Ivankov, Jul 13, 2011
  5. Jonathan NiederJul 24, 2011
  6. 03/11 svn-fe: add EXTLIBS needed for parse-optionsDmitry Ivankov, Jul 13, 2011
  7. Jonathan NiederJul 24, 2011
  8. 04/11 svn-fe: add usage and unpositional arguments versionsDmitry Ivankov, Jul 13, 2011
  9. Jonathan NiederJul 24, 2011
  10. 05/11 vcs-svn: move url parameter from _read to _initDmitry Ivankov, Jul 13, 2011
  11. Jonathan NiederJul 24, 2011
  12. 06/11 vcs-svn: move commit parameters logic to svndump.cDmitry Ivankov, Jul 13, 2011
  13. Jonathan NiederJul 24, 2011
  14. 07/11 vcs-svn,svn-fe: allow to specify dump destination refDmitry Ivankov, Jul 13, 2011
  15. Jonathan NiederJul 25, 2011
  16. 08/11 vcs-svn,svn-fe: convert REPORT_FILENO to an optionDmitry Ivankov, Jul 13, 2011
  17. Jonathan NiederJul 25, 2011
  18. 09/11 vcs-svn,svn-fe: allow to disable 'progress' linesDmitry Ivankov, Jul 13, 2011
  19. 10/11 vcs-svn,svn-fe: add --incremental optionDmitry Ivankov, Jul 13, 2011
  20. Jonathan NiederJul 25, 2011
  21. 11/11 vcs-svn,svn-fe: add an option to write svnrev notesDmitry Ivankov, Jul 13, 2011
  22. Jonathan NiederJul 25, 2011
  23. Dmitry IvankovJul 28, 2011
  24. Jonathan NiederJul 28, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.