Git development
 help / color / mirror / Atom feed
* Trouble with git-svn when upstream svn URL changed
@ 2006-12-08 17:43 Seth Falcon
  2006-12-08 18:11 ` Eric Wong
  0 siblings, 1 reply; 4+ messages in thread
From: Seth Falcon @ 2006-12-08 17:43 UTC (permalink / raw)
  To: git; +Cc: Eric Wong

Hi,

One of the repositories I have been tracking with git-svn was
reorganized and the path that I have been tracking is now in a new
location.

I was hoping that the following would work:

   git clone orig new
   cd new
   git svn rebuild $NEW_URL

I also tried 

   git svn rebuild --remote $NEW_URL

This have some output that looked reasonable (svn rev nums and git
sha1's).  But git svn fetch does nothing and I don't seem to have any
of the new content.  Am I using this incorrectly?

I guess I can create a fresh git repos using git-svn init and then
fetch all of my dev branches from the original repository.

git version 1.4.4.1.g03c8-dirty (no changes to git-svn)

Thanks,


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Trouble with git-svn when upstream svn URL changed
  2006-12-08 17:43 Trouble with git-svn when upstream svn URL changed Seth Falcon
@ 2006-12-08 18:11 ` Eric Wong
  2006-12-08 18:34   ` Seth Falcon
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Wong @ 2006-12-08 18:11 UTC (permalink / raw)
  To: Seth Falcon; +Cc: git

Seth Falcon <sethfalcon@gmail.com> wrote:
> Hi,
> 
> One of the repositories I have been tracking with git-svn was
> reorganized and the path that I have been tracking is now in a new
> location.
> 
> I was hoping that the following would work:
> 
>    git clone orig new
>    cd new
>    git svn rebuild $NEW_URL
> 
> I also tried 
> 
>    git svn rebuild --remote $NEW_URL
> 
> This have some output that looked reasonable (svn rev nums and git
> sha1's).  But git svn fetch does nothing and I don't seem to have any
> of the new content.  Am I using this incorrectly?

This is incorrect, rebuild is not designed to handle new urls.  However,
git/git-svn are very flexible beasts :)

> I guess I can create a fresh git repos using git-svn init and then
> fetch all of my dev branches from the original repository.

You can look at "Advanced Example: Tracking a Reorganized Repository"
in the manpage.  Ignore the text about --follow-parent since you
already have the old stuff fetched, and start following the instructions
beginning with "# And now, we continue tracking the new revisions:"

If that fails (I don't think it would); you can always link branches
together using grafts (git-svn graft-branches tries to automate this;
but it's imperfect).

-- 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Trouble with git-svn when upstream svn URL changed
  2006-12-08 18:11 ` Eric Wong
@ 2006-12-08 18:34   ` Seth Falcon
  2006-12-08 19:13     ` Eric Wong
  0 siblings, 1 reply; 4+ messages in thread
From: Seth Falcon @ 2006-12-08 18:34 UTC (permalink / raw)
  To: Eric Wong; +Cc: git

Eric Wong <normalperson@yhbt.net> writes:
> This is incorrect, rebuild is not designed to handle new urls.  

ok, I was lead astray by this part of the doc for rebuild:

         A Subversion URL may be optionally specified at the
         command-line if the directory/repository you're tracking has
         moved or changed protocols.

> However, git/git-svn are very flexible beasts :)
>
>> I guess I can create a fresh git repos using git-svn init and then
>> fetch all of my dev branches from the original repository.
>
> You can look at "Advanced Example: Tracking a Reorganized Repository"
> in the manpage.  Ignore the text about --follow-parent since you
> already have the old stuff fetched, and start following the instructions
> beginning with "# And now, we continue tracking the new revisions:"

Oh, sorry I didn't find that example.  This worked perfectly, thanks!

One question: My fingers are in the habit of typing remotes/git-svn.
Can I do:
   cd .git/svn
   rm -r git-svn
   mv git-newsvn git-svn

Or is there a safer way to rename?  Or are there other config-file
ways to make this work -- to provide an alias?

Thank you so much for the prompt reply.  Nice to get going again and
with the full history.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Trouble with git-svn when upstream svn URL changed
  2006-12-08 18:34   ` Seth Falcon
@ 2006-12-08 19:13     ` Eric Wong
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Wong @ 2006-12-08 19:13 UTC (permalink / raw)
  To: Seth Falcon; +Cc: git

Seth Falcon <sethfalcon@gmail.com> wrote:
> Eric Wong <normalperson@yhbt.net> writes:
> > This is incorrect, rebuild is not designed to handle new urls.  
> 
> ok, I was lead astray by this part of the doc for rebuild:
> 
>          A Subversion URL may be optionally specified at the
>          command-line if the directory/repository you're tracking has
>          moved or changed protocols.

Hmm..  it seems that rebuild will work as intended iff you didn't clone
(and therefore still have .git/svn/git-svn/.rev_db intact).  Otherwise,
it will rebuild the .rev_db file and ignore your specified URL.  Perhaps
running rebuild twice (specifying the URL on a second clone) after a
clone would work.  I honestly haven't used or looked at rebuild in a
while.

> > However, git/git-svn are very flexible beasts :)
> >
> >> I guess I can create a fresh git repos using git-svn init and then
> >> fetch all of my dev branches from the original repository.
> >
> > You can look at "Advanced Example: Tracking a Reorganized Repository"
> > in the manpage.  Ignore the text about --follow-parent since you
> > already have the old stuff fetched, and start following the instructions
> > beginning with "# And now, we continue tracking the new revisions:"
> 
> Oh, sorry I didn't find that example.  This worked perfectly, thanks!
> 
> One question: My fingers are in the habit of typing remotes/git-svn.
> Can I do:
>    cd .git/svn
>    rm -r git-svn
>    mv git-newsvn git-svn
> 
> Or is there a safer way to rename?  Or are there other config-file
> ways to make this work -- to provide an alias?

You need to mv refs/remotes/git-newsvn refs/remotes/git-svn, too.  Then
it should be safe.

-- 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-12-08 19:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-08 17:43 Trouble with git-svn when upstream svn URL changed Seth Falcon
2006-12-08 18:11 ` Eric Wong
2006-12-08 18:34   ` Seth Falcon
2006-12-08 19:13     ` Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox