# "svn switch" equivalent when using git-svn -- git-filter-branch?

5 messages from 2007-07-09 to 2007-07-10. Participants: David Kastrup, Eric Wong.
Thread: https://gitlist.dev/t/8946

## David Kastrup, 2007-07-09 12:36

Subject: "svn switch" equivalent when using git-svn -- git-filter-branch?
Message-ID: <86sl7x7nzq.fsf@lola.quinscape.zz>
URL: https://gitlist.dev/e/86sl7x7nzq.fsf%40lola.quinscape.zz

```

Hi,

an upstream svn repository that I access with git-svn has moved.  I
seem to be too stupid to use git-filter-branch and/or .git/config
and/or git-reset to make my git mirror follow the switch.

Any pointers?

-- 
David Kastrup

```

## Eric Wong, 2007-07-10 05:40

Subject: Re: "svn switch" equivalent when using git-svn -- git-filter-branch?
Message-ID: <20070710054038.GA17675@muzzle>
URL: https://gitlist.dev/e/20070710054038.GA17675%40muzzle
In-Reply-To: <86sl7x7nzq.fsf@lola.quinscape.zz>

```
David Kastrup <dak@gnu.org> wrote:
> Hi,
> 
> an upstream svn repository that I access with git-svn has moved.  I
> seem to be too stupid to use git-filter-branch and/or .git/config
> and/or git-reset to make my git mirror follow the switch.

Just changing the url key in the [svn-remote] section of the .git/config
file should be enough.

You'll probably need to fetch at least one revision from the new URL
before being able to dcommit, though.

I've never looked at git-filter-branch, either.

-- 
Eric Wong

```

## David Kastrup, 2007-07-10 08:24

Subject: Re: "svn switch" equivalent when using git-svn -- git-filter-branch?
Message-ID: <86ejjgzmxl.fsf@lola.quinscape.zz>
URL: https://gitlist.dev/e/86ejjgzmxl.fsf%40lola.quinscape.zz
In-Reply-To: <20070710054038.GA17675@muzzle>

```
Eric Wong <normalperson@yhbt.net> writes:

> David Kastrup <dak@gnu.org> wrote:
>> Hi,
>> 
>> an upstream svn repository that I access with git-svn has moved.  I
>> seem to be too stupid to use git-filter-branch and/or .git/config
>> and/or git-reset to make my git mirror follow the switch.
>
> Just changing the url key in the [svn-remote] section of the .git/config
> file should be enough.
>
> You'll probably need to fetch at least one revision from the new URL
> before being able to dcommit, though.

git-fetch works, but git-rebase -l still complains:

git-svn rebase -l
Unable to determine upstream SVN information from working tree history

And consequently I can't actually update.

-- 
David Kastrup

```

## Eric Wong, 2007-07-10 09:00

Subject: Re: "svn switch" equivalent when using git-svn -- git-filter-branch?
Message-ID: <20070710090003.GA18850@muzzle>
URL: https://gitlist.dev/e/20070710090003.GA18850%40muzzle
In-Reply-To: <86ejjgzmxl.fsf@lola.quinscape.zz>

```
David Kastrup <dak@gnu.org> wrote:
> Eric Wong <normalperson@yhbt.net> writes:
> 
> > David Kastrup <dak@gnu.org> wrote:
> >> Hi,
> >> 
> >> an upstream svn repository that I access with git-svn has moved.  I
> >> seem to be too stupid to use git-filter-branch and/or .git/config
> >> and/or git-reset to make my git mirror follow the switch.
> >
> > Just changing the url key in the [svn-remote] section of the .git/config
> > file should be enough.
> >
> > You'll probably need to fetch at least one revision from the new URL
> > before being able to dcommit, though.
> 
> git-fetch works, but git-rebase -l still complains:
> 
> git-svn rebase -l
> Unable to determine upstream SVN information from working tree history
> 
> And consequently I can't actually update.

Does manually specifying the remote name work?

Try bypassing the auto-detection of "git-svn rebase" and just using
"git rebase <remote name>"

-- 
Eric Wong

```

## David Kastrup, 2007-07-10 09:38

Subject: Re: "svn switch" equivalent when using git-svn -- git-filter-branch?
Message-ID: <86hcocwqbz.fsf@lola.quinscape.zz>
URL: https://gitlist.dev/e/86hcocwqbz.fsf%40lola.quinscape.zz
In-Reply-To: <20070710090003.GA18850@muzzle>

```
Eric Wong <normalperson@yhbt.net> writes:

> David Kastrup <dak@gnu.org> wrote:
>> Eric Wong <normalperson@yhbt.net> writes:
>> 
>> > David Kastrup <dak@gnu.org> wrote:
>> >> Hi,
>> >> 
>> >> an upstream svn repository that I access with git-svn has moved.  I
>> >> seem to be too stupid to use git-filter-branch and/or .git/config
>> >> and/or git-reset to make my git mirror follow the switch.
>> >
>> > Just changing the url key in the [svn-remote] section of the .git/config
>> > file should be enough.
>> >
>> > You'll probably need to fetch at least one revision from the new URL
>> > before being able to dcommit, though.
>> 
>> git-fetch works, but git-rebase -l still complains:
>> 
>> git-svn rebase -l
>> Unable to determine upstream SVN information from working tree history
>> 
>> And consequently I can't actually update.
>
> Does manually specifying the remote name work?
>
> Try bypassing the auto-detection of "git-svn rebase" and just using
> "git rebase <remote name>"

Well, a combination of changing the config, doing a fetch, changing
the config back again, doing the rebase, and changing the config again
seems to have done the trick for now.

I'll have to see how this works in future.  Maybe I will have to
refetch everything anyhow as upstream has just decided to create a
trunk directory (and presumably tags and branches will follow).  I am
not sure I am up to performing the correct steps for adapting to this.

-- 
David Kastrup

```
