diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2012-07-09 10:52:36 +0300 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-11-14 14:22:10 +0200 |
commit | 4e1f6817919effbd2eb9a4bc218fac5041445440 (patch) | |
tree | 1a2082973d83ab533490ee3598f76da6c1ee516f /gbp/scripts/buildpackage.py | |
parent | 654385a2cc173c4199db78f4be7b54de934d8e05 (diff) | |
download | git-buildpackage-4e1f6817919effbd2eb9a4bc218fac5041445440.tar.gz git-buildpackage-4e1f6817919effbd2eb9a4bc218fac5041445440.tar.bz2 git-buildpackage-4e1f6817919effbd2eb9a4bc218fac5041445440.zip |
buildpackage: new "working copy" choices for --git-export
Add support for building different kind of "working copies", when using
the --git-export option:
- 'WC.TRACKED': only use files that are already tracked
- 'WC.UNTRACKED': use untracked files, too
- 'WC.IGNORED': also add files that'd normally be ignored
Using '--git-export=WC' beaves like before.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp/scripts/buildpackage.py')
-rwxr-xr-x | gbp/scripts/buildpackage.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gbp/scripts/buildpackage.py b/gbp/scripts/buildpackage.py index 38e5a75d..c03d39f0 100755 --- a/gbp/scripts/buildpackage.py +++ b/gbp/scripts/buildpackage.py @@ -35,7 +35,7 @@ from gbp.deb.upstreamsource import DebianUpstreamSource from gbp.errors import GbpError import gbp.log import gbp.notifications -from gbp.scripts.common.buildpackage import (index_name, wc_name, +from gbp.scripts.common.buildpackage import (index_name, wc_names, git_archive_submodules, git_archive_single, dump_tree, write_wc, drop_index) @@ -122,8 +122,10 @@ def write_tree(repo, options): if options.export_dir: if options.export == index_name: tree = repo.write_tree() - elif options.export == wc_name: - tree = write_wc(repo) + elif options.export in wc_names: + tree = write_wc(repo, + force=wc_names[options.export]['force'], + untracked=wc_names[options.export]['untracked']) else: tree = options.export if not repo.has_treeish(tree): |