[SciPy-dev] Git-svn sub-optimality

David Cournapeau cournape@gmail....
Mon Mar 9 02:23:24 CDT 2009


On Sun, Mar 8, 2009 at 11:04 PM, Pauli Virtanen <pav@iki.fi> wrote:
> Sun, 08 Mar 2009 17:31:24 +0900, David Cournapeau wrote:
>
>> Pauli Virtanen wrote:
>>> Hi David (& other prospective git-svn users),
>>>
>>> I just ran into a speedbump with git-svn and using the Git mirror:
>>>
>>>     http://projects.scipy.org/numpy/wiki/GitMirror#Abigfatwordofwarning
>>>
>>> In short: apparently git-svn does not automatically track SVN commits
>>> appearing elsewhere than locally via `git-svn fetch/rebase`. So if you
>>> want to `dcommit` after `git fetch`ing from the mirror or from someone
>>> else, the database of git-svn needs to be rebuilt:
>>>
>>>     rm -rf .git/svn
>>>     git svn rebase -l
>>>
>>> Otherwise, the `dcommit` will shove bogus changesets to SVN. (Ouch!)
>>>
>>>
>> Hm, do you have an example of that ? It never happened to me. My typical
>> usage is when I start working on numpy is:
>>
>> git svn fetch --all
>> git co master && git svn rebase -l
>> git co -b line_of_work
>>
>> When I use dcommit, it first rebase my changes on top of svn last
>> revision if the last svn revision differs from the on I have locally.
>
> It doesn't occur if you stick to the usual git-svn workflow of getting
> SVN commits via `git svn fetch/rebase` only. An example where it occurs is
>
>    git fetch mirror      # fetch branch from mirror or from someone else
>    git rebase svn/trunk  # rebase on it
>    git svn dcommit -n    # now try to dcommit

Ah, yes, you should definitely stick to one and only one mirror.
That's a git-svn limitation I think. I guess I was careful because of
my experience with previous conversion tools (in bzr).  I think the
problem is linked to guaranteeing that a given commit with the same
content will be recognized as such. In git proper, it is by design if
the history is the same. In bzr and other systems, it has to be
explicit because a commit does not depend only on the content (but on
meta-data as well).

That's what they call deterministic on the BzrMigration page:

http://bazaar-vcs.org/BzrMigration

If I look at my git-svn import and yours, the commit sha1 are not the
same for the corresponding svn revision. As such, I don't see how it
is possible to guarantee consistency with multiple mirrors.

cheers,

David


More information about the Scipy-dev mailing list