summaryrefslogtreecommitdiffstats
path: root/scripts/combo-layer
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2015-03-12 16:45:34 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-20 11:21:24 +0000
commit14eac2a474f5fb347312b7257cc385d495a06c2d (patch)
tree8a7fe7274f10a8354ceab81fa3903745958592b3 /scripts/combo-layer
parentdd985a241c55612ccce96e926d45e089eec07bdd (diff)
downloadpoky-14eac2a474f5fb347312b7257cc385d495a06c2d.tar.gz
combo-layer: combine trees via replacement objects
Instead of local graft entries rooting the imported branches in the shared root commit, use replacement objects. The advantage is that they get moved around by "git push" and "git fetch", so everyone has the same, nicer view with everything starting at the beginning of the combined repository. If undesired, these objects can be removed with "git replace". (From OE-Core rev: 220d816cda3c9b8d888288cc03eb74be5e71cc59) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/combo-layer')
-rwxr-xr-xscripts/combo-layer16
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/combo-layer b/scripts/combo-layer
index d11274e245..6d24ce3ee1 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -354,14 +354,14 @@ file_exclude = %s''' % (name, file_filter or '<empty>', repo.get('file_exclude',
354 # Create Octopus merge commit according to http://stackoverflow.com/questions/10874149/git-octopus-merge-with-unrelated-repositoies 354 # Create Octopus merge commit according to http://stackoverflow.com/questions/10874149/git-octopus-merge-with-unrelated-repositoies
355 runcmd('git checkout master') 355 runcmd('git checkout master')
356 merge = ['git', 'merge', '--no-commit'] 356 merge = ['git', 'merge', '--no-commit']
357 with open('.git/info/grafts', 'w') as grafts: 357 for name in conf.repos:
358 grafts.write('%s\n' % startrev) 358 repo = conf.repos[name]
359 for name in conf.repos: 359 # Use branch created earlier.
360 repo = conf.repos[name] 360 merge.append(name)
361 # Use branch created earlier. 361 # Root all commits which have no parent in the common
362 merge.append(name) 362 # ancestor in the new repository.
363 for start in runcmd('git log --pretty=format:%%H --max-parents=0 %s' % name).split('\n'): 363 for start in runcmd('git log --pretty=format:%%H --max-parents=0 %s' % name).split('\n'):
364 grafts.write('%s %s\n' % (start, startrev)) 364 runcmd('git replace --graft %s %s' % (start, startrev))
365 try: 365 try:
366 runcmd(merge) 366 runcmd(merge)
367 except Exception, error: 367 except Exception, error: