Commit Graph

7 Commits

Author SHA1 Message Date
Patrick Ohly e0d3cabc5a combo-layer: partial import for '--history init'
The new "since_revision" property can be used to cut off the imported
history at some point. This is useful to keep the resulting repository
smaller while still preserving enough history that "git annotate"
reports the right author and commit for most lines.

The initial, squashed import commit shows up with "unknown" as author
in the "git annotate" output. It has the repository name as prefix
in the subject line; importing that commit works best with a
layer hook which does not add the repository name again when
it is already present. Adding it here is useful for hooks
which do not extend the subject line.

(From OE-Core rev: 74f4c9e3bcdb3c4ca919623086e92a9379bd81ff)

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>
2015-03-20 11:21:24 +00:00
Patrick Ohly 96b98451c4 combo-layer: exclude files
Some combined repos intentionally do not include certain files.
For example, Poky does not include bitbake's setup files and
OE-core's sample files under meta/conf.

When these files get modified in the upstream repository, applying the
patches fails and requires manual intervention. That is merely a
nuisance for someone familiar with the problem, but a real show
stopper when having the import run automatically or by someone less
experienced.

Therefore this change introduces "file_exclude", a new per-repo list
of file patterns which removes all matching files when initializing or
updating a combined repository. Because fnmatch is used under the hood
to match full path strings, removing entire directories must be done
with a pattern ending in a '/*' (in contrast to file_filter).

For Poky, the additional configuration looks like this:

[bitbake]
...
file_exclude = classes/base.bbclass
	conf/bitbake.conf
	.gitignore
	MANIFEST.in
	setup.py
	TODO

[openembedded-core]
...
file_exclude = meta/conf/bblayers.conf.sample
	meta/conf/local.conf.sample
	meta/conf/local.conf.sample.extended
	meta/conf/site.conf.sample

(From OE-Core rev: a51b37f4db6b144386d1bd5789ec91acc78a0bd8)

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>
2015-03-20 11:21:23 +00:00
Patrick Ohly 58c5bb28b5 combo-layer: make Signed-off-by optional
It depends on the diligence of the person running the combo-layer tool
whether the Signed-off-by line added to each commit actually indicates
that the person was involved in validating the change.

When the import is purely automatic, it is better to not add the line,
because the history is more useful without it (searching for the person
really only lists changes he or she was involved with) and it would
be a false statement.

The 'signoff' property can be set per repository, like every
other property. But setting it in the special [DEFAULT] section
is more useful, so that is what the example shows.

(From OE-Core rev: dba34e5a6f0a4c726266654dc5f26e0f7f13db0f)

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>
2015-03-20 11:21:22 +00:00
Paul Eggleton cf10b9b847 scripts/combo-layer: add branch option to example config
Minor improvements to the example combo-layer config file:
* Add the recently added branch option to the optional options section
* Mention in comments that last_revision gets updated during "update"
* Tidy up some more grammar

(From OE-Core rev: 065798d8dd0552934175f794f7678e0dd24ef152)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-21 17:00:46 +00:00
Paul Eggleton cb21ff1807 scripts/combo-layer: tidy up config example
Move all example configuration to the example config file, tidy up a few
long lines and fix some grammar.

(From OE-Core rev: ec099a32243ebc7eecd86e4bf40ed38da4af3fe5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-07 14:05:35 +00:00
Paul Eggleton fd471a1337 scripts/combo-layer: make init set up initial component data
The "init" subcommand will now copy the current state of each component
repository into the combo layer repository, set last_revision for each
component, and then use "git add" to set up the initial commit (but will
not actually make the initial commit - that is left up to the user).
Also take the opportunity to bump the version number.

(From OE-Core rev: d4d491aa118b6cbe895167c62a46d883abc7b4ab)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-07 14:05:35 +00:00
Yu Ke b9ff62a0d0 combo-layer-tool: add tool to manipulate combo layers
This patch adds the script "combo-layer" to manipulate combo layer
repos. A combo layer repo is a repo containing multiple component
repos, e.g. oe-core, bitbake, BSP repos. The combo layer repo needs to
be updated by syncing with the component repo upstream. This script
is written to assist the combo layer handling.

The combo layer tool provides three functionalities:
- init: when the combo layer repo and component repo does not exist,
  init will "git init" the combo layer repo, and also "git clone" the
  component repos

- update: combo layer tool will pull the latest commit from component
  repo upstream, and apply the commits since last update commit to the
  combo repo. If the user specifies interactive mode(--interactive),
  they can edit the patch list to select which commits to apply.

- splitpatch: split the combo repo commit into separate patches per
  component repo, to facilitate upstream submission.

Combo layer tool uses a config file to define the component repo info.
Please check the combo-layer.conf.example for a detailed explanation
of the config file fields.

(From OE-Core rev: 68394476748386e58f40173643967f5a248173b1)

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-08 17:52:27 +01:00