git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Lars Hjemli" <lh@elementstorage.no>
To: "Eric Wong" <normalperson@yhbt.net>
Cc: "Junio C Hamano" <junkio@cox.net>,
	"Joakim Tjernlund" <joakim.tjernlund@transmode.se>,
	"Steven Grimm" <koreth@midwinter.com>,
	git@vger.kernel.org
Subject: Re: git-svn set-tree bug
Date: Tue, 12 Jun 2007 10:04:41 +0200	[thread overview]
Message-ID: <8c5c35580706120104m7c3e2b2cifca513f2dda50d23@mail.gmail.com> (raw)
In-Reply-To: <20070612072035.GA29385@muzzle>

On 6/12/07, Eric Wong <normalperson@yhbt.net> wrote:
> If dcommit detects a merge commit when doing rev-list When looking at
> commit objects, is it safe to assume that the first parent is always the
> "mainline" and that parents after it are the ones to merge from?
>
> So if I saw:
>
> commit $X
> parent $A
> parent $B
>
> I'd basically do:
>   reset --hard $A
>   merge --squash $B
>
> And resulting in $C which would have the same tree as $X,
> then, when dcommit-ting, $D would be created with two parents:
>   $D~1 (svn), $B (git), but not $A
>
> Rewritten history:
>   $A         =>  $D~1
>   $X         =>  $D (HEAD revision in SVN)
>
> $X and $A are now discarded and gc-able.
>
>
> Of course, since I already have the result of "merge --squash $B" in $X,
> I could just rewrite $X with a single parent (call it $X'), dcommit, and
> then give $D ($D~1 and $B) as parents.  Avoiding the nastiness of
> set-tree
>

Would it be possible to keep the 'local commit' $X and change the
mapping in .rev_db to point at $X instead of $D? This would of course
require a matching TREE-ID + noMetadata=1. I've been tempted to try to
implement this, but my perl-skills are sadly non-existent.

If this is possible it would make my day-job interaction with svn a
much more pleasant experience: push/pull between git repos would 'just
work' (without -f).

And if "follow left parent" also works out, I (and our
'releasemaster') can finally do all merging in git (without --squash)
and preserve the DAG. Ahh, that would be great...

--
larsh

  parent reply	other threads:[~2007-06-12  8:04 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-08 17:25 git-svn set-tree bug Joakim Tjernlund
2007-06-10  1:47 ` Eric Wong
2007-06-10 17:21   ` Joakim Tjernlund
2007-06-10 17:27     ` Joakim Tjernlund
2007-06-10 21:33     ` Eric Wong
2007-06-10 23:27       ` Joakim Tjernlund
2007-06-10 23:37         ` Steven Grimm
2007-06-10 23:55           ` Joakim Tjernlund
2007-06-11  4:25             ` Eric Wong
2007-06-11  5:52               ` Junio C Hamano
2007-06-12  7:20                 ` Eric Wong
2007-06-12  7:34                   ` Junio C Hamano
2007-06-12  8:39                     ` Eric Wong
2007-06-12  9:21                       ` Joakim Tjernlund
2007-06-12 12:15                       ` Steven Grimm
2007-06-13  9:23                       ` [PATCH] git-svn: allow dcommit to retain local merge information Eric Wong
2007-06-13 17:13                         ` Joakim Tjernlund
2007-06-13 23:17                           ` Joakim Tjernlund
2007-06-20  7:04                             ` Eric Wong
2007-06-20  6:56                           ` Eric Wong
2007-06-21 16:54                             ` Joakim Tjernlund
2007-07-01 13:09                             ` Joakim Tjernlund
2007-06-14  6:30                         ` Steven Grimm
2007-06-22 11:55                           ` Joakim Tjernlund
2007-06-12  8:04                   ` Lars Hjemli [this message]
2007-06-11  6:58               ` git-svn set-tree bug Steven Grimm
2007-06-11  8:52                 ` Joakim Tjernlund

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=8c5c35580706120104m7c3e2b2cifca513f2dda50d23@mail.gmail.com \
    --to=lh@elementstorage.no \
    --cc=git@vger.kernel.org \
    --cc=joakim.tjernlund@transmode.se \
    --cc=junkio@cox.net \
    --cc=koreth@midwinter.com \
    --cc=normalperson@yhbt.net \
    /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).