Mercurial > hg
comparison mercurial/transaction.py @ 23250:8919dc7f2dbb
transaction: document startgroup and endgroup
These enigmatic methods are only used in repair. We document them to clarify
there purpose and user.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 05 Nov 2014 10:00:15 +0000 |
parents | 84720eab4fbd |
children | 85c634ff395a |
comparison
equal
deleted
inserted
replaced
23249:84720eab4fbd | 23250:8919dc7f2dbb |
---|---|
115 if self.journal: | 115 if self.journal: |
116 self._abort() | 116 self._abort() |
117 | 117 |
118 @active | 118 @active |
119 def startgroup(self): | 119 def startgroup(self): |
120 """delay registration of file entry | |
121 | |
122 This is used by strip to delay vision of strip offset. The transaction | |
123 sees either none or all of the strip actions to be done.""" | |
120 self._queue.append(([], [])) | 124 self._queue.append(([], [])) |
121 | 125 |
122 @active | 126 @active |
123 def endgroup(self): | 127 def endgroup(self): |
128 """apply delayed registration of file entry. | |
129 | |
130 This is used by strip to delay vision of strip offset. The transaction | |
131 sees either none or all of the strip actions to be done.""" | |
124 q = self._queue.pop() | 132 q = self._queue.pop() |
125 self.entries.extend(q[0]) | 133 self.entries.extend(q[0]) |
126 self._backupentries.extend(q[1]) | 134 self._backupentries.extend(q[1]) |
127 | 135 |
128 offsets = [] | 136 offsets = [] |