From: Petr Baudis <pasky@suse.cz>
To: Alan Chandler <alan@chandlerfamily.org.uk>
Cc: git@vger.kernel.org
Subject: Re: little conundrum
Date: Thu, 3 Nov 2005 21:06:31 +0100 [thread overview]
Message-ID: <20051103200631.GJ1431@pasky.or.cz> (raw)
In-Reply-To: <200511031741.20496.alan@chandlerfamily.org.uk>
Dear diary, on Thu, Nov 03, 2005 at 06:41:20PM CET, I got a letter
where Alan Chandler <alan@chandlerfamily.org.uk> told me that...
> Since I don't actually have a list of the files, I thought I would establish
> these automatically by going into each directory and doing a cg-init. So I
> now have two disjoint repositories each with their source tree in it.
>
> My next thought was to add a branch to one of them and then pull the resultant
> code over and merge it using cg-branch-add followed by a cg-update. But when
> I do that it complains that there is no common base.
>
> I tried creating an empty directory and separately merging the two versions
> with it, so that I have a common parent, but whatever I do, I can't get one
> of those nice little gitk diagrams that has any linkage between the two
> versions of the source code.
The empty directory is the good approach to do the merge, but you are
going to get a huge number of conflicts. Anyway, this is probably the
most sensible behaviour for cg-merge, so I added cg-merge -j which does
exactly that - use empty tree as a base for three-way merge.
But you actually do not want to do a merge, but:
$ cd original-version
$ cg-init
$ cd ../modified-version
$ cg-init
$ cg-branch-add orig ../original-version
$ cg-fetch orig
$ echo `cg-object-id` `cg-object-id orig` >.git/info/grafts
Voila, now your commit in 'modified' has the commit in 'original' as its
parent.
PS: And to be able to even commit the cg-merge -j, I had to back out the
git-read-tree -u usage in cg-Xlib's tree_timewarp, which made it racy as
hell - basically, it could be argued that it working _properly_ would be
a race now. Besides, keeping local changes wouldn't work, and stuff.
cg-admin-uncommit was painfully broken.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
next prev parent reply other threads:[~2005-11-03 20:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-03 17:41 little conundrum Alan Chandler
2005-11-03 17:47 ` Johannes Schindelin
2005-11-03 20:57 ` Peter Eriksen
2005-11-03 22:02 ` Alan Chandler
2005-11-04 0:41 ` Johannes Schindelin
2005-11-03 18:10 ` Peter Eriksen
2005-11-03 18:48 ` Alan Chandler
2005-11-03 19:16 ` Peter Eriksen
2005-11-03 19:30 ` Alan Chandler
2005-11-03 19:36 ` Peter Eriksen
2005-11-03 20:06 ` Petr Baudis [this message]
2005-11-03 22:17 ` Alan Chandler
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=20051103200631.GJ1431@pasky.or.cz \
--to=pasky@suse.cz \
--cc=alan@chandlerfamily.org.uk \
--cc=git@vger.kernel.org \
/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