Show More
@@ -1,449 +1,451 b'' | |||||
1 | # branchmap.py - logic to computes, maintain and stores branchmap for local repo |
|
1 | # branchmap.py - logic to computes, maintain and stores branchmap for local repo | |
2 | # |
|
2 | # | |
3 | # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | from node import bin, hex, nullid, nullrev |
|
8 | from node import bin, hex, nullid, nullrev | |
9 | import encoding |
|
9 | import encoding | |
10 | import util |
|
10 | import util | |
11 | import time |
|
11 | import time | |
12 | from array import array |
|
12 | from array import array | |
13 | from struct import calcsize, pack, unpack |
|
13 | from struct import calcsize, pack, unpack | |
14 |
|
14 | |||
15 | def _filename(repo): |
|
15 | def _filename(repo): | |
16 | """name of a branchcache file for a given repo or repoview""" |
|
16 | """name of a branchcache file for a given repo or repoview""" | |
17 | filename = "cache/branch2" |
|
17 | filename = "cache/branch2" | |
18 | if repo.filtername: |
|
18 | if repo.filtername: | |
19 | filename = '%s-%s' % (filename, repo.filtername) |
|
19 | filename = '%s-%s' % (filename, repo.filtername) | |
20 | return filename |
|
20 | return filename | |
21 |
|
21 | |||
22 | def read(repo): |
|
22 | def read(repo): | |
23 | try: |
|
23 | try: | |
24 | f = repo.opener(_filename(repo)) |
|
24 | f = repo.opener(_filename(repo)) | |
25 | lines = f.read().split('\n') |
|
25 | lines = f.read().split('\n') | |
26 | f.close() |
|
26 | f.close() | |
27 | except (IOError, OSError): |
|
27 | except (IOError, OSError): | |
28 | return None |
|
28 | return None | |
29 |
|
29 | |||
30 | try: |
|
30 | try: | |
31 | cachekey = lines.pop(0).split(" ", 2) |
|
31 | cachekey = lines.pop(0).split(" ", 2) | |
32 | last, lrev = cachekey[:2] |
|
32 | last, lrev = cachekey[:2] | |
33 | last, lrev = bin(last), int(lrev) |
|
33 | last, lrev = bin(last), int(lrev) | |
34 | filteredhash = None |
|
34 | filteredhash = None | |
35 | if len(cachekey) > 2: |
|
35 | if len(cachekey) > 2: | |
36 | filteredhash = bin(cachekey[2]) |
|
36 | filteredhash = bin(cachekey[2]) | |
37 | partial = branchcache(tipnode=last, tiprev=lrev, |
|
37 | partial = branchcache(tipnode=last, tiprev=lrev, | |
38 | filteredhash=filteredhash) |
|
38 | filteredhash=filteredhash) | |
39 | if not partial.validfor(repo): |
|
39 | if not partial.validfor(repo): | |
40 | # invalidate the cache |
|
40 | # invalidate the cache | |
41 | raise ValueError('tip differs') |
|
41 | raise ValueError('tip differs') | |
42 | for l in lines: |
|
42 | for l in lines: | |
43 | if not l: |
|
43 | if not l: | |
44 | continue |
|
44 | continue | |
45 | node, state, label = l.split(" ", 2) |
|
45 | node, state, label = l.split(" ", 2) | |
46 | if state not in 'oc': |
|
46 | if state not in 'oc': | |
47 | raise ValueError('invalid branch state') |
|
47 | raise ValueError('invalid branch state') | |
48 | label = encoding.tolocal(label.strip()) |
|
48 | label = encoding.tolocal(label.strip()) | |
49 | if not node in repo: |
|
49 | if not node in repo: | |
50 | raise ValueError('node %s does not exist' % node) |
|
50 | raise ValueError('node %s does not exist' % node) | |
51 | node = bin(node) |
|
51 | node = bin(node) | |
52 | partial.setdefault(label, []).append(node) |
|
52 | partial.setdefault(label, []).append(node) | |
53 | if state == 'c': |
|
53 | if state == 'c': | |
54 | partial._closednodes.add(node) |
|
54 | partial._closednodes.add(node) | |
55 | except KeyboardInterrupt: |
|
55 | except KeyboardInterrupt: | |
56 | raise |
|
56 | raise | |
57 | except Exception, inst: |
|
57 | except Exception, inst: | |
58 | if repo.ui.debugflag: |
|
58 | if repo.ui.debugflag: | |
59 | msg = 'invalid branchheads cache' |
|
59 | msg = 'invalid branchheads cache' | |
60 | if repo.filtername is not None: |
|
60 | if repo.filtername is not None: | |
61 | msg += ' (%s)' % repo.filtername |
|
61 | msg += ' (%s)' % repo.filtername | |
62 | msg += ': %s\n' |
|
62 | msg += ': %s\n' | |
63 | repo.ui.debug(msg % inst) |
|
63 | repo.ui.debug(msg % inst) | |
64 | partial = None |
|
64 | partial = None | |
65 | return partial |
|
65 | return partial | |
66 |
|
66 | |||
67 | ### Nearest subset relation |
|
67 | ### Nearest subset relation | |
68 | # Nearest subset of filter X is a filter Y so that: |
|
68 | # Nearest subset of filter X is a filter Y so that: | |
69 | # * Y is included in X, |
|
69 | # * Y is included in X, | |
70 | # * X - Y is as small as possible. |
|
70 | # * X - Y is as small as possible. | |
71 | # This create and ordering used for branchmap purpose. |
|
71 | # This create and ordering used for branchmap purpose. | |
72 | # the ordering may be partial |
|
72 | # the ordering may be partial | |
73 | subsettable = {None: 'visible', |
|
73 | subsettable = {None: 'visible', | |
74 | 'visible': 'served', |
|
74 | 'visible': 'served', | |
75 | 'served': 'immutable', |
|
75 | 'served': 'immutable', | |
76 | 'immutable': 'base'} |
|
76 | 'immutable': 'base'} | |
77 |
|
77 | |||
78 | def updatecache(repo): |
|
78 | def updatecache(repo): | |
79 | cl = repo.changelog |
|
79 | cl = repo.changelog | |
80 | filtername = repo.filtername |
|
80 | filtername = repo.filtername | |
81 | partial = repo._branchcaches.get(filtername) |
|
81 | partial = repo._branchcaches.get(filtername) | |
82 |
|
82 | |||
83 | revs = [] |
|
83 | revs = [] | |
84 | if partial is None or not partial.validfor(repo): |
|
84 | if partial is None or not partial.validfor(repo): | |
85 | partial = read(repo) |
|
85 | partial = read(repo) | |
86 | if partial is None: |
|
86 | if partial is None: | |
87 | subsetname = subsettable.get(filtername) |
|
87 | subsetname = subsettable.get(filtername) | |
88 | if subsetname is None: |
|
88 | if subsetname is None: | |
89 | partial = branchcache() |
|
89 | partial = branchcache() | |
90 | else: |
|
90 | else: | |
91 | subset = repo.filtered(subsetname) |
|
91 | subset = repo.filtered(subsetname) | |
92 | partial = subset.branchmap().copy() |
|
92 | partial = subset.branchmap().copy() | |
93 | extrarevs = subset.changelog.filteredrevs - cl.filteredrevs |
|
93 | extrarevs = subset.changelog.filteredrevs - cl.filteredrevs | |
94 | revs.extend(r for r in extrarevs if r <= partial.tiprev) |
|
94 | revs.extend(r for r in extrarevs if r <= partial.tiprev) | |
95 | revs.extend(cl.revs(start=partial.tiprev + 1)) |
|
95 | revs.extend(cl.revs(start=partial.tiprev + 1)) | |
96 | if revs: |
|
96 | if revs: | |
97 | partial.update(repo, revs) |
|
97 | partial.update(repo, revs) | |
98 | partial.write(repo) |
|
98 | partial.write(repo) | |
99 | assert partial.validfor(repo), filtername |
|
99 | assert partial.validfor(repo), filtername | |
100 | repo._branchcaches[repo.filtername] = partial |
|
100 | repo._branchcaches[repo.filtername] = partial | |
101 |
|
101 | |||
102 | class branchcache(dict): |
|
102 | class branchcache(dict): | |
103 | """A dict like object that hold branches heads cache. |
|
103 | """A dict like object that hold branches heads cache. | |
104 |
|
104 | |||
105 | This cache is used to avoid costly computations to determine all the |
|
105 | This cache is used to avoid costly computations to determine all the | |
106 | branch heads of a repo. |
|
106 | branch heads of a repo. | |
107 |
|
107 | |||
108 | The cache is serialized on disk in the following format: |
|
108 | The cache is serialized on disk in the following format: | |
109 |
|
109 | |||
110 | <tip hex node> <tip rev number> [optional filtered repo hex hash] |
|
110 | <tip hex node> <tip rev number> [optional filtered repo hex hash] | |
111 | <branch head hex node> <open/closed state> <branch name> |
|
111 | <branch head hex node> <open/closed state> <branch name> | |
112 | <branch head hex node> <open/closed state> <branch name> |
|
112 | <branch head hex node> <open/closed state> <branch name> | |
113 | ... |
|
113 | ... | |
114 |
|
114 | |||
115 | The first line is used to check if the cache is still valid. If the |
|
115 | The first line is used to check if the cache is still valid. If the | |
116 | branch cache is for a filtered repo view, an optional third hash is |
|
116 | branch cache is for a filtered repo view, an optional third hash is | |
117 | included that hashes the hashes of all filtered revisions. |
|
117 | included that hashes the hashes of all filtered revisions. | |
118 |
|
118 | |||
119 | The open/closed state is represented by a single letter 'o' or 'c'. |
|
119 | The open/closed state is represented by a single letter 'o' or 'c'. | |
120 | This field can be used to avoid changelog reads when determining if a |
|
120 | This field can be used to avoid changelog reads when determining if a | |
121 | branch head closes a branch or not. |
|
121 | branch head closes a branch or not. | |
122 | """ |
|
122 | """ | |
123 |
|
123 | |||
124 | def __init__(self, entries=(), tipnode=nullid, tiprev=nullrev, |
|
124 | def __init__(self, entries=(), tipnode=nullid, tiprev=nullrev, | |
125 | filteredhash=None, closednodes=None): |
|
125 | filteredhash=None, closednodes=None): | |
126 | super(branchcache, self).__init__(entries) |
|
126 | super(branchcache, self).__init__(entries) | |
127 | self.tipnode = tipnode |
|
127 | self.tipnode = tipnode | |
128 | self.tiprev = tiprev |
|
128 | self.tiprev = tiprev | |
129 | self.filteredhash = filteredhash |
|
129 | self.filteredhash = filteredhash | |
130 | # closednodes is a set of nodes that close their branch. If the branch |
|
130 | # closednodes is a set of nodes that close their branch. If the branch | |
131 | # cache has been updated, it may contain nodes that are no longer |
|
131 | # cache has been updated, it may contain nodes that are no longer | |
132 | # heads. |
|
132 | # heads. | |
133 | if closednodes is None: |
|
133 | if closednodes is None: | |
134 | self._closednodes = set() |
|
134 | self._closednodes = set() | |
135 | else: |
|
135 | else: | |
136 | self._closednodes = closednodes |
|
136 | self._closednodes = closednodes | |
137 | self._revbranchcache = None |
|
137 | self._revbranchcache = None | |
138 |
|
138 | |||
139 | def _hashfiltered(self, repo): |
|
139 | def _hashfiltered(self, repo): | |
140 | """build hash of revision filtered in the current cache |
|
140 | """build hash of revision filtered in the current cache | |
141 |
|
141 | |||
142 | Tracking tipnode and tiprev is not enough to ensure validity of the |
|
142 | Tracking tipnode and tiprev is not enough to ensure validity of the | |
143 | cache as they do not help to distinct cache that ignored various |
|
143 | cache as they do not help to distinct cache that ignored various | |
144 | revision bellow tiprev. |
|
144 | revision bellow tiprev. | |
145 |
|
145 | |||
146 | To detect such difference, we build a cache of all ignored revisions. |
|
146 | To detect such difference, we build a cache of all ignored revisions. | |
147 | """ |
|
147 | """ | |
148 | cl = repo.changelog |
|
148 | cl = repo.changelog | |
149 | if not cl.filteredrevs: |
|
149 | if not cl.filteredrevs: | |
150 | return None |
|
150 | return None | |
151 | key = None |
|
151 | key = None | |
152 | revs = sorted(r for r in cl.filteredrevs if r <= self.tiprev) |
|
152 | revs = sorted(r for r in cl.filteredrevs if r <= self.tiprev) | |
153 | if revs: |
|
153 | if revs: | |
154 | s = util.sha1() |
|
154 | s = util.sha1() | |
155 | for rev in revs: |
|
155 | for rev in revs: | |
156 | s.update('%s;' % rev) |
|
156 | s.update('%s;' % rev) | |
157 | key = s.digest() |
|
157 | key = s.digest() | |
158 | return key |
|
158 | return key | |
159 |
|
159 | |||
160 | def validfor(self, repo): |
|
160 | def validfor(self, repo): | |
161 | """Is the cache content valid regarding a repo |
|
161 | """Is the cache content valid regarding a repo | |
162 |
|
162 | |||
163 | - False when cached tipnode is unknown or if we detect a strip. |
|
163 | - False when cached tipnode is unknown or if we detect a strip. | |
164 | - True when cache is up to date or a subset of current repo.""" |
|
164 | - True when cache is up to date or a subset of current repo.""" | |
165 | try: |
|
165 | try: | |
166 | return ((self.tipnode == repo.changelog.node(self.tiprev)) |
|
166 | return ((self.tipnode == repo.changelog.node(self.tiprev)) | |
167 | and (self.filteredhash == self._hashfiltered(repo))) |
|
167 | and (self.filteredhash == self._hashfiltered(repo))) | |
168 | except IndexError: |
|
168 | except IndexError: | |
169 | return False |
|
169 | return False | |
170 |
|
170 | |||
171 | def _branchtip(self, heads): |
|
171 | def _branchtip(self, heads): | |
172 | '''Return tuple with last open head in heads and false, |
|
172 | '''Return tuple with last open head in heads and false, | |
173 | otherwise return last closed head and true.''' |
|
173 | otherwise return last closed head and true.''' | |
174 | tip = heads[-1] |
|
174 | tip = heads[-1] | |
175 | closed = True |
|
175 | closed = True | |
176 | for h in reversed(heads): |
|
176 | for h in reversed(heads): | |
177 | if h not in self._closednodes: |
|
177 | if h not in self._closednodes: | |
178 | tip = h |
|
178 | tip = h | |
179 | closed = False |
|
179 | closed = False | |
180 | break |
|
180 | break | |
181 | return tip, closed |
|
181 | return tip, closed | |
182 |
|
182 | |||
183 | def branchtip(self, branch): |
|
183 | def branchtip(self, branch): | |
184 | '''Return the tipmost open head on branch head, otherwise return the |
|
184 | '''Return the tipmost open head on branch head, otherwise return the | |
185 | tipmost closed head on branch. |
|
185 | tipmost closed head on branch. | |
186 | Raise KeyError for unknown branch.''' |
|
186 | Raise KeyError for unknown branch.''' | |
187 | return self._branchtip(self[branch])[0] |
|
187 | return self._branchtip(self[branch])[0] | |
188 |
|
188 | |||
189 | def branchheads(self, branch, closed=False): |
|
189 | def branchheads(self, branch, closed=False): | |
190 | heads = self[branch] |
|
190 | heads = self[branch] | |
191 | if not closed: |
|
191 | if not closed: | |
192 | heads = [h for h in heads if h not in self._closednodes] |
|
192 | heads = [h for h in heads if h not in self._closednodes] | |
193 | return heads |
|
193 | return heads | |
194 |
|
194 | |||
195 | def iterbranches(self): |
|
195 | def iterbranches(self): | |
196 | for bn, heads in self.iteritems(): |
|
196 | for bn, heads in self.iteritems(): | |
197 | yield (bn, heads) + self._branchtip(heads) |
|
197 | yield (bn, heads) + self._branchtip(heads) | |
198 |
|
198 | |||
199 | def copy(self): |
|
199 | def copy(self): | |
200 | """return an deep copy of the branchcache object""" |
|
200 | """return an deep copy of the branchcache object""" | |
201 | return branchcache(self, self.tipnode, self.tiprev, self.filteredhash, |
|
201 | return branchcache(self, self.tipnode, self.tiprev, self.filteredhash, | |
202 | self._closednodes) |
|
202 | self._closednodes) | |
203 |
|
203 | |||
204 | def write(self, repo): |
|
204 | def write(self, repo): | |
205 | try: |
|
205 | try: | |
206 | f = repo.opener(_filename(repo), "w", atomictemp=True) |
|
206 | f = repo.opener(_filename(repo), "w", atomictemp=True) | |
207 | cachekey = [hex(self.tipnode), str(self.tiprev)] |
|
207 | cachekey = [hex(self.tipnode), str(self.tiprev)] | |
208 | if self.filteredhash is not None: |
|
208 | if self.filteredhash is not None: | |
209 | cachekey.append(hex(self.filteredhash)) |
|
209 | cachekey.append(hex(self.filteredhash)) | |
210 | f.write(" ".join(cachekey) + '\n') |
|
210 | f.write(" ".join(cachekey) + '\n') | |
211 | nodecount = 0 |
|
211 | nodecount = 0 | |
212 | for label, nodes in sorted(self.iteritems()): |
|
212 | for label, nodes in sorted(self.iteritems()): | |
213 | for node in nodes: |
|
213 | for node in nodes: | |
214 | nodecount += 1 |
|
214 | nodecount += 1 | |
215 | if node in self._closednodes: |
|
215 | if node in self._closednodes: | |
216 | state = 'c' |
|
216 | state = 'c' | |
217 | else: |
|
217 | else: | |
218 | state = 'o' |
|
218 | state = 'o' | |
219 | f.write("%s %s %s\n" % (hex(node), state, |
|
219 | f.write("%s %s %s\n" % (hex(node), state, | |
220 | encoding.fromlocal(label))) |
|
220 | encoding.fromlocal(label))) | |
221 | f.close() |
|
221 | f.close() | |
222 | repo.ui.log('branchcache', |
|
222 | repo.ui.log('branchcache', | |
223 | 'wrote %s branch cache with %d labels and %d nodes\n', |
|
223 | 'wrote %s branch cache with %d labels and %d nodes\n', | |
224 | repo.filtername, len(self), nodecount) |
|
224 | repo.filtername, len(self), nodecount) | |
225 | except (IOError, OSError, util.Abort), inst: |
|
225 | except (IOError, OSError, util.Abort), inst: | |
226 | repo.ui.debug("couldn't write branch cache: %s\n" % inst) |
|
226 | repo.ui.debug("couldn't write branch cache: %s\n" % inst) | |
227 | # Abort may be raise by read only opener |
|
227 | # Abort may be raise by read only opener | |
228 | pass |
|
228 | pass | |
229 | if self._revbranchcache: |
|
229 | if self._revbranchcache: | |
230 | self._revbranchcache.write(repo.unfiltered()) |
|
230 | self._revbranchcache.write(repo.unfiltered()) | |
231 | self._revbranchcache = None |
|
231 | self._revbranchcache = None | |
232 |
|
232 | |||
233 | def update(self, repo, revgen): |
|
233 | def update(self, repo, revgen): | |
234 | """Given a branchhead cache, self, that may have extra nodes or be |
|
234 | """Given a branchhead cache, self, that may have extra nodes or be | |
235 | missing heads, and a generator of nodes that are strictly a superset of |
|
235 | missing heads, and a generator of nodes that are strictly a superset of | |
236 | heads missing, this function updates self to be correct. |
|
236 | heads missing, this function updates self to be correct. | |
237 | """ |
|
237 | """ | |
238 | starttime = time.time() |
|
238 | starttime = time.time() | |
239 | cl = repo.changelog |
|
239 | cl = repo.changelog | |
240 | # collect new branch entries |
|
240 | # collect new branch entries | |
241 | newbranches = {} |
|
241 | newbranches = {} | |
242 | urepo = repo.unfiltered() |
|
242 | urepo = repo.unfiltered() | |
243 | self._revbranchcache = revbranchcache(urepo) |
|
243 | self._revbranchcache = revbranchcache(urepo) | |
244 | getbranchinfo = self._revbranchcache.branchinfo |
|
244 | getbranchinfo = self._revbranchcache.branchinfo | |
245 | ucl = urepo.changelog |
|
245 | ucl = urepo.changelog | |
246 | for r in revgen: |
|
246 | for r in revgen: | |
247 | branch, closesbranch = getbranchinfo(ucl, r) |
|
247 | branch, closesbranch = getbranchinfo(ucl, r) | |
248 | newbranches.setdefault(branch, []).append(r) |
|
248 | newbranches.setdefault(branch, []).append(r) | |
249 | if closesbranch: |
|
249 | if closesbranch: | |
250 | self._closednodes.add(cl.node(r)) |
|
250 | self._closednodes.add(cl.node(r)) | |
251 |
|
251 | |||
252 | # fetch current topological heads to speed up filtering |
|
252 | # fetch current topological heads to speed up filtering | |
253 | topoheads = set(cl.headrevs()) |
|
253 | topoheads = set(cl.headrevs()) | |
254 |
|
254 | |||
255 | # if older branchheads are reachable from new ones, they aren't |
|
255 | # if older branchheads are reachable from new ones, they aren't | |
256 | # really branchheads. Note checking parents is insufficient: |
|
256 | # really branchheads. Note checking parents is insufficient: | |
257 | # 1 (branch a) -> 2 (branch b) -> 3 (branch a) |
|
257 | # 1 (branch a) -> 2 (branch b) -> 3 (branch a) | |
258 | for branch, newheadrevs in newbranches.iteritems(): |
|
258 | for branch, newheadrevs in newbranches.iteritems(): | |
259 | bheads = self.setdefault(branch, []) |
|
259 | bheads = self.setdefault(branch, []) | |
260 | bheadset = set(cl.rev(node) for node in bheads) |
|
260 | bheadset = set(cl.rev(node) for node in bheads) | |
261 |
|
261 | |||
262 | # This have been tested True on all internal usage of this function. |
|
262 | # This have been tested True on all internal usage of this function. | |
263 | # run it again in case of doubt |
|
263 | # run it again in case of doubt | |
264 | # assert not (set(bheadrevs) & set(newheadrevs)) |
|
264 | # assert not (set(bheadrevs) & set(newheadrevs)) | |
265 | newheadrevs.sort() |
|
265 | newheadrevs.sort() | |
266 | bheadset.update(newheadrevs) |
|
266 | bheadset.update(newheadrevs) | |
267 |
|
267 | |||
268 | # This prunes out two kinds of heads - heads that are superseded by |
|
268 | # This prunes out two kinds of heads - heads that are superseded by | |
269 | # a head in newheadrevs, and newheadrevs that are not heads because |
|
269 | # a head in newheadrevs, and newheadrevs that are not heads because | |
270 | # an existing head is their descendant. |
|
270 | # an existing head is their descendant. | |
271 | uncertain = bheadset - topoheads |
|
271 | uncertain = bheadset - topoheads | |
272 | if uncertain: |
|
272 | if uncertain: | |
273 | floorrev = min(uncertain) |
|
273 | floorrev = min(uncertain) | |
274 | ancestors = set(cl.ancestors(newheadrevs, floorrev)) |
|
274 | ancestors = set(cl.ancestors(newheadrevs, floorrev)) | |
275 | bheadset -= ancestors |
|
275 | bheadset -= ancestors | |
276 | bheadrevs = sorted(bheadset) |
|
276 | bheadrevs = sorted(bheadset) | |
277 | self[branch] = [cl.node(rev) for rev in bheadrevs] |
|
277 | self[branch] = [cl.node(rev) for rev in bheadrevs] | |
278 | tiprev = bheadrevs[-1] |
|
278 | tiprev = bheadrevs[-1] | |
279 | if tiprev > self.tiprev: |
|
279 | if tiprev > self.tiprev: | |
280 | self.tipnode = cl.node(tiprev) |
|
280 | self.tipnode = cl.node(tiprev) | |
281 | self.tiprev = tiprev |
|
281 | self.tiprev = tiprev | |
282 |
|
282 | |||
283 | if not self.validfor(repo): |
|
283 | if not self.validfor(repo): | |
284 | # cache key are not valid anymore |
|
284 | # cache key are not valid anymore | |
285 | self.tipnode = nullid |
|
285 | self.tipnode = nullid | |
286 | self.tiprev = nullrev |
|
286 | self.tiprev = nullrev | |
287 | for heads in self.values(): |
|
287 | for heads in self.values(): | |
288 | tiprev = max(cl.rev(node) for node in heads) |
|
288 | tiprev = max(cl.rev(node) for node in heads) | |
289 | if tiprev > self.tiprev: |
|
289 | if tiprev > self.tiprev: | |
290 | self.tipnode = cl.node(tiprev) |
|
290 | self.tipnode = cl.node(tiprev) | |
291 | self.tiprev = tiprev |
|
291 | self.tiprev = tiprev | |
292 | self.filteredhash = self._hashfiltered(repo) |
|
292 | self.filteredhash = self._hashfiltered(repo) | |
293 |
|
293 | |||
294 | duration = time.time() - starttime |
|
294 | duration = time.time() - starttime | |
295 | repo.ui.log('branchcache', 'updated %s branch cache in %.4f seconds\n', |
|
295 | repo.ui.log('branchcache', 'updated %s branch cache in %.4f seconds\n', | |
296 | repo.filtername, duration) |
|
296 | repo.filtername, duration) | |
297 |
|
297 | |||
298 | # Revision branch info cache |
|
298 | # Revision branch info cache | |
299 |
|
299 | |||
300 | _rbcversion = '-v1' |
|
300 | _rbcversion = '-v1' | |
301 | _rbcnames = 'cache/rbc-names' + _rbcversion |
|
301 | _rbcnames = 'cache/rbc-names' + _rbcversion | |
302 | _rbcrevs = 'cache/rbc-revs' + _rbcversion |
|
302 | _rbcrevs = 'cache/rbc-revs' + _rbcversion | |
303 | # [4 byte hash prefix][4 byte branch name number with sign bit indicating open] |
|
303 | # [4 byte hash prefix][4 byte branch name number with sign bit indicating open] | |
304 | _rbcrecfmt = '>4sI' |
|
304 | _rbcrecfmt = '>4sI' | |
305 | _rbcrecsize = calcsize(_rbcrecfmt) |
|
305 | _rbcrecsize = calcsize(_rbcrecfmt) | |
306 | _rbcnodelen = 4 |
|
306 | _rbcnodelen = 4 | |
307 | _rbcbranchidxmask = 0x7fffffff |
|
307 | _rbcbranchidxmask = 0x7fffffff | |
308 | _rbccloseflag = 0x80000000 |
|
308 | _rbccloseflag = 0x80000000 | |
309 |
|
309 | |||
310 | class revbranchcache(object): |
|
310 | class revbranchcache(object): | |
311 | """Persistent cache, mapping from revision number to branch name and close. |
|
311 | """Persistent cache, mapping from revision number to branch name and close. | |
312 | This is a low level cache, independent of filtering. |
|
312 | This is a low level cache, independent of filtering. | |
313 |
|
313 | |||
314 | Branch names are stored in rbc-names in internal encoding separated by 0. |
|
314 | Branch names are stored in rbc-names in internal encoding separated by 0. | |
315 | rbc-names is append-only, and each branch name is only stored once and will |
|
315 | rbc-names is append-only, and each branch name is only stored once and will | |
316 | thus have a unique index. |
|
316 | thus have a unique index. | |
317 |
|
317 | |||
318 | The branch info for each revision is stored in rbc-revs as constant size |
|
318 | The branch info for each revision is stored in rbc-revs as constant size | |
319 | records. The whole file is read into memory, but it is only 'parsed' on |
|
319 | records. The whole file is read into memory, but it is only 'parsed' on | |
320 | demand. The file is usually append-only but will be truncated if repo |
|
320 | demand. The file is usually append-only but will be truncated if repo | |
321 | modification is detected. |
|
321 | modification is detected. | |
322 | The record for each revision contains the first 4 bytes of the |
|
322 | The record for each revision contains the first 4 bytes of the | |
323 | corresponding node hash, and the record is only used if it still matches. |
|
323 | corresponding node hash, and the record is only used if it still matches. | |
324 | Even a completely trashed rbc-revs fill thus still give the right result |
|
324 | Even a completely trashed rbc-revs fill thus still give the right result | |
325 | while converging towards full recovery ... assuming no incorrectly matching |
|
325 | while converging towards full recovery ... assuming no incorrectly matching | |
326 | node hashes. |
|
326 | node hashes. | |
327 | The record also contains 4 bytes where 31 bits contains the index of the |
|
327 | The record also contains 4 bytes where 31 bits contains the index of the | |
328 | branch and the last bit indicate that it is a branch close commit. |
|
328 | branch and the last bit indicate that it is a branch close commit. | |
329 | The usage pattern for rbc-revs is thus somewhat similar to 00changelog.i |
|
329 | The usage pattern for rbc-revs is thus somewhat similar to 00changelog.i | |
330 | and will grow with it but be 1/8th of its size. |
|
330 | and will grow with it but be 1/8th of its size. | |
331 | """ |
|
331 | """ | |
332 |
|
332 | |||
333 | def __init__(self, repo): |
|
333 | def __init__(self, repo): | |
334 | assert repo.filtername is None |
|
334 | assert repo.filtername is None | |
335 | self._names = [] # branch names in local encoding with static index |
|
335 | self._names = [] # branch names in local encoding with static index | |
336 | self._rbcrevs = array('c') # structs of type _rbcrecfmt |
|
336 | self._rbcrevs = array('c') # structs of type _rbcrecfmt | |
337 | self._rbcsnameslen = 0 |
|
337 | self._rbcsnameslen = 0 | |
338 | try: |
|
338 | try: | |
339 | bndata = repo.vfs.read(_rbcnames) |
|
339 | bndata = repo.vfs.read(_rbcnames) | |
340 | self._rbcsnameslen = len(bndata) # for verification before writing |
|
340 | self._rbcsnameslen = len(bndata) # for verification before writing | |
341 | self._names = [encoding.tolocal(bn) for bn in bndata.split('\0')] |
|
341 | self._names = [encoding.tolocal(bn) for bn in bndata.split('\0')] | |
342 | except (IOError, OSError), inst: |
|
342 | except (IOError, OSError), inst: | |
343 | repo.ui.debug("couldn't read revision branch cache names: %s\n" % |
|
343 | repo.ui.debug("couldn't read revision branch cache names: %s\n" % | |
344 | inst) |
|
344 | inst) | |
345 | if self._names: |
|
345 | if self._names: | |
346 | try: |
|
346 | try: | |
347 | data = repo.vfs.read(_rbcrevs) |
|
347 | data = repo.vfs.read(_rbcrevs) | |
348 | self._rbcrevs.fromstring(data) |
|
348 | self._rbcrevs.fromstring(data) | |
349 | except (IOError, OSError), inst: |
|
349 | except (IOError, OSError), inst: | |
350 | repo.ui.debug("couldn't read revision branch cache: %s\n" % |
|
350 | repo.ui.debug("couldn't read revision branch cache: %s\n" % | |
351 | inst) |
|
351 | inst) | |
352 | # remember number of good records on disk |
|
352 | # remember number of good records on disk | |
353 | self._rbcrevslen = min(len(self._rbcrevs) // _rbcrecsize, |
|
353 | self._rbcrevslen = min(len(self._rbcrevs) // _rbcrecsize, | |
354 | len(repo.changelog)) |
|
354 | len(repo.changelog)) | |
355 | if self._rbcrevslen == 0: |
|
355 | if self._rbcrevslen == 0: | |
356 | self._names = [] |
|
356 | self._names = [] | |
357 | self._rbcnamescount = len(self._names) # number of good names on disk |
|
357 | self._rbcnamescount = len(self._names) # number of good names on disk | |
358 | self._namesreverse = dict((b, r) for r, b in enumerate(self._names)) |
|
358 | self._namesreverse = dict((b, r) for r, b in enumerate(self._names)) | |
359 |
|
359 | |||
360 | def branchinfo(self, changelog, rev): |
|
360 | def branchinfo(self, changelog, rev): | |
361 | """Return branch name and close flag for rev, using and updating |
|
361 | """Return branch name and close flag for rev, using and updating | |
362 | persistent cache.""" |
|
362 | persistent cache.""" | |
363 | rbcrevidx = rev * _rbcrecsize |
|
363 | rbcrevidx = rev * _rbcrecsize | |
364 |
|
364 | |||
365 | # if requested rev is missing, add and populate all missing revs |
|
365 | # if requested rev is missing, add and populate all missing revs | |
366 | if len(self._rbcrevs) < rbcrevidx + _rbcrecsize: |
|
366 | if len(self._rbcrevs) < rbcrevidx + _rbcrecsize: | |
367 | first = len(self._rbcrevs) // _rbcrecsize |
|
367 | first = len(self._rbcrevs) // _rbcrecsize | |
368 | self._rbcrevs.extend('\0' * (len(changelog) * _rbcrecsize - |
|
368 | self._rbcrevs.extend('\0' * (len(changelog) * _rbcrecsize - | |
369 | len(self._rbcrevs))) |
|
369 | len(self._rbcrevs))) | |
370 | for r in xrange(first, len(changelog)): |
|
370 | for r in xrange(first, len(changelog)): | |
371 | self._branchinfo(changelog, r) |
|
371 | self._branchinfo(changelog, r) | |
372 |
|
372 | |||
373 | # fast path: extract data from cache, use it if node is matching |
|
373 | # fast path: extract data from cache, use it if node is matching | |
374 | reponode = changelog.node(rev)[:_rbcnodelen] |
|
374 | reponode = changelog.node(rev)[:_rbcnodelen] | |
375 | cachenode, branchidx = unpack( |
|
375 | cachenode, branchidx = unpack( | |
376 | _rbcrecfmt, buffer(self._rbcrevs, rbcrevidx, _rbcrecsize)) |
|
376 | _rbcrecfmt, buffer(self._rbcrevs, rbcrevidx, _rbcrecsize)) | |
377 | close = bool(branchidx & _rbccloseflag) |
|
377 | close = bool(branchidx & _rbccloseflag) | |
378 | if close: |
|
378 | if close: | |
379 | branchidx &= _rbcbranchidxmask |
|
379 | branchidx &= _rbcbranchidxmask | |
380 | if cachenode == reponode: |
|
380 | if cachenode == reponode: | |
381 | return self._names[branchidx], close |
|
381 | return self._names[branchidx], close | |
382 | # fall back to slow path and make sure it will be written to disk |
|
382 | # fall back to slow path and make sure it will be written to disk | |
383 | self._rbcrevslen = min(self._rbcrevslen, rev) |
|
383 | self._rbcrevslen = min(self._rbcrevslen, rev) | |
384 | return self._branchinfo(changelog, rev) |
|
384 | return self._branchinfo(changelog, rev) | |
385 |
|
385 | |||
386 | def _branchinfo(self, changelog, rev): |
|
386 | def _branchinfo(self, changelog, rev): | |
387 | """Retrieve branch info from changelog and update _rbcrevs""" |
|
387 | """Retrieve branch info from changelog and update _rbcrevs""" | |
388 | b, close = changelog.branchinfo(rev) |
|
388 | b, close = changelog.branchinfo(rev) | |
389 | if b in self._namesreverse: |
|
389 | if b in self._namesreverse: | |
390 | branchidx = self._namesreverse[b] |
|
390 | branchidx = self._namesreverse[b] | |
391 | else: |
|
391 | else: | |
392 | branchidx = len(self._names) |
|
392 | branchidx = len(self._names) | |
393 | self._names.append(b) |
|
393 | self._names.append(b) | |
394 | self._namesreverse[b] = branchidx |
|
394 | self._namesreverse[b] = branchidx | |
395 | reponode = changelog.node(rev) |
|
395 | reponode = changelog.node(rev) | |
396 | if close: |
|
396 | if close: | |
397 | branchidx |= _rbccloseflag |
|
397 | branchidx |= _rbccloseflag | |
398 | rbcrevidx = rev * _rbcrecsize |
|
398 | rbcrevidx = rev * _rbcrecsize | |
399 | rec = array('c') |
|
399 | rec = array('c') | |
400 | rec.fromstring(pack(_rbcrecfmt, reponode, branchidx)) |
|
400 | rec.fromstring(pack(_rbcrecfmt, reponode, branchidx)) | |
401 | self._rbcrevs[rbcrevidx:rbcrevidx + _rbcrecsize] = rec |
|
401 | self._rbcrevs[rbcrevidx:rbcrevidx + _rbcrecsize] = rec | |
402 | return b, close |
|
402 | return b, close | |
403 |
|
403 | |||
404 | def write(self, repo): |
|
404 | def write(self, repo): | |
405 | """Save branch cache if it is dirty.""" |
|
405 | """Save branch cache if it is dirty.""" | |
406 | if self._rbcnamescount < len(self._names): |
|
406 | if self._rbcnamescount < len(self._names): | |
407 | try: |
|
407 | try: | |
408 | if self._rbcnamescount != 0: |
|
408 | if self._rbcnamescount != 0: | |
409 | f = repo.vfs.open(_rbcnames, 'ab') |
|
409 | f = repo.vfs.open(_rbcnames, 'ab') | |
410 | # The position after open(x, 'a') is implementation defined- |
|
410 | # The position after open(x, 'a') is implementation defined- | |
411 | # see issue3543. SEEK_END was added in 2.5 |
|
411 | # see issue3543. SEEK_END was added in 2.5 | |
412 | f.seek(0, 2) #os.SEEK_END |
|
412 | f.seek(0, 2) #os.SEEK_END | |
413 | if f.tell() == self._rbcsnameslen: |
|
413 | if f.tell() == self._rbcsnameslen: | |
414 | f.write('\0') |
|
414 | f.write('\0') | |
415 | else: |
|
415 | else: | |
416 | f.close() |
|
416 | f.close() | |
|
417 | repo.ui.debug("%s changed - rewriting it\n" % _rbcnames) | |||
417 | self._rbcnamescount = 0 |
|
418 | self._rbcnamescount = 0 | |
418 | self._rbcrevslen = 0 |
|
419 | self._rbcrevslen = 0 | |
419 | if self._rbcnamescount == 0: |
|
420 | if self._rbcnamescount == 0: | |
420 | f = repo.vfs.open(_rbcnames, 'wb') |
|
421 | f = repo.vfs.open(_rbcnames, 'wb') | |
421 | f.write('\0'.join(encoding.fromlocal(b) |
|
422 | f.write('\0'.join(encoding.fromlocal(b) | |
422 | for b in self._names[self._rbcnamescount:])) |
|
423 | for b in self._names[self._rbcnamescount:])) | |
423 | self._rbcsnameslen = f.tell() |
|
424 | self._rbcsnameslen = f.tell() | |
424 | f.close() |
|
425 | f.close() | |
425 | except (IOError, OSError, util.Abort), inst: |
|
426 | except (IOError, OSError, util.Abort), inst: | |
426 | repo.ui.debug("couldn't write revision branch cache names: " |
|
427 | repo.ui.debug("couldn't write revision branch cache names: " | |
427 | "%s\n" % inst) |
|
428 | "%s\n" % inst) | |
428 | return |
|
429 | return | |
429 | self._rbcnamescount = len(self._names) |
|
430 | self._rbcnamescount = len(self._names) | |
430 |
|
431 | |||
431 | start = self._rbcrevslen * _rbcrecsize |
|
432 | start = self._rbcrevslen * _rbcrecsize | |
432 | if start != len(self._rbcrevs): |
|
433 | if start != len(self._rbcrevs): | |
433 | self._rbcrevslen = min(len(repo.changelog), |
|
434 | self._rbcrevslen = min(len(repo.changelog), | |
434 | len(self._rbcrevs) // _rbcrecsize) |
|
435 | len(self._rbcrevs) // _rbcrecsize) | |
435 | try: |
|
436 | try: | |
436 | f = repo.vfs.open(_rbcrevs, 'ab') |
|
437 | f = repo.vfs.open(_rbcrevs, 'ab') | |
437 | # The position after open(x, 'a') is implementation defined- |
|
438 | # The position after open(x, 'a') is implementation defined- | |
438 | # see issue3543. SEEK_END was added in 2.5 |
|
439 | # see issue3543. SEEK_END was added in 2.5 | |
439 | f.seek(0, 2) #os.SEEK_END |
|
440 | f.seek(0, 2) #os.SEEK_END | |
440 | if f.tell() != start: |
|
441 | if f.tell() != start: | |
|
442 | repo.ui.debug("truncating %s to %s\n" % (_rbcrevs, start)) | |||
441 | f.seek(start) |
|
443 | f.seek(start) | |
442 | f.truncate() |
|
444 | f.truncate() | |
443 | end = self._rbcrevslen * _rbcrecsize |
|
445 | end = self._rbcrevslen * _rbcrecsize | |
444 | f.write(self._rbcrevs[start:end]) |
|
446 | f.write(self._rbcrevs[start:end]) | |
445 | f.close() |
|
447 | f.close() | |
446 | except (IOError, OSError, util.Abort), inst: |
|
448 | except (IOError, OSError, util.Abort), inst: | |
447 | repo.ui.debug("couldn't write revision branch cache: %s\n" % |
|
449 | repo.ui.debug("couldn't write revision branch cache: %s\n" % | |
448 | inst) |
|
450 | inst) | |
449 | return |
|
451 | return |
@@ -1,623 +1,626 b'' | |||||
1 | $ hg init a |
|
1 | $ hg init a | |
2 | $ cd a |
|
2 | $ cd a | |
3 | $ echo 'root' >root |
|
3 | $ echo 'root' >root | |
4 | $ hg add root |
|
4 | $ hg add root | |
5 | $ hg commit -d '0 0' -m "Adding root node" |
|
5 | $ hg commit -d '0 0' -m "Adding root node" | |
6 |
|
6 | |||
7 | $ echo 'a' >a |
|
7 | $ echo 'a' >a | |
8 | $ hg add a |
|
8 | $ hg add a | |
9 | $ hg branch a |
|
9 | $ hg branch a | |
10 | marked working directory as branch a |
|
10 | marked working directory as branch a | |
11 | (branches are permanent and global, did you want a bookmark?) |
|
11 | (branches are permanent and global, did you want a bookmark?) | |
12 | $ hg commit -d '1 0' -m "Adding a branch" |
|
12 | $ hg commit -d '1 0' -m "Adding a branch" | |
13 |
|
13 | |||
14 | $ hg branch q |
|
14 | $ hg branch q | |
15 | marked working directory as branch q |
|
15 | marked working directory as branch q | |
16 | (branches are permanent and global, did you want a bookmark?) |
|
16 | (branches are permanent and global, did you want a bookmark?) | |
17 | $ echo 'aa' >a |
|
17 | $ echo 'aa' >a | |
18 | $ hg branch -C |
|
18 | $ hg branch -C | |
19 | reset working directory to branch a |
|
19 | reset working directory to branch a | |
20 | $ hg commit -d '2 0' -m "Adding to a branch" |
|
20 | $ hg commit -d '2 0' -m "Adding to a branch" | |
21 |
|
21 | |||
22 | $ hg update -C 0 |
|
22 | $ hg update -C 0 | |
23 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
23 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
24 | $ echo 'b' >b |
|
24 | $ echo 'b' >b | |
25 | $ hg add b |
|
25 | $ hg add b | |
26 | $ hg branch b |
|
26 | $ hg branch b | |
27 | marked working directory as branch b |
|
27 | marked working directory as branch b | |
28 | (branches are permanent and global, did you want a bookmark?) |
|
28 | (branches are permanent and global, did you want a bookmark?) | |
29 | $ hg commit -d '2 0' -m "Adding b branch" |
|
29 | $ hg commit -d '2 0' -m "Adding b branch" | |
30 |
|
30 | |||
31 | $ echo 'bh1' >bh1 |
|
31 | $ echo 'bh1' >bh1 | |
32 | $ hg add bh1 |
|
32 | $ hg add bh1 | |
33 | $ hg commit -d '3 0' -m "Adding b branch head 1" |
|
33 | $ hg commit -d '3 0' -m "Adding b branch head 1" | |
34 |
|
34 | |||
35 | $ hg update -C 2 |
|
35 | $ hg update -C 2 | |
36 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
36 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
37 | $ echo 'bh2' >bh2 |
|
37 | $ echo 'bh2' >bh2 | |
38 | $ hg add bh2 |
|
38 | $ hg add bh2 | |
39 | $ hg commit -d '4 0' -m "Adding b branch head 2" |
|
39 | $ hg commit -d '4 0' -m "Adding b branch head 2" | |
40 |
|
40 | |||
41 | $ echo 'c' >c |
|
41 | $ echo 'c' >c | |
42 | $ hg add c |
|
42 | $ hg add c | |
43 | $ hg branch c |
|
43 | $ hg branch c | |
44 | marked working directory as branch c |
|
44 | marked working directory as branch c | |
45 | (branches are permanent and global, did you want a bookmark?) |
|
45 | (branches are permanent and global, did you want a bookmark?) | |
46 | $ hg commit -d '5 0' -m "Adding c branch" |
|
46 | $ hg commit -d '5 0' -m "Adding c branch" | |
47 |
|
47 | |||
48 | reserved names |
|
48 | reserved names | |
49 |
|
49 | |||
50 | $ hg branch tip |
|
50 | $ hg branch tip | |
51 | abort: the name 'tip' is reserved |
|
51 | abort: the name 'tip' is reserved | |
52 | [255] |
|
52 | [255] | |
53 | $ hg branch null |
|
53 | $ hg branch null | |
54 | abort: the name 'null' is reserved |
|
54 | abort: the name 'null' is reserved | |
55 | [255] |
|
55 | [255] | |
56 | $ hg branch . |
|
56 | $ hg branch . | |
57 | abort: the name '.' is reserved |
|
57 | abort: the name '.' is reserved | |
58 | [255] |
|
58 | [255] | |
59 |
|
59 | |||
60 | invalid characters |
|
60 | invalid characters | |
61 |
|
61 | |||
62 | $ hg branch 'foo:bar' |
|
62 | $ hg branch 'foo:bar' | |
63 | abort: ':' cannot be used in a name |
|
63 | abort: ':' cannot be used in a name | |
64 | [255] |
|
64 | [255] | |
65 |
|
65 | |||
66 | $ hg branch 'foo |
|
66 | $ hg branch 'foo | |
67 | > bar' |
|
67 | > bar' | |
68 | abort: '\n' cannot be used in a name |
|
68 | abort: '\n' cannot be used in a name | |
69 | [255] |
|
69 | [255] | |
70 |
|
70 | |||
71 | trailing or leading spaces should be stripped before testing duplicates |
|
71 | trailing or leading spaces should be stripped before testing duplicates | |
72 |
|
72 | |||
73 | $ hg branch 'b ' |
|
73 | $ hg branch 'b ' | |
74 | abort: a branch of the same name already exists |
|
74 | abort: a branch of the same name already exists | |
75 | (use 'hg update' to switch to it) |
|
75 | (use 'hg update' to switch to it) | |
76 | [255] |
|
76 | [255] | |
77 |
|
77 | |||
78 | $ hg branch ' b' |
|
78 | $ hg branch ' b' | |
79 | abort: a branch of the same name already exists |
|
79 | abort: a branch of the same name already exists | |
80 | (use 'hg update' to switch to it) |
|
80 | (use 'hg update' to switch to it) | |
81 | [255] |
|
81 | [255] | |
82 |
|
82 | |||
83 | verify update will accept invalid legacy branch names |
|
83 | verify update will accept invalid legacy branch names | |
84 |
|
84 | |||
85 | $ hg init test-invalid-branch-name |
|
85 | $ hg init test-invalid-branch-name | |
86 | $ cd test-invalid-branch-name |
|
86 | $ cd test-invalid-branch-name | |
87 | $ hg pull -u "$TESTDIR"/bundles/test-invalid-branch-name.hg |
|
87 | $ hg pull -u "$TESTDIR"/bundles/test-invalid-branch-name.hg | |
88 | pulling from *test-invalid-branch-name.hg (glob) |
|
88 | pulling from *test-invalid-branch-name.hg (glob) | |
89 | requesting all changes |
|
89 | requesting all changes | |
90 | adding changesets |
|
90 | adding changesets | |
91 | adding manifests |
|
91 | adding manifests | |
92 | adding file changes |
|
92 | adding file changes | |
93 | added 3 changesets with 3 changes to 2 files |
|
93 | added 3 changesets with 3 changes to 2 files | |
94 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
94 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
95 |
|
95 | |||
96 | $ hg update '"colon:test"' |
|
96 | $ hg update '"colon:test"' | |
97 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
97 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
98 | $ cd .. |
|
98 | $ cd .. | |
99 |
|
99 | |||
100 | $ echo 'd' >d |
|
100 | $ echo 'd' >d | |
101 | $ hg add d |
|
101 | $ hg add d | |
102 | $ hg branch 'a branch name much longer than the default justification used by branches' |
|
102 | $ hg branch 'a branch name much longer than the default justification used by branches' | |
103 | marked working directory as branch a branch name much longer than the default justification used by branches |
|
103 | marked working directory as branch a branch name much longer than the default justification used by branches | |
104 | (branches are permanent and global, did you want a bookmark?) |
|
104 | (branches are permanent and global, did you want a bookmark?) | |
105 | $ hg commit -d '6 0' -m "Adding d branch" |
|
105 | $ hg commit -d '6 0' -m "Adding d branch" | |
106 |
|
106 | |||
107 | $ hg branches |
|
107 | $ hg branches | |
108 | a branch name much longer than the default justification used by branches 7:10ff5895aa57 |
|
108 | a branch name much longer than the default justification used by branches 7:10ff5895aa57 | |
109 | b 4:aee39cd168d0 |
|
109 | b 4:aee39cd168d0 | |
110 | c 6:589736a22561 (inactive) |
|
110 | c 6:589736a22561 (inactive) | |
111 | a 5:d8cbc61dbaa6 (inactive) |
|
111 | a 5:d8cbc61dbaa6 (inactive) | |
112 | default 0:19709c5a4e75 (inactive) |
|
112 | default 0:19709c5a4e75 (inactive) | |
113 |
|
113 | |||
114 | ------- |
|
114 | ------- | |
115 |
|
115 | |||
116 | $ hg branches -a |
|
116 | $ hg branches -a | |
117 | a branch name much longer than the default justification used by branches 7:10ff5895aa57 |
|
117 | a branch name much longer than the default justification used by branches 7:10ff5895aa57 | |
118 | b 4:aee39cd168d0 |
|
118 | b 4:aee39cd168d0 | |
119 |
|
119 | |||
120 | --- Branch a |
|
120 | --- Branch a | |
121 |
|
121 | |||
122 | $ hg log -b a |
|
122 | $ hg log -b a | |
123 | changeset: 5:d8cbc61dbaa6 |
|
123 | changeset: 5:d8cbc61dbaa6 | |
124 | branch: a |
|
124 | branch: a | |
125 | parent: 2:881fe2b92ad0 |
|
125 | parent: 2:881fe2b92ad0 | |
126 | user: test |
|
126 | user: test | |
127 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
127 | date: Thu Jan 01 00:00:04 1970 +0000 | |
128 | summary: Adding b branch head 2 |
|
128 | summary: Adding b branch head 2 | |
129 |
|
129 | |||
130 | changeset: 2:881fe2b92ad0 |
|
130 | changeset: 2:881fe2b92ad0 | |
131 | branch: a |
|
131 | branch: a | |
132 | user: test |
|
132 | user: test | |
133 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
133 | date: Thu Jan 01 00:00:02 1970 +0000 | |
134 | summary: Adding to a branch |
|
134 | summary: Adding to a branch | |
135 |
|
135 | |||
136 | changeset: 1:dd6b440dd85a |
|
136 | changeset: 1:dd6b440dd85a | |
137 | branch: a |
|
137 | branch: a | |
138 | user: test |
|
138 | user: test | |
139 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
139 | date: Thu Jan 01 00:00:01 1970 +0000 | |
140 | summary: Adding a branch |
|
140 | summary: Adding a branch | |
141 |
|
141 | |||
142 |
|
142 | |||
143 | ---- Branch b |
|
143 | ---- Branch b | |
144 |
|
144 | |||
145 | $ hg log -b b |
|
145 | $ hg log -b b | |
146 | changeset: 4:aee39cd168d0 |
|
146 | changeset: 4:aee39cd168d0 | |
147 | branch: b |
|
147 | branch: b | |
148 | user: test |
|
148 | user: test | |
149 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
149 | date: Thu Jan 01 00:00:03 1970 +0000 | |
150 | summary: Adding b branch head 1 |
|
150 | summary: Adding b branch head 1 | |
151 |
|
151 | |||
152 | changeset: 3:ac22033332d1 |
|
152 | changeset: 3:ac22033332d1 | |
153 | branch: b |
|
153 | branch: b | |
154 | parent: 0:19709c5a4e75 |
|
154 | parent: 0:19709c5a4e75 | |
155 | user: test |
|
155 | user: test | |
156 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
156 | date: Thu Jan 01 00:00:02 1970 +0000 | |
157 | summary: Adding b branch |
|
157 | summary: Adding b branch | |
158 |
|
158 | |||
159 |
|
159 | |||
160 | ---- going to test branch closing |
|
160 | ---- going to test branch closing | |
161 |
|
161 | |||
162 | $ hg branches |
|
162 | $ hg branches | |
163 | a branch name much longer than the default justification used by branches 7:10ff5895aa57 |
|
163 | a branch name much longer than the default justification used by branches 7:10ff5895aa57 | |
164 | b 4:aee39cd168d0 |
|
164 | b 4:aee39cd168d0 | |
165 | c 6:589736a22561 (inactive) |
|
165 | c 6:589736a22561 (inactive) | |
166 | a 5:d8cbc61dbaa6 (inactive) |
|
166 | a 5:d8cbc61dbaa6 (inactive) | |
167 | default 0:19709c5a4e75 (inactive) |
|
167 | default 0:19709c5a4e75 (inactive) | |
168 | $ hg up -C b |
|
168 | $ hg up -C b | |
169 | 2 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
169 | 2 files updated, 0 files merged, 4 files removed, 0 files unresolved | |
170 | $ echo 'xxx1' >> b |
|
170 | $ echo 'xxx1' >> b | |
171 | $ hg commit -d '7 0' -m 'adding cset to branch b' |
|
171 | $ hg commit -d '7 0' -m 'adding cset to branch b' | |
172 | $ hg up -C aee39cd168d0 |
|
172 | $ hg up -C aee39cd168d0 | |
173 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
173 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
174 | $ echo 'xxx2' >> b |
|
174 | $ echo 'xxx2' >> b | |
175 | $ hg commit -d '8 0' -m 'adding head to branch b' |
|
175 | $ hg commit -d '8 0' -m 'adding head to branch b' | |
176 | created new head |
|
176 | created new head | |
177 | $ echo 'xxx3' >> b |
|
177 | $ echo 'xxx3' >> b | |
178 | $ hg commit -d '9 0' -m 'adding another cset to branch b' |
|
178 | $ hg commit -d '9 0' -m 'adding another cset to branch b' | |
179 | $ hg branches |
|
179 | $ hg branches | |
180 | b 10:bfbe841b666e |
|
180 | b 10:bfbe841b666e | |
181 | a branch name much longer than the default justification used by branches 7:10ff5895aa57 |
|
181 | a branch name much longer than the default justification used by branches 7:10ff5895aa57 | |
182 | c 6:589736a22561 (inactive) |
|
182 | c 6:589736a22561 (inactive) | |
183 | a 5:d8cbc61dbaa6 (inactive) |
|
183 | a 5:d8cbc61dbaa6 (inactive) | |
184 | default 0:19709c5a4e75 (inactive) |
|
184 | default 0:19709c5a4e75 (inactive) | |
185 | $ hg heads --closed |
|
185 | $ hg heads --closed | |
186 | changeset: 10:bfbe841b666e |
|
186 | changeset: 10:bfbe841b666e | |
187 | branch: b |
|
187 | branch: b | |
188 | tag: tip |
|
188 | tag: tip | |
189 | user: test |
|
189 | user: test | |
190 | date: Thu Jan 01 00:00:09 1970 +0000 |
|
190 | date: Thu Jan 01 00:00:09 1970 +0000 | |
191 | summary: adding another cset to branch b |
|
191 | summary: adding another cset to branch b | |
192 |
|
192 | |||
193 | changeset: 8:eebb944467c9 |
|
193 | changeset: 8:eebb944467c9 | |
194 | branch: b |
|
194 | branch: b | |
195 | parent: 4:aee39cd168d0 |
|
195 | parent: 4:aee39cd168d0 | |
196 | user: test |
|
196 | user: test | |
197 | date: Thu Jan 01 00:00:07 1970 +0000 |
|
197 | date: Thu Jan 01 00:00:07 1970 +0000 | |
198 | summary: adding cset to branch b |
|
198 | summary: adding cset to branch b | |
199 |
|
199 | |||
200 | changeset: 7:10ff5895aa57 |
|
200 | changeset: 7:10ff5895aa57 | |
201 | branch: a branch name much longer than the default justification used by branches |
|
201 | branch: a branch name much longer than the default justification used by branches | |
202 | user: test |
|
202 | user: test | |
203 | date: Thu Jan 01 00:00:06 1970 +0000 |
|
203 | date: Thu Jan 01 00:00:06 1970 +0000 | |
204 | summary: Adding d branch |
|
204 | summary: Adding d branch | |
205 |
|
205 | |||
206 | changeset: 6:589736a22561 |
|
206 | changeset: 6:589736a22561 | |
207 | branch: c |
|
207 | branch: c | |
208 | user: test |
|
208 | user: test | |
209 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
209 | date: Thu Jan 01 00:00:05 1970 +0000 | |
210 | summary: Adding c branch |
|
210 | summary: Adding c branch | |
211 |
|
211 | |||
212 | changeset: 5:d8cbc61dbaa6 |
|
212 | changeset: 5:d8cbc61dbaa6 | |
213 | branch: a |
|
213 | branch: a | |
214 | parent: 2:881fe2b92ad0 |
|
214 | parent: 2:881fe2b92ad0 | |
215 | user: test |
|
215 | user: test | |
216 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
216 | date: Thu Jan 01 00:00:04 1970 +0000 | |
217 | summary: Adding b branch head 2 |
|
217 | summary: Adding b branch head 2 | |
218 |
|
218 | |||
219 | changeset: 0:19709c5a4e75 |
|
219 | changeset: 0:19709c5a4e75 | |
220 | user: test |
|
220 | user: test | |
221 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
221 | date: Thu Jan 01 00:00:00 1970 +0000 | |
222 | summary: Adding root node |
|
222 | summary: Adding root node | |
223 |
|
223 | |||
224 | $ hg heads |
|
224 | $ hg heads | |
225 | changeset: 10:bfbe841b666e |
|
225 | changeset: 10:bfbe841b666e | |
226 | branch: b |
|
226 | branch: b | |
227 | tag: tip |
|
227 | tag: tip | |
228 | user: test |
|
228 | user: test | |
229 | date: Thu Jan 01 00:00:09 1970 +0000 |
|
229 | date: Thu Jan 01 00:00:09 1970 +0000 | |
230 | summary: adding another cset to branch b |
|
230 | summary: adding another cset to branch b | |
231 |
|
231 | |||
232 | changeset: 8:eebb944467c9 |
|
232 | changeset: 8:eebb944467c9 | |
233 | branch: b |
|
233 | branch: b | |
234 | parent: 4:aee39cd168d0 |
|
234 | parent: 4:aee39cd168d0 | |
235 | user: test |
|
235 | user: test | |
236 | date: Thu Jan 01 00:00:07 1970 +0000 |
|
236 | date: Thu Jan 01 00:00:07 1970 +0000 | |
237 | summary: adding cset to branch b |
|
237 | summary: adding cset to branch b | |
238 |
|
238 | |||
239 | changeset: 7:10ff5895aa57 |
|
239 | changeset: 7:10ff5895aa57 | |
240 | branch: a branch name much longer than the default justification used by branches |
|
240 | branch: a branch name much longer than the default justification used by branches | |
241 | user: test |
|
241 | user: test | |
242 | date: Thu Jan 01 00:00:06 1970 +0000 |
|
242 | date: Thu Jan 01 00:00:06 1970 +0000 | |
243 | summary: Adding d branch |
|
243 | summary: Adding d branch | |
244 |
|
244 | |||
245 | changeset: 6:589736a22561 |
|
245 | changeset: 6:589736a22561 | |
246 | branch: c |
|
246 | branch: c | |
247 | user: test |
|
247 | user: test | |
248 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
248 | date: Thu Jan 01 00:00:05 1970 +0000 | |
249 | summary: Adding c branch |
|
249 | summary: Adding c branch | |
250 |
|
250 | |||
251 | changeset: 5:d8cbc61dbaa6 |
|
251 | changeset: 5:d8cbc61dbaa6 | |
252 | branch: a |
|
252 | branch: a | |
253 | parent: 2:881fe2b92ad0 |
|
253 | parent: 2:881fe2b92ad0 | |
254 | user: test |
|
254 | user: test | |
255 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
255 | date: Thu Jan 01 00:00:04 1970 +0000 | |
256 | summary: Adding b branch head 2 |
|
256 | summary: Adding b branch head 2 | |
257 |
|
257 | |||
258 | changeset: 0:19709c5a4e75 |
|
258 | changeset: 0:19709c5a4e75 | |
259 | user: test |
|
259 | user: test | |
260 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
260 | date: Thu Jan 01 00:00:00 1970 +0000 | |
261 | summary: Adding root node |
|
261 | summary: Adding root node | |
262 |
|
262 | |||
263 | $ hg commit -d '9 0' --close-branch -m 'prune bad branch' |
|
263 | $ hg commit -d '9 0' --close-branch -m 'prune bad branch' | |
264 | $ hg branches -a |
|
264 | $ hg branches -a | |
265 | b 8:eebb944467c9 |
|
265 | b 8:eebb944467c9 | |
266 | a branch name much longer than the default justification used by branches 7:10ff5895aa57 |
|
266 | a branch name much longer than the default justification used by branches 7:10ff5895aa57 | |
267 | $ hg up -C b |
|
267 | $ hg up -C b | |
268 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
268 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
269 | $ hg commit -d '9 0' --close-branch -m 'close this part branch too' |
|
269 | $ hg commit -d '9 0' --close-branch -m 'close this part branch too' | |
270 | $ hg commit -d '9 0' --close-branch -m 're-closing this branch' |
|
270 | $ hg commit -d '9 0' --close-branch -m 're-closing this branch' | |
271 | abort: can only close branch heads |
|
271 | abort: can only close branch heads | |
272 | [255] |
|
272 | [255] | |
273 |
|
273 | |||
274 | $ hg log -r tip --debug |
|
274 | $ hg log -r tip --debug | |
275 | changeset: 12:e3d49c0575d8fc2cb1cd6859c747c14f5f6d499f |
|
275 | changeset: 12:e3d49c0575d8fc2cb1cd6859c747c14f5f6d499f | |
276 | branch: b |
|
276 | branch: b | |
277 | tag: tip |
|
277 | tag: tip | |
278 | phase: draft |
|
278 | phase: draft | |
279 | parent: 8:eebb944467c9fb9651ed232aeaf31b3c0a7fc6c1 |
|
279 | parent: 8:eebb944467c9fb9651ed232aeaf31b3c0a7fc6c1 | |
280 | parent: -1:0000000000000000000000000000000000000000 |
|
280 | parent: -1:0000000000000000000000000000000000000000 | |
281 | manifest: 8:6f9ed32d2b310e391a4f107d5f0f071df785bfee |
|
281 | manifest: 8:6f9ed32d2b310e391a4f107d5f0f071df785bfee | |
282 | user: test |
|
282 | user: test | |
283 | date: Thu Jan 01 00:00:09 1970 +0000 |
|
283 | date: Thu Jan 01 00:00:09 1970 +0000 | |
284 | extra: branch=b |
|
284 | extra: branch=b | |
285 | extra: close=1 |
|
285 | extra: close=1 | |
286 | description: |
|
286 | description: | |
287 | close this part branch too |
|
287 | close this part branch too | |
288 |
|
288 | |||
289 |
|
289 | |||
290 | --- b branch should be inactive |
|
290 | --- b branch should be inactive | |
291 |
|
291 | |||
292 | $ hg branches |
|
292 | $ hg branches | |
293 | a branch name much longer than the default justification used by branches 7:10ff5895aa57 |
|
293 | a branch name much longer than the default justification used by branches 7:10ff5895aa57 | |
294 | c 6:589736a22561 (inactive) |
|
294 | c 6:589736a22561 (inactive) | |
295 | a 5:d8cbc61dbaa6 (inactive) |
|
295 | a 5:d8cbc61dbaa6 (inactive) | |
296 | default 0:19709c5a4e75 (inactive) |
|
296 | default 0:19709c5a4e75 (inactive) | |
297 | $ hg branches -c |
|
297 | $ hg branches -c | |
298 | a branch name much longer than the default justification used by branches 7:10ff5895aa57 |
|
298 | a branch name much longer than the default justification used by branches 7:10ff5895aa57 | |
299 | b 12:e3d49c0575d8 (closed) |
|
299 | b 12:e3d49c0575d8 (closed) | |
300 | c 6:589736a22561 (inactive) |
|
300 | c 6:589736a22561 (inactive) | |
301 | a 5:d8cbc61dbaa6 (inactive) |
|
301 | a 5:d8cbc61dbaa6 (inactive) | |
302 | default 0:19709c5a4e75 (inactive) |
|
302 | default 0:19709c5a4e75 (inactive) | |
303 | $ hg branches -a |
|
303 | $ hg branches -a | |
304 | a branch name much longer than the default justification used by branches 7:10ff5895aa57 |
|
304 | a branch name much longer than the default justification used by branches 7:10ff5895aa57 | |
305 | $ hg branches -q |
|
305 | $ hg branches -q | |
306 | a branch name much longer than the default justification used by branches |
|
306 | a branch name much longer than the default justification used by branches | |
307 | c |
|
307 | c | |
308 | a |
|
308 | a | |
309 | default |
|
309 | default | |
310 | $ hg heads b |
|
310 | $ hg heads b | |
311 | no open branch heads found on branches b |
|
311 | no open branch heads found on branches b | |
312 | [1] |
|
312 | [1] | |
313 | $ hg heads --closed b |
|
313 | $ hg heads --closed b | |
314 | changeset: 12:e3d49c0575d8 |
|
314 | changeset: 12:e3d49c0575d8 | |
315 | branch: b |
|
315 | branch: b | |
316 | tag: tip |
|
316 | tag: tip | |
317 | parent: 8:eebb944467c9 |
|
317 | parent: 8:eebb944467c9 | |
318 | user: test |
|
318 | user: test | |
319 | date: Thu Jan 01 00:00:09 1970 +0000 |
|
319 | date: Thu Jan 01 00:00:09 1970 +0000 | |
320 | summary: close this part branch too |
|
320 | summary: close this part branch too | |
321 |
|
321 | |||
322 | changeset: 11:d3f163457ebf |
|
322 | changeset: 11:d3f163457ebf | |
323 | branch: b |
|
323 | branch: b | |
324 | user: test |
|
324 | user: test | |
325 | date: Thu Jan 01 00:00:09 1970 +0000 |
|
325 | date: Thu Jan 01 00:00:09 1970 +0000 | |
326 | summary: prune bad branch |
|
326 | summary: prune bad branch | |
327 |
|
327 | |||
328 | $ echo 'xxx4' >> b |
|
328 | $ echo 'xxx4' >> b | |
329 | $ hg commit -d '9 0' -m 'reopen branch with a change' |
|
329 | $ hg commit -d '9 0' -m 'reopen branch with a change' | |
330 | reopening closed branch head 12 |
|
330 | reopening closed branch head 12 | |
331 |
|
331 | |||
332 | --- branch b is back in action |
|
332 | --- branch b is back in action | |
333 |
|
333 | |||
334 | $ hg branches -a |
|
334 | $ hg branches -a | |
335 | b 13:e23b5505d1ad |
|
335 | b 13:e23b5505d1ad | |
336 | a branch name much longer than the default justification used by branches 7:10ff5895aa57 |
|
336 | a branch name much longer than the default justification used by branches 7:10ff5895aa57 | |
337 |
|
337 | |||
338 | ---- test heads listings |
|
338 | ---- test heads listings | |
339 |
|
339 | |||
340 | $ hg heads |
|
340 | $ hg heads | |
341 | changeset: 13:e23b5505d1ad |
|
341 | changeset: 13:e23b5505d1ad | |
342 | branch: b |
|
342 | branch: b | |
343 | tag: tip |
|
343 | tag: tip | |
344 | user: test |
|
344 | user: test | |
345 | date: Thu Jan 01 00:00:09 1970 +0000 |
|
345 | date: Thu Jan 01 00:00:09 1970 +0000 | |
346 | summary: reopen branch with a change |
|
346 | summary: reopen branch with a change | |
347 |
|
347 | |||
348 | changeset: 7:10ff5895aa57 |
|
348 | changeset: 7:10ff5895aa57 | |
349 | branch: a branch name much longer than the default justification used by branches |
|
349 | branch: a branch name much longer than the default justification used by branches | |
350 | user: test |
|
350 | user: test | |
351 | date: Thu Jan 01 00:00:06 1970 +0000 |
|
351 | date: Thu Jan 01 00:00:06 1970 +0000 | |
352 | summary: Adding d branch |
|
352 | summary: Adding d branch | |
353 |
|
353 | |||
354 | changeset: 6:589736a22561 |
|
354 | changeset: 6:589736a22561 | |
355 | branch: c |
|
355 | branch: c | |
356 | user: test |
|
356 | user: test | |
357 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
357 | date: Thu Jan 01 00:00:05 1970 +0000 | |
358 | summary: Adding c branch |
|
358 | summary: Adding c branch | |
359 |
|
359 | |||
360 | changeset: 5:d8cbc61dbaa6 |
|
360 | changeset: 5:d8cbc61dbaa6 | |
361 | branch: a |
|
361 | branch: a | |
362 | parent: 2:881fe2b92ad0 |
|
362 | parent: 2:881fe2b92ad0 | |
363 | user: test |
|
363 | user: test | |
364 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
364 | date: Thu Jan 01 00:00:04 1970 +0000 | |
365 | summary: Adding b branch head 2 |
|
365 | summary: Adding b branch head 2 | |
366 |
|
366 | |||
367 | changeset: 0:19709c5a4e75 |
|
367 | changeset: 0:19709c5a4e75 | |
368 | user: test |
|
368 | user: test | |
369 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
369 | date: Thu Jan 01 00:00:00 1970 +0000 | |
370 | summary: Adding root node |
|
370 | summary: Adding root node | |
371 |
|
371 | |||
372 |
|
372 | |||
373 | branch default |
|
373 | branch default | |
374 |
|
374 | |||
375 | $ hg heads default |
|
375 | $ hg heads default | |
376 | changeset: 0:19709c5a4e75 |
|
376 | changeset: 0:19709c5a4e75 | |
377 | user: test |
|
377 | user: test | |
378 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
378 | date: Thu Jan 01 00:00:00 1970 +0000 | |
379 | summary: Adding root node |
|
379 | summary: Adding root node | |
380 |
|
380 | |||
381 |
|
381 | |||
382 | branch a |
|
382 | branch a | |
383 |
|
383 | |||
384 | $ hg heads a |
|
384 | $ hg heads a | |
385 | changeset: 5:d8cbc61dbaa6 |
|
385 | changeset: 5:d8cbc61dbaa6 | |
386 | branch: a |
|
386 | branch: a | |
387 | parent: 2:881fe2b92ad0 |
|
387 | parent: 2:881fe2b92ad0 | |
388 | user: test |
|
388 | user: test | |
389 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
389 | date: Thu Jan 01 00:00:04 1970 +0000 | |
390 | summary: Adding b branch head 2 |
|
390 | summary: Adding b branch head 2 | |
391 |
|
391 | |||
392 | $ hg heads --active a |
|
392 | $ hg heads --active a | |
393 | no open branch heads found on branches a |
|
393 | no open branch heads found on branches a | |
394 | [1] |
|
394 | [1] | |
395 |
|
395 | |||
396 | branch b |
|
396 | branch b | |
397 |
|
397 | |||
398 | $ hg heads b |
|
398 | $ hg heads b | |
399 | changeset: 13:e23b5505d1ad |
|
399 | changeset: 13:e23b5505d1ad | |
400 | branch: b |
|
400 | branch: b | |
401 | tag: tip |
|
401 | tag: tip | |
402 | user: test |
|
402 | user: test | |
403 | date: Thu Jan 01 00:00:09 1970 +0000 |
|
403 | date: Thu Jan 01 00:00:09 1970 +0000 | |
404 | summary: reopen branch with a change |
|
404 | summary: reopen branch with a change | |
405 |
|
405 | |||
406 | $ hg heads --closed b |
|
406 | $ hg heads --closed b | |
407 | changeset: 13:e23b5505d1ad |
|
407 | changeset: 13:e23b5505d1ad | |
408 | branch: b |
|
408 | branch: b | |
409 | tag: tip |
|
409 | tag: tip | |
410 | user: test |
|
410 | user: test | |
411 | date: Thu Jan 01 00:00:09 1970 +0000 |
|
411 | date: Thu Jan 01 00:00:09 1970 +0000 | |
412 | summary: reopen branch with a change |
|
412 | summary: reopen branch with a change | |
413 |
|
413 | |||
414 | changeset: 11:d3f163457ebf |
|
414 | changeset: 11:d3f163457ebf | |
415 | branch: b |
|
415 | branch: b | |
416 | user: test |
|
416 | user: test | |
417 | date: Thu Jan 01 00:00:09 1970 +0000 |
|
417 | date: Thu Jan 01 00:00:09 1970 +0000 | |
418 | summary: prune bad branch |
|
418 | summary: prune bad branch | |
419 |
|
419 | |||
420 | default branch colors: |
|
420 | default branch colors: | |
421 |
|
421 | |||
422 | $ cat <<EOF >> $HGRCPATH |
|
422 | $ cat <<EOF >> $HGRCPATH | |
423 | > [extensions] |
|
423 | > [extensions] | |
424 | > color = |
|
424 | > color = | |
425 | > [color] |
|
425 | > [color] | |
426 | > mode = ansi |
|
426 | > mode = ansi | |
427 | > EOF |
|
427 | > EOF | |
428 |
|
428 | |||
429 | $ hg up -C c |
|
429 | $ hg up -C c | |
430 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
430 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
431 | $ hg commit -d '9 0' --close-branch -m 'reclosing this branch' |
|
431 | $ hg commit -d '9 0' --close-branch -m 'reclosing this branch' | |
432 | $ hg up -C b |
|
432 | $ hg up -C b | |
433 | 2 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
433 | 2 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
434 | $ hg branches --color=always |
|
434 | $ hg branches --color=always | |
435 | \x1b[0;32mb\x1b[0m\x1b[0;33m 13:e23b5505d1ad\x1b[0m (esc) |
|
435 | \x1b[0;32mb\x1b[0m\x1b[0;33m 13:e23b5505d1ad\x1b[0m (esc) | |
436 | \x1b[0;0ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;33m 7:10ff5895aa57\x1b[0m (esc) |
|
436 | \x1b[0;0ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;33m 7:10ff5895aa57\x1b[0m (esc) | |
437 | \x1b[0;0ma\x1b[0m\x1b[0;33m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc) |
|
437 | \x1b[0;0ma\x1b[0m\x1b[0;33m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc) | |
438 | \x1b[0;0mdefault\x1b[0m\x1b[0;33m 0:19709c5a4e75\x1b[0m (inactive) (esc) |
|
438 | \x1b[0;0mdefault\x1b[0m\x1b[0;33m 0:19709c5a4e75\x1b[0m (inactive) (esc) | |
439 |
|
439 | |||
440 | default closed branch color: |
|
440 | default closed branch color: | |
441 |
|
441 | |||
442 | $ hg branches --color=always --closed |
|
442 | $ hg branches --color=always --closed | |
443 | \x1b[0;32mb\x1b[0m\x1b[0;33m 13:e23b5505d1ad\x1b[0m (esc) |
|
443 | \x1b[0;32mb\x1b[0m\x1b[0;33m 13:e23b5505d1ad\x1b[0m (esc) | |
444 | \x1b[0;0ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;33m 7:10ff5895aa57\x1b[0m (esc) |
|
444 | \x1b[0;0ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;33m 7:10ff5895aa57\x1b[0m (esc) | |
445 | \x1b[0;30;1mc\x1b[0m\x1b[0;33m 14:f894c25619d3\x1b[0m (closed) (esc) |
|
445 | \x1b[0;30;1mc\x1b[0m\x1b[0;33m 14:f894c25619d3\x1b[0m (closed) (esc) | |
446 | \x1b[0;0ma\x1b[0m\x1b[0;33m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc) |
|
446 | \x1b[0;0ma\x1b[0m\x1b[0;33m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc) | |
447 | \x1b[0;0mdefault\x1b[0m\x1b[0;33m 0:19709c5a4e75\x1b[0m (inactive) (esc) |
|
447 | \x1b[0;0mdefault\x1b[0m\x1b[0;33m 0:19709c5a4e75\x1b[0m (inactive) (esc) | |
448 |
|
448 | |||
449 | $ cat <<EOF >> $HGRCPATH |
|
449 | $ cat <<EOF >> $HGRCPATH | |
450 | > [extensions] |
|
450 | > [extensions] | |
451 | > color = |
|
451 | > color = | |
452 | > [color] |
|
452 | > [color] | |
453 | > branches.active = green |
|
453 | > branches.active = green | |
454 | > branches.closed = blue |
|
454 | > branches.closed = blue | |
455 | > branches.current = red |
|
455 | > branches.current = red | |
456 | > branches.inactive = magenta |
|
456 | > branches.inactive = magenta | |
457 | > log.changeset = cyan |
|
457 | > log.changeset = cyan | |
458 | > EOF |
|
458 | > EOF | |
459 |
|
459 | |||
460 | custom branch colors: |
|
460 | custom branch colors: | |
461 |
|
461 | |||
462 | $ hg branches --color=always |
|
462 | $ hg branches --color=always | |
463 | \x1b[0;31mb\x1b[0m\x1b[0;36m 13:e23b5505d1ad\x1b[0m (esc) |
|
463 | \x1b[0;31mb\x1b[0m\x1b[0;36m 13:e23b5505d1ad\x1b[0m (esc) | |
464 | \x1b[0;32ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;36m 7:10ff5895aa57\x1b[0m (esc) |
|
464 | \x1b[0;32ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;36m 7:10ff5895aa57\x1b[0m (esc) | |
465 | \x1b[0;35ma\x1b[0m\x1b[0;36m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc) |
|
465 | \x1b[0;35ma\x1b[0m\x1b[0;36m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc) | |
466 | \x1b[0;35mdefault\x1b[0m\x1b[0;36m 0:19709c5a4e75\x1b[0m (inactive) (esc) |
|
466 | \x1b[0;35mdefault\x1b[0m\x1b[0;36m 0:19709c5a4e75\x1b[0m (inactive) (esc) | |
467 |
|
467 | |||
468 | custom closed branch color: |
|
468 | custom closed branch color: | |
469 |
|
469 | |||
470 | $ hg branches --color=always --closed |
|
470 | $ hg branches --color=always --closed | |
471 | \x1b[0;31mb\x1b[0m\x1b[0;36m 13:e23b5505d1ad\x1b[0m (esc) |
|
471 | \x1b[0;31mb\x1b[0m\x1b[0;36m 13:e23b5505d1ad\x1b[0m (esc) | |
472 | \x1b[0;32ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;36m 7:10ff5895aa57\x1b[0m (esc) |
|
472 | \x1b[0;32ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;36m 7:10ff5895aa57\x1b[0m (esc) | |
473 | \x1b[0;34mc\x1b[0m\x1b[0;36m 14:f894c25619d3\x1b[0m (closed) (esc) |
|
473 | \x1b[0;34mc\x1b[0m\x1b[0;36m 14:f894c25619d3\x1b[0m (closed) (esc) | |
474 | \x1b[0;35ma\x1b[0m\x1b[0;36m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc) |
|
474 | \x1b[0;35ma\x1b[0m\x1b[0;36m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc) | |
475 | \x1b[0;35mdefault\x1b[0m\x1b[0;36m 0:19709c5a4e75\x1b[0m (inactive) (esc) |
|
475 | \x1b[0;35mdefault\x1b[0m\x1b[0;36m 0:19709c5a4e75\x1b[0m (inactive) (esc) | |
476 |
|
476 | |||
477 | template output: |
|
477 | template output: | |
478 |
|
478 | |||
479 | $ hg branches -Tjson --closed |
|
479 | $ hg branches -Tjson --closed | |
480 | [ |
|
480 | [ | |
481 | { |
|
481 | { | |
482 | "active": true, |
|
482 | "active": true, | |
483 | "branch": "b", |
|
483 | "branch": "b", | |
484 | "closed": false, |
|
484 | "closed": false, | |
485 | "current": true, |
|
485 | "current": true, | |
486 | "node": "e23b5505d1ad24aab6f84fd8c7cb8cd8e5e93be0", |
|
486 | "node": "e23b5505d1ad24aab6f84fd8c7cb8cd8e5e93be0", | |
487 | "rev": 13 |
|
487 | "rev": 13 | |
488 | }, |
|
488 | }, | |
489 | { |
|
489 | { | |
490 | "active": true, |
|
490 | "active": true, | |
491 | "branch": "a branch name much longer than the default justification used by branches", |
|
491 | "branch": "a branch name much longer than the default justification used by branches", | |
492 | "closed": false, |
|
492 | "closed": false, | |
493 | "current": false, |
|
493 | "current": false, | |
494 | "node": "10ff5895aa5793bd378da574af8cec8ea408d831", |
|
494 | "node": "10ff5895aa5793bd378da574af8cec8ea408d831", | |
495 | "rev": 7 |
|
495 | "rev": 7 | |
496 | }, |
|
496 | }, | |
497 | { |
|
497 | { | |
498 | "active": false, |
|
498 | "active": false, | |
499 | "branch": "c", |
|
499 | "branch": "c", | |
500 | "closed": true, |
|
500 | "closed": true, | |
501 | "current": false, |
|
501 | "current": false, | |
502 | "node": "f894c25619d3f1484639d81be950e0a07bc6f1f6", |
|
502 | "node": "f894c25619d3f1484639d81be950e0a07bc6f1f6", | |
503 | "rev": 14 |
|
503 | "rev": 14 | |
504 | }, |
|
504 | }, | |
505 | { |
|
505 | { | |
506 | "active": false, |
|
506 | "active": false, | |
507 | "branch": "a", |
|
507 | "branch": "a", | |
508 | "closed": false, |
|
508 | "closed": false, | |
509 | "current": false, |
|
509 | "current": false, | |
510 | "node": "d8cbc61dbaa6dc817175d1e301eecb863f280832", |
|
510 | "node": "d8cbc61dbaa6dc817175d1e301eecb863f280832", | |
511 | "rev": 5 |
|
511 | "rev": 5 | |
512 | }, |
|
512 | }, | |
513 | { |
|
513 | { | |
514 | "active": false, |
|
514 | "active": false, | |
515 | "branch": "default", |
|
515 | "branch": "default", | |
516 | "closed": false, |
|
516 | "closed": false, | |
517 | "current": false, |
|
517 | "current": false, | |
518 | "node": "19709c5a4e75bf938f8e349aff97438539bb729e", |
|
518 | "node": "19709c5a4e75bf938f8e349aff97438539bb729e", | |
519 | "rev": 0 |
|
519 | "rev": 0 | |
520 | } |
|
520 | } | |
521 | ] |
|
521 | ] | |
522 |
|
522 | |||
523 |
|
523 | |||
524 | Tests of revision branch name caching |
|
524 | Tests of revision branch name caching | |
525 |
|
525 | |||
526 | We rev branch cache is updated automatically. In these tests we use a trick to |
|
526 | We rev branch cache is updated automatically. In these tests we use a trick to | |
527 | trigger rebuilds. We remove the branch head cache and run 'hg head' to cause a |
|
527 | trigger rebuilds. We remove the branch head cache and run 'hg head' to cause a | |
528 | rebuild that also will populate the rev branch cache. |
|
528 | rebuild that also will populate the rev branch cache. | |
529 |
|
529 | |||
530 | revision branch cache is created when building the branch head cache |
|
530 | revision branch cache is created when building the branch head cache | |
531 | $ rm -rf .hg/cache; hg head a -T '{rev}\n' |
|
531 | $ rm -rf .hg/cache; hg head a -T '{rev}\n' | |
532 | 5 |
|
532 | 5 | |
533 | $ f --hexdump --size .hg/cache/rbc-* |
|
533 | $ f --hexdump --size .hg/cache/rbc-* | |
534 | .hg/cache/rbc-names-v1: size=87 |
|
534 | .hg/cache/rbc-names-v1: size=87 | |
535 | 0000: 64 65 66 61 75 6c 74 00 61 00 62 00 63 00 61 20 |default.a.b.c.a | |
|
535 | 0000: 64 65 66 61 75 6c 74 00 61 00 62 00 63 00 61 20 |default.a.b.c.a | | |
536 | 0010: 62 72 61 6e 63 68 20 6e 61 6d 65 20 6d 75 63 68 |branch name much| |
|
536 | 0010: 62 72 61 6e 63 68 20 6e 61 6d 65 20 6d 75 63 68 |branch name much| | |
537 | 0020: 20 6c 6f 6e 67 65 72 20 74 68 61 6e 20 74 68 65 | longer than the| |
|
537 | 0020: 20 6c 6f 6e 67 65 72 20 74 68 61 6e 20 74 68 65 | longer than the| | |
538 | 0030: 20 64 65 66 61 75 6c 74 20 6a 75 73 74 69 66 69 | default justifi| |
|
538 | 0030: 20 64 65 66 61 75 6c 74 20 6a 75 73 74 69 66 69 | default justifi| | |
539 | 0040: 63 61 74 69 6f 6e 20 75 73 65 64 20 62 79 20 62 |cation used by b| |
|
539 | 0040: 63 61 74 69 6f 6e 20 75 73 65 64 20 62 79 20 62 |cation used by b| | |
540 | 0050: 72 61 6e 63 68 65 73 |ranches| |
|
540 | 0050: 72 61 6e 63 68 65 73 |ranches| | |
541 | .hg/cache/rbc-revs-v1: size=120 |
|
541 | .hg/cache/rbc-revs-v1: size=120 | |
542 | 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....| |
|
542 | 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....| | |
543 | 0010: 88 1f e2 b9 00 00 00 01 ac 22 03 33 00 00 00 02 |.........".3....| |
|
543 | 0010: 88 1f e2 b9 00 00 00 01 ac 22 03 33 00 00 00 02 |.........".3....| | |
544 | 0020: ae e3 9c d1 00 00 00 02 d8 cb c6 1d 00 00 00 01 |................| |
|
544 | 0020: ae e3 9c d1 00 00 00 02 d8 cb c6 1d 00 00 00 01 |................| | |
545 | 0030: 58 97 36 a2 00 00 00 03 10 ff 58 95 00 00 00 04 |X.6.......X.....| |
|
545 | 0030: 58 97 36 a2 00 00 00 03 10 ff 58 95 00 00 00 04 |X.6.......X.....| | |
546 | 0040: ee bb 94 44 00 00 00 02 5f 40 61 bb 00 00 00 02 |...D...._@a.....| |
|
546 | 0040: ee bb 94 44 00 00 00 02 5f 40 61 bb 00 00 00 02 |...D...._@a.....| | |
547 | 0050: bf be 84 1b 00 00 00 02 d3 f1 63 45 80 00 00 02 |..........cE....| |
|
547 | 0050: bf be 84 1b 00 00 00 02 d3 f1 63 45 80 00 00 02 |..........cE....| | |
548 | 0060: e3 d4 9c 05 80 00 00 02 e2 3b 55 05 00 00 00 02 |.........;U.....| |
|
548 | 0060: e3 d4 9c 05 80 00 00 02 e2 3b 55 05 00 00 00 02 |.........;U.....| | |
549 | 0070: f8 94 c2 56 80 00 00 03 |...V....| |
|
549 | 0070: f8 94 c2 56 80 00 00 03 |...V....| | |
550 | recovery from invalid cache revs file with trailing data |
|
550 | recovery from invalid cache revs file with trailing data | |
551 | $ echo >> .hg/cache/rbc-revs-v1 |
|
551 | $ echo >> .hg/cache/rbc-revs-v1 | |
552 | $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug |
|
552 | $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug | |
|
553 | truncating cache/rbc-revs-v1 to 120 | |||
553 | 5 |
|
554 | 5 | |
554 | $ f --size .hg/cache/rbc-revs* |
|
555 | $ f --size .hg/cache/rbc-revs* | |
555 | .hg/cache/rbc-revs-v1: size=120 |
|
556 | .hg/cache/rbc-revs-v1: size=120 | |
556 | recovery from invalid cache file with partial last record |
|
557 | recovery from invalid cache file with partial last record | |
557 | $ mv .hg/cache/rbc-revs-v1 . |
|
558 | $ mv .hg/cache/rbc-revs-v1 . | |
558 | $ f -qDB 119 rbc-revs-v1 > .hg/cache/rbc-revs-v1 |
|
559 | $ f -qDB 119 rbc-revs-v1 > .hg/cache/rbc-revs-v1 | |
559 | $ f --size .hg/cache/rbc-revs* |
|
560 | $ f --size .hg/cache/rbc-revs* | |
560 | .hg/cache/rbc-revs-v1: size=119 |
|
561 | .hg/cache/rbc-revs-v1: size=119 | |
561 | $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug |
|
562 | $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug | |
|
563 | truncating cache/rbc-revs-v1 to 112 | |||
562 | 5 |
|
564 | 5 | |
563 | $ f --size .hg/cache/rbc-revs* |
|
565 | $ f --size .hg/cache/rbc-revs* | |
564 | .hg/cache/rbc-revs-v1: size=120 |
|
566 | .hg/cache/rbc-revs-v1: size=120 | |
565 | recovery from invalid cache file with missing record - no truncation |
|
567 | recovery from invalid cache file with missing record - no truncation | |
566 | $ mv .hg/cache/rbc-revs-v1 . |
|
568 | $ mv .hg/cache/rbc-revs-v1 . | |
567 | $ f -qDB 112 rbc-revs-v1 > .hg/cache/rbc-revs-v1 |
|
569 | $ f -qDB 112 rbc-revs-v1 > .hg/cache/rbc-revs-v1 | |
568 | $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug |
|
570 | $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug | |
569 | 5 |
|
571 | 5 | |
570 | $ f --size .hg/cache/rbc-revs* |
|
572 | $ f --size .hg/cache/rbc-revs* | |
571 | .hg/cache/rbc-revs-v1: size=120 |
|
573 | .hg/cache/rbc-revs-v1: size=120 | |
572 | recovery from invalid cache file with some bad records |
|
574 | recovery from invalid cache file with some bad records | |
573 | $ mv .hg/cache/rbc-revs-v1 . |
|
575 | $ mv .hg/cache/rbc-revs-v1 . | |
574 | $ f -qDB 8 rbc-revs-v1 > .hg/cache/rbc-revs-v1 |
|
576 | $ f -qDB 8 rbc-revs-v1 > .hg/cache/rbc-revs-v1 | |
575 | $ f --size .hg/cache/rbc-revs* |
|
577 | $ f --size .hg/cache/rbc-revs* | |
576 | .hg/cache/rbc-revs-v1: size=8 |
|
578 | .hg/cache/rbc-revs-v1: size=8 | |
577 | $ f -qDB 112 rbc-revs-v1 >> .hg/cache/rbc-revs-v1 |
|
579 | $ f -qDB 112 rbc-revs-v1 >> .hg/cache/rbc-revs-v1 | |
578 | $ f --size .hg/cache/rbc-revs* |
|
580 | $ f --size .hg/cache/rbc-revs* | |
579 | .hg/cache/rbc-revs-v1: size=120 |
|
581 | .hg/cache/rbc-revs-v1: size=120 | |
580 | $ hg log -r 'branch(.)' -T '{rev} ' |
|
582 | $ hg log -r 'branch(.)' -T '{rev} ' | |
581 | 3 4 8 9 10 11 12 13 (no-eol) |
|
583 | 3 4 8 9 10 11 12 13 (no-eol) | |
582 | $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug |
|
584 | $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug | |
|
585 | truncating cache/rbc-revs-v1 to 8 | |||
583 | 5 |
|
586 | 5 | |
584 | $ f --size --hexdump --bytes=16 .hg/cache/rbc-revs* |
|
587 | $ f --size --hexdump --bytes=16 .hg/cache/rbc-revs* | |
585 | .hg/cache/rbc-revs-v1: size=120 |
|
588 | .hg/cache/rbc-revs-v1: size=120 | |
586 | 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....| |
|
589 | 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....| | |
587 | cache is updated when committing |
|
590 | cache is updated when committing | |
588 | $ hg branch i-will-regret-this |
|
591 | $ hg branch i-will-regret-this | |
589 | marked working directory as branch i-will-regret-this |
|
592 | marked working directory as branch i-will-regret-this | |
590 | (branches are permanent and global, did you want a bookmark?) |
|
593 | (branches are permanent and global, did you want a bookmark?) | |
591 | $ hg ci -m regrets |
|
594 | $ hg ci -m regrets | |
592 | $ f --size .hg/cache/rbc-* |
|
595 | $ f --size .hg/cache/rbc-* | |
593 | .hg/cache/rbc-names-v1: size=106 |
|
596 | .hg/cache/rbc-names-v1: size=106 | |
594 | .hg/cache/rbc-revs-v1: size=128 |
|
597 | .hg/cache/rbc-revs-v1: size=128 | |
595 | update after rollback - the cache will be correct but rbc-names will will still |
|
598 | update after rollback - the cache will be correct but rbc-names will will still | |
596 | contain the branch name even though it no longer is used |
|
599 | contain the branch name even though it no longer is used | |
597 | $ hg up -qr '.^' |
|
600 | $ hg up -qr '.^' | |
598 | $ hg rollback -qf |
|
601 | $ hg rollback -qf | |
599 | $ f --size --hexdump .hg/cache/rbc-* |
|
602 | $ f --size --hexdump .hg/cache/rbc-* | |
600 | .hg/cache/rbc-names-v1: size=106 |
|
603 | .hg/cache/rbc-names-v1: size=106 | |
601 | 0000: 64 65 66 61 75 6c 74 00 61 00 62 00 63 00 61 20 |default.a.b.c.a | |
|
604 | 0000: 64 65 66 61 75 6c 74 00 61 00 62 00 63 00 61 20 |default.a.b.c.a | | |
602 | 0010: 62 72 61 6e 63 68 20 6e 61 6d 65 20 6d 75 63 68 |branch name much| |
|
605 | 0010: 62 72 61 6e 63 68 20 6e 61 6d 65 20 6d 75 63 68 |branch name much| | |
603 | 0020: 20 6c 6f 6e 67 65 72 20 74 68 61 6e 20 74 68 65 | longer than the| |
|
606 | 0020: 20 6c 6f 6e 67 65 72 20 74 68 61 6e 20 74 68 65 | longer than the| | |
604 | 0030: 20 64 65 66 61 75 6c 74 20 6a 75 73 74 69 66 69 | default justifi| |
|
607 | 0030: 20 64 65 66 61 75 6c 74 20 6a 75 73 74 69 66 69 | default justifi| | |
605 | 0040: 63 61 74 69 6f 6e 20 75 73 65 64 20 62 79 20 62 |cation used by b| |
|
608 | 0040: 63 61 74 69 6f 6e 20 75 73 65 64 20 62 79 20 62 |cation used by b| | |
606 | 0050: 72 61 6e 63 68 65 73 00 69 2d 77 69 6c 6c 2d 72 |ranches.i-will-r| |
|
609 | 0050: 72 61 6e 63 68 65 73 00 69 2d 77 69 6c 6c 2d 72 |ranches.i-will-r| | |
607 | 0060: 65 67 72 65 74 2d 74 68 69 73 |egret-this| |
|
610 | 0060: 65 67 72 65 74 2d 74 68 69 73 |egret-this| | |
608 | .hg/cache/rbc-revs-v1: size=120 |
|
611 | .hg/cache/rbc-revs-v1: size=120 | |
609 | 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....| |
|
612 | 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....| | |
610 | 0010: 88 1f e2 b9 00 00 00 01 ac 22 03 33 00 00 00 02 |.........".3....| |
|
613 | 0010: 88 1f e2 b9 00 00 00 01 ac 22 03 33 00 00 00 02 |.........".3....| | |
611 | 0020: ae e3 9c d1 00 00 00 02 d8 cb c6 1d 00 00 00 01 |................| |
|
614 | 0020: ae e3 9c d1 00 00 00 02 d8 cb c6 1d 00 00 00 01 |................| | |
612 | 0030: 58 97 36 a2 00 00 00 03 10 ff 58 95 00 00 00 04 |X.6.......X.....| |
|
615 | 0030: 58 97 36 a2 00 00 00 03 10 ff 58 95 00 00 00 04 |X.6.......X.....| | |
613 | 0040: ee bb 94 44 00 00 00 02 5f 40 61 bb 00 00 00 02 |...D...._@a.....| |
|
616 | 0040: ee bb 94 44 00 00 00 02 5f 40 61 bb 00 00 00 02 |...D...._@a.....| | |
614 | 0050: bf be 84 1b 00 00 00 02 d3 f1 63 45 80 00 00 02 |..........cE....| |
|
617 | 0050: bf be 84 1b 00 00 00 02 d3 f1 63 45 80 00 00 02 |..........cE....| | |
615 | 0060: e3 d4 9c 05 80 00 00 02 e2 3b 55 05 00 00 00 02 |.........;U.....| |
|
618 | 0060: e3 d4 9c 05 80 00 00 02 e2 3b 55 05 00 00 00 02 |.........;U.....| | |
616 | 0070: f8 94 c2 56 80 00 00 03 |...V....| |
|
619 | 0070: f8 94 c2 56 80 00 00 03 |...V....| | |
617 | cache is updated/truncated when stripping - it is thus very hard to get in a |
|
620 | cache is updated/truncated when stripping - it is thus very hard to get in a | |
618 | situation where the cache is out of sync and the hash check detects it |
|
621 | situation where the cache is out of sync and the hash check detects it | |
619 | $ hg --config extensions.strip= strip -r tip --nob |
|
622 | $ hg --config extensions.strip= strip -r tip --nob | |
620 | $ f --size .hg/cache/rbc-revs* |
|
623 | $ f --size .hg/cache/rbc-revs* | |
621 | .hg/cache/rbc-revs-v1: size=112 |
|
624 | .hg/cache/rbc-revs-v1: size=112 | |
622 |
|
625 | |||
623 | $ cd .. |
|
626 | $ cd .. |
@@ -1,326 +1,327 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > rebase= |
|
3 | > rebase= | |
4 | > |
|
4 | > | |
5 | > [phases] |
|
5 | > [phases] | |
6 | > publish=False |
|
6 | > publish=False | |
7 | > |
|
7 | > | |
8 | > [alias] |
|
8 | > [alias] | |
9 | > tglog = log -G --template "{rev}:{phase} '{desc}' {branches} {bookmarks}\n" |
|
9 | > tglog = log -G --template "{rev}:{phase} '{desc}' {branches} {bookmarks}\n" | |
10 | > EOF |
|
10 | > EOF | |
11 |
|
11 | |||
12 | $ hg init a |
|
12 | $ hg init a | |
13 | $ cd a |
|
13 | $ cd a | |
14 | $ echo c1 >common |
|
14 | $ echo c1 >common | |
15 | $ hg add common |
|
15 | $ hg add common | |
16 | $ hg ci -m C1 |
|
16 | $ hg ci -m C1 | |
17 |
|
17 | |||
18 | $ echo c2 >>common |
|
18 | $ echo c2 >>common | |
19 | $ hg ci -m C2 |
|
19 | $ hg ci -m C2 | |
20 |
|
20 | |||
21 | $ echo c3 >>common |
|
21 | $ echo c3 >>common | |
22 | $ hg ci -m C3 |
|
22 | $ hg ci -m C3 | |
23 |
|
23 | |||
24 | $ hg up -q -C 1 |
|
24 | $ hg up -q -C 1 | |
25 |
|
25 | |||
26 | $ echo l1 >>extra |
|
26 | $ echo l1 >>extra | |
27 | $ hg add extra |
|
27 | $ hg add extra | |
28 | $ hg ci -m L1 |
|
28 | $ hg ci -m L1 | |
29 | created new head |
|
29 | created new head | |
30 |
|
30 | |||
31 | $ sed -e 's/c2/l2/' common > common.new |
|
31 | $ sed -e 's/c2/l2/' common > common.new | |
32 | $ mv common.new common |
|
32 | $ mv common.new common | |
33 | $ hg ci -m L2 |
|
33 | $ hg ci -m L2 | |
34 |
|
34 | |||
35 | $ echo l3 >> extra2 |
|
35 | $ echo l3 >> extra2 | |
36 | $ hg add extra2 |
|
36 | $ hg add extra2 | |
37 | $ hg ci -m L3 |
|
37 | $ hg ci -m L3 | |
38 | $ hg bookmark mybook |
|
38 | $ hg bookmark mybook | |
39 |
|
39 | |||
40 | $ hg phase --force --secret 4 |
|
40 | $ hg phase --force --secret 4 | |
41 |
|
41 | |||
42 | $ hg tglog |
|
42 | $ hg tglog | |
43 | @ 5:secret 'L3' mybook |
|
43 | @ 5:secret 'L3' mybook | |
44 | | |
|
44 | | | |
45 | o 4:secret 'L2' |
|
45 | o 4:secret 'L2' | |
46 | | |
|
46 | | | |
47 | o 3:draft 'L1' |
|
47 | o 3:draft 'L1' | |
48 | | |
|
48 | | | |
49 | | o 2:draft 'C3' |
|
49 | | o 2:draft 'C3' | |
50 | |/ |
|
50 | |/ | |
51 | o 1:draft 'C2' |
|
51 | o 1:draft 'C2' | |
52 | | |
|
52 | | | |
53 | o 0:draft 'C1' |
|
53 | o 0:draft 'C1' | |
54 |
|
54 | |||
55 | Try to call --continue: |
|
55 | Try to call --continue: | |
56 |
|
56 | |||
57 | $ hg rebase --continue |
|
57 | $ hg rebase --continue | |
58 | abort: no rebase in progress |
|
58 | abort: no rebase in progress | |
59 | [255] |
|
59 | [255] | |
60 |
|
60 | |||
61 | Conflicting rebase: |
|
61 | Conflicting rebase: | |
62 |
|
62 | |||
63 | $ hg rebase -s 3 -d 2 |
|
63 | $ hg rebase -s 3 -d 2 | |
64 | rebasing 3:3163e20567cc "L1" |
|
64 | rebasing 3:3163e20567cc "L1" | |
65 | rebasing 4:46f0b057b5c0 "L2" |
|
65 | rebasing 4:46f0b057b5c0 "L2" | |
66 | merging common |
|
66 | merging common | |
67 | warning: conflicts during merge. |
|
67 | warning: conflicts during merge. | |
68 | merging common incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
68 | merging common incomplete! (edit conflicts, then use 'hg resolve --mark') | |
69 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
69 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
70 | [1] |
|
70 | [1] | |
71 |
|
71 | |||
72 | Try to continue without solving the conflict: |
|
72 | Try to continue without solving the conflict: | |
73 |
|
73 | |||
74 | $ hg rebase --continue |
|
74 | $ hg rebase --continue | |
75 | already rebased 3:3163e20567cc "L1" as 3e046f2ecedb |
|
75 | already rebased 3:3163e20567cc "L1" as 3e046f2ecedb | |
76 | rebasing 4:46f0b057b5c0 "L2" |
|
76 | rebasing 4:46f0b057b5c0 "L2" | |
77 | abort: unresolved merge conflicts (see hg help resolve) |
|
77 | abort: unresolved merge conflicts (see hg help resolve) | |
78 | [255] |
|
78 | [255] | |
79 |
|
79 | |||
80 | Conclude rebase: |
|
80 | Conclude rebase: | |
81 |
|
81 | |||
82 | $ echo 'resolved merge' >common |
|
82 | $ echo 'resolved merge' >common | |
83 | $ hg resolve -m common |
|
83 | $ hg resolve -m common | |
84 | (no more unresolved files) |
|
84 | (no more unresolved files) | |
85 | $ hg rebase --continue |
|
85 | $ hg rebase --continue | |
86 | already rebased 3:3163e20567cc "L1" as 3e046f2ecedb |
|
86 | already rebased 3:3163e20567cc "L1" as 3e046f2ecedb | |
87 | rebasing 4:46f0b057b5c0 "L2" |
|
87 | rebasing 4:46f0b057b5c0 "L2" | |
88 | rebasing 5:8029388f38dc "L3" (mybook) |
|
88 | rebasing 5:8029388f38dc "L3" (mybook) | |
89 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/3163e20567cc-5ca4656e-backup.hg (glob) |
|
89 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/3163e20567cc-5ca4656e-backup.hg (glob) | |
90 |
|
90 | |||
91 | $ hg tglog |
|
91 | $ hg tglog | |
92 | @ 5:secret 'L3' mybook |
|
92 | @ 5:secret 'L3' mybook | |
93 | | |
|
93 | | | |
94 | o 4:secret 'L2' |
|
94 | o 4:secret 'L2' | |
95 | | |
|
95 | | | |
96 | o 3:draft 'L1' |
|
96 | o 3:draft 'L1' | |
97 | | |
|
97 | | | |
98 | o 2:draft 'C3' |
|
98 | o 2:draft 'C3' | |
99 | | |
|
99 | | | |
100 | o 1:draft 'C2' |
|
100 | o 1:draft 'C2' | |
101 | | |
|
101 | | | |
102 | o 0:draft 'C1' |
|
102 | o 0:draft 'C1' | |
103 |
|
103 | |||
104 | Check correctness: |
|
104 | Check correctness: | |
105 |
|
105 | |||
106 | $ hg cat -r 0 common |
|
106 | $ hg cat -r 0 common | |
107 | c1 |
|
107 | c1 | |
108 |
|
108 | |||
109 | $ hg cat -r 1 common |
|
109 | $ hg cat -r 1 common | |
110 | c1 |
|
110 | c1 | |
111 | c2 |
|
111 | c2 | |
112 |
|
112 | |||
113 | $ hg cat -r 2 common |
|
113 | $ hg cat -r 2 common | |
114 | c1 |
|
114 | c1 | |
115 | c2 |
|
115 | c2 | |
116 | c3 |
|
116 | c3 | |
117 |
|
117 | |||
118 | $ hg cat -r 3 common |
|
118 | $ hg cat -r 3 common | |
119 | c1 |
|
119 | c1 | |
120 | c2 |
|
120 | c2 | |
121 | c3 |
|
121 | c3 | |
122 |
|
122 | |||
123 | $ hg cat -r 4 common |
|
123 | $ hg cat -r 4 common | |
124 | resolved merge |
|
124 | resolved merge | |
125 |
|
125 | |||
126 | $ hg cat -r 5 common |
|
126 | $ hg cat -r 5 common | |
127 | resolved merge |
|
127 | resolved merge | |
128 |
|
128 | |||
129 | Bookmark stays active after --continue |
|
129 | Bookmark stays active after --continue | |
130 | $ hg bookmarks |
|
130 | $ hg bookmarks | |
131 | * mybook 5:d67b21408fc0 |
|
131 | * mybook 5:d67b21408fc0 | |
132 |
|
132 | |||
133 | $ cd .. |
|
133 | $ cd .. | |
134 |
|
134 | |||
135 | Check that the right ancestors is used while rebasing a merge (issue4041) |
|
135 | Check that the right ancestors is used while rebasing a merge (issue4041) | |
136 |
|
136 | |||
137 | $ hg clone "$TESTDIR/bundles/issue4041.hg" issue4041 |
|
137 | $ hg clone "$TESTDIR/bundles/issue4041.hg" issue4041 | |
138 | requesting all changes |
|
138 | requesting all changes | |
139 | adding changesets |
|
139 | adding changesets | |
140 | adding manifests |
|
140 | adding manifests | |
141 | adding file changes |
|
141 | adding file changes | |
142 | added 11 changesets with 8 changes to 3 files (+1 heads) |
|
142 | added 11 changesets with 8 changes to 3 files (+1 heads) | |
143 | updating to branch default |
|
143 | updating to branch default | |
144 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
144 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
145 | $ cd issue4041 |
|
145 | $ cd issue4041 | |
146 | $ hg log -G |
|
146 | $ hg log -G | |
147 | o changeset: 10:2f2496ddf49d |
|
147 | o changeset: 10:2f2496ddf49d | |
148 | |\ branch: f1 |
|
148 | |\ branch: f1 | |
149 | | | tag: tip |
|
149 | | | tag: tip | |
150 | | | parent: 7:4c9fbe56a16f |
|
150 | | | parent: 7:4c9fbe56a16f | |
151 | | | parent: 9:e31216eec445 |
|
151 | | | parent: 9:e31216eec445 | |
152 | | | user: szhang |
|
152 | | | user: szhang | |
153 | | | date: Thu Sep 05 12:59:39 2013 -0400 |
|
153 | | | date: Thu Sep 05 12:59:39 2013 -0400 | |
154 | | | summary: merge |
|
154 | | | summary: merge | |
155 | | | |
|
155 | | | | |
156 | | o changeset: 9:e31216eec445 |
|
156 | | o changeset: 9:e31216eec445 | |
157 | | | branch: f1 |
|
157 | | | branch: f1 | |
158 | | | user: szhang |
|
158 | | | user: szhang | |
159 | | | date: Thu Sep 05 12:59:10 2013 -0400 |
|
159 | | | date: Thu Sep 05 12:59:10 2013 -0400 | |
160 | | | summary: more changes to f1 |
|
160 | | | summary: more changes to f1 | |
161 | | | |
|
161 | | | | |
162 | | o changeset: 8:8e4e2c1a07ae |
|
162 | | o changeset: 8:8e4e2c1a07ae | |
163 | | |\ branch: f1 |
|
163 | | |\ branch: f1 | |
164 | | | | parent: 2:4bc80088dc6b |
|
164 | | | | parent: 2:4bc80088dc6b | |
165 | | | | parent: 6:400110238667 |
|
165 | | | | parent: 6:400110238667 | |
166 | | | | user: szhang |
|
166 | | | | user: szhang | |
167 | | | | date: Thu Sep 05 12:57:59 2013 -0400 |
|
167 | | | | date: Thu Sep 05 12:57:59 2013 -0400 | |
168 | | | | summary: bad merge |
|
168 | | | | summary: bad merge | |
169 | | | | |
|
169 | | | | | |
170 | o | | changeset: 7:4c9fbe56a16f |
|
170 | o | | changeset: 7:4c9fbe56a16f | |
171 | |/ / branch: f1 |
|
171 | |/ / branch: f1 | |
172 | | | parent: 2:4bc80088dc6b |
|
172 | | | parent: 2:4bc80088dc6b | |
173 | | | user: szhang |
|
173 | | | user: szhang | |
174 | | | date: Thu Sep 05 12:54:00 2013 -0400 |
|
174 | | | date: Thu Sep 05 12:54:00 2013 -0400 | |
175 | | | summary: changed f1 |
|
175 | | | summary: changed f1 | |
176 | | | |
|
176 | | | | |
177 | | o changeset: 6:400110238667 |
|
177 | | o changeset: 6:400110238667 | |
178 | | | branch: f2 |
|
178 | | | branch: f2 | |
179 | | | parent: 4:12e8ec6bb010 |
|
179 | | | parent: 4:12e8ec6bb010 | |
180 | | | user: szhang |
|
180 | | | user: szhang | |
181 | | | date: Tue Sep 03 13:58:02 2013 -0400 |
|
181 | | | date: Tue Sep 03 13:58:02 2013 -0400 | |
182 | | | summary: changed f2 on f2 |
|
182 | | | summary: changed f2 on f2 | |
183 | | | |
|
183 | | | | |
184 | | | @ changeset: 5:d79e2059b5c0 |
|
184 | | | @ changeset: 5:d79e2059b5c0 | |
185 | | | | parent: 3:8a951942e016 |
|
185 | | | | parent: 3:8a951942e016 | |
186 | | | | user: szhang |
|
186 | | | | user: szhang | |
187 | | | | date: Tue Sep 03 13:57:39 2013 -0400 |
|
187 | | | | date: Tue Sep 03 13:57:39 2013 -0400 | |
188 | | | | summary: changed f2 on default |
|
188 | | | | summary: changed f2 on default | |
189 | | | | |
|
189 | | | | | |
190 | | o | changeset: 4:12e8ec6bb010 |
|
190 | | o | changeset: 4:12e8ec6bb010 | |
191 | | |/ branch: f2 |
|
191 | | |/ branch: f2 | |
192 | | | user: szhang |
|
192 | | | user: szhang | |
193 | | | date: Tue Sep 03 13:57:18 2013 -0400 |
|
193 | | | date: Tue Sep 03 13:57:18 2013 -0400 | |
194 | | | summary: created f2 branch |
|
194 | | | summary: created f2 branch | |
195 | | | |
|
195 | | | | |
196 | | o changeset: 3:8a951942e016 |
|
196 | | o changeset: 3:8a951942e016 | |
197 | | | parent: 0:24797d4f68de |
|
197 | | | parent: 0:24797d4f68de | |
198 | | | user: szhang |
|
198 | | | user: szhang | |
199 | | | date: Tue Sep 03 13:57:11 2013 -0400 |
|
199 | | | date: Tue Sep 03 13:57:11 2013 -0400 | |
200 | | | summary: added f2.txt |
|
200 | | | summary: added f2.txt | |
201 | | | |
|
201 | | | | |
202 | o | changeset: 2:4bc80088dc6b |
|
202 | o | changeset: 2:4bc80088dc6b | |
203 | | | branch: f1 |
|
203 | | | branch: f1 | |
204 | | | user: szhang |
|
204 | | | user: szhang | |
205 | | | date: Tue Sep 03 13:56:20 2013 -0400 |
|
205 | | | date: Tue Sep 03 13:56:20 2013 -0400 | |
206 | | | summary: added f1.txt |
|
206 | | | summary: added f1.txt | |
207 | | | |
|
207 | | | | |
208 | o | changeset: 1:ef53c9e6b608 |
|
208 | o | changeset: 1:ef53c9e6b608 | |
209 | |/ branch: f1 |
|
209 | |/ branch: f1 | |
210 | | user: szhang |
|
210 | | user: szhang | |
211 | | date: Tue Sep 03 13:55:26 2013 -0400 |
|
211 | | date: Tue Sep 03 13:55:26 2013 -0400 | |
212 | | summary: created f1 branch |
|
212 | | summary: created f1 branch | |
213 | | |
|
213 | | | |
214 | o changeset: 0:24797d4f68de |
|
214 | o changeset: 0:24797d4f68de | |
215 | user: szhang |
|
215 | user: szhang | |
216 | date: Tue Sep 03 13:55:08 2013 -0400 |
|
216 | date: Tue Sep 03 13:55:08 2013 -0400 | |
217 | summary: added default.txt |
|
217 | summary: added default.txt | |
218 |
|
218 | |||
219 | $ hg rebase -s9 -d2 --debug # use debug to really check merge base used |
|
219 | $ hg rebase -s9 -d2 --debug # use debug to really check merge base used | |
220 | rebase onto 2 starting from e31216eec445 |
|
220 | rebase onto 2 starting from e31216eec445 | |
221 | ignoring null merge rebase of 3 |
|
221 | ignoring null merge rebase of 3 | |
222 | ignoring null merge rebase of 4 |
|
222 | ignoring null merge rebase of 4 | |
223 | ignoring null merge rebase of 6 |
|
223 | ignoring null merge rebase of 6 | |
224 | ignoring null merge rebase of 8 |
|
224 | ignoring null merge rebase of 8 | |
225 | rebasing 9:e31216eec445 "more changes to f1" |
|
225 | rebasing 9:e31216eec445 "more changes to f1" | |
226 | rebasing: 9:e31216eec445 5/6 changesets (83.33%) |
|
226 | rebasing: 9:e31216eec445 5/6 changesets (83.33%) | |
227 | future parents are 2 and -1 |
|
227 | future parents are 2 and -1 | |
228 | rebase status stored |
|
228 | rebase status stored | |
229 | update to 2:4bc80088dc6b |
|
229 | update to 2:4bc80088dc6b | |
230 | resolving manifests |
|
230 | resolving manifests | |
231 | branchmerge: False, force: True, partial: False |
|
231 | branchmerge: False, force: True, partial: False | |
232 | ancestor: d79e2059b5c0+, local: d79e2059b5c0+, remote: 4bc80088dc6b |
|
232 | ancestor: d79e2059b5c0+, local: d79e2059b5c0+, remote: 4bc80088dc6b | |
233 | f2.txt: other deleted -> r |
|
233 | f2.txt: other deleted -> r | |
234 | removing f2.txt |
|
234 | removing f2.txt | |
235 | updating: f2.txt 1/2 files (50.00%) |
|
235 | updating: f2.txt 1/2 files (50.00%) | |
236 | f1.txt: remote created -> g |
|
236 | f1.txt: remote created -> g | |
237 | getting f1.txt |
|
237 | getting f1.txt | |
238 | updating: f1.txt 2/2 files (100.00%) |
|
238 | updating: f1.txt 2/2 files (100.00%) | |
239 | merge against 9:e31216eec445 |
|
239 | merge against 9:e31216eec445 | |
240 | detach base 8:8e4e2c1a07ae |
|
240 | detach base 8:8e4e2c1a07ae | |
241 | searching for copies back to rev 3 |
|
241 | searching for copies back to rev 3 | |
242 | resolving manifests |
|
242 | resolving manifests | |
243 | branchmerge: True, force: True, partial: False |
|
243 | branchmerge: True, force: True, partial: False | |
244 | ancestor: 8e4e2c1a07ae, local: 4bc80088dc6b+, remote: e31216eec445 |
|
244 | ancestor: 8e4e2c1a07ae, local: 4bc80088dc6b+, remote: e31216eec445 | |
245 | f1.txt: remote is newer -> g |
|
245 | f1.txt: remote is newer -> g | |
246 | getting f1.txt |
|
246 | getting f1.txt | |
247 | updating: f1.txt 1/1 files (100.00%) |
|
247 | updating: f1.txt 1/1 files (100.00%) | |
248 | committing files: |
|
248 | committing files: | |
249 | f1.txt |
|
249 | f1.txt | |
250 | committing manifest |
|
250 | committing manifest | |
251 | committing changelog |
|
251 | committing changelog | |
252 | rebased as 19c888675e13 |
|
252 | rebased as 19c888675e13 | |
253 | rebasing 10:2f2496ddf49d "merge" (tip) |
|
253 | rebasing 10:2f2496ddf49d "merge" (tip) | |
254 | rebasing: 10:2f2496ddf49d 6/6 changesets (100.00%) |
|
254 | rebasing: 10:2f2496ddf49d 6/6 changesets (100.00%) | |
255 | future parents are 11 and 7 |
|
255 | future parents are 11 and 7 | |
256 | rebase status stored |
|
256 | rebase status stored | |
257 | already in target |
|
257 | already in target | |
258 | merge against 10:2f2496ddf49d |
|
258 | merge against 10:2f2496ddf49d | |
259 | detach base 9:e31216eec445 |
|
259 | detach base 9:e31216eec445 | |
260 | searching for copies back to rev 3 |
|
260 | searching for copies back to rev 3 | |
261 | resolving manifests |
|
261 | resolving manifests | |
262 | branchmerge: True, force: True, partial: False |
|
262 | branchmerge: True, force: True, partial: False | |
263 | ancestor: e31216eec445, local: 19c888675e13+, remote: 2f2496ddf49d |
|
263 | ancestor: e31216eec445, local: 19c888675e13+, remote: 2f2496ddf49d | |
264 | f1.txt: remote is newer -> g |
|
264 | f1.txt: remote is newer -> g | |
265 | getting f1.txt |
|
265 | getting f1.txt | |
266 | updating: f1.txt 1/1 files (100.00%) |
|
266 | updating: f1.txt 1/1 files (100.00%) | |
267 | committing files: |
|
267 | committing files: | |
268 | f1.txt |
|
268 | f1.txt | |
269 | committing manifest |
|
269 | committing manifest | |
270 | committing changelog |
|
270 | committing changelog | |
271 | rebased as 2a7f09cac94c |
|
271 | rebased as 2a7f09cac94c | |
272 | rebase merging completed |
|
272 | rebase merging completed | |
273 | update back to initial working directory parent |
|
273 | update back to initial working directory parent | |
274 | resolving manifests |
|
274 | resolving manifests | |
275 | branchmerge: False, force: False, partial: False |
|
275 | branchmerge: False, force: False, partial: False | |
276 | ancestor: 2a7f09cac94c, local: 2a7f09cac94c+, remote: d79e2059b5c0 |
|
276 | ancestor: 2a7f09cac94c, local: 2a7f09cac94c+, remote: d79e2059b5c0 | |
277 | f1.txt: other deleted -> r |
|
277 | f1.txt: other deleted -> r | |
278 | removing f1.txt |
|
278 | removing f1.txt | |
279 | updating: f1.txt 1/2 files (50.00%) |
|
279 | updating: f1.txt 1/2 files (50.00%) | |
280 | f2.txt: remote created -> g |
|
280 | f2.txt: remote created -> g | |
281 | getting f2.txt |
|
281 | getting f2.txt | |
282 | updating: f2.txt 2/2 files (100.00%) |
|
282 | updating: f2.txt 2/2 files (100.00%) | |
283 | 3 changesets found |
|
283 | 3 changesets found | |
284 | list of changesets: |
|
284 | list of changesets: | |
285 | 4c9fbe56a16f30c0d5dcc40ec1a97bbe3325209c |
|
285 | 4c9fbe56a16f30c0d5dcc40ec1a97bbe3325209c | |
286 | e31216eec445e44352c5f01588856059466a24c9 |
|
286 | e31216eec445e44352c5f01588856059466a24c9 | |
287 | 2f2496ddf49d69b5ef23ad8cf9fb2e0e4faf0ac2 |
|
287 | 2f2496ddf49d69b5ef23ad8cf9fb2e0e4faf0ac2 | |
288 | bundling: 1/3 changesets (33.33%) |
|
288 | bundling: 1/3 changesets (33.33%) | |
289 | bundling: 2/3 changesets (66.67%) |
|
289 | bundling: 2/3 changesets (66.67%) | |
290 | bundling: 3/3 changesets (100.00%) |
|
290 | bundling: 3/3 changesets (100.00%) | |
291 | bundling: 1/3 manifests (33.33%) |
|
291 | bundling: 1/3 manifests (33.33%) | |
292 | bundling: 2/3 manifests (66.67%) |
|
292 | bundling: 2/3 manifests (66.67%) | |
293 | bundling: 3/3 manifests (100.00%) |
|
293 | bundling: 3/3 manifests (100.00%) | |
294 | bundling: f1.txt 1/1 files (100.00%) |
|
294 | bundling: f1.txt 1/1 files (100.00%) | |
295 | saved backup bundle to $TESTTMP/issue4041/.hg/strip-backup/e31216eec445-15f7a814-backup.hg (glob) |
|
295 | saved backup bundle to $TESTTMP/issue4041/.hg/strip-backup/e31216eec445-15f7a814-backup.hg (glob) | |
296 | 3 changesets found |
|
296 | 3 changesets found | |
297 | list of changesets: |
|
297 | list of changesets: | |
298 | 4c9fbe56a16f30c0d5dcc40ec1a97bbe3325209c |
|
298 | 4c9fbe56a16f30c0d5dcc40ec1a97bbe3325209c | |
299 | 19c888675e133ab5dff84516926a65672eaf04d9 |
|
299 | 19c888675e133ab5dff84516926a65672eaf04d9 | |
300 | 2a7f09cac94c7f4b73ebd5cd1a62d3b2e8e336bf |
|
300 | 2a7f09cac94c7f4b73ebd5cd1a62d3b2e8e336bf | |
301 | bundling: 1/3 changesets (33.33%) |
|
301 | bundling: 1/3 changesets (33.33%) | |
302 | bundling: 2/3 changesets (66.67%) |
|
302 | bundling: 2/3 changesets (66.67%) | |
303 | bundling: 3/3 changesets (100.00%) |
|
303 | bundling: 3/3 changesets (100.00%) | |
304 | bundling: 1/3 manifests (33.33%) |
|
304 | bundling: 1/3 manifests (33.33%) | |
305 | bundling: 2/3 manifests (66.67%) |
|
305 | bundling: 2/3 manifests (66.67%) | |
306 | bundling: 3/3 manifests (100.00%) |
|
306 | bundling: 3/3 manifests (100.00%) | |
307 | bundling: f1.txt 1/1 files (100.00%) |
|
307 | bundling: f1.txt 1/1 files (100.00%) | |
308 | adding branch |
|
308 | adding branch | |
309 | adding changesets |
|
309 | adding changesets | |
310 | changesets: 1 chunks |
|
310 | changesets: 1 chunks | |
311 | add changeset 4c9fbe56a16f |
|
311 | add changeset 4c9fbe56a16f | |
312 | changesets: 2 chunks |
|
312 | changesets: 2 chunks | |
313 | add changeset 19c888675e13 |
|
313 | add changeset 19c888675e13 | |
314 | changesets: 3 chunks |
|
314 | changesets: 3 chunks | |
315 | add changeset 2a7f09cac94c |
|
315 | add changeset 2a7f09cac94c | |
316 | adding manifests |
|
316 | adding manifests | |
317 | manifests: 1/2 chunks (50.00%) |
|
317 | manifests: 1/2 chunks (50.00%) | |
318 | manifests: 2/2 chunks (100.00%) |
|
318 | manifests: 2/2 chunks (100.00%) | |
319 | manifests: 3/2 chunks (150.00%) |
|
319 | manifests: 3/2 chunks (150.00%) | |
320 | adding file changes |
|
320 | adding file changes | |
321 | adding f1.txt revisions |
|
321 | adding f1.txt revisions | |
322 | files: 1/1 chunks (100.00%) |
|
322 | files: 1/1 chunks (100.00%) | |
323 | added 2 changesets with 2 changes to 1 files |
|
323 | added 2 changesets with 2 changes to 1 files | |
324 | invalid branchheads cache (served): tip differs |
|
324 | invalid branchheads cache (served): tip differs | |
|
325 | truncating cache/rbc-revs-v1 to 72 | |||
325 | rebase completed |
|
326 | rebase completed | |
326 | updating the branch cache |
|
327 | updating the branch cache |
General Comments 0
You need to be logged in to leave comments.
Login now