]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
make-version.py: when _darcs doesn't exist, make the warning less scary-looking
authorBrian Warner <warner@allmydata.com>
Mon, 24 Sep 2007 19:38:37 +0000 (12:38 -0700)
committerBrian Warner <warner@allmydata.com>
Mon, 24 Sep 2007 19:38:37 +0000 (12:38 -0700)
misc/make-version.py

index a87cfd897e2ab1b6c633a5aae9187f4d2d915477..d020f0f5c159f9f3312615e097273ddefff0e28d 100644 (file)
@@ -64,6 +64,12 @@ def write_version_py(verstr, outfname):
 
 def update(pkgname, verfilename):
     rc = -1
+    if not os.path.isdir("_darcs"):
+        if os.path.exists(verfilename):
+            print "No _darcs directory, and %s already exists, so leaving it alone." % (verfilename,)
+            return 0
+        print "No _darcs directory, no %s, so version is unknown." % (verfilename,)
+        return 1
     cmd = ["darcs", "changes", "--from-tag=^%s" % (pkgname,), "--xml-output"]
     try:
         p = Popen(cmd, stdout=PIPE)