-
-
-
/trunk/reviewboard/contrib/tools/post-review (Diff revision 1) This check will fail for such versions as 2.0.0 or 1.6.3. We'd need to be more specific in our checks. Since it's going to be a bit longer, I'd recommend creating a utility function that checks if a version is at least the version passed. For example: def check_version(version, expected): return (expected[0] > version[0]) or \ (expected[0] == version[0] and expected[1] > version[1]) or \ (expected[0] == version[0] and expected[1] == version[1] and \ expected[3] >= version[3])) version and expected should be tuples of (major, minor, micro). It would be good to document that in the function. Then your check would become: if not check_version((version_parts.group(1), version_parts.group(2), version_parts.group(2)), (1, 5, 4)): die(...)
-
/trunk/reviewboard/contrib/tools/post-review (Diff revision 1) I'd rather not have the "post-review failed: " prefix here. If we want a prefix to identify failure, we should put it in die(). Maybe just prefix "fatal: "
Make post-review warn if installed version of git-svn is too old
Review Request #343 — Created April 4, 2008 and submitted
Information | |
---|---|
marc | |
Review Board SVN (deprecated) | |
Reviewers | |
reviewboard | |
I installed git-svn the other day with an out-of-date MacPorts index, and wound up with version 1.5.3.7 installed. It turns out that 'git svn info', which is used by post-review to find repository information, wasn't added until git 1.5.4 (see http://www.kernel.org/pub/software/scm/git/docs/RelNotes-1.5.4.txt ). This adds a version check for git-svn which is run if git svn info fails, and which lets the user know that the git-svn version is out of date.
Tested against my old 1.5.3.7 install and my new, hotter 1.5.4.4 install.
CU
-
-
/trunk/reviewboard/contrib/tools/post-review (Diff revision 1) Please note that not all git releases have a four-part version number. For instance, my Cygwin installation has plain-old 1.5.4. You're not using the fourth part anyway, so why not leave that out of the expression?
-
-
/trunk/reviewboard/contrib/tools/post-review (Diff revision 2) These need to be >= and not >. Otherwise, if you call: is_valid_version((1, 2, 3), (1, 2, 3)) It will return False, since 2 is not > 2 and 3 is not > 3.