git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-svn question: adding a branch to a local clone of an upstream  git-svn clone
@ 2010-01-22 19:15 Jay Soffian
  2010-01-22 20:03 ` Jay Soffian
  0 siblings, 1 reply; 3+ messages in thread
From: Jay Soffian @ 2010-01-22 19:15 UTC (permalink / raw)
  To: git

I have a clone of a repo that is itself a git-svn clone:

git://git.chromium.org/chromium.git

So my .git/config has (obviously):

[remote "origin"]
	url = git://git.chromium.org/chromium.git
	fetch = +refs/heads/*:refs/remotes/origin/*

The upstream repo has only trunk. I want to use git-svn to add an
additional branch:

http://src.chromium.org/svn/branches/249/

So I added this to my .git/config:

[svn-remote "svn"]
	url = http://src.chromium.org/svn
	fetch = branches/249/src:refs/remotes/branches/249

I looked up the branch point for 249 and created a new branch:

$ svn log http://src.chromium.org/svn/branches/249
------------------------------------------------------------------------
r32060 | laforge@chromium.org | 2009-11-16 11:34:43 -0500 (Mon, 16 Nov
2009) | 1 line

Branching for 249 @32041
------------------------------------------------------------------------
$ git rev2sha | grep src@32041
bf6f4ed svn://svn.chromium.org/chrome/trunk/src@32041
$ git checkout -b 249 bf6f4ed

And then attempted a git svn fetch. Which wanted to grab the entire
svn history. I then realized that the origin git clone is from a
different upstream URL (to which I don't have access), so I tried
adding rewriteRoot:

[svn-remote "svn"]
	url = http://src.chromium.org/svn
	fetch = branches/249/src:refs/remotes/branches/249
	rewriteRoot = svn://svn.chromium.org/chrome

Same problem. Ah, UUID is also different. Unfortunately, git-svn
doesn't have a "rewriteUUID" config (I'm working on a patch), but I
did try hacking .git/svn/.metadata to look like this:

[svn-remote "svn"]
	reposRoot = http://src.chromium.org/svn
	uuid = 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
	svnsync-uuid = 0039d316-1c4b-4281-b951-d872f2087c98
	svnsync-url = svn://svn.chromium.org/chrome

Then changed my .git/config to:

[svn-remote "svn"]
	url = http://src.chromium.org/svn
	fetch = branches/249/src:refs/remotes/branches/249
	useSvnsyncProps = true

I blew away .git/svn/refs and tried again:

$ git svn fetch
Found possible branch point: http://src.chromium.org/svn/trunk/src =>
http://src.chromium.org/svn/branches/249/src, 32041
Initializing parent: refs/remotes/branches/249@32041
r3 = c14d891d44f0afff64e56ed7c9702df1d807b1ee (refs/remotes/branches/249@32041)

Sadly, git svn is still trying to fetch the entire history.

Hmpfh. Any suggestions? Maybe I should just not worry about trying to
have a connected history locally (I'll never be dcomitting) and just
use git svn fetch -r 32041:HEAD ?

j.

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

* Re: git-svn question: adding a branch to a local clone of an upstream  git-svn clone
  2010-01-22 19:15 git-svn question: adding a branch to a local clone of an upstream git-svn clone Jay Soffian
@ 2010-01-22 20:03 ` Jay Soffian
  2010-01-22 22:43   ` Jay Soffian
  0 siblings, 1 reply; 3+ messages in thread
From: Jay Soffian @ 2010-01-22 20:03 UTC (permalink / raw)
  To: git

On Fri, Jan 22, 2010 at 2:15 PM, Jay Soffian <jaysoffian@gmail.com> wrote:

> $ git checkout -b 249 bf6f4ed
> ...
> [svn-remote "svn"]
>        url = http://src.chromium.org/svn
>        fetch = branches/249/src:refs/remotes/branches/249

Also tried this:

$ git update-ref refs/remotes/branches/249 bf6f4ed
$ git svn fetch
Done rebuilding
.git/svn/refs/remotes/branches/249/.rev_map.4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Done rebuilding
.git/svn/refs/remotes/branches/249/.rev_map.4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Done rebuilding
.git/svn/refs/remotes/branches/249/.rev_map.4ff67af0-8c30-449e-8e8b-ad334ec8d88c
[... lots of these as it works its way through 30k revisions...]
Found possible branch point: http://src.chromium.org/svn/trunk/src =>
http://src.chromium.org/svn/branches/249/src, 32041
Initializing parent: refs/remotes/branches/249@32041
r3 = c14d891d44f0afff64e56ed7c9702df1d807b1ee (refs/remotes/branches/249@32041)
...

So, no help either. :-(

j.

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

* Re: git-svn question: adding a branch to a local clone of an upstream  git-svn clone
  2010-01-22 20:03 ` Jay Soffian
@ 2010-01-22 22:43   ` Jay Soffian
  0 siblings, 0 replies; 3+ messages in thread
From: Jay Soffian @ 2010-01-22 22:43 UTC (permalink / raw)
  To: git

On Fri, Jan 22, 2010 at 3:03 PM, Jay Soffian <jaysoffian@gmail.com> wrote:
> So, no help either. :-(

Okay, got this working with some git-svn hackage. Patch forthcoming.

j.

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

end of thread, other threads:[~2010-01-22 22:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-22 19:15 git-svn question: adding a branch to a local clone of an upstream git-svn clone Jay Soffian
2010-01-22 20:03 ` Jay Soffian
2010-01-22 22:43   ` Jay Soffian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).