Gentoo Archives: gentoo-dev

From: Kent Fredric <kentfredric@×××××.com>
To: gentoo-dev@l.g.o
Cc: Nicolas Sebrecht <nsebrecht@×××××.fr>
Subject: Re: [gentoo-dev] Re: Portage Git migration - clean cut or git-cvsserver
Date: Fri, 01 Jun 2012 15:57:46
Message-Id: CAATnKFD1tm7_zh9gvPpLMcf4Bo+4TKy8TQus3sfG4mxKovn29g@mail.gmail.com
In Reply to: Re: [gentoo-dev] Re: Portage Git migration - clean cut or git-cvsserver by Rich Freeman
1 On 2 June 2012 03:39, Rich Freeman <rich0@g.o> wrote:
2 > On Fri, Jun 1, 2012 at 9:25 AM, Nicolas Sebrecht <nsebrecht@×××××.fr> wrote:
3 >> So, like explained before your concern is clearly out of the current
4 >> discussion. Importing commit history from Overlays is not supported and
5 >> will probably never be. Gentoo doesn't forces (and doesn't want to)
6 >> overlays maintainers to use Git.
7 >
8 > I'm not sure that git even supports this, unless the overlay is a
9 > complete clone of the entire gentoo-x86.git repository.
10 >
11 > I think the way git operations work is by finding common parents in
12 > the history of two heads, and then moving forward from there.  If you
13 > have two completely different repositories then they never will have a
14 > common parent.
15
16 You can however merge dissimilar histories with no common parents if
17 you know what you're doing. It does warn you, but it still lets you do
18 it.
19
20 > Plus, even if it did work, to rebase the overlay on the gentoo-x86
21 > repository you'd have to import the full gentoo-x86 tree into it.
22 > Then you'd have to push EVERYTHING in your overlay into gentoo-x86.  I
23 > don't think you can just push individual files from one tree to
24 > another.
25
26 Yeah, selectively pulling in files with histories however is hard,
27 I've occasionally been fussed enough to create temporary copies of
28 branches, and then iterate over their history so the history is
29 reduced to changes only for a small selection of files, but its
30 largely lots of work, and I can't remember how to do it every time I
31 go to do it -_-
32
33 Its reasonably straight forward to cherry-pick commits in though.
34
35 > From what I've seen the various methods out there which do involve
36 > moving only part of one branch into another basically involve a LOT of
37 > history manipulation or are really no different than just copying the
38 > files into the branch and adding them, losing all history in the
39 > process.
40 >
41 > I'm not sure how important all that history preservation actually is -
42 > the overlay would still possess it.  If we did want to preserve it
43 > then the only practical option I see is to have the overlay start out
44 > as a clone of gentoo-x86 and keep around all the non-overlay packages,
45 > which then means that anybody using the overlay will get all those old
46 > gentoo-x86 packages as part of their portage tree.  Plus you still
47 > have the rebase+gpg-signatures=fail issue.
48 >
49 > Rich
50 >
51
52 Myself, I'd be inclined to do something like this:
53
54 1. Have an integration branch on gx86
55 2. Select a package or packages to migrate to gx86 from an overlay
56 3. create a branch in the overlay that only contains the history with
57 regard to those packages.
58 4. copy the branch to a local checkout of gx86, and then rebase it on
59 top of the integration branch
60 5. then delete it from the overlay.
61
62 But the exact part of "Create a branch that contains only the history
63 of those packages" is the part I need to get down to an art .
64
65 --
66 Kent
67
68 perl -e  "print substr( \"edrgmaM  SPA NOcomil.ic\\@tfrken\", \$_ * 3,
69 3 ) for ( 9,8,0,7,1,6,5,4,3,2 );"
70
71 http://kent-fredric.fox.geek.nz

Replies

Subject Author
Re: [gentoo-dev] Re: Portage Git migration - clean cut or git-cvsserver "W. Trevor King" <wking@×××××××.us>