Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
5b4469d8
Commit
5b4469d8
authored
Jul 29, 2010
by
Kurt Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use 'hg identify' to generate .hgrev file
parent
b2d2e9ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
setup.py
setup.py
+3
-4
No files found.
setup.py
View file @
5b4469d8
...
...
@@ -6,10 +6,9 @@ import sys
if
'sdist'
in
sys
.
argv
and
sys
.
platform
!=
"win32"
and
sys
.
version_info
>=
(
2
,
4
):
# Record the current revision in .hgrev
import
subprocess
# os.popen is cleaner but deprecated
changset
=
subprocess
.
Popen
(
"hg log --rev tip | grep changeset"
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
).
stdout
.
read
()
rev
=
changset
.
decode
(
'ISO-8859-1'
).
split
(
':'
)[
-
1
].
strip
()
changeset
=
subprocess
.
Popen
(
"hg identify --id --rev tip"
.
split
(),
stdout
=
subprocess
.
PIPE
).
stdout
.
read
()
rev
=
changeset
.
decode
(
'ISO-8859-1'
).
strip
()
hgrev
=
open
(
'.hgrev'
,
'w'
)
hgrev
.
write
(
rev
)
hgrev
.
close
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment