Joshua Powers has proposed merging ~powersj/cloud-init:read-version-error-msg 
into cloud-init:master.

Commit message:
read-version: enhance error message
    
The error message when read-vesion is not very useful and does not help
the end-user know how to overcome the issue. This adds a short message
explaining that the user does not have the latest upstream tags and how
to get those tags.


Requested reviews:
  cloud-init commiters (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+merge/353685

This was after a discussion with robjo and given that you have to know about 
this error message about how to fix it. It also is due to the fact that it can 
prevent people from running tox.
-- 
Your team cloud-init commiters is requested to review the proposed merge of 
~powersj/cloud-init:read-version-error-msg into cloud-init:master.
diff --git a/tools/read-version b/tools/read-version
index 3ea9e66..6efe369 100755
--- a/tools/read-version
+++ b/tools/read-version
@@ -76,6 +76,12 @@ if is_gitdir(_tdir) and which("git"):
     if not version.startswith(src_version):
         sys.stderr.write("git describe version (%s) differs from "
                          "cloudinit.version (%s)\n" % (version, src_version))
+        sys.stderr.write(
+            "Please get the latest upstream tags.\n"
+            "As an example, this can be done with the following:\n"
+            "$ git remote add upstream https://git.launchpad.net/cloud-init\n";
+            "$ git fetch upstream\n"
+        )
         sys.exit(1)
 
     version_long = tiny_p(cmd + ["--long"]).strip()
_______________________________________________
Mailing list: https://launchpad.net/~cloud-init-dev
Post to     : cloud-init-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~cloud-init-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to