From b85ced9dd89f9e05ab86067154cbc709514e86c3 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 14 Feb 2008 18:11:25 +0000 Subject: [PATCH] print warning when topdir looks like a real dir --- module-tag.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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" -- 2.47.0