public inbox for gentoo-scm@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-scm] 'overlays' are altenatives to full tree clone
@ 2009-04-12 17:14 Caleb Cushing
  2009-04-17  1:39 ` Donnie Berkholz
  0 siblings, 1 reply; 6+ messages in thread
From: Caleb Cushing @ 2009-04-12 17:14 UTC (permalink / raw
  To: gentoo-scm

just so you know, you don't need the full tree to patch it. git
doesn't actually care if there's common history between 2 tree's when
you merge. I was planning on writing a tutorial for this for dev in
regen2 if anyone wants me to for here (since it sound like your w/
extra history) has some hugeness.

-- 
Caleb Cushing

http://xenoterracide.blogspot.com



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

* Re: [gentoo-scm] 'overlays' are altenatives to full tree clone
  2009-04-12 17:14 [gentoo-scm] 'overlays' are altenatives to full tree clone Caleb Cushing
@ 2009-04-17  1:39 ` Donnie Berkholz
  2009-04-17  1:41   ` Caleb Cushing
  2009-04-17  6:48   ` Justin
  0 siblings, 2 replies; 6+ messages in thread
From: Donnie Berkholz @ 2009-04-17  1:39 UTC (permalink / raw
  To: Caleb Cushing; +Cc: gentoo-scm

[-- Attachment #1: Type: text/plain, Size: 653 bytes --]

On 13:14 Sun 12 Apr     , Caleb Cushing wrote:
> just so you know, you don't need the full tree to patch it. git
> doesn't actually care if there's common history between 2 tree's when
> you merge. I was planning on writing a tutorial for this for dev in
> regen2 if anyone wants me to for here (since it sound like your w/
> extra history) has some hugeness.

Justin Lecher wrote up quick instructions about this, to preserve 
history when merging from the sci overlay to the main tree. I don't know 
if it's anywhere besides my inbox.

-- 
Thanks,
Donnie

Donnie Berkholz
Developer, Gentoo Linux
Blog: http://dberkholz.wordpress.com

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [gentoo-scm] 'overlays' are altenatives to full tree clone
  2009-04-17  1:39 ` Donnie Berkholz
@ 2009-04-17  1:41   ` Caleb Cushing
  2009-04-17 17:45     ` Donnie Berkholz
  2009-04-17  6:48   ` Justin
  1 sibling, 1 reply; 6+ messages in thread
From: Caleb Cushing @ 2009-04-17  1:41 UTC (permalink / raw
  To: Donnie Berkholz; +Cc: gentoo-scm

On Thu, Apr 16, 2009 at 9:39 PM, Donnie Berkholz <dberkholz@gentoo.org> wrote:
>
> Justin Lecher wrote up quick instructions about this, to preserve
> history when merging from the sci overlay to the main tree. I don't know
> if it's anywhere besides my inbox

history is preserved via merges.


-- 
Caleb Cushing

http://xenoterracide.blogspot.com



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

* Re: [gentoo-scm] 'overlays' are altenatives to full tree clone
  2009-04-17  1:39 ` Donnie Berkholz
  2009-04-17  1:41   ` Caleb Cushing
@ 2009-04-17  6:48   ` Justin
  1 sibling, 0 replies; 6+ messages in thread
From: Justin @ 2009-04-17  6:48 UTC (permalink / raw
  To: gentoo-scm

[-- Attachment #1: Type: text/plain, Size: 1858 bytes --]

Donnie Berkholz schrieb:
> On 13:14 Sun 12 Apr     , Caleb Cushing wrote:
>> just so you know, you don't need the full tree to patch it. git
>> doesn't actually care if there's common history between 2 tree's when
>> you merge. I was planning on writing a tutorial for this for dev in
>> regen2 if anyone wants me to for here (since it sound like your w/
>> extra history) has some hugeness.
> 
> Justin Lecher wrote up quick instructions about this, to preserve 
> history when merging from the sci overlay to the main tree. I don't know 
> if it's anywhere besides my inbox.
> 

Attached the little script how I import things from git to git overlays. It basically works, but one
thing really could be optimized, preserving the directory structure. The way I do it with
--subdirectory-filter results in in a new repo where the root of the repo is the package dir. If
possible preserving the directory structure would be beneficial. There might be some tricks but this is
high-level git magic. This way I do it preserves the history of every file inside the package dir and
this is what we basically want.


#!/bin/bash -v
#git clone repoA
#git clone repoB
#cd repoA
#git fetch ../repoB master:repoB-merge
#git checkout repoB-merge
#git filter-branch --subdirectory-filter ${CATEGOY}/${PN} -- repoB-merge

if [[ -z $1 ]]; then
    exit
fi

CATPACK="${1}"
CAT="${1%\/*}"
PACK="${1#*\/}"


cd /data/local/science

git fetch /data/local/dberkholz master:"${CATPACK}"-import
git checkout "${CATPACK}"-import
rm -rf .git/refs/original
git filter-branch --subdirectory-filter ${CATPACK} -- "${CATPACK}"-import
git checkout master
git pull --no-commit . "${CATPACK}"-import
mkdir "${CATPACK}"
for i in ${PACK}* ChangeLog Manifest metadata.xml files; do
if [[ -e $i ]]; then
    git mv $i "${CATPACK}"/
fi
done


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [gentoo-scm] 'overlays' are altenatives to full tree clone
  2009-04-17  1:41   ` Caleb Cushing
@ 2009-04-17 17:45     ` Donnie Berkholz
  2009-04-18 13:45       ` Nirbheek Chauhan
  0 siblings, 1 reply; 6+ messages in thread
From: Donnie Berkholz @ 2009-04-17 17:45 UTC (permalink / raw
  To: Caleb Cushing; +Cc: gentoo-scm

[-- Attachment #1: Type: text/plain, Size: 899 bytes --]

On 21:41 Thu 16 Apr     , Caleb Cushing wrote:
> On Thu, Apr 16, 2009 at 9:39 PM, Donnie Berkholz <dberkholz@gentoo.org> wrote:
> >
> > Justin Lecher wrote up quick instructions about this, to preserve
> > history when merging from the sci overlay to the main tree. I don't know
> > if it's anywhere besides my inbox
> 
> history is preserved via merges.

I'm pretty sure we all know that. The comparison though is to the 
current case, where you just copy files across. A simple merge works 
great if your overlay is a copy of the entire tree plus a few commits, 
and you want the entire history of changes to every package merged 
across. I suspect the more common case is a small overlay with no shared 
ancestry, where you only want to merge in commits to a single package.

-- 
Thanks,
Donnie

Donnie Berkholz
Developer, Gentoo Linux
Blog: http://dberkholz.wordpress.com

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [gentoo-scm] 'overlays' are altenatives to full tree clone
  2009-04-17 17:45     ` Donnie Berkholz
@ 2009-04-18 13:45       ` Nirbheek Chauhan
  0 siblings, 0 replies; 6+ messages in thread
From: Nirbheek Chauhan @ 2009-04-18 13:45 UTC (permalink / raw
  To: Donnie Berkholz; +Cc: Caleb Cushing, gentoo-scm

On Fri, Apr 17, 2009 at 11:15 PM, Donnie Berkholz <dberkholz@gentoo.org> wrote:
> I'm pretty sure we all know that. The comparison though is to the
> current case, where you just copy files across. A simple merge works
> great if your overlay is a copy of the entire tree plus a few commits,
> and you want the entire history of changes to every package merged
> across. I suspect the more common case is a small overlay with no shared
> ancestry, where you only want to merge in commits to a single package.
>

In that case, `git format-patch <then>..<now>` will give a nice set of
patches, which can then be applied regardless of ancestry. I guess a
script could be written to do this automatically ;)


-- 
~Nirbheek Chauhan



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

end of thread, other threads:[~2009-04-18 13:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-12 17:14 [gentoo-scm] 'overlays' are altenatives to full tree clone Caleb Cushing
2009-04-17  1:39 ` Donnie Berkholz
2009-04-17  1:41   ` Caleb Cushing
2009-04-17 17:45     ` Donnie Berkholz
2009-04-18 13:45       ` Nirbheek Chauhan
2009-04-17  6:48   ` Justin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox