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

Re: [PATCH] git-svn: follow revisions of svm-mirrored repositories

From
João Abecasis <joao@abecasis.name>
Date
Jun 18, 2008, 02:57 UTC
Message-ID
<7bf6f1d20806171957k29dbdd4fh52c3b515e7b573d@mail.gmail.com>
In-Reply-To
<485589F5.6020409@vilain.net>
Hi Sam,

Thanks for your reply. I'm currently on the road so may be a little slow to respond. Please bear with me.

Sam Vilain wrote:
Show 23 quoted lines
>> When using an svk mirror repository as the source for git-svn,
>> find-rev and rebase don't work.
>>
>> find-rev takes a while, while it traverses and processes commit logs
>> for the branch, and ultimately fails with the error message: "Unable
>> to determine upstream SVN information from git-svn history". This
>> happens because find-rev doesn't relate information in the commit
>> messages to the internal svm-source revision maps.
>>
>> Similarly, rebase is faster but still exits with the message "Unable
>> to determine upstream SVN information from working tree history".
>>
>> The attached patch fixes a couple of underlying issues to get at least
>> these two commands working. AFAICT it still works well with plain svn
>> repositories.
>>
>> Can this be merged upstream? Any comments are welcome.
>
> Can you give an approximate series of commands that led to this not
> working?  Just to clarify what happened.  Ideally, it would be a test
> case; see if you can add it to the existing SVM test case.  In fact this
> might be a regression compared to the original support, due to lack of
> tests - in which case it would be good to fix this "for good".

I haven't tried the test cases yet, but will look into it. Perhaps that can also hammer out other places where svm-mirror support is incomplete.

In the meantime, reproducing the 2 issues my patch is supposed to fix is rather straightforward, but there could be something that I missed, so here goes:

    # Preparation, skipped informational messages.
    $ git init
    $ git svn init --use-svm-props -s file:///path/to/svk/repository/and/mirror/
    # Populate repository
    $ git svn fetch
    # And the missing functionality.
    $ git svn rebase
    Unable to determine upstream SVN information from working tree history
    $ git svn find-rev r5
    Unable to determine upstream SVN information from HEAD history

And trying out the test case I just noticed an issue with my previous patch, with misplaced // -- somehow it didn't show up in my previous tests. I'll post an updated patch, shortly.

> Also, please try to send your patches inline if possible, or at least
> try to get them to be Content-Disposition: inline, it makes review
> easier for casual list subscribers.

I was worried that sending patches inlined would break the patch because of line lengths and such, since I'm using Gmail's web interface. Anyway, I'll try that we'll see how that goes.

Cheers,
João
Previous: Sam VilainNext: João Abecasis
Message 3 of 4 in “git-svn: follow revisions of svm-mirrored repositories”
  1. git-svn: follow revisions of svm-mirrored repositoriesJoão Abecasis, Jun 14, 2008
  2. Sam VilainJun 15, 2008
  3. João AbecasisJun 18, 2008
  4. João AbecasisJun 18, 2008

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.