[Python-Dev] Expose Subversion revision number to Python (original) (raw)
Barry Warsaw barry at python.org
Sat Dec 17 22:24:17 CET 2005
- Previous message: [Python-Dev] Expose Subversion revision number to Python
- Next message: [Python-Dev] Expose Subversion revision number to Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, 2005-12-16 at 17:11 -0500, Phillip J. Eby wrote:
It looks like using 'svnversion -c . | cut -f2 -d":"' would get the most-recent committed version, plus the letter "M" if there are local changes. That sounds like what we should be using.
That way, a build with local revisions would include "M", thus nicely addressing that issue as well.
I didn't know about svnversion, but that does seem like the right thing to use. One downside is that it can take a long time on a big tree, but in my own limited testing, that doesn't seem like a practical concern for the Python source checkout.
AFAICT, the reason to use -c is so that changes outside the Python source tree (i.e. in the sandbox) won't show up in Python's build number. That's fine although I wouldn't mind leaving off the -c since you'll still get the same snapshot of code from a revisioned checkout either way, and that's my primary interest.
Because the 'M' can show up in the build number (and is useful information), then I'll change the C API and sys attribute to be a string instead of an int.
Other than that, it sounds like this is a generally acceptable change to make to the build process, so I'll make the above modifications and commit it.
Thanks everyone, -Barry
-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 307 bytes Desc: This is a digitally signed message part Url : http://mail.python.org/pipermail/python-dev/attachments/20051217/27251dd3/attachment.pgp
- Previous message: [Python-Dev] Expose Subversion revision number to Python
- Next message: [Python-Dev] Expose Subversion revision number to Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]