">
headers
Ævar Arnfjörð Bjarmason | 8 May 19:58
spacer
spacer

Reconstructing git-svn metadata after a git clone

Ævar Arnfjörð Bjarmason <avarab <at> gmail.com>
2010-05-08 17:58:07 GMT
I maintain a couple of git-svn exports [1][2] on GitHub. I'd like to
instruct my users on how they should clone those projects and then
commit back to Subversion. But in some cases I can't figure out how to
reconstruct the Subversion metadata.

    1. github.com/openstreetmap
    2. github.com/mediawiki

The git-svn documentation is lacking here. I'd like to send a patch
for it, but first I have to know what to write. I can add Subversion
metadata to some repositories, but not others.

I can e.g. clone the WebKit repository
(trac.webkit.org/wiki/UsingGitWithWebKit#Checkout):

    git clone git://git.webkit.org/WebKit.git WebKit
    cd WebKit
    git svn init -T trunk svn.webkit.org/repository/webkit
    git update-ref refs/remotes/trunk origin/master

That works just fine and gives me:

    [...]
    r59025 = 542777d30c645a095d5416a74fdf60b2f3446685
    r59026 = 9afc07910ceabcc065fcd4fcd1c68382955d0d7e
    r59027 = c7c8bfaf28e19eab90f68f53dc7523dd07ef794f
    Done rebuilding
.git/svn/refs/remotes/trunk/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc

However, when I do that with some other repositories I can't make it
(Continue reading)

Permalink | Reply |
headers
Dmitrijs Ledkovs | 8 May 20:20
spacer
spacer

Re: Reconstructing git-svn metadata after a git clone

Dmitrijs Ledkovs <dmitrij.ledkov <at> ubuntu.com>
2010-05-08 18:20:59 GMT
On 8 May 2010 18:58, Ævar Arnfjörð Bjarmason <avarab <at> gmail.com> wrote:
> So:
>
>  * Am I doing something wrong? If so I can't see what it is.
>

No

>  * Is there something that works for the general case, i.e. you only
>   have to know the original `git svn init` options. If there is I'd
>   like to document that & submit a patch.
>

In my repo I have a branch with no anestors which has a config file,
setup.sh & fetch.sh

I instruct to clone repo, checkout "utils" branch, run setup.sh (it
overrides .git/config with config file committed to utils branch and
after it copied config it runs git svn init URL), fetch.sh just runs
git svn fetch =)

I have to do this because I have two svn remotes and both are not
standard layout. The only way for me to represet "same init options"
is by editing .git/config cause it's impossible for me to supply
git-init options on the command line =)

>  * Depending on the above; can git-svn itself be friendlier here?
>   Maybe by having a `git svn bootstrap` command. E.g.:
>

(Continue reading)

Permalink | Reply |
headers
Ævar Arnfjörð Bjarmason | 10 May 23:43
spacer
spacer

Re: Reconstructing git-svn metadata after a git clone

Ævar Arnfjörð Bjarmason <avarab <at> gmail.com>
2010-05-10 21:43:11 GMT
On Sat, May 8, 2010 at 18:20, Dmitrijs Ledkovs
<dmitrij.ledkov <at> ubuntu.com> wrote:
> On 8 May 2010 18:58, Ævar Arnfjörð Bjarmason <avarab <at> gmail.com> wrote:
>> So:
>>
>>  * Am I doing something wrong? If so I can't see what it is.
>>
>
> No
>
>>  * Is there something that works for the general case, i.e. you only
>>   have to know the original `git svn init` options. If there is I'd
>>   like to document that & submit a patch.
>>
>
> In my repo I have a branch with no anestors which has a config file,
> setup.sh & fetch.sh
>
> I instruct to clone repo, checkout "utils" branch, run setup.sh (it
> overrides .git/config with config file committed to utils branch and
> after it copied config it runs git svn init URL), fetch.sh just runs
> git svn fetch =)
>
> I have to do this because I have two svn remotes and both are not
> standard layout. The only way for me to represet "same init options"
> is by editing .git/config cause it's impossible for me to supply
> git-init options on the command line =)

If I can't resolve this I'll do something similar. Just provide a
tarball of .git/svn for each repo that is.
(Continue reading)

Permalink | Reply |
headers
Dmitrijs Ledkovs | 11 May 06:27
spacer
spacer

Re: Reconstructing git-svn metadata after a git clone

Dmitrijs Ledkovs <dmitrij.ledkov <at> ubuntu.com>
2010-05-11 04:27:05 GMT
On 10 May 2010 22:43, Ævar Arnfjörð Bjarmason <avarab <at> gmail.com> wrote:
> On Sat, May 8, 2010 at 18:20, Dmitrijs Ledkovs
> <dmitrij.ledkov <at> ubuntu.com> wrote:
>> On 8 May 2010 18:58, Ævar Arnfjörð Bjarmason <avarab <at> gmail.com> wrote:
>>> So:
>>>
>>>  * Am I doing something wrong? If so I can't see what it is.
>>>
>>
>> No
>>
>>>  * Is there something that works for the general case, i.e. you only
>>>   have to know the original `git svn init` options. If there is I'd
>>>   like to document that & submit a patch.
>>>
>>
>> In my repo I have a branch with no anestors which has a config file,
>> setup.sh & fetch.sh
>>
>> I instruct to clone repo, checkout "utils" branch, run setup.sh (it
>> overrides .git/config with config file committed to utils branch and
>> after it copied config it runs git svn init URL), fetch.sh just runs
>> git svn fetch =)
>>
>> I have to do this because I have two svn remotes and both are not
>> standard layout. The only way for me to represet "same init options"
>> is by editing .git/config cause it's impossible for me to supply
>> git-init options on the command line =)
>
> If I can't resolve this I'll do something similar. Just provide a
(Continue reading)

Permalink | Reply |
headers
Ævar Arnfjörð Bjarmason | 11 May 15:04
spacer
spacer

Re: Reconstructing git-svn metadata after a git clone

Ævar Arnfjörð Bjarmason <avarab <at> gmail.com>
2010-05-11 13:04:17 GMT
On Tue, May 11, 2010 at 04:27, Dmitrijs Ledkovs
<dmitrij.ledkov <at> ubuntu.com> wrote:
> On 10 May 2010 22:43, Ævar Arnfjörð Bjarmason <avarab <at> gmail.com> wrote:
>> Why isn't that the case? What info is in .git/svn that can't be
>> inferred from the above?
>>
>
> Is there a git versions mismatch between machine where the first
> import was made and the machine where you are testing bootstrapping by
> any chance?
>
> on my machine I sometimes see "upgrading metadata" when I'm updating
> some of my acient git-svn clones.

No, they were both running 1.7.1 from Debian.
Permalink | Reply |

Gmane

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.