# git svn fetch loses data

11 messages from 2009-11-14 to 2009-12-11. Participants: Victor Engmark, Sverre Rabbelier, Johan 't Hart, Thomas Rast.
Thread: https://gitlist.dev/t/21613

## Victor Engmark, 2009-11-14 17:07

Subject: git svn fetch loses data
Message-ID: <7d4f41f50911140907n285d72dcp7bbe802900f8bae5@mail.gmail.com>
URL: https://gitlist.dev/e/7d4f41f50911140907n285d72dcp7bbe802900f8bae5%40mail.gmail.com

```
Hi all,

I've been trying to move from Subversion to Git for a couple days now,
and I can't get git svn to get all my data. The progress so far is
explained at <http://l0b0.wordpress.com/2009/11/14/n-way-git-synchronization-with-extra-cheese/>.
git svn fetch doesn't report any errors, and goes through the entire
repository as regular as anything, but at the end about half of the
root directories are missing. Even the file modified by the last
commit is not there at all. Any ideas why this is?

-- 
Victor Engmark

```

## Sverre Rabbelier, 2009-11-14 17:25

Subject: Re: git svn fetch loses data
Message-ID: <fabb9a1e0911140925r3f7b7806s65da03c046bf5ab4@mail.gmail.com>
URL: https://gitlist.dev/e/fabb9a1e0911140925r3f7b7806s65da03c046bf5ab4%40mail.gmail.com
In-Reply-To: <7d4f41f50911140907n285d72dcp7bbe802900f8bae5@mail.gmail.com>

```
Heya,

On Sat, Nov 14, 2009 at 18:07, Victor Engmark <victor.engmark@gmail.com> wrote:
> but at the end about half of the
> root directories are missing.

Can you be more specific, what is the layout of your repository and
which directories are missing?

/ -- trunk
  -- branches
  -- tags
  -- thirdparty
  -- private

If your repository looks like that, and 'thirdparty' and 'private' are
missing, that's because git svn assumes that you're only interested in
trunk, branches and tags by default.

-- 
Cheers,

Sverre Rabbelier

```

## Victor Engmark, 2009-11-14 19:29

Subject: Re: git svn fetch loses data
Message-ID: <7d4f41f50911141129n967374ap7d92296c5723e31e@mail.gmail.com>
URL: https://gitlist.dev/e/7d4f41f50911141129n967374ap7d92296c5723e31e%40mail.gmail.com
In-Reply-To: <fabb9a1e0911140925r3f7b7806s65da03c046bf5ab4@mail.gmail.com>

```
On Sat, Nov 14, 2009 at 6:25 PM, Sverre Rabbelier <srabbelier@gmail.com> wrote:
> On Sat, Nov 14, 2009 at 18:07, Victor Engmark <victor.engmark@gmail.com> wrote:
>> but at the end about half of the
>> root directories are missing.
>
> Can you be more specific, what is the layout of your repository and
> which directories are missing?
>
> / -- trunk
>  -- branches
>  -- tags
>  -- thirdparty
>  -- private

> If your repository looks like that, and 'thirdparty' and 'private' are
> missing, that's because git svn assumes that you're only interested in
> trunk, branches and tags by default.

I'm not entirely sure which directories you mean - I've got none of
those, neither in the repository nor the working copy. One of the
directories missing in the top-level directory of the working copy is
"Linux", which contains my .bashrc and tens of other config files.
Which is really odd, because here are the last few lines of "git svn
fetch --revision 993:1879":
r1878 = 3fcec05426b59b0bad43b02cc3c367525d2c0b93 (git-svn)
	M	Linux/etc/cups/printers.conf
r1879 = 7ab92e8f4bb1a277621d67ba7373f56a694466c1 (git-svn)

After checking this output a bit closer, it turns out only the
directories and files that were retrieved by "git svn clone" (the
first revision only) remain. Where did the files from the "git svn
fetch" go? Do I need to run something after fetch to see them?

-- 
Victor Engmark

```

## Sverre Rabbelier, 2009-11-14 19:38

Subject: Re: git svn fetch loses data
Message-ID: <fabb9a1e0911141138r5279650ge57db2413e2321a4@mail.gmail.com>
URL: https://gitlist.dev/e/fabb9a1e0911141138r5279650ge57db2413e2321a4%40mail.gmail.com
In-Reply-To: <7d4f41f50911141129n967374ap7d92296c5723e31e@mail.gmail.com>

```
Heya,

On Sat, Nov 14, 2009 at 20:29, Victor Engmark <victor.engmark@gmail.com> wrote:
> Do I need to run something after fetch to see them?

Your working copy is probably not up to date anymore, try:

$ git rebase git-svn

-- 
Cheers,

Sverre Rabbelier

```

## Victor Engmark, 2009-11-14 20:35

Subject: Re: git svn fetch loses data
Message-ID: <7d4f41f50911141235r29f791a0u72cc45b6d94c8f6e@mail.gmail.com>
URL: https://gitlist.dev/e/7d4f41f50911141235r29f791a0u72cc45b6d94c8f6e%40mail.gmail.com
In-Reply-To: <fabb9a1e0911141138r5279650ge57db2413e2321a4@mail.gmail.com>

```
On Sat, Nov 14, 2009 at 8:38 PM, Sverre Rabbelier <srabbelier@gmail.com> wrote:
> On Sat, Nov 14, 2009 at 20:29, Victor Engmark <victor.engmark@gmail.com> wrote:
>> Do I need to run something after fetch to see them?
>
> Your working copy is probably not up to date anymore, try:
>
> $ git rebase git-svn

Thank you very much! That did the trick. Now to update svn2git.sh...

-- 
Victor Engmark

```

## Johan 't Hart, 2009-11-14 23:35

Subject: Re: git svn fetch loses data
Message-ID: <4AFF3EB7.5080606@gmail.com>
URL: https://gitlist.dev/e/4AFF3EB7.5080606%40gmail.com
In-Reply-To: <fabb9a1e0911141138r5279650ge57db2413e2321a4@mail.gmail.com>

```
Sverre Rabbelier schreef:
> Heya,
> 
> On Sat, Nov 14, 2009 at 20:29, Victor Engmark <victor.engmark@gmail.com> wrote:
>> Do I need to run something after fetch to see them?
> 
> Your working copy is probably not up to date anymore, try:
> 
> $ git rebase git-svn
> 
Why not just
$ git svn rebase
?

```

## Victor Engmark, 2009-11-15 09:56

Subject: Re: git svn fetch loses data
Message-ID: <7d4f41f50911150156x4cc07dcch977c90e5bd134d17@mail.gmail.com>
URL: https://gitlist.dev/e/7d4f41f50911150156x4cc07dcch977c90e5bd134d17%40mail.gmail.com
In-Reply-To: <4AFF3EB7.5080606@gmail.com>

```
On Sun, Nov 15, 2009 at 12:35 AM, Johan 't Hart <johanthart@gmail.com> wrote:
> Sverre Rabbelier schreef:
>> On Sat, Nov 14, 2009 at 20:29, Victor Engmark <victor.engmark@gmail.com>
>> wrote:
>>>
>>> Do I need to run something after fetch to see them?
>>
>> Your working copy is probably not up to date anymore, try:
>>
>> $ git rebase git-svn
>>
> Why not just
> $ git svn rebase
> ?

What is the difference between the two?

-- 
Victor Engmark

```

## Thomas Rast, 2009-11-15 13:33

Subject: Re: git svn fetch loses data
Message-ID: <200911151433.54797.trast@student.ethz.ch>
URL: https://gitlist.dev/e/200911151433.54797.trast%40student.ethz.ch
In-Reply-To: <7d4f41f50911150156x4cc07dcch977c90e5bd134d17@mail.gmail.com>

```
Victor Engmark wrote:
> On Sun, Nov 15, 2009 at 12:35 AM, Johan 't Hart <johanthart@gmail.com> wrote:
> > Sverre Rabbelier schreef:
> > 
> > > $ git rebase git-svn
> > 
> > Why not just
> > $ git svn rebase
> 
> What is the difference between the two?

'git svn rebase' magically[*] picks the right remote branch to rebase
against, and also first talks to the network to update said branch.


[*] actually it looks at the first git-svn-id line found in git log
--first-parent.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

```

## Johan 't Hart, 2009-11-15 19:52

Subject: Re: git svn fetch loses data
Message-ID: <4B005C14.8090607@gmail.com>
URL: https://gitlist.dev/e/4B005C14.8090607%40gmail.com
In-Reply-To: <200911151433.54797.trast@student.ethz.ch>

```
Thomas Rast schreef:
> Victor Engmark wrote:
>> On Sun, Nov 15, 2009 at 12:35 AM, Johan 't Hart <johanthart@gmail.com> wrote:
>>> Sverre Rabbelier schreef:
>>>
>>>> $ git rebase git-svn
>>> Why not just
>>> $ git svn rebase
>> What is the difference between the two?
> 
> 'git svn rebase' magically[*] picks the right remote branch to rebase
> against, and also first talks to the network to update said branch.
> 
> 
> [*] actually it looks at the first git-svn-id line found in git log
> --first-parent.
> 

I didn't even know you could also do
$ git rebase git-svn
Unless git-svn is a ref...

```

## Thomas Rast, 2009-11-15 20:52

Subject: Re: git svn fetch loses data
Message-ID: <200911152152.01513.trast@student.ethz.ch>
URL: https://gitlist.dev/e/200911152152.01513.trast%40student.ethz.ch
In-Reply-To: <4B005C14.8090607@gmail.com>

```
Johan 't Hart wrote:
> I didn't even know you could also do
> $ git rebase git-svn
> Unless git-svn is a ref...

You can't, but in git-svn's default configuration (without
--stdlayout) the cloned SVN history is called refs/remotes/git-svn.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

```

## Victor Engmark, 2009-12-11 08:32

Subject: Re: git svn fetch loses data
Message-ID: <7d4f41f50912110032kd1990f9y9bb856576fc0437a@mail.gmail.com>
URL: https://gitlist.dev/e/7d4f41f50912110032kd1990f9y9bb856576fc0437a%40mail.gmail.com
In-Reply-To: <200911152152.01513.trast@student.ethz.ch>

```
On Sun, Nov 15, 2009 at 9:52 PM, Thomas Rast <trast@student.ethz.ch> wrote:
> Johan 't Hart wrote:
>> I didn't even know you could also do
>> $ git rebase git-svn
>> Unless git-svn is a ref...
>
> You can't, but in git-svn's default configuration (without
> --stdlayout) the cloned SVN history is called refs/remotes/git-svn.

Thanks all; now it all works a lot more smoothly.

-- 
Victor Engmark

```
