Mercurial > hg
comparison mercurial/repair.py @ 32922:eb84b4ad41e5
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()).
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 19 Jun 2017 11:24:21 -0700 |
parents | 0a41902879d3 |
children | e413609659cf |
comparison
equal
deleted
inserted
replaced
32921:5694311db6ed | 32922:eb84b4ad41e5 |
---|---|
74 collectone(repo.file(fname)) | 74 collectone(repo.file(fname)) |
75 | 75 |
76 return s | 76 return s |
77 | 77 |
78 def strip(ui, repo, nodelist, backup=True, topic='backup'): | 78 def strip(ui, repo, nodelist, backup=True, topic='backup'): |
79 # This function operates within a transaction of its own, but does | 79 # This function requires the caller to lock the repo, but it operates |
80 # not take any lock on the repo. | 80 # within a transaction of its own, and thus requires there to be no current |
81 # transaction when it is called. | |
81 # Simple way to maintain backwards compatibility for this | 82 # Simple way to maintain backwards compatibility for this |
82 # argument. | 83 # argument. |
83 if backup in ['none', 'strip']: | 84 if backup in ['none', 'strip']: |
84 backup = False | 85 backup = False |
85 | 86 |