Patchwork D6339: repair: reword comments that I noticed while working on source formatting

login
register
mail settings
Submitter phabricator
Date May 5, 2019, 5:14 a.m.
Message ID <8b76410843d668094798abfc35910e02@localhost.localdomain>
Download mbox | patch
Permalink /patch/39959/
State Not Applicable
Headers show

Comments

phabricator - May 5, 2019, 5:14 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd811f17090a3: repair: reword comments that I noticed while working on source formatting (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6339?vs=15008&id=15016

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

AFFECTED FILES
  mercurial/repair.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -366,8 +366,9 @@ 
     striptrees(repo, tr, striprev, files)
 
 def striptrees(repo, tr, striprev, files):
-    if 'treemanifest' in repo.requirements: # safe but unnecessary
-                                            # otherwise
+    if 'treemanifest' in repo.requirements:
+        # This logic is safe if treemanifest isn't enabled, but also
+        # pointless, so we skip it if treemanifest isn't enabled.
         for unencoded, encoded, size in repo.store.datafiles():
             if (unencoded.startswith('meta/') and
                 unencoded.endswith('00manifest.i')):
@@ -418,7 +419,9 @@ 
 
         progress.complete()
 
-        if 'treemanifest' in repo.requirements: # safe but unnecessary otherwise
+        if 'treemanifest' in repo.requirements:
+            # This logic is safe if treemanifest isn't enabled, but also
+            # pointless, so we skip it if treemanifest isn't enabled.
             for dir in util.dirs(seenfiles):
                 i = 'meta/%s/00manifest.i' % dir
                 d = 'meta/%s/00manifest.d' % dir