From patchwork Mon Jun 19 20:47:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [6, of, 9] repair: clarify in comment that caller must take lock, but not transaction From: via Mercurial-devel X-Patchwork-Id: 21512 Message-Id: <35e3c0300b35a93ce3ac.1497905278@martinvonz.svl.corp.google.com> To: mercurial-devel@mercurial-scm.org Date: Mon, 19 Jun 2017 13:47:58 -0700 # HG changeset patch # User Martin von Zweigbergk # Date 1497896661 25200 # Mon Jun 19 11:24:21 2017 -0700 # Node ID 35e3c0300b35a93ce3acfd7234135144ebd2d9f4 # Parent ff0a5f83ee622acdc1f1ed5f9323211044bfa78d repair: clarify in comment that caller must take lock, but not transaction I have checked that all callers have already taken the lock (and if they hadn't, we should have seen tests fail thanks to the 'transaction requires locking' devel warning in localrepo.transaction()). diff --git a/mercurial/repair.py b/mercurial/repair.py --- a/mercurial/repair.py +++ b/mercurial/repair.py @@ -76,8 +76,9 @@ 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. + # This function requires the caller to lock the repo, but it operates + # within a transaction of its own, and thus requires there to be no current + # transaction when it is called. # Simple way to maintain backwards compatibility for this # argument. if backup in ['none', 'strip']: