Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
nexedi
re6stnet
Commits
2263c33a
Commit
2263c33a
authored
Mar 05, 2024
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug py3 egg
parent
0fc6e204
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
42 deletions
+6
-42
re6st/registry.py
re6st/registry.py
+1
-0
re6st/version.py
re6st/version.py
+5
-42
No files found.
re6st/registry.py
View file @
2263c33a
...
@@ -21,6 +21,7 @@ Authenticated communication:
...
@@ -21,6 +21,7 @@ Authenticated communication:
import
base64
,
hmac
,
hashlib
,
http
.
client
,
inspect
,
json
,
logging
import
base64
,
hmac
,
hashlib
,
http
.
client
,
inspect
,
json
,
logging
import
mailbox
,
os
,
platform
,
random
,
select
,
smtplib
,
socket
,
sqlite3
import
mailbox
,
os
,
platform
,
random
,
select
,
smtplib
,
socket
,
sqlite3
import
string
,
sys
,
threading
,
time
,
weakref
,
zlib
import
string
,
sys
,
threading
,
time
,
weakref
,
zlib
from
collections
import
defaultdict
,
deque
from
collections
import
defaultdict
,
deque
from
datetime
import
datetime
from
datetime
import
datetime
from
http.server
import
HTTPServer
,
BaseHTTPRequestHandler
from
http.server
import
HTTPServer
,
BaseHTTPRequestHandler
...
...
re6st/version.py
View file @
2263c33a
import
subprocess
as
_S
dirty
=
0
import
os.path
as
_P
_d
=
_P
.
realpath
(
_P
.
dirname
(
_P
.
dirname
(
__file__
)))
def
_git_call
(
*
args
):
return
_S
.
call
((
"git"
,
"-c"
,
"safe.directory="
+
_d
)
+
args
,
cwd
=
_d
)
def
_git_output
(
*
args
):
p
=
_S
.
Popen
(
(
"git"
,
"-c"
,
"safe.directory="
+
_d
)
+
args
,
cwd
=
_d
,
stdout
=
_S
.
PIPE
,
stderr
=
_S
.
PIPE
)
out
,
err
=
p
.
communicate
()
if
p
.
returncode
:
raise
_S
.
CalledProcessError
(
p
.
returncode
,
"git"
,
err
)
return
out
.
strip
()
_git_call
(
"update-index"
,
"-q"
,
"--refresh"
)
dirty
=
_git_call
(
"diff-index"
,
"--quiet"
,
"HEAD"
,
"--"
)
if
dirty
not
in
(
0
,
1
):
raise
_S
.
CalledProcessError
(
dirty
,
"git"
)
try
:
revision
=
int
(
_git_output
(
"rev-list"
,
"--count"
,
"HEAD"
))
except
_S
.
CalledProcessError
:
# BBB: Git too old
revision
=
len
(
_git_output
(
"rev-list"
,
"HEAD"
).
split
())
short
=
_git_output
(
"rev-parse"
,
"--short"
,
"HEAD"
)
version
=
"0-%s.g%s"
%
(
revision
,
short
)
if
dirty
:
version
+=
".dirty"
# Because the software could be forked or have local changes/commits, above
# properties can't be used to decide whether a peer runs an appropriate version:
# they are intended to the network admin.
# Only 'protocol' is important and it must be increased whenever they would be
# a wish to force an update of nodes.
protocol
=
8
min_protocol
=
1
min_protocol
=
1
protocol
=
8
if
__name__
==
"__main__"
:
revision
=
632
print
(
version
)
short
=
'3b67c53'
version
=
'0-632.g3b67c53'
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