Change --spec to use only base file name
authorHuang Hao <hao.h.huang@intel.com>
Mon, 12 Nov 2012 10:05:48 +0000 (18:05 +0800)
committerHuang Hao <hao.h.huang@intel.com>
Tue, 20 Nov 2012 07:19:53 +0000 (15:19 +0800)
commitc4a64b91c03dde47aed270b44d11c6602ce97019
treecde977629c297561aef37b4bb9cead9c4b008423
parenta8eb95d29680a594b424b9f7782fb36242e8a706
Change --spec to use only base file name

Detail of discussion is in #485

* --spec accept only base file name
* only check spec file in working copy if --include-all is given,
  otherwise check in commit
* if gbs want to parse spec file, it must parse the correct
  version that in --commit(default HEAD)
* unify --spec for all subcommands
  - ch: use the spec given first
  - rb: --include-all means to use work copy, otherwise checkout
    spec in some revision to parse
  - lb: check only one project is about to build and
    pass --spec directly to depanneur
* add several helper functions
  - show_file_from_rev: cat file content from given rev
  - file_exists_in_rev: check whether file exist in given rev
  - glob_in_rev: glob file pattern in given rev

Change-Id: I0621634b50ddedf65eab3c41db4d6f537194b345
gitbuildsys/cmd_build.py
gitbuildsys/cmd_changelog.py
gitbuildsys/cmd_export.py
gitbuildsys/cmd_remotebuild.py
gitbuildsys/parsing.py
gitbuildsys/utils.py
tools/gbs