From: Thierry Parmentelat Date: Thu, 14 Feb 2008 18:11:25 +0000 (+0000) Subject: print warning when topdir looks like a real dir X-Git-Tag: 4.2-rc2~200 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=b85ced9dd89f9e05ab86067154cbc709514e86c3;p=build.git print warning when topdir looks like a real dir --- diff --git a/module-tag.py b/module-tag.py index 4d9fded7..799c0659 100755 --- a/module-tag.py +++ b/module-tag.py @@ -139,6 +139,15 @@ class Module: if options.verbose: print 'Checking for',topdir storage="%s/%s"%(topdir,Module.config_storage) + # sanity check. Either the topdir exists AND we have a config/storage + # or topdir does not exist and we create it + # to avoid people use their own daily svn repo + if os.path.isdir(topdir) and not os.path.isfile(storage): + print """The directory %s exists and has no CONFIG file +If this is your regular working directory, please provide another one as the +module-* commands need a fresh working dir. Make sure that you do not use +that for other purposes than tagging"""%topdir + sys.exit(1) if not os.path.isdir (topdir): # prompt for login or whatever svnpath print "Cannot find",topdir,"let's create it"