Patchwork D2638: tests: fix indentation width in run-tests

login
register
mail settings
Submitter phabricator
Date March 4, 2018, 3:26 p.m.
Message ID <differential-rev-PHID-DREV-fbmiht2rh2iio5ozq6sb-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28916/
State Superseded
Headers show

Comments

phabricator - March 4, 2018, 3:26 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Caught by check-code.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2638

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel
phabricator - March 4, 2018, 4:31 p.m.
pulkit added a comment.


  This looks like fixed at tip of hg-committed. Not required anymore.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2638

To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel
phabricator - March 4, 2018, 4:35 p.m.
durin42 abandoned this revision.
durin42 added a comment.


  Oh nice.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2638

To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -2318,13 +2318,13 @@ 
 
     if previoustimes:
         def sortkey(f):
-          f = f['path']
-          if f in previoustimes:
-            # Use most recent time as estimate
-            return -previoustimes[f][-1]
-          else:
-            # Default to a rather arbitrary value of 1 second for new tests
-            return -1.0
+            f = f['path']
+            if f in previoustimes:
+                # Use most recent time as estimate
+                return -previoustimes[f][-1]
+            else:
+                # Default to a rather arbitrary value of 1 second for new tests
+                return -1.0
     else:
         # keywords for slow tests
         slow = {b'svn': 10,
@@ -2447,7 +2447,7 @@ 
                 self._outputdir = os.path.join(self._outputdir, pathname)
         previoustimes = {}
         if self.options.order_by_runtime:
-          previoustimes = dict(loadtimes(self._outputdir))
+            previoustimes = dict(loadtimes(self._outputdir))
         sorttests(testdescs, previoustimes, shuffle=self.options.random)
 
         if 'PYTHONHASHSEED' not in os.environ: