summaryrefslogtreecommitdiff
path: root/git-import-orig
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2006-09-27 12:01:00 +0200
committerGuido Guenther <agx@bogon.sigxcpu.org>2006-09-27 12:01:00 +0200
commitaadce8574d2be33ea48570a16f3b44600c4a4c49 (patch)
treef3f946baa05cdfa55a95d67e5d958f44332c452c /git-import-orig
parentbd9dc5d64f2eeb38bacd11d4fc35d841ae9a51e5 (diff)
downloadgit-buildpackage-aadce8574d2be33ea48570a16f3b44600c4a4c49.tar.gz
git-buildpackage-aadce8574d2be33ea48570a16f3b44600c4a4c49.tar.bz2
git-buildpackage-aadce8574d2be33ea48570a16f3b44600c4a4c49.zip
git-import-orig: don't try import new upstream versions when there are uncommitted changes
Diffstat (limited to 'git-import-orig')
-rwxr-xr-xgit-import-orig8
1 files changed, 7 insertions, 1 deletions
diff --git a/git-import-orig b/git-import-orig
index 44319c5e..642f9b72 100755
--- a/git-import-orig
+++ b/git-import-orig
@@ -24,7 +24,7 @@ import re
import glob
from optparse import OptionParser
from git_buildpackage import *
-
+from git_buildpackage.utils import is_repository_clean
# Used GIT Commands
gitCheckoutUpstream=GitCheckoutBranch('upstream')
@@ -88,6 +88,12 @@ def main():
parser.print_help()
return 1
+ (ret, out) = is_repository_clean('.')
+ if not ret:
+ print >>sys.stderr, "Repository has uncommitted changes, commit them first: "
+ print >>sys.stderr, out
+ return 1
+
tmpdir=unpackOrig(tgz)
if not tmpdir:
return 1