Mercurial > public > mercurial-scm > hg
comparison mercurial/revlog.py @ 15890:e234eda20984
revlog: make addgroup returns a list of node contained in the added source
This list will contains any node see in the source, not only the added one.
This is intended to allow phase to be move according what was pushed by client
not only what was added.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 13 Jan 2012 01:29:03 +0100 |
parents | fa15869bf95c |
children | 29c2ff719715 |
comparison
equal
deleted
inserted
replaced
15889:816209eaf963 | 15890:e234eda20984 |
---|---|
1129 first delta is against its parent, which should be in our | 1129 first delta is against its parent, which should be in our |
1130 log, the rest are against the previous delta. | 1130 log, the rest are against the previous delta. |
1131 """ | 1131 """ |
1132 | 1132 |
1133 # track the base of the current delta log | 1133 # track the base of the current delta log |
1134 content = [] | |
1134 node = None | 1135 node = None |
1135 | 1136 |
1136 r = len(self) | 1137 r = len(self) |
1137 end = 0 | 1138 end = 0 |
1138 if r: | 1139 if r: |
1159 p2 = chunkdata['p2'] | 1160 p2 = chunkdata['p2'] |
1160 cs = chunkdata['cs'] | 1161 cs = chunkdata['cs'] |
1161 deltabase = chunkdata['deltabase'] | 1162 deltabase = chunkdata['deltabase'] |
1162 delta = chunkdata['delta'] | 1163 delta = chunkdata['delta'] |
1163 | 1164 |
1165 content.append(node) | |
1166 | |
1164 link = linkmapper(cs) | 1167 link = linkmapper(cs) |
1165 if node in self.nodemap: | 1168 if node in self.nodemap: |
1166 # this can happen if two branches make the same change | 1169 # this can happen if two branches make the same change |
1167 chain = node | 1170 chain = node |
1168 continue | 1171 continue |
1188 finally: | 1191 finally: |
1189 if dfh: | 1192 if dfh: |
1190 dfh.close() | 1193 dfh.close() |
1191 ifh.close() | 1194 ifh.close() |
1192 | 1195 |
1193 return node | 1196 return content |
1194 | 1197 |
1195 def strip(self, minlink, transaction): | 1198 def strip(self, minlink, transaction): |
1196 """truncate the revlog on the first revision with a linkrev >= minlink | 1199 """truncate the revlog on the first revision with a linkrev >= minlink |
1197 | 1200 |
1198 This function is called when we're stripping revision minlink and | 1201 This function is called when we're stripping revision minlink and |