git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Getting git-svn to recognize branchpoints?
@ 2008-06-06 19:07 davetron5000
  2008-06-07 15:36 ` Steven Walter
  0 siblings, 1 reply; 3+ messages in thread
From: davetron5000 @ 2008-06-06 19:07 UTC (permalink / raw)
  To: git

I was given a branch in an SVN repo to work on.  My plan is to merge
it with trunk in Git to indicate how much easier it would be to use
Git.

Unfortunately, Git doesn't seem to realize that my branch is a branch
from SVN's trunk.  For example, I have made no changes to file foo.c

The main trunk has changes to foo.c

When I merge, those changes show up as conflicts.

gitk doesn't show any branch points, and I'm thinking that Git just
doesn't see the branches as they are in SVN.

The sha-1 of the branch commit from SVN shows up in gitk when I've
checked out my branch, but not if I have the trunk checked out (though
a git log DOES show it).

Here's what I did to initially set this up (I'm working on $SVNROOT/
branches/FOO):

git-svn init ssh://www.theirrepo.com/svnroot
git-checkout -b local-trunk trunk
git-branch local-foo FOO
git-checkout local-foo

git-svn dcommit on local-foo sends changes to FOO, if on local-trunk,
they are sent to trunk in SVN
git-svn rebase gets changes from FOO or trunk, as appropriate

Here's my .git/config:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[svn-remote "svn"]
    url = svn+ssh://davec@svn.theirrepo.com/svnroot
    fetch = trunk:refs/remotes/trunk
    branches = branches/*:refs/remotes/*
    tags = tags/*:refs/remotes/tags/*

Any ideas?

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

* Re: Getting git-svn to recognize branchpoints?
  2008-06-06 19:07 Getting git-svn to recognize branchpoints? davetron5000
@ 2008-06-07 15:36 ` Steven Walter
  2008-06-07 17:13   ` davetron5000
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Walter @ 2008-06-07 15:36 UTC (permalink / raw)
  To: davetron5000; +Cc: git

On Fri, Jun 6, 2008 at 3:07 PM, davetron5000 <davetron5000@gmail.com> wrote:
> I was given a branch in an SVN repo to work on.  My plan is to merge
> it with trunk in Git to indicate how much easier it would be to use
> Git.
>
> Unfortunately, Git doesn't seem to realize that my branch is a branch
> from SVN's trunk.  For example, I have made no changes to file foo.c
>
> The main trunk has changes to foo.c
>
> When I merge, those changes show up as conflicts.
>
> gitk doesn't show any branch points, and I'm thinking that Git just
> doesn't see the branches as they are in SVN.

How much history did you fetch from subversion?  If you didn't fetch
at least to the branch point, then that could explain what you're
seeing.  If the SVN repository isn't too large, it is probably worth
the time to fetch the entire history (from r1 forward).

> The sha-1 of the branch commit from SVN shows up in gitk when I've
> checked out my branch, but not if I have the trunk checked out (though
> a git log DOES show it).

That's expected; it sounds like you want "gitk --all"
-- 
-Steven Walter <stevenrwalter@gmail.com>
"A human being should be able to change a diaper, plan an invasion,
butcher a hog, conn a ship, design a building, write a sonnet, balance
accounts, build a wall, set a bone, comfort the dying, take orders,
give orders, cooperate, act alone, solve equations, analyze a new
problem, pitch manure, program a computer, cook a tasty meal, fight
efficiently, die gallantly. Specialization is for insects."
 -Robert Heinlein

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

* Re: Getting git-svn to recognize branchpoints?
  2008-06-07 15:36 ` Steven Walter
@ 2008-06-07 17:13   ` davetron5000
  0 siblings, 0 replies; 3+ messages in thread
From: davetron5000 @ 2008-06-07 17:13 UTC (permalink / raw)
  To: git

OK, gitk is now showing it using the --all.

I did get the entire history.  It seems like when I merge, every file
that was changed on trunk since the branch shows up as a conflict,
including files that I have not changed on my branch.

For one particular file, the history is:

6/4/07 - File Created
8/9/07 - File modified
12/3/07 - File modified
4/24/08 - Branch created

The diffs of the conflict make no sense, e.g.

<< From Trunk
some_stuff();
that_was_added();
====
>> From My Branch

I've tried all the merge strategies, and nothing makes a difference...

On Jun 7, 11:36 am, "Steven Walter" <stevenrwal...@gmail.com> wrote:
> On Fri, Jun 6, 2008 at 3:07 PM, davetron5000 <davetron5...@gmail.com> wrote:
> > I was given a branch in an SVN repo to work on.  My plan is to merge
> > it with trunk in Git to indicate how much easier it would be to use
> > Git.
>
> > Unfortunately, Git doesn't seem to realize that my branch is a branch
> > from SVN's trunk.  For example, I have made no changes to file foo.c
>
> > The main trunk has changes to foo.c
>
> > When I merge, those changes show up as conflicts.
>
> > gitk doesn't show any branch points, and I'm thinking that Git just
> > doesn't see the branches as they are in SVN.
>
> How much history did you fetch from subversion?  If you didn't fetch
> at least to the branch point, then that could explain what you're
> seeing.  If the SVN repository isn't too large, it is probably worth
> the time to fetch the entire history (from r1 forward).
>
> > The sha-1 of the branch commit from SVN shows up in gitk when I've
> > checked out my branch, but not if I have the trunk checked out (though
> > a git log DOES show it).
>
> That's expected; it sounds like you want "gitk --all"
> --
> -Steven Walter <stevenrwal...@gmail.com>
> "A human being should be able to change a diaper, plan an invasion,
> butcher a hog, conn a ship, design a building, write a sonnet, balance
> accounts, build a wall, set a bone, comfort the dying, take orders,
> give orders, cooperate, act alone, solve equations, analyze a new
> problem, pitch manure, program a computer, cook a tasty meal, fight
> efficiently, die gallantly. Specialization is for insects."
>  -Robert Heinlein
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2008-06-07 17:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-06 19:07 Getting git-svn to recognize branchpoints? davetron5000
2008-06-07 15:36 ` Steven Walter
2008-06-07 17:13   ` davetron5000

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).