diff options
author | Guido Guenther <agx@sigxcpu.org> | 2006-09-27 12:01:00 +0200 |
---|---|---|
committer | Guido Guenther <agx@bogon.sigxcpu.org> | 2006-09-27 12:01:00 +0200 |
commit | aadce8574d2be33ea48570a16f3b44600c4a4c49 (patch) | |
tree | f3f946baa05cdfa55a95d67e5d958f44332c452c /git-buildpackage | |
parent | bd9dc5d64f2eeb38bacd11d4fc35d841ae9a51e5 (diff) |
git-import-orig: don't try import new upstream versions when there are uncommitted changes
Diffstat (limited to 'git-buildpackage')
-rwxr-xr-x | git-buildpackage | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/git-buildpackage b/git-buildpackage index ba1daaea..c6abe999 100755 --- a/git-buildpackage +++ b/git-buildpackage @@ -19,6 +19,7 @@ import sys,os,commands,re import optparse +from git_buildpackage.utils import is_repository_clean build_cmd='debuild' @@ -55,12 +56,11 @@ def main(argv): clean_cmd='%s clean' % options.build_cmd if not options.ignore_new: if not exec_command(clean_cmd)[0]: return 1 - (status, out) = commands.getstatusoutput('git status') - msgs=out.split('\n') - if msgs[0] != 'nothing to commit': - print "You have uncommitted changes in your source tree:" - print out - print "Use --git-ignore_new to override" + (ret, out) = is_repository_clean('.') + if not ret: + print >>sys.stderr, "You have uncommitted changes in your source tree:" + print >>sys.stderr, out + print >>sys.stderr, "Use --git-ignore_new to ignore." return 1 cmd=options.build_cmd+' -i.git '+" ".join(dpkg_args) if not exec_command(cmd)[0]: return 1 |