Mercurial > hg
annotate mercurial/revlogutils/revlogv0.py @ 47142:4292bed8da7c
revlog: make the index always return the same tuple
It is simpler to manage the diferrence in on disk format in the internal index
code itself and lets the rest of the code always handle the same object.
This will become even more important when the data we store will be entirely
different (for example the changelog does not need the "linkrev" field.
We start with item reading, we will deal with item writing in the next
changesets.
Differential Revision: https://phab.mercurial-scm.org/D10568
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 03 May 2021 12:21:15 +0200 |
parents | 724db234b790 |
children | ba21cfd9b044 |
rev | line source |
---|---|
47038
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
1 # revlogv0 - code related to revlog format "V0" |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
2 # |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
3 # Copyright 2005-2007 Olivia Mackall <olivia@selenic.com> |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
4 # |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
5 # This software may be used and distributed according to the terms of the |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
6 # GNU General Public License version 2 or any later version. |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
7 from __future__ import absolute_import |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
8 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
9 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
10 from ..node import sha1nodeconstants |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
11 from .constants import ( |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
12 INDEX_ENTRY_V0, |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
13 ) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
14 from ..i18n import _ |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
15 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
16 from .. import ( |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
17 error, |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
18 node, |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
19 pycompat, |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
20 util, |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
21 ) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
22 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
23 from . import ( |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
24 flagutil, |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
25 nodemap as nodemaputil, |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
26 ) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
27 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
28 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
29 def getoffset(q): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
30 return int(q >> 16) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
31 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
32 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
33 def gettype(q): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
34 return int(q & 0xFFFF) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
35 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
36 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
37 def offset_type(offset, type): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
38 if (type & ~flagutil.REVIDX_KNOWN_FLAGS) != 0: |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
39 raise ValueError(b'unknown revlog index flags') |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
40 return int(int(offset) << 16 | type) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
41 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
42 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
43 class revlogoldindex(list): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
44 entry_size = INDEX_ENTRY_V0.size |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
45 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
46 @property |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
47 def nodemap(self): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
48 msg = b"index.nodemap is deprecated, use index.[has_node|rev|get_rev]" |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
49 util.nouideprecwarn(msg, b'5.3', stacklevel=2) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
50 return self._nodemap |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
51 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
52 @util.propertycache |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
53 def _nodemap(self): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
54 nodemap = nodemaputil.NodeMap({sha1nodeconstants.nullid: node.nullrev}) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
55 for r in range(0, len(self)): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
56 n = self[r][7] |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
57 nodemap[n] = r |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
58 return nodemap |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
59 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
60 def has_node(self, node): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
61 """return True if the node exist in the index""" |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
62 return node in self._nodemap |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
63 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
64 def rev(self, node): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
65 """return a revision for a node |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
66 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
67 If the node is unknown, raise a RevlogError""" |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
68 return self._nodemap[node] |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
69 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
70 def get_rev(self, node): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
71 """return a revision for a node |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
72 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
73 If the node is unknown, return None""" |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
74 return self._nodemap.get(node) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
75 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
76 def append(self, tup): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
77 self._nodemap[tup[7]] = len(self) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
78 super(revlogoldindex, self).append(tup) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
79 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
80 def __delitem__(self, i): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
81 if not isinstance(i, slice) or not i.stop == -1 or i.step is not None: |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
82 raise ValueError(b"deleting slices only supports a:-1 with step 1") |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
83 for r in pycompat.xrange(i.start, len(self)): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
84 del self._nodemap[self[r][7]] |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
85 super(revlogoldindex, self).__delitem__(i) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
86 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
87 def clearcaches(self): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
88 self.__dict__.pop('_nodemap', None) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
89 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
90 def __getitem__(self, i): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
91 if i == -1: |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
92 return (0, 0, 0, -1, -1, -1, -1, node.nullid) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
93 return list.__getitem__(self, i) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
94 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
95 def pack_header(self, header): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
96 """pack header information in binary""" |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
97 return b'' |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
98 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
99 def entry_binary(self, rev): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
100 """return the raw binary string representing a revision""" |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
101 entry = self[rev] |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
102 if gettype(entry[0]): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
103 raise error.RevlogError( |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
104 _(b'index entry flags need revlog version 1') |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
105 ) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
106 e2 = ( |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
107 getoffset(entry[0]), |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
108 entry[1], |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
109 entry[3], |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
110 entry[4], |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
111 self[entry[5]][7], |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
112 self[entry[6]][7], |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
113 entry[7], |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
114 ) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
115 return INDEX_ENTRY_V0.pack(*e2) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
116 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
117 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
118 def parse_index_v0(data, inline): |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
119 s = INDEX_ENTRY_V0.size |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
120 index = [] |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
121 nodemap = nodemaputil.NodeMap({node.nullid: node.nullrev}) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
122 n = off = 0 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
123 l = len(data) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
124 while off + s <= l: |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
125 cur = data[off : off + s] |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
126 off += s |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
127 e = INDEX_ENTRY_V0.unpack(cur) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
128 # transform to revlogv1 format |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
129 e2 = ( |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
130 offset_type(e[0], 0), |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
131 e[1], |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
132 -1, |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
133 e[2], |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
134 e[3], |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
135 nodemap.get(e[4], node.nullrev), |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
136 nodemap.get(e[5], node.nullrev), |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
137 e[6], |
47142
4292bed8da7c
revlog: make the index always return the same tuple
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47038
diff
changeset
|
138 0, # no side data support |
4292bed8da7c
revlog: make the index always return the same tuple
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47038
diff
changeset
|
139 0, # no side data support |
47038
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
140 ) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
141 index.append(e2) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
142 nodemap[e[6]] = n |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
143 n += 1 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
144 |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
145 index = revlogoldindex(index) |
724db234b790
revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
146 return index, None |