[Bug 6238] New: Windows: time.clock removed from python 3.8 - prevents building/running from source.
mercurial-bugs at mercurial-scm.org
mercurial-bugs at mercurial-scm.org
Mon Dec 9 16:49:36 UTC 2019
https://bz.mercurial-scm.org/show_bug.cgi?id=6238
Bug ID: 6238
Summary: Windows: time.clock removed from python 3.8 - prevents
building/running from source.
Product: Mercurial
Version: default branch
Hardware: PC
OS: Linux
Status: UNCONFIRMED
Severity: feature
Priority: wish
Component: Mercurial
Assignee: bugzilla at mercurial-scm.org
Reporter: tom_hindle at sil.org
CC: mercurial-devel at mercurial-scm.org
Python Version: ---
Emits 'Unable to find a working hg binary to extract the version from the
repository tags'
Patched by checking for perf_counter (introduced in python 3.3) first:
diff -r 76d32a0edbc6 mercurial/util.py
--- a/mercurial/util.py Fri Dec 06 15:30:06 2019 +0100
+++ b/mercurial/util.py Mon Dec 09 14:48:29 2019 -0700
@@ -2040,15 +2040,17 @@
)
+timer = None;
+if safehasattr(time, "perf_counter"):
+ timer = time.perf_counter
if pycompat.iswindows:
checkosfilename = checkwinfilename
- timer = time.clock
+ if not timer:
+ timer = time.clock
else:
checkosfilename = platform.checkosfilename
- timer = time.time
-
-if safehasattr(time, "perf_counter"):
- timer = time.perf_counter
+ if not timer:
+ timer = time.time
def makelock(info, pathname):
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list