They are unused after the previous commit.
.. api:: externalize() and externalizeall() removed from dagutil
Use .node() on a storage primitive to perform revision to node conversions.
hg-reviewers |
They are unused after the previous commit.
.. api:: externalize() and externalizeall() removed from dagutil
Use .node() on a storage primitive to perform revision to node conversions.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/dagutil.py (17 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | indygreg | D4330 dagutil: remove module | |
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg |
''' | ''' | ||||
subset of connected list of ixs so that no node has a descendant in it | subset of connected list of ixs so that no node has a descendant in it | ||||
By "connected list" we mean that if an ancestor and a descendant are in | By "connected list" we mean that if an ancestor and a descendant are in | ||||
the list, then so is at least one path connecting them. | the list, then so is at least one path connecting them. | ||||
''' | ''' | ||||
raise NotImplementedError | raise NotImplementedError | ||||
def externalize(self, ix): | |||||
'''return a node id''' | |||||
return self._externalize(ix) | |||||
def externalizeall(self, ixs): | |||||
'''return a list of (or set if given a set) of node ids''' | |||||
ids = self._externalizeall(ixs) | |||||
if isinstance(ixs, set): | |||||
return set(ids) | |||||
return list(ids) | |||||
def internalize(self, id): | def internalize(self, id): | ||||
'''return a node ix''' | '''return a node ix''' | ||||
return self._internalize(id) | return self._internalize(id) | ||||
def internalizeall(self, ids, filterunknown=False): | def internalizeall(self, ids, filterunknown=False): | ||||
'''return a list of (or set if given a set) of node ixs''' | '''return a list of (or set if given a set) of node ixs''' | ||||
ixs = self._internalizeall(ids, filterunknown) | ixs = self._internalizeall(ids, filterunknown) | ||||
if isinstance(ids, set): | if isinstance(ids, set): | ||||
def nodeset(self): | def nodeset(self): | ||||
return self._nodeset | return self._nodeset | ||||
def heads(self): | def heads(self): | ||||
if self._heads is None: | if self._heads is None: | ||||
self._heads = self._getheads() | self._heads = self._getheads() | ||||
return self._heads | return self._heads | ||||
def _externalize(self, ix): | |||||
return self._revlog.index[ix][7] | |||||
def _externalizeall(self, ixs): | |||||
idx = self._revlog.index | |||||
return [idx[i][7] for i in ixs] | |||||
def _internalize(self, id): | def _internalize(self, id): | ||||
ix = self._revlog.rev(id) | ix = self._revlog.rev(id) | ||||
if ix == nullrev: | if ix == nullrev: | ||||
raise LookupError(id, self._revlog.indexfile, _('nullid')) | raise LookupError(id, self._revlog.indexfile, _('nullid')) | ||||
return ix | return ix | ||||
def _internalizeall(self, ids, filterunknown): | def _internalizeall(self, ids, filterunknown): | ||||
rl = self._revlog | rl = self._revlog | ||||
if filterunknown: | if filterunknown: |