From aadce8574d2be33ea48570a16f3b44600c4a4c49 Mon Sep 17 00:00:00 2001 From: Guido Guenther Date: Wed, 27 Sep 2006 12:01:00 +0200 Subject: git-import-orig: don't try import new upstream versions when there are uncommitted changes --- git-import-orig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'git-import-orig') 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 -- cgit v1.2.3