"""Test importing from source rpm."""
eq_(GBS(argv=["gbs", "import", srcrpm]), None)
repo = GitRepository("./ail")
- eq_(repo.get_local_branches(), ['master', 'upstream'])
+ eq_(repo.get_local_branches(), ['master', 'pristine-tar', 'upstream'])
eq_(repo.get_tags(), ['upstream/0.2.29', 'vendor/0.2.29-2.3'])
@with_data("bluez_unpacked")
eq_(GBS(argv=["gbs", "import",
os.path.join(srcdir, 'bluez.spec')]), None)
repo = GitRepository("./bluez")
- eq_(repo.get_local_branches(), ['master', 'upstream'])
+ eq_(repo.get_local_branches(), ['master', 'pristine-tar', 'upstream'])
eq_(repo.get_tags(), ['upstream/4.87', 'vendor/4.87-1'])
#raise Exception(os.listdir('./bluez'))
repo = GitRepository.create("./repo_dir")
os.chdir(repo.path)
eq_(GBS(argv=["gbs", "import", srcrpm]), None)
- eq_(repo.get_local_branches(), ['master', 'upstream'])
+ eq_(repo.get_local_branches(), ['master', 'pristine-tar', 'upstream'])
eq_(repo.get_tags(), ['upstream/0.2.29', 'vendor/0.2.29-2.5'])
#raise Exception(os.listdir('./bluez'))
"--author-email=test@otctools.jf.intel.com",
srcrpm]), None)
repo = GitRepository("./app-core")
- eq_(repo.get_local_branches(), ['master', 'upstream'])
+ eq_(repo.get_local_branches(), ['master', 'pristine-tar', 'upstream'])
eq_(repo.get_tags(), ['upstream/1.2', 'vendor/1.2-19.3'])
@with_data("ail-0.2.29-2.3.src.rpm")
eq_(GBS(argv=["gbs", "import", "--upstream=upstream",
srcrpm]), None)
repo = GitRepository("./ail")
- eq_(repo.get_local_branches(), ['master', 'upstream'])
+ eq_(repo.get_local_branches(), ['master', 'pristine-tar', 'upstream'])
eq_(repo.get_tags(), ['upstream/0.2.29', 'vendor/0.2.29-2.3'])
@raises(SystemExit)
help='don\'t merge new upstream branch to master')
parser.add_argument('--packaging-dir',
help='directory containing packaging files')
+ parser.add_argument('--no-pristine-tar', action='store_true',
+ help='don\'t use pristine-tar to import source. '
+ 'pristine-tar only support import *tar.{gz,bz2,xz} '
+ 'sources, this option can be specified to import '
+ 'other format sources')
parser.set_defaults(alias="im")
return parser