[PATCH] repair: improves documentation of strip regarding locks

Laurent Charignon lcharignon at fb.com
Tue Dec 29 18:24:38 UTC 2015


# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com>
# Date 1451413299 28800
#      Tue Dec 29 10:21:39 2015 -0800
# Node ID a112debc66c16bbbc8f6051e5249a151300e9c57
# Parent  23541bdd1610c08af247f9c8719045cf247ce541
repair: improves documentation of strip regarding locks

This patch adds a comment making it clear that we should hold a lock before
calling repair.strip. The wording is the same than what we have for
obsolete.createmarkers

diff --git a/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -74,7 +74,8 @@ def _collectbrokencsets(repo, files, str
     return s
 
 def strip(ui, repo, nodelist, backup=True, topic='backup'):
-
+    # This function operates within a transaction of its own, but does
+    # not take any lock on the repo.
     # Simple way to maintain backwards compatibility for this
     # argument.
     if backup in ['none', 'strip']:


More information about the Mercurial-devel mailing list