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: bugzi...@mercurial-scm.org
          Reporter: tom_hin...@sil.org
                CC: mercurial-devel@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.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to