git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Baumann <waste.manager@gmx.de>
To: Matthias Kleine <matthias_kleine@gmx.de>, git@vger.kernel.org
Subject: Re: git-svn: Finding the svn-URL of the current branch in git
Date: Wed, 8 Aug 2007 22:57:31 +0200	[thread overview]
Message-ID: <20070808205731.GF27470@xp.machine.xx> (raw)
In-Reply-To: <20070808192537.GB27470@xp.machine.xx>

On Wed, Aug 08, 2007 at 09:25:37PM +0200, Peter Baumann wrote:
> On Wed, Aug 08, 2007 at 08:51:55PM +0200, Matthias Kleine wrote:
> > Junio C Hamano wrote:
> >> Parents' order and which branch you are on may not have anything
> >> to do with each other.  Somebody else may have pulled a while on
> >> b, and you might have pulled from him the merge he created by
> >> doing so while you are on branch a.
> >
> > You're right, I didn't think of that. While pondering this I came up with
> > another problem: git-svn currently remembers which svn-branch a commit
> > belongs to by including this information in the git commit log message.
> 
> Thats true.
> 
> > This way it is not possible to have one git-commit appear in more than one
> > svn branch.
> 
> But there is no way that a git commit could appear on several branches
> in SVN, because SVN doesn't have the concept of multiple parents. So you
> can't have a commit which describes a merge of two branches, because SVN
> can't store the 2 parents. But you could have 2 commits which describe
> the same state (e.g. same root tree), but are on seperate branches.
> 
> t:= commits on trunk
> b:= commits on branch 'b'
> 
> repo1:
> 	t    <-trunk
> 	|
> 	t
> 	| \
> 	t  b <- branch
> 	| /
> 	t
> 
> But this graph is only local to the committers repo. Another person
> using git-svn to track the SVN repo sees this
> 
> repo2/SVN repo:
> 
> 	t     <-trunk
> 	|
> 	t
> 	|
> 	t  b  <- branch
> 	| /
> 	t
> 
> So if you do a 'git merge trunk' in repo1 on branch 'branch', git-svn
> should produce something like this:
> 
> repo2/SVN repo:
> 
> trunk->	t  t' <- branch
> 	|  |
> 	t  t'
> 	|  |
> 	t  b
> 	| /
> 	t
> 
> The interesting case is what it will produce in *YOUR* repo. There are 2
                                  ^- should, because both cases aren't
				  implemented yet.
> possibilities:
> 
> repo1 (I):				repo1 (II)
> 	tb   <-trunk <-branch		trunk->	t  b <- branch
> 	|					|  |
> 	tb					t  b
> 	| \					| \|
> 	t  b <- branch				t  b
> 	| /					| /
> 	t					t
> 
> (I)  would be nicer, but propably more difficult the way git-svn works now.
> 
> (II) would also be possible and more in line what other people importing
>      from SVN see.
> 
> These are the possible ways to describe the merge of 2 SVN branches.
> 
-Peter

  reply	other threads:[~2007-08-08 20:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-07 18:29 git-svn: Finding the svn-URL of the current branch in git Matthias Kleine
2007-08-07 20:55 ` Peter Baumann
2007-08-08  8:54   ` Matthias Kleine
2007-08-08  9:13     ` Junio C Hamano
2007-08-08 18:51       ` Matthias Kleine
2007-08-08 19:25         ` Peter Baumann
2007-08-08 20:57           ` Peter Baumann [this message]
2007-08-16  8:21   ` Eric Wong
2007-08-16 12:16     ` Peter Baumann
2007-08-17  7:55       ` Eric Wong
2007-08-17  8:45     ` Junio C Hamano
2007-08-18  9:09       ` Eric Wong
2007-08-18  9:57         ` David Kastrup
2007-08-18 10:04           ` Junio C Hamano
2007-08-18 21:18             ` Karl Hasselström

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070808205731.GF27470@xp.machine.xx \
    --to=waste.manager@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=matthias_kleine@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).