projects
/
tools
/
gbs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8cc2e65
)
check git dir before gbs remotebuild
author
Guan Junchun
<junchunx.guan@intel.com>
Tue, 22 May 2012 08:19:14 +0000
(16:19 +0800)
committer
Guan Junchun
<junchunx.guan@intel.com>
Tue, 22 May 2012 08:19:14 +0000
(16:19 +0800)
gitbuildsys/cmd_remotebuild.py
patch
|
blob
|
history
diff --git
a/gitbuildsys/cmd_remotebuild.py
b/gitbuildsys/cmd_remotebuild.py
index
9c3bc65
..
3f6886f
100644
(file)
--- a/
gitbuildsys/cmd_remotebuild.py
+++ b/
gitbuildsys/cmd_remotebuild.py
@@
-31,6
+31,7
@@
from utils import Workdir
import gbp.rpm
from gbp.scripts.buildpackage_rpm import main as gbp_build
+from gbp.git import repository
OSCRC_TEMPLATE = """[general]
apiurl = %(apiurl)s
@@
-56,6
+57,10
@@
def do(opts, args):
msger.error('only one work directory can be specified in args.')
if len(args) == 1:
workdir = args[0]
+ try:
+ repo = repository.GitRepository(workdir)
+ except repository.GitRepositoryError:
+ msger.error('%s is not a git dir' % workdir)
tmpdir = '%s/%s' % (TMPDIR, USER)
if not os.path.exists(tmpdir):