From: Brian Warner Date: Mon, 24 Sep 2007 19:38:37 +0000 (-0700) Subject: make-version.py: when _darcs doesn't exist, make the warning less scary-looking X-Git-Tag: allmydata-tahoe-0.6.0~6 X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/uri/flags/quickstart.html?a=commitdiff_plain;h=d1e07daeeefbadcccd69ef5c63d295b363ac6786;p=tahoe-lafs%2Ftahoe-lafs.git make-version.py: when _darcs doesn't exist, make the warning less scary-looking --- diff --git a/misc/make-version.py b/misc/make-version.py index a87cfd89..d020f0f5 100644 --- a/misc/make-version.py +++ b/misc/make-version.py @@ -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)