From d1e07daeeefbadcccd69ef5c63d295b363ac6786 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Mon, 24 Sep 2007 12:38:37 -0700 Subject: [PATCH] make-version.py: when _darcs doesn't exist, make the warning less scary-looking --- misc/make-version.py | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.45.2