Show More
@@ -1,834 +1,850 b'' | |||||
1 | # changegroup.py - Mercurial changegroup manipulation functions |
|
1 | # changegroup.py - Mercurial changegroup manipulation functions | |
2 | # |
|
2 | # | |
3 | # Copyright 2006 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2006 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 | import weakref |
|
8 | import weakref | |
9 | from i18n import _ |
|
9 | from i18n import _ | |
10 | from node import nullrev, nullid, hex, short |
|
10 | from node import nullrev, nullid, hex, short | |
11 | import mdiff, util, dagutil |
|
11 | import mdiff, util, dagutil | |
12 | import struct, os, bz2, zlib, tempfile |
|
12 | import struct, os, bz2, zlib, tempfile | |
13 | import discovery, error, phases, branchmap |
|
13 | import discovery, error, phases, branchmap | |
14 |
|
14 | |||
15 | _CHANGEGROUPV1_DELTA_HEADER = "20s20s20s20s" |
|
15 | _CHANGEGROUPV1_DELTA_HEADER = "20s20s20s20s" | |
16 | _CHANGEGROUPV2_DELTA_HEADER = "20s20s20s20s20s" |
|
16 | _CHANGEGROUPV2_DELTA_HEADER = "20s20s20s20s20s" | |
17 |
|
17 | |||
18 | def readexactly(stream, n): |
|
18 | def readexactly(stream, n): | |
19 | '''read n bytes from stream.read and abort if less was available''' |
|
19 | '''read n bytes from stream.read and abort if less was available''' | |
20 | s = stream.read(n) |
|
20 | s = stream.read(n) | |
21 | if len(s) < n: |
|
21 | if len(s) < n: | |
22 | raise util.Abort(_("stream ended unexpectedly" |
|
22 | raise util.Abort(_("stream ended unexpectedly" | |
23 | " (got %d bytes, expected %d)") |
|
23 | " (got %d bytes, expected %d)") | |
24 | % (len(s), n)) |
|
24 | % (len(s), n)) | |
25 | return s |
|
25 | return s | |
26 |
|
26 | |||
27 | def getchunk(stream): |
|
27 | def getchunk(stream): | |
28 | """return the next chunk from stream as a string""" |
|
28 | """return the next chunk from stream as a string""" | |
29 | d = readexactly(stream, 4) |
|
29 | d = readexactly(stream, 4) | |
30 | l = struct.unpack(">l", d)[0] |
|
30 | l = struct.unpack(">l", d)[0] | |
31 | if l <= 4: |
|
31 | if l <= 4: | |
32 | if l: |
|
32 | if l: | |
33 | raise util.Abort(_("invalid chunk length %d") % l) |
|
33 | raise util.Abort(_("invalid chunk length %d") % l) | |
34 | return "" |
|
34 | return "" | |
35 | return readexactly(stream, l - 4) |
|
35 | return readexactly(stream, l - 4) | |
36 |
|
36 | |||
37 | def chunkheader(length): |
|
37 | def chunkheader(length): | |
38 | """return a changegroup chunk header (string)""" |
|
38 | """return a changegroup chunk header (string)""" | |
39 | return struct.pack(">l", length + 4) |
|
39 | return struct.pack(">l", length + 4) | |
40 |
|
40 | |||
41 | def closechunk(): |
|
41 | def closechunk(): | |
42 | """return a changegroup chunk header (string) for a zero-length chunk""" |
|
42 | """return a changegroup chunk header (string) for a zero-length chunk""" | |
43 | return struct.pack(">l", 0) |
|
43 | return struct.pack(">l", 0) | |
44 |
|
44 | |||
45 | class nocompress(object): |
|
45 | class nocompress(object): | |
46 | def compress(self, x): |
|
46 | def compress(self, x): | |
47 | return x |
|
47 | return x | |
48 | def flush(self): |
|
48 | def flush(self): | |
49 | return "" |
|
49 | return "" | |
50 |
|
50 | |||
51 | bundletypes = { |
|
51 | bundletypes = { | |
52 | "": ("", nocompress), # only when using unbundle on ssh and old http servers |
|
52 | "": ("", nocompress), # only when using unbundle on ssh and old http servers | |
53 | # since the unification ssh accepts a header but there |
|
53 | # since the unification ssh accepts a header but there | |
54 | # is no capability signaling it. |
|
54 | # is no capability signaling it. | |
55 | "HG10UN": ("HG10UN", nocompress), |
|
55 | "HG10UN": ("HG10UN", nocompress), | |
56 | "HG10BZ": ("HG10", lambda: bz2.BZ2Compressor()), |
|
56 | "HG10BZ": ("HG10", lambda: bz2.BZ2Compressor()), | |
57 | "HG10GZ": ("HG10GZ", lambda: zlib.compressobj()), |
|
57 | "HG10GZ": ("HG10GZ", lambda: zlib.compressobj()), | |
58 | } |
|
58 | } | |
59 |
|
59 | |||
60 | # hgweb uses this list to communicate its preferred type |
|
60 | # hgweb uses this list to communicate its preferred type | |
61 | bundlepriority = ['HG10GZ', 'HG10BZ', 'HG10UN'] |
|
61 | bundlepriority = ['HG10GZ', 'HG10BZ', 'HG10UN'] | |
62 |
|
62 | |||
63 | def writebundle(cg, filename, bundletype, vfs=None): |
|
63 | def writebundle(cg, filename, bundletype, vfs=None): | |
64 | """Write a bundle file and return its filename. |
|
64 | """Write a bundle file and return its filename. | |
65 |
|
65 | |||
66 | Existing files will not be overwritten. |
|
66 | Existing files will not be overwritten. | |
67 | If no filename is specified, a temporary file is created. |
|
67 | If no filename is specified, a temporary file is created. | |
68 | bz2 compression can be turned off. |
|
68 | bz2 compression can be turned off. | |
69 | The bundle file will be deleted in case of errors. |
|
69 | The bundle file will be deleted in case of errors. | |
70 | """ |
|
70 | """ | |
71 |
|
71 | |||
72 | fh = None |
|
72 | fh = None | |
73 | cleanup = None |
|
73 | cleanup = None | |
74 | try: |
|
74 | try: | |
75 | if filename: |
|
75 | if filename: | |
76 | if vfs: |
|
76 | if vfs: | |
77 | fh = vfs.open(filename, "wb") |
|
77 | fh = vfs.open(filename, "wb") | |
78 | else: |
|
78 | else: | |
79 | fh = open(filename, "wb") |
|
79 | fh = open(filename, "wb") | |
80 | else: |
|
80 | else: | |
81 | fd, filename = tempfile.mkstemp(prefix="hg-bundle-", suffix=".hg") |
|
81 | fd, filename = tempfile.mkstemp(prefix="hg-bundle-", suffix=".hg") | |
82 | fh = os.fdopen(fd, "wb") |
|
82 | fh = os.fdopen(fd, "wb") | |
83 | cleanup = filename |
|
83 | cleanup = filename | |
84 |
|
84 | |||
85 | header, compressor = bundletypes[bundletype] |
|
85 | header, compressor = bundletypes[bundletype] | |
86 | fh.write(header) |
|
86 | fh.write(header) | |
87 | z = compressor() |
|
87 | z = compressor() | |
88 |
|
88 | |||
89 | # parse the changegroup data, otherwise we will block |
|
89 | # parse the changegroup data, otherwise we will block | |
90 | # in case of sshrepo because we don't know the end of the stream |
|
90 | # in case of sshrepo because we don't know the end of the stream | |
91 |
|
91 | |||
92 | # an empty chunkgroup is the end of the changegroup |
|
92 | # an empty chunkgroup is the end of the changegroup | |
93 | # a changegroup has at least 2 chunkgroups (changelog and manifest). |
|
93 | # a changegroup has at least 2 chunkgroups (changelog and manifest). | |
94 | # after that, an empty chunkgroup is the end of the changegroup |
|
94 | # after that, an empty chunkgroup is the end of the changegroup | |
95 | for chunk in cg.getchunks(): |
|
95 | for chunk in cg.getchunks(): | |
96 | fh.write(z.compress(chunk)) |
|
96 | fh.write(z.compress(chunk)) | |
97 | fh.write(z.flush()) |
|
97 | fh.write(z.flush()) | |
98 | cleanup = None |
|
98 | cleanup = None | |
99 | return filename |
|
99 | return filename | |
100 | finally: |
|
100 | finally: | |
101 | if fh is not None: |
|
101 | if fh is not None: | |
102 | fh.close() |
|
102 | fh.close() | |
103 | if cleanup is not None: |
|
103 | if cleanup is not None: | |
104 | if filename and vfs: |
|
104 | if filename and vfs: | |
105 | vfs.unlink(cleanup) |
|
105 | vfs.unlink(cleanup) | |
106 | else: |
|
106 | else: | |
107 | os.unlink(cleanup) |
|
107 | os.unlink(cleanup) | |
108 |
|
108 | |||
109 | def decompressor(fh, alg): |
|
109 | def decompressor(fh, alg): | |
110 | if alg == 'UN': |
|
110 | if alg == 'UN': | |
111 | return fh |
|
111 | return fh | |
112 | elif alg == 'GZ': |
|
112 | elif alg == 'GZ': | |
113 | def generator(f): |
|
113 | def generator(f): | |
114 | zd = zlib.decompressobj() |
|
114 | zd = zlib.decompressobj() | |
115 | for chunk in util.filechunkiter(f): |
|
115 | for chunk in util.filechunkiter(f): | |
116 | yield zd.decompress(chunk) |
|
116 | yield zd.decompress(chunk) | |
117 | elif alg == 'BZ': |
|
117 | elif alg == 'BZ': | |
118 | def generator(f): |
|
118 | def generator(f): | |
119 | zd = bz2.BZ2Decompressor() |
|
119 | zd = bz2.BZ2Decompressor() | |
120 | zd.decompress("BZ") |
|
120 | zd.decompress("BZ") | |
121 | for chunk in util.filechunkiter(f, 4096): |
|
121 | for chunk in util.filechunkiter(f, 4096): | |
122 | yield zd.decompress(chunk) |
|
122 | yield zd.decompress(chunk) | |
123 | else: |
|
123 | else: | |
124 | raise util.Abort("unknown bundle compression '%s'" % alg) |
|
124 | raise util.Abort("unknown bundle compression '%s'" % alg) | |
125 | return util.chunkbuffer(generator(fh)) |
|
125 | return util.chunkbuffer(generator(fh)) | |
126 |
|
126 | |||
127 | class cg1unpacker(object): |
|
127 | class cg1unpacker(object): | |
128 | deltaheader = _CHANGEGROUPV1_DELTA_HEADER |
|
128 | deltaheader = _CHANGEGROUPV1_DELTA_HEADER | |
129 | deltaheadersize = struct.calcsize(deltaheader) |
|
129 | deltaheadersize = struct.calcsize(deltaheader) | |
130 | def __init__(self, fh, alg): |
|
130 | def __init__(self, fh, alg): | |
131 | self._stream = decompressor(fh, alg) |
|
131 | self._stream = decompressor(fh, alg) | |
132 | self._type = alg |
|
132 | self._type = alg | |
133 | self.callback = None |
|
133 | self.callback = None | |
134 | def compressed(self): |
|
134 | def compressed(self): | |
135 | return self._type != 'UN' |
|
135 | return self._type != 'UN' | |
136 | def read(self, l): |
|
136 | def read(self, l): | |
137 | return self._stream.read(l) |
|
137 | return self._stream.read(l) | |
138 | def seek(self, pos): |
|
138 | def seek(self, pos): | |
139 | return self._stream.seek(pos) |
|
139 | return self._stream.seek(pos) | |
140 | def tell(self): |
|
140 | def tell(self): | |
141 | return self._stream.tell() |
|
141 | return self._stream.tell() | |
142 | def close(self): |
|
142 | def close(self): | |
143 | return self._stream.close() |
|
143 | return self._stream.close() | |
144 |
|
144 | |||
145 | def chunklength(self): |
|
145 | def chunklength(self): | |
146 | d = readexactly(self._stream, 4) |
|
146 | d = readexactly(self._stream, 4) | |
147 | l = struct.unpack(">l", d)[0] |
|
147 | l = struct.unpack(">l", d)[0] | |
148 | if l <= 4: |
|
148 | if l <= 4: | |
149 | if l: |
|
149 | if l: | |
150 | raise util.Abort(_("invalid chunk length %d") % l) |
|
150 | raise util.Abort(_("invalid chunk length %d") % l) | |
151 | return 0 |
|
151 | return 0 | |
152 | if self.callback: |
|
152 | if self.callback: | |
153 | self.callback() |
|
153 | self.callback() | |
154 | return l - 4 |
|
154 | return l - 4 | |
155 |
|
155 | |||
156 | def changelogheader(self): |
|
156 | def changelogheader(self): | |
157 | """v10 does not have a changelog header chunk""" |
|
157 | """v10 does not have a changelog header chunk""" | |
158 | return {} |
|
158 | return {} | |
159 |
|
159 | |||
160 | def manifestheader(self): |
|
160 | def manifestheader(self): | |
161 | """v10 does not have a manifest header chunk""" |
|
161 | """v10 does not have a manifest header chunk""" | |
162 | return {} |
|
162 | return {} | |
163 |
|
163 | |||
164 | def filelogheader(self): |
|
164 | def filelogheader(self): | |
165 | """return the header of the filelogs chunk, v10 only has the filename""" |
|
165 | """return the header of the filelogs chunk, v10 only has the filename""" | |
166 | l = self.chunklength() |
|
166 | l = self.chunklength() | |
167 | if not l: |
|
167 | if not l: | |
168 | return {} |
|
168 | return {} | |
169 | fname = readexactly(self._stream, l) |
|
169 | fname = readexactly(self._stream, l) | |
170 | return {'filename': fname} |
|
170 | return {'filename': fname} | |
171 |
|
171 | |||
172 | def _deltaheader(self, headertuple, prevnode): |
|
172 | def _deltaheader(self, headertuple, prevnode): | |
173 | node, p1, p2, cs = headertuple |
|
173 | node, p1, p2, cs = headertuple | |
174 | if prevnode is None: |
|
174 | if prevnode is None: | |
175 | deltabase = p1 |
|
175 | deltabase = p1 | |
176 | else: |
|
176 | else: | |
177 | deltabase = prevnode |
|
177 | deltabase = prevnode | |
178 | return node, p1, p2, deltabase, cs |
|
178 | return node, p1, p2, deltabase, cs | |
179 |
|
179 | |||
180 | def deltachunk(self, prevnode): |
|
180 | def deltachunk(self, prevnode): | |
181 | l = self.chunklength() |
|
181 | l = self.chunklength() | |
182 | if not l: |
|
182 | if not l: | |
183 | return {} |
|
183 | return {} | |
184 | headerdata = readexactly(self._stream, self.deltaheadersize) |
|
184 | headerdata = readexactly(self._stream, self.deltaheadersize) | |
185 | header = struct.unpack(self.deltaheader, headerdata) |
|
185 | header = struct.unpack(self.deltaheader, headerdata) | |
186 | delta = readexactly(self._stream, l - self.deltaheadersize) |
|
186 | delta = readexactly(self._stream, l - self.deltaheadersize) | |
187 | node, p1, p2, deltabase, cs = self._deltaheader(header, prevnode) |
|
187 | node, p1, p2, deltabase, cs = self._deltaheader(header, prevnode) | |
188 | return {'node': node, 'p1': p1, 'p2': p2, 'cs': cs, |
|
188 | return {'node': node, 'p1': p1, 'p2': p2, 'cs': cs, | |
189 | 'deltabase': deltabase, 'delta': delta} |
|
189 | 'deltabase': deltabase, 'delta': delta} | |
190 |
|
190 | |||
191 | def getchunks(self): |
|
191 | def getchunks(self): | |
192 | """returns all the chunks contains in the bundle |
|
192 | """returns all the chunks contains in the bundle | |
193 |
|
193 | |||
194 | Used when you need to forward the binary stream to a file or another |
|
194 | Used when you need to forward the binary stream to a file or another | |
195 | network API. To do so, it parse the changegroup data, otherwise it will |
|
195 | network API. To do so, it parse the changegroup data, otherwise it will | |
196 | block in case of sshrepo because it don't know the end of the stream. |
|
196 | block in case of sshrepo because it don't know the end of the stream. | |
197 | """ |
|
197 | """ | |
198 | # an empty chunkgroup is the end of the changegroup |
|
198 | # an empty chunkgroup is the end of the changegroup | |
199 | # a changegroup has at least 2 chunkgroups (changelog and manifest). |
|
199 | # a changegroup has at least 2 chunkgroups (changelog and manifest). | |
200 | # after that, an empty chunkgroup is the end of the changegroup |
|
200 | # after that, an empty chunkgroup is the end of the changegroup | |
201 | empty = False |
|
201 | empty = False | |
202 | count = 0 |
|
202 | count = 0 | |
203 | while not empty or count <= 2: |
|
203 | while not empty or count <= 2: | |
204 | empty = True |
|
204 | empty = True | |
205 | count += 1 |
|
205 | count += 1 | |
206 | while True: |
|
206 | while True: | |
207 | chunk = getchunk(self) |
|
207 | chunk = getchunk(self) | |
208 | if not chunk: |
|
208 | if not chunk: | |
209 | break |
|
209 | break | |
210 | empty = False |
|
210 | empty = False | |
211 | yield chunkheader(len(chunk)) |
|
211 | yield chunkheader(len(chunk)) | |
212 | pos = 0 |
|
212 | pos = 0 | |
213 | while pos < len(chunk): |
|
213 | while pos < len(chunk): | |
214 | next = pos + 2**20 |
|
214 | next = pos + 2**20 | |
215 | yield chunk[pos:next] |
|
215 | yield chunk[pos:next] | |
216 | pos = next |
|
216 | pos = next | |
217 | yield closechunk() |
|
217 | yield closechunk() | |
218 |
|
218 | |||
219 | class cg2unpacker(cg1unpacker): |
|
219 | class cg2unpacker(cg1unpacker): | |
220 | deltaheader = _CHANGEGROUPV2_DELTA_HEADER |
|
220 | deltaheader = _CHANGEGROUPV2_DELTA_HEADER | |
221 | deltaheadersize = struct.calcsize(deltaheader) |
|
221 | deltaheadersize = struct.calcsize(deltaheader) | |
222 |
|
222 | |||
223 | def _deltaheader(self, headertuple, prevnode): |
|
223 | def _deltaheader(self, headertuple, prevnode): | |
224 | node, p1, p2, deltabase, cs = headertuple |
|
224 | node, p1, p2, deltabase, cs = headertuple | |
225 | return node, p1, p2, deltabase, cs |
|
225 | return node, p1, p2, deltabase, cs | |
226 |
|
226 | |||
227 | class headerlessfixup(object): |
|
227 | class headerlessfixup(object): | |
228 | def __init__(self, fh, h): |
|
228 | def __init__(self, fh, h): | |
229 | self._h = h |
|
229 | self._h = h | |
230 | self._fh = fh |
|
230 | self._fh = fh | |
231 | def read(self, n): |
|
231 | def read(self, n): | |
232 | if self._h: |
|
232 | if self._h: | |
233 | d, self._h = self._h[:n], self._h[n:] |
|
233 | d, self._h = self._h[:n], self._h[n:] | |
234 | if len(d) < n: |
|
234 | if len(d) < n: | |
235 | d += readexactly(self._fh, n - len(d)) |
|
235 | d += readexactly(self._fh, n - len(d)) | |
236 | return d |
|
236 | return d | |
237 | return readexactly(self._fh, n) |
|
237 | return readexactly(self._fh, n) | |
238 |
|
238 | |||
239 | class cg1packer(object): |
|
239 | class cg1packer(object): | |
240 | deltaheader = _CHANGEGROUPV1_DELTA_HEADER |
|
240 | deltaheader = _CHANGEGROUPV1_DELTA_HEADER | |
241 | def __init__(self, repo, bundlecaps=None): |
|
241 | def __init__(self, repo, bundlecaps=None): | |
242 | """Given a source repo, construct a bundler. |
|
242 | """Given a source repo, construct a bundler. | |
243 |
|
243 | |||
244 | bundlecaps is optional and can be used to specify the set of |
|
244 | bundlecaps is optional and can be used to specify the set of | |
245 | capabilities which can be used to build the bundle. |
|
245 | capabilities which can be used to build the bundle. | |
246 | """ |
|
246 | """ | |
247 | # Set of capabilities we can use to build the bundle. |
|
247 | # Set of capabilities we can use to build the bundle. | |
248 | if bundlecaps is None: |
|
248 | if bundlecaps is None: | |
249 | bundlecaps = set() |
|
249 | bundlecaps = set() | |
250 | self._bundlecaps = bundlecaps |
|
250 | self._bundlecaps = bundlecaps | |
251 | self._changelog = repo.changelog |
|
251 | self._changelog = repo.changelog | |
252 | self._manifest = repo.manifest |
|
252 | self._manifest = repo.manifest | |
253 | reorder = repo.ui.config('bundle', 'reorder', 'auto') |
|
253 | reorder = repo.ui.config('bundle', 'reorder', 'auto') | |
254 | if reorder == 'auto': |
|
254 | if reorder == 'auto': | |
255 | reorder = None |
|
255 | reorder = None | |
256 | else: |
|
256 | else: | |
257 | reorder = util.parsebool(reorder) |
|
257 | reorder = util.parsebool(reorder) | |
258 | self._repo = repo |
|
258 | self._repo = repo | |
259 | self._reorder = reorder |
|
259 | self._reorder = reorder | |
260 | self._progress = repo.ui.progress |
|
260 | self._progress = repo.ui.progress | |
|
261 | if self._repo.ui.verbose and not self._repo.ui.debugflag: | |||
|
262 | self._verbosenote = self._repo.ui.note | |||
|
263 | else: | |||
|
264 | self._verbosenote = lambda s: None | |||
|
265 | ||||
261 | def close(self): |
|
266 | def close(self): | |
262 | return closechunk() |
|
267 | return closechunk() | |
263 |
|
268 | |||
264 | def fileheader(self, fname): |
|
269 | def fileheader(self, fname): | |
265 | return chunkheader(len(fname)) + fname |
|
270 | return chunkheader(len(fname)) + fname | |
266 |
|
271 | |||
267 | def group(self, nodelist, revlog, lookup, units=None, reorder=None): |
|
272 | def group(self, nodelist, revlog, lookup, units=None, reorder=None): | |
268 | """Calculate a delta group, yielding a sequence of changegroup chunks |
|
273 | """Calculate a delta group, yielding a sequence of changegroup chunks | |
269 | (strings). |
|
274 | (strings). | |
270 |
|
275 | |||
271 | Given a list of changeset revs, return a set of deltas and |
|
276 | Given a list of changeset revs, return a set of deltas and | |
272 | metadata corresponding to nodes. The first delta is |
|
277 | metadata corresponding to nodes. The first delta is | |
273 | first parent(nodelist[0]) -> nodelist[0], the receiver is |
|
278 | first parent(nodelist[0]) -> nodelist[0], the receiver is | |
274 | guaranteed to have this parent as it has all history before |
|
279 | guaranteed to have this parent as it has all history before | |
275 | these changesets. In the case firstparent is nullrev the |
|
280 | these changesets. In the case firstparent is nullrev the | |
276 | changegroup starts with a full revision. |
|
281 | changegroup starts with a full revision. | |
277 |
|
282 | |||
278 | If units is not None, progress detail will be generated, units specifies |
|
283 | If units is not None, progress detail will be generated, units specifies | |
279 | the type of revlog that is touched (changelog, manifest, etc.). |
|
284 | the type of revlog that is touched (changelog, manifest, etc.). | |
280 | """ |
|
285 | """ | |
281 | # if we don't have any revisions touched by these changesets, bail |
|
286 | # if we don't have any revisions touched by these changesets, bail | |
282 | if len(nodelist) == 0: |
|
287 | if len(nodelist) == 0: | |
283 | yield self.close() |
|
288 | yield self.close() | |
284 | return |
|
289 | return | |
285 |
|
290 | |||
286 | # for generaldelta revlogs, we linearize the revs; this will both be |
|
291 | # for generaldelta revlogs, we linearize the revs; this will both be | |
287 | # much quicker and generate a much smaller bundle |
|
292 | # much quicker and generate a much smaller bundle | |
288 | if (revlog._generaldelta and reorder is not False) or reorder: |
|
293 | if (revlog._generaldelta and reorder is not False) or reorder: | |
289 | dag = dagutil.revlogdag(revlog) |
|
294 | dag = dagutil.revlogdag(revlog) | |
290 | revs = set(revlog.rev(n) for n in nodelist) |
|
295 | revs = set(revlog.rev(n) for n in nodelist) | |
291 | revs = dag.linearize(revs) |
|
296 | revs = dag.linearize(revs) | |
292 | else: |
|
297 | else: | |
293 | revs = sorted([revlog.rev(n) for n in nodelist]) |
|
298 | revs = sorted([revlog.rev(n) for n in nodelist]) | |
294 |
|
299 | |||
295 | # add the parent of the first rev |
|
300 | # add the parent of the first rev | |
296 | p = revlog.parentrevs(revs[0])[0] |
|
301 | p = revlog.parentrevs(revs[0])[0] | |
297 | revs.insert(0, p) |
|
302 | revs.insert(0, p) | |
298 |
|
303 | |||
299 | # build deltas |
|
304 | # build deltas | |
300 | total = len(revs) - 1 |
|
305 | total = len(revs) - 1 | |
301 | msgbundling = _('bundling') |
|
306 | msgbundling = _('bundling') | |
302 | for r in xrange(len(revs) - 1): |
|
307 | for r in xrange(len(revs) - 1): | |
303 | if units is not None: |
|
308 | if units is not None: | |
304 | self._progress(msgbundling, r + 1, unit=units, total=total) |
|
309 | self._progress(msgbundling, r + 1, unit=units, total=total) | |
305 | prev, curr = revs[r], revs[r + 1] |
|
310 | prev, curr = revs[r], revs[r + 1] | |
306 | linknode = lookup(revlog.node(curr)) |
|
311 | linknode = lookup(revlog.node(curr)) | |
307 | for c in self.revchunk(revlog, curr, prev, linknode): |
|
312 | for c in self.revchunk(revlog, curr, prev, linknode): | |
308 | yield c |
|
313 | yield c | |
309 |
|
314 | |||
310 | yield self.close() |
|
315 | yield self.close() | |
311 |
|
316 | |||
312 | # filter any nodes that claim to be part of the known set |
|
317 | # filter any nodes that claim to be part of the known set | |
313 | def prune(self, revlog, missing, commonrevs, source): |
|
318 | def prune(self, revlog, missing, commonrevs, source): | |
314 | rr, rl = revlog.rev, revlog.linkrev |
|
319 | rr, rl = revlog.rev, revlog.linkrev | |
315 | return [n for n in missing if rl(rr(n)) not in commonrevs] |
|
320 | return [n for n in missing if rl(rr(n)) not in commonrevs] | |
316 |
|
321 | |||
317 | def generate(self, commonrevs, clnodes, fastpathlinkrev, source): |
|
322 | def generate(self, commonrevs, clnodes, fastpathlinkrev, source): | |
318 | '''yield a sequence of changegroup chunks (strings)''' |
|
323 | '''yield a sequence of changegroup chunks (strings)''' | |
319 | repo = self._repo |
|
324 | repo = self._repo | |
320 | cl = self._changelog |
|
325 | cl = self._changelog | |
321 | mf = self._manifest |
|
326 | mf = self._manifest | |
322 | reorder = self._reorder |
|
327 | reorder = self._reorder | |
323 | progress = self._progress |
|
328 | progress = self._progress | |
324 |
|
329 | |||
325 | # for progress output |
|
330 | # for progress output | |
326 | msgbundling = _('bundling') |
|
331 | msgbundling = _('bundling') | |
327 |
|
332 | |||
328 | clrevorder = {} |
|
333 | clrevorder = {} | |
329 | mfs = {} # needed manifests |
|
334 | mfs = {} # needed manifests | |
330 | fnodes = {} # needed file nodes |
|
335 | fnodes = {} # needed file nodes | |
331 | changedfiles = set() |
|
336 | changedfiles = set() | |
332 |
|
337 | |||
333 | # Callback for the changelog, used to collect changed files and manifest |
|
338 | # Callback for the changelog, used to collect changed files and manifest | |
334 | # nodes. |
|
339 | # nodes. | |
335 | # Returns the linkrev node (identity in the changelog case). |
|
340 | # Returns the linkrev node (identity in the changelog case). | |
336 | def lookupcl(x): |
|
341 | def lookupcl(x): | |
337 | c = cl.read(x) |
|
342 | c = cl.read(x) | |
338 | clrevorder[x] = len(clrevorder) |
|
343 | clrevorder[x] = len(clrevorder) | |
339 | changedfiles.update(c[3]) |
|
344 | changedfiles.update(c[3]) | |
340 | # record the first changeset introducing this manifest version |
|
345 | # record the first changeset introducing this manifest version | |
341 | mfs.setdefault(c[0], x) |
|
346 | mfs.setdefault(c[0], x) | |
342 | return x |
|
347 | return x | |
343 |
|
348 | |||
|
349 | self._verbosenote(_('uncompressed size of bundle content:\n')) | |||
|
350 | size = 0 | |||
344 | for chunk in self.group(clnodes, cl, lookupcl, units=_('changesets'), |
|
351 | for chunk in self.group(clnodes, cl, lookupcl, units=_('changesets'), | |
345 | reorder=reorder): |
|
352 | reorder=reorder): | |
|
353 | size += len(chunk) | |||
346 | yield chunk |
|
354 | yield chunk | |
|
355 | self._verbosenote(_('%8.i (changelog)\n') % size) | |||
347 | progress(msgbundling, None) |
|
356 | progress(msgbundling, None) | |
348 |
|
357 | |||
349 | # Callback for the manifest, used to collect linkrevs for filelog |
|
358 | # Callback for the manifest, used to collect linkrevs for filelog | |
350 | # revisions. |
|
359 | # revisions. | |
351 | # Returns the linkrev node (collected in lookupcl). |
|
360 | # Returns the linkrev node (collected in lookupcl). | |
352 | def lookupmf(x): |
|
361 | def lookupmf(x): | |
353 | clnode = mfs[x] |
|
362 | clnode = mfs[x] | |
354 | if not fastpathlinkrev or reorder: |
|
363 | if not fastpathlinkrev or reorder: | |
355 | mdata = mf.readfast(x) |
|
364 | mdata = mf.readfast(x) | |
356 | for f, n in mdata.iteritems(): |
|
365 | for f, n in mdata.iteritems(): | |
357 | if f in changedfiles: |
|
366 | if f in changedfiles: | |
358 | # record the first changeset introducing this filelog |
|
367 | # record the first changeset introducing this filelog | |
359 | # version |
|
368 | # version | |
360 | fclnodes = fnodes.setdefault(f, {}) |
|
369 | fclnodes = fnodes.setdefault(f, {}) | |
361 | fclnode = fclnodes.setdefault(n, clnode) |
|
370 | fclnode = fclnodes.setdefault(n, clnode) | |
362 | if clrevorder[clnode] < clrevorder[fclnode]: |
|
371 | if clrevorder[clnode] < clrevorder[fclnode]: | |
363 | fclnodes[n] = clnode |
|
372 | fclnodes[n] = clnode | |
364 | return clnode |
|
373 | return clnode | |
365 |
|
374 | |||
366 | mfnodes = self.prune(mf, mfs, commonrevs, source) |
|
375 | mfnodes = self.prune(mf, mfs, commonrevs, source) | |
|
376 | size = 0 | |||
367 | for chunk in self.group(mfnodes, mf, lookupmf, units=_('manifests'), |
|
377 | for chunk in self.group(mfnodes, mf, lookupmf, units=_('manifests'), | |
368 | reorder=reorder): |
|
378 | reorder=reorder): | |
|
379 | size += len(chunk) | |||
369 | yield chunk |
|
380 | yield chunk | |
|
381 | self._verbosenote(_('%8.i (manifests)\n') % size) | |||
370 | progress(msgbundling, None) |
|
382 | progress(msgbundling, None) | |
371 |
|
383 | |||
372 | mfs.clear() |
|
384 | mfs.clear() | |
373 | needed = set(cl.rev(x) for x in clnodes) |
|
385 | needed = set(cl.rev(x) for x in clnodes) | |
374 |
|
386 | |||
375 | def linknodes(filerevlog, fname): |
|
387 | def linknodes(filerevlog, fname): | |
376 | if fastpathlinkrev and not reorder: |
|
388 | if fastpathlinkrev and not reorder: | |
377 | llr = filerevlog.linkrev |
|
389 | llr = filerevlog.linkrev | |
378 | def genfilenodes(): |
|
390 | def genfilenodes(): | |
379 | for r in filerevlog: |
|
391 | for r in filerevlog: | |
380 | linkrev = llr(r) |
|
392 | linkrev = llr(r) | |
381 | if linkrev in needed: |
|
393 | if linkrev in needed: | |
382 | yield filerevlog.node(r), cl.node(linkrev) |
|
394 | yield filerevlog.node(r), cl.node(linkrev) | |
383 | return dict(genfilenodes()) |
|
395 | return dict(genfilenodes()) | |
384 | return fnodes.get(fname, {}) |
|
396 | return fnodes.get(fname, {}) | |
385 |
|
397 | |||
386 | for chunk in self.generatefiles(changedfiles, linknodes, commonrevs, |
|
398 | for chunk in self.generatefiles(changedfiles, linknodes, commonrevs, | |
387 | source): |
|
399 | source): | |
388 | yield chunk |
|
400 | yield chunk | |
389 |
|
401 | |||
390 | yield self.close() |
|
402 | yield self.close() | |
391 | progress(msgbundling, None) |
|
403 | progress(msgbundling, None) | |
392 |
|
404 | |||
393 | if clnodes: |
|
405 | if clnodes: | |
394 | repo.hook('outgoing', node=hex(clnodes[0]), source=source) |
|
406 | repo.hook('outgoing', node=hex(clnodes[0]), source=source) | |
395 |
|
407 | |||
396 | def generatefiles(self, changedfiles, linknodes, commonrevs, source): |
|
408 | def generatefiles(self, changedfiles, linknodes, commonrevs, source): | |
397 | repo = self._repo |
|
409 | repo = self._repo | |
398 | progress = self._progress |
|
410 | progress = self._progress | |
399 | reorder = self._reorder |
|
411 | reorder = self._reorder | |
400 | msgbundling = _('bundling') |
|
412 | msgbundling = _('bundling') | |
401 |
|
413 | |||
402 | total = len(changedfiles) |
|
414 | total = len(changedfiles) | |
403 | # for progress output |
|
415 | # for progress output | |
404 | msgfiles = _('files') |
|
416 | msgfiles = _('files') | |
405 | for i, fname in enumerate(sorted(changedfiles)): |
|
417 | for i, fname in enumerate(sorted(changedfiles)): | |
406 | filerevlog = repo.file(fname) |
|
418 | filerevlog = repo.file(fname) | |
407 | if not filerevlog: |
|
419 | if not filerevlog: | |
408 | raise util.Abort(_("empty or missing revlog for %s") % fname) |
|
420 | raise util.Abort(_("empty or missing revlog for %s") % fname) | |
409 |
|
421 | |||
410 | linkrevnodes = linknodes(filerevlog, fname) |
|
422 | linkrevnodes = linknodes(filerevlog, fname) | |
411 | # Lookup for filenodes, we collected the linkrev nodes above in the |
|
423 | # Lookup for filenodes, we collected the linkrev nodes above in the | |
412 | # fastpath case and with lookupmf in the slowpath case. |
|
424 | # fastpath case and with lookupmf in the slowpath case. | |
413 | def lookupfilelog(x): |
|
425 | def lookupfilelog(x): | |
414 | return linkrevnodes[x] |
|
426 | return linkrevnodes[x] | |
415 |
|
427 | |||
416 | filenodes = self.prune(filerevlog, linkrevnodes, commonrevs, source) |
|
428 | filenodes = self.prune(filerevlog, linkrevnodes, commonrevs, source) | |
417 | if filenodes: |
|
429 | if filenodes: | |
418 | progress(msgbundling, i + 1, item=fname, unit=msgfiles, |
|
430 | progress(msgbundling, i + 1, item=fname, unit=msgfiles, | |
419 | total=total) |
|
431 | total=total) | |
420 |
|
|
432 | h = self.fileheader(fname) | |
|
433 | size = len(h) | |||
|
434 | yield h | |||
421 | for chunk in self.group(filenodes, filerevlog, lookupfilelog, |
|
435 | for chunk in self.group(filenodes, filerevlog, lookupfilelog, | |
422 | reorder=reorder): |
|
436 | reorder=reorder): | |
|
437 | size += len(chunk) | |||
423 | yield chunk |
|
438 | yield chunk | |
|
439 | self._verbosenote(_('%8.i %s\n') % (size, fname)) | |||
424 |
|
440 | |||
425 | def deltaparent(self, revlog, rev, p1, p2, prev): |
|
441 | def deltaparent(self, revlog, rev, p1, p2, prev): | |
426 | return prev |
|
442 | return prev | |
427 |
|
443 | |||
428 | def revchunk(self, revlog, rev, prev, linknode): |
|
444 | def revchunk(self, revlog, rev, prev, linknode): | |
429 | node = revlog.node(rev) |
|
445 | node = revlog.node(rev) | |
430 | p1, p2 = revlog.parentrevs(rev) |
|
446 | p1, p2 = revlog.parentrevs(rev) | |
431 | base = self.deltaparent(revlog, rev, p1, p2, prev) |
|
447 | base = self.deltaparent(revlog, rev, p1, p2, prev) | |
432 |
|
448 | |||
433 | prefix = '' |
|
449 | prefix = '' | |
434 | if base == nullrev: |
|
450 | if base == nullrev: | |
435 | delta = revlog.revision(node) |
|
451 | delta = revlog.revision(node) | |
436 | prefix = mdiff.trivialdiffheader(len(delta)) |
|
452 | prefix = mdiff.trivialdiffheader(len(delta)) | |
437 | else: |
|
453 | else: | |
438 | delta = revlog.revdiff(base, rev) |
|
454 | delta = revlog.revdiff(base, rev) | |
439 | p1n, p2n = revlog.parents(node) |
|
455 | p1n, p2n = revlog.parents(node) | |
440 | basenode = revlog.node(base) |
|
456 | basenode = revlog.node(base) | |
441 | meta = self.builddeltaheader(node, p1n, p2n, basenode, linknode) |
|
457 | meta = self.builddeltaheader(node, p1n, p2n, basenode, linknode) | |
442 | meta += prefix |
|
458 | meta += prefix | |
443 | l = len(meta) + len(delta) |
|
459 | l = len(meta) + len(delta) | |
444 | yield chunkheader(l) |
|
460 | yield chunkheader(l) | |
445 | yield meta |
|
461 | yield meta | |
446 | yield delta |
|
462 | yield delta | |
447 | def builddeltaheader(self, node, p1n, p2n, basenode, linknode): |
|
463 | def builddeltaheader(self, node, p1n, p2n, basenode, linknode): | |
448 | # do nothing with basenode, it is implicitly the previous one in HG10 |
|
464 | # do nothing with basenode, it is implicitly the previous one in HG10 | |
449 | return struct.pack(self.deltaheader, node, p1n, p2n, linknode) |
|
465 | return struct.pack(self.deltaheader, node, p1n, p2n, linknode) | |
450 |
|
466 | |||
451 | class cg2packer(cg1packer): |
|
467 | class cg2packer(cg1packer): | |
452 |
|
468 | |||
453 | deltaheader = _CHANGEGROUPV2_DELTA_HEADER |
|
469 | deltaheader = _CHANGEGROUPV2_DELTA_HEADER | |
454 |
|
470 | |||
455 | def group(self, nodelist, revlog, lookup, units=None, reorder=None): |
|
471 | def group(self, nodelist, revlog, lookup, units=None, reorder=None): | |
456 | if (revlog._generaldelta and reorder is not True): |
|
472 | if (revlog._generaldelta and reorder is not True): | |
457 | reorder = False |
|
473 | reorder = False | |
458 | return super(cg2packer, self).group(nodelist, revlog, lookup, |
|
474 | return super(cg2packer, self).group(nodelist, revlog, lookup, | |
459 | units=units, reorder=reorder) |
|
475 | units=units, reorder=reorder) | |
460 |
|
476 | |||
461 | def deltaparent(self, revlog, rev, p1, p2, prev): |
|
477 | def deltaparent(self, revlog, rev, p1, p2, prev): | |
462 | dp = revlog.deltaparent(rev) |
|
478 | dp = revlog.deltaparent(rev) | |
463 | # avoid storing full revisions; pick prev in those cases |
|
479 | # avoid storing full revisions; pick prev in those cases | |
464 | # also pick prev when we can't be sure remote has dp |
|
480 | # also pick prev when we can't be sure remote has dp | |
465 | if dp == nullrev or (dp != p1 and dp != p2 and dp != prev): |
|
481 | if dp == nullrev or (dp != p1 and dp != p2 and dp != prev): | |
466 | return prev |
|
482 | return prev | |
467 | return dp |
|
483 | return dp | |
468 |
|
484 | |||
469 | def builddeltaheader(self, node, p1n, p2n, basenode, linknode): |
|
485 | def builddeltaheader(self, node, p1n, p2n, basenode, linknode): | |
470 | return struct.pack(self.deltaheader, node, p1n, p2n, basenode, linknode) |
|
486 | return struct.pack(self.deltaheader, node, p1n, p2n, basenode, linknode) | |
471 |
|
487 | |||
472 | packermap = {'01': (cg1packer, cg1unpacker), |
|
488 | packermap = {'01': (cg1packer, cg1unpacker), | |
473 | '02': (cg2packer, cg2unpacker)} |
|
489 | '02': (cg2packer, cg2unpacker)} | |
474 |
|
490 | |||
475 | def _changegroupinfo(repo, nodes, source): |
|
491 | def _changegroupinfo(repo, nodes, source): | |
476 | if repo.ui.verbose or source == 'bundle': |
|
492 | if repo.ui.verbose or source == 'bundle': | |
477 | repo.ui.status(_("%d changesets found\n") % len(nodes)) |
|
493 | repo.ui.status(_("%d changesets found\n") % len(nodes)) | |
478 | if repo.ui.debugflag: |
|
494 | if repo.ui.debugflag: | |
479 | repo.ui.debug("list of changesets:\n") |
|
495 | repo.ui.debug("list of changesets:\n") | |
480 | for node in nodes: |
|
496 | for node in nodes: | |
481 | repo.ui.debug("%s\n" % hex(node)) |
|
497 | repo.ui.debug("%s\n" % hex(node)) | |
482 |
|
498 | |||
483 | def getsubsetraw(repo, outgoing, bundler, source, fastpath=False): |
|
499 | def getsubsetraw(repo, outgoing, bundler, source, fastpath=False): | |
484 | repo = repo.unfiltered() |
|
500 | repo = repo.unfiltered() | |
485 | commonrevs = outgoing.common |
|
501 | commonrevs = outgoing.common | |
486 | csets = outgoing.missing |
|
502 | csets = outgoing.missing | |
487 | heads = outgoing.missingheads |
|
503 | heads = outgoing.missingheads | |
488 | # We go through the fast path if we get told to, or if all (unfiltered |
|
504 | # We go through the fast path if we get told to, or if all (unfiltered | |
489 | # heads have been requested (since we then know there all linkrevs will |
|
505 | # heads have been requested (since we then know there all linkrevs will | |
490 | # be pulled by the client). |
|
506 | # be pulled by the client). | |
491 | heads.sort() |
|
507 | heads.sort() | |
492 | fastpathlinkrev = fastpath or ( |
|
508 | fastpathlinkrev = fastpath or ( | |
493 | repo.filtername is None and heads == sorted(repo.heads())) |
|
509 | repo.filtername is None and heads == sorted(repo.heads())) | |
494 |
|
510 | |||
495 | repo.hook('preoutgoing', throw=True, source=source) |
|
511 | repo.hook('preoutgoing', throw=True, source=source) | |
496 | _changegroupinfo(repo, csets, source) |
|
512 | _changegroupinfo(repo, csets, source) | |
497 | return bundler.generate(commonrevs, csets, fastpathlinkrev, source) |
|
513 | return bundler.generate(commonrevs, csets, fastpathlinkrev, source) | |
498 |
|
514 | |||
499 | def getsubset(repo, outgoing, bundler, source, fastpath=False): |
|
515 | def getsubset(repo, outgoing, bundler, source, fastpath=False): | |
500 | gengroup = getsubsetraw(repo, outgoing, bundler, source, fastpath) |
|
516 | gengroup = getsubsetraw(repo, outgoing, bundler, source, fastpath) | |
501 | return cg1unpacker(util.chunkbuffer(gengroup), 'UN') |
|
517 | return cg1unpacker(util.chunkbuffer(gengroup), 'UN') | |
502 |
|
518 | |||
503 | def changegroupsubset(repo, roots, heads, source): |
|
519 | def changegroupsubset(repo, roots, heads, source): | |
504 | """Compute a changegroup consisting of all the nodes that are |
|
520 | """Compute a changegroup consisting of all the nodes that are | |
505 | descendants of any of the roots and ancestors of any of the heads. |
|
521 | descendants of any of the roots and ancestors of any of the heads. | |
506 | Return a chunkbuffer object whose read() method will return |
|
522 | Return a chunkbuffer object whose read() method will return | |
507 | successive changegroup chunks. |
|
523 | successive changegroup chunks. | |
508 |
|
524 | |||
509 | It is fairly complex as determining which filenodes and which |
|
525 | It is fairly complex as determining which filenodes and which | |
510 | manifest nodes need to be included for the changeset to be complete |
|
526 | manifest nodes need to be included for the changeset to be complete | |
511 | is non-trivial. |
|
527 | is non-trivial. | |
512 |
|
528 | |||
513 | Another wrinkle is doing the reverse, figuring out which changeset in |
|
529 | Another wrinkle is doing the reverse, figuring out which changeset in | |
514 | the changegroup a particular filenode or manifestnode belongs to. |
|
530 | the changegroup a particular filenode or manifestnode belongs to. | |
515 | """ |
|
531 | """ | |
516 | cl = repo.changelog |
|
532 | cl = repo.changelog | |
517 | if not roots: |
|
533 | if not roots: | |
518 | roots = [nullid] |
|
534 | roots = [nullid] | |
519 | # TODO: remove call to nodesbetween. |
|
535 | # TODO: remove call to nodesbetween. | |
520 | csets, roots, heads = cl.nodesbetween(roots, heads) |
|
536 | csets, roots, heads = cl.nodesbetween(roots, heads) | |
521 | discbases = [] |
|
537 | discbases = [] | |
522 | for n in roots: |
|
538 | for n in roots: | |
523 | discbases.extend([p for p in cl.parents(n) if p != nullid]) |
|
539 | discbases.extend([p for p in cl.parents(n) if p != nullid]) | |
524 | outgoing = discovery.outgoing(cl, discbases, heads) |
|
540 | outgoing = discovery.outgoing(cl, discbases, heads) | |
525 | bundler = cg1packer(repo) |
|
541 | bundler = cg1packer(repo) | |
526 | return getsubset(repo, outgoing, bundler, source) |
|
542 | return getsubset(repo, outgoing, bundler, source) | |
527 |
|
543 | |||
528 | def getlocalchangegroupraw(repo, source, outgoing, bundlecaps=None, |
|
544 | def getlocalchangegroupraw(repo, source, outgoing, bundlecaps=None, | |
529 | version='01'): |
|
545 | version='01'): | |
530 | """Like getbundle, but taking a discovery.outgoing as an argument. |
|
546 | """Like getbundle, but taking a discovery.outgoing as an argument. | |
531 |
|
547 | |||
532 | This is only implemented for local repos and reuses potentially |
|
548 | This is only implemented for local repos and reuses potentially | |
533 | precomputed sets in outgoing. Returns a raw changegroup generator.""" |
|
549 | precomputed sets in outgoing. Returns a raw changegroup generator.""" | |
534 | if not outgoing.missing: |
|
550 | if not outgoing.missing: | |
535 | return None |
|
551 | return None | |
536 | bundler = packermap[version][0](repo, bundlecaps) |
|
552 | bundler = packermap[version][0](repo, bundlecaps) | |
537 | return getsubsetraw(repo, outgoing, bundler, source) |
|
553 | return getsubsetraw(repo, outgoing, bundler, source) | |
538 |
|
554 | |||
539 | def getlocalchangegroup(repo, source, outgoing, bundlecaps=None): |
|
555 | def getlocalchangegroup(repo, source, outgoing, bundlecaps=None): | |
540 | """Like getbundle, but taking a discovery.outgoing as an argument. |
|
556 | """Like getbundle, but taking a discovery.outgoing as an argument. | |
541 |
|
557 | |||
542 | This is only implemented for local repos and reuses potentially |
|
558 | This is only implemented for local repos and reuses potentially | |
543 | precomputed sets in outgoing.""" |
|
559 | precomputed sets in outgoing.""" | |
544 | if not outgoing.missing: |
|
560 | if not outgoing.missing: | |
545 | return None |
|
561 | return None | |
546 | bundler = cg1packer(repo, bundlecaps) |
|
562 | bundler = cg1packer(repo, bundlecaps) | |
547 | return getsubset(repo, outgoing, bundler, source) |
|
563 | return getsubset(repo, outgoing, bundler, source) | |
548 |
|
564 | |||
549 | def _computeoutgoing(repo, heads, common): |
|
565 | def _computeoutgoing(repo, heads, common): | |
550 | """Computes which revs are outgoing given a set of common |
|
566 | """Computes which revs are outgoing given a set of common | |
551 | and a set of heads. |
|
567 | and a set of heads. | |
552 |
|
568 | |||
553 | This is a separate function so extensions can have access to |
|
569 | This is a separate function so extensions can have access to | |
554 | the logic. |
|
570 | the logic. | |
555 |
|
571 | |||
556 | Returns a discovery.outgoing object. |
|
572 | Returns a discovery.outgoing object. | |
557 | """ |
|
573 | """ | |
558 | cl = repo.changelog |
|
574 | cl = repo.changelog | |
559 | if common: |
|
575 | if common: | |
560 | hasnode = cl.hasnode |
|
576 | hasnode = cl.hasnode | |
561 | common = [n for n in common if hasnode(n)] |
|
577 | common = [n for n in common if hasnode(n)] | |
562 | else: |
|
578 | else: | |
563 | common = [nullid] |
|
579 | common = [nullid] | |
564 | if not heads: |
|
580 | if not heads: | |
565 | heads = cl.heads() |
|
581 | heads = cl.heads() | |
566 | return discovery.outgoing(cl, common, heads) |
|
582 | return discovery.outgoing(cl, common, heads) | |
567 |
|
583 | |||
568 | def getchangegroupraw(repo, source, heads=None, common=None, bundlecaps=None, |
|
584 | def getchangegroupraw(repo, source, heads=None, common=None, bundlecaps=None, | |
569 | version='01'): |
|
585 | version='01'): | |
570 | """Like changegroupsubset, but returns the set difference between the |
|
586 | """Like changegroupsubset, but returns the set difference between the | |
571 | ancestors of heads and the ancestors common. |
|
587 | ancestors of heads and the ancestors common. | |
572 |
|
588 | |||
573 | If heads is None, use the local heads. If common is None, use [nullid]. |
|
589 | If heads is None, use the local heads. If common is None, use [nullid]. | |
574 |
|
590 | |||
575 | If version is None, use a version '1' changegroup. |
|
591 | If version is None, use a version '1' changegroup. | |
576 |
|
592 | |||
577 | The nodes in common might not all be known locally due to the way the |
|
593 | The nodes in common might not all be known locally due to the way the | |
578 | current discovery protocol works. Returns a raw changegroup generator. |
|
594 | current discovery protocol works. Returns a raw changegroup generator. | |
579 | """ |
|
595 | """ | |
580 | outgoing = _computeoutgoing(repo, heads, common) |
|
596 | outgoing = _computeoutgoing(repo, heads, common) | |
581 | return getlocalchangegroupraw(repo, source, outgoing, bundlecaps=bundlecaps, |
|
597 | return getlocalchangegroupraw(repo, source, outgoing, bundlecaps=bundlecaps, | |
582 | version=version) |
|
598 | version=version) | |
583 |
|
599 | |||
584 | def getchangegroup(repo, source, heads=None, common=None, bundlecaps=None): |
|
600 | def getchangegroup(repo, source, heads=None, common=None, bundlecaps=None): | |
585 | """Like changegroupsubset, but returns the set difference between the |
|
601 | """Like changegroupsubset, but returns the set difference between the | |
586 | ancestors of heads and the ancestors common. |
|
602 | ancestors of heads and the ancestors common. | |
587 |
|
603 | |||
588 | If heads is None, use the local heads. If common is None, use [nullid]. |
|
604 | If heads is None, use the local heads. If common is None, use [nullid]. | |
589 |
|
605 | |||
590 | The nodes in common might not all be known locally due to the way the |
|
606 | The nodes in common might not all be known locally due to the way the | |
591 | current discovery protocol works. |
|
607 | current discovery protocol works. | |
592 | """ |
|
608 | """ | |
593 | outgoing = _computeoutgoing(repo, heads, common) |
|
609 | outgoing = _computeoutgoing(repo, heads, common) | |
594 | return getlocalchangegroup(repo, source, outgoing, bundlecaps=bundlecaps) |
|
610 | return getlocalchangegroup(repo, source, outgoing, bundlecaps=bundlecaps) | |
595 |
|
611 | |||
596 | def changegroup(repo, basenodes, source): |
|
612 | def changegroup(repo, basenodes, source): | |
597 | # to avoid a race we use changegroupsubset() (issue1320) |
|
613 | # to avoid a race we use changegroupsubset() (issue1320) | |
598 | return changegroupsubset(repo, basenodes, repo.heads(), source) |
|
614 | return changegroupsubset(repo, basenodes, repo.heads(), source) | |
599 |
|
615 | |||
600 | def addchangegroupfiles(repo, source, revmap, trp, pr, needfiles): |
|
616 | def addchangegroupfiles(repo, source, revmap, trp, pr, needfiles): | |
601 | revisions = 0 |
|
617 | revisions = 0 | |
602 | files = 0 |
|
618 | files = 0 | |
603 | while True: |
|
619 | while True: | |
604 | chunkdata = source.filelogheader() |
|
620 | chunkdata = source.filelogheader() | |
605 | if not chunkdata: |
|
621 | if not chunkdata: | |
606 | break |
|
622 | break | |
607 | f = chunkdata["filename"] |
|
623 | f = chunkdata["filename"] | |
608 | repo.ui.debug("adding %s revisions\n" % f) |
|
624 | repo.ui.debug("adding %s revisions\n" % f) | |
609 | pr() |
|
625 | pr() | |
610 | fl = repo.file(f) |
|
626 | fl = repo.file(f) | |
611 | o = len(fl) |
|
627 | o = len(fl) | |
612 | if not fl.addgroup(source, revmap, trp): |
|
628 | if not fl.addgroup(source, revmap, trp): | |
613 | raise util.Abort(_("received file revlog group is empty")) |
|
629 | raise util.Abort(_("received file revlog group is empty")) | |
614 | revisions += len(fl) - o |
|
630 | revisions += len(fl) - o | |
615 | files += 1 |
|
631 | files += 1 | |
616 | if f in needfiles: |
|
632 | if f in needfiles: | |
617 | needs = needfiles[f] |
|
633 | needs = needfiles[f] | |
618 | for new in xrange(o, len(fl)): |
|
634 | for new in xrange(o, len(fl)): | |
619 | n = fl.node(new) |
|
635 | n = fl.node(new) | |
620 | if n in needs: |
|
636 | if n in needs: | |
621 | needs.remove(n) |
|
637 | needs.remove(n) | |
622 | else: |
|
638 | else: | |
623 | raise util.Abort( |
|
639 | raise util.Abort( | |
624 | _("received spurious file revlog entry")) |
|
640 | _("received spurious file revlog entry")) | |
625 | if not needs: |
|
641 | if not needs: | |
626 | del needfiles[f] |
|
642 | del needfiles[f] | |
627 | repo.ui.progress(_('files'), None) |
|
643 | repo.ui.progress(_('files'), None) | |
628 |
|
644 | |||
629 | for f, needs in needfiles.iteritems(): |
|
645 | for f, needs in needfiles.iteritems(): | |
630 | fl = repo.file(f) |
|
646 | fl = repo.file(f) | |
631 | for n in needs: |
|
647 | for n in needs: | |
632 | try: |
|
648 | try: | |
633 | fl.rev(n) |
|
649 | fl.rev(n) | |
634 | except error.LookupError: |
|
650 | except error.LookupError: | |
635 | raise util.Abort( |
|
651 | raise util.Abort( | |
636 | _('missing file data for %s:%s - run hg verify') % |
|
652 | _('missing file data for %s:%s - run hg verify') % | |
637 | (f, hex(n))) |
|
653 | (f, hex(n))) | |
638 |
|
654 | |||
639 | return revisions, files |
|
655 | return revisions, files | |
640 |
|
656 | |||
641 | def addchangegroup(repo, source, srctype, url, emptyok=False, |
|
657 | def addchangegroup(repo, source, srctype, url, emptyok=False, | |
642 | targetphase=phases.draft): |
|
658 | targetphase=phases.draft): | |
643 | """Add the changegroup returned by source.read() to this repo. |
|
659 | """Add the changegroup returned by source.read() to this repo. | |
644 | srctype is a string like 'push', 'pull', or 'unbundle'. url is |
|
660 | srctype is a string like 'push', 'pull', or 'unbundle'. url is | |
645 | the URL of the repo where this changegroup is coming from. |
|
661 | the URL of the repo where this changegroup is coming from. | |
646 |
|
662 | |||
647 | Return an integer summarizing the change to this repo: |
|
663 | Return an integer summarizing the change to this repo: | |
648 | - nothing changed or no source: 0 |
|
664 | - nothing changed or no source: 0 | |
649 | - more heads than before: 1+added heads (2..n) |
|
665 | - more heads than before: 1+added heads (2..n) | |
650 | - fewer heads than before: -1-removed heads (-2..-n) |
|
666 | - fewer heads than before: -1-removed heads (-2..-n) | |
651 | - number of heads stays the same: 1 |
|
667 | - number of heads stays the same: 1 | |
652 | """ |
|
668 | """ | |
653 | repo = repo.unfiltered() |
|
669 | repo = repo.unfiltered() | |
654 | def csmap(x): |
|
670 | def csmap(x): | |
655 | repo.ui.debug("add changeset %s\n" % short(x)) |
|
671 | repo.ui.debug("add changeset %s\n" % short(x)) | |
656 | return len(cl) |
|
672 | return len(cl) | |
657 |
|
673 | |||
658 | def revmap(x): |
|
674 | def revmap(x): | |
659 | return cl.rev(x) |
|
675 | return cl.rev(x) | |
660 |
|
676 | |||
661 | if not source: |
|
677 | if not source: | |
662 | return 0 |
|
678 | return 0 | |
663 |
|
679 | |||
664 | changesets = files = revisions = 0 |
|
680 | changesets = files = revisions = 0 | |
665 | efiles = set() |
|
681 | efiles = set() | |
666 |
|
682 | |||
667 | tr = repo.transaction("\n".join([srctype, util.hidepassword(url)])) |
|
683 | tr = repo.transaction("\n".join([srctype, util.hidepassword(url)])) | |
668 | # The transaction could have been created before and already carries source |
|
684 | # The transaction could have been created before and already carries source | |
669 | # information. In this case we use the top level data. We overwrite the |
|
685 | # information. In this case we use the top level data. We overwrite the | |
670 | # argument because we need to use the top level value (if they exist) in |
|
686 | # argument because we need to use the top level value (if they exist) in | |
671 | # this function. |
|
687 | # this function. | |
672 | srctype = tr.hookargs.setdefault('source', srctype) |
|
688 | srctype = tr.hookargs.setdefault('source', srctype) | |
673 | url = tr.hookargs.setdefault('url', url) |
|
689 | url = tr.hookargs.setdefault('url', url) | |
674 |
|
690 | |||
675 | # write changelog data to temp files so concurrent readers will not see |
|
691 | # write changelog data to temp files so concurrent readers will not see | |
676 | # inconsistent view |
|
692 | # inconsistent view | |
677 | cl = repo.changelog |
|
693 | cl = repo.changelog | |
678 | cl.delayupdate(tr) |
|
694 | cl.delayupdate(tr) | |
679 | oldheads = cl.heads() |
|
695 | oldheads = cl.heads() | |
680 | try: |
|
696 | try: | |
681 | repo.hook('prechangegroup', throw=True, **tr.hookargs) |
|
697 | repo.hook('prechangegroup', throw=True, **tr.hookargs) | |
682 |
|
698 | |||
683 | trp = weakref.proxy(tr) |
|
699 | trp = weakref.proxy(tr) | |
684 | # pull off the changeset group |
|
700 | # pull off the changeset group | |
685 | repo.ui.status(_("adding changesets\n")) |
|
701 | repo.ui.status(_("adding changesets\n")) | |
686 | clstart = len(cl) |
|
702 | clstart = len(cl) | |
687 | class prog(object): |
|
703 | class prog(object): | |
688 | step = _('changesets') |
|
704 | step = _('changesets') | |
689 | count = 1 |
|
705 | count = 1 | |
690 | ui = repo.ui |
|
706 | ui = repo.ui | |
691 | total = None |
|
707 | total = None | |
692 | def __call__(repo): |
|
708 | def __call__(repo): | |
693 | repo.ui.progress(repo.step, repo.count, unit=_('chunks'), |
|
709 | repo.ui.progress(repo.step, repo.count, unit=_('chunks'), | |
694 | total=repo.total) |
|
710 | total=repo.total) | |
695 | repo.count += 1 |
|
711 | repo.count += 1 | |
696 | pr = prog() |
|
712 | pr = prog() | |
697 | source.callback = pr |
|
713 | source.callback = pr | |
698 |
|
714 | |||
699 | source.changelogheader() |
|
715 | source.changelogheader() | |
700 | srccontent = cl.addgroup(source, csmap, trp) |
|
716 | srccontent = cl.addgroup(source, csmap, trp) | |
701 | if not (srccontent or emptyok): |
|
717 | if not (srccontent or emptyok): | |
702 | raise util.Abort(_("received changelog group is empty")) |
|
718 | raise util.Abort(_("received changelog group is empty")) | |
703 | clend = len(cl) |
|
719 | clend = len(cl) | |
704 | changesets = clend - clstart |
|
720 | changesets = clend - clstart | |
705 | for c in xrange(clstart, clend): |
|
721 | for c in xrange(clstart, clend): | |
706 | efiles.update(repo[c].files()) |
|
722 | efiles.update(repo[c].files()) | |
707 | efiles = len(efiles) |
|
723 | efiles = len(efiles) | |
708 | repo.ui.progress(_('changesets'), None) |
|
724 | repo.ui.progress(_('changesets'), None) | |
709 |
|
725 | |||
710 | # pull off the manifest group |
|
726 | # pull off the manifest group | |
711 | repo.ui.status(_("adding manifests\n")) |
|
727 | repo.ui.status(_("adding manifests\n")) | |
712 | pr.step = _('manifests') |
|
728 | pr.step = _('manifests') | |
713 | pr.count = 1 |
|
729 | pr.count = 1 | |
714 | pr.total = changesets # manifests <= changesets |
|
730 | pr.total = changesets # manifests <= changesets | |
715 | # no need to check for empty manifest group here: |
|
731 | # no need to check for empty manifest group here: | |
716 | # if the result of the merge of 1 and 2 is the same in 3 and 4, |
|
732 | # if the result of the merge of 1 and 2 is the same in 3 and 4, | |
717 | # no new manifest will be created and the manifest group will |
|
733 | # no new manifest will be created and the manifest group will | |
718 | # be empty during the pull |
|
734 | # be empty during the pull | |
719 | source.manifestheader() |
|
735 | source.manifestheader() | |
720 | repo.manifest.addgroup(source, revmap, trp) |
|
736 | repo.manifest.addgroup(source, revmap, trp) | |
721 | repo.ui.progress(_('manifests'), None) |
|
737 | repo.ui.progress(_('manifests'), None) | |
722 |
|
738 | |||
723 | needfiles = {} |
|
739 | needfiles = {} | |
724 | if repo.ui.configbool('server', 'validate', default=False): |
|
740 | if repo.ui.configbool('server', 'validate', default=False): | |
725 | # validate incoming csets have their manifests |
|
741 | # validate incoming csets have their manifests | |
726 | for cset in xrange(clstart, clend): |
|
742 | for cset in xrange(clstart, clend): | |
727 | mfest = repo.changelog.read(repo.changelog.node(cset))[0] |
|
743 | mfest = repo.changelog.read(repo.changelog.node(cset))[0] | |
728 | mfest = repo.manifest.readdelta(mfest) |
|
744 | mfest = repo.manifest.readdelta(mfest) | |
729 | # store file nodes we must see |
|
745 | # store file nodes we must see | |
730 | for f, n in mfest.iteritems(): |
|
746 | for f, n in mfest.iteritems(): | |
731 | needfiles.setdefault(f, set()).add(n) |
|
747 | needfiles.setdefault(f, set()).add(n) | |
732 |
|
748 | |||
733 | # process the files |
|
749 | # process the files | |
734 | repo.ui.status(_("adding file changes\n")) |
|
750 | repo.ui.status(_("adding file changes\n")) | |
735 | pr.step = _('files') |
|
751 | pr.step = _('files') | |
736 | pr.count = 1 |
|
752 | pr.count = 1 | |
737 | pr.total = efiles |
|
753 | pr.total = efiles | |
738 | source.callback = None |
|
754 | source.callback = None | |
739 |
|
755 | |||
740 | newrevs, newfiles = addchangegroupfiles(repo, source, revmap, trp, pr, |
|
756 | newrevs, newfiles = addchangegroupfiles(repo, source, revmap, trp, pr, | |
741 | needfiles) |
|
757 | needfiles) | |
742 | revisions += newrevs |
|
758 | revisions += newrevs | |
743 | files += newfiles |
|
759 | files += newfiles | |
744 |
|
760 | |||
745 | dh = 0 |
|
761 | dh = 0 | |
746 | if oldheads: |
|
762 | if oldheads: | |
747 | heads = cl.heads() |
|
763 | heads = cl.heads() | |
748 | dh = len(heads) - len(oldheads) |
|
764 | dh = len(heads) - len(oldheads) | |
749 | for h in heads: |
|
765 | for h in heads: | |
750 | if h not in oldheads and repo[h].closesbranch(): |
|
766 | if h not in oldheads and repo[h].closesbranch(): | |
751 | dh -= 1 |
|
767 | dh -= 1 | |
752 | htext = "" |
|
768 | htext = "" | |
753 | if dh: |
|
769 | if dh: | |
754 | htext = _(" (%+d heads)") % dh |
|
770 | htext = _(" (%+d heads)") % dh | |
755 |
|
771 | |||
756 | repo.ui.status(_("added %d changesets" |
|
772 | repo.ui.status(_("added %d changesets" | |
757 | " with %d changes to %d files%s\n") |
|
773 | " with %d changes to %d files%s\n") | |
758 | % (changesets, revisions, files, htext)) |
|
774 | % (changesets, revisions, files, htext)) | |
759 | repo.invalidatevolatilesets() |
|
775 | repo.invalidatevolatilesets() | |
760 |
|
776 | |||
761 | if changesets > 0: |
|
777 | if changesets > 0: | |
762 | p = lambda: tr.writepending() and repo.root or "" |
|
778 | p = lambda: tr.writepending() and repo.root or "" | |
763 | if 'node' not in tr.hookargs: |
|
779 | if 'node' not in tr.hookargs: | |
764 | tr.hookargs['node'] = hex(cl.node(clstart)) |
|
780 | tr.hookargs['node'] = hex(cl.node(clstart)) | |
765 | hookargs = dict(tr.hookargs) |
|
781 | hookargs = dict(tr.hookargs) | |
766 | else: |
|
782 | else: | |
767 | hookargs = dict(tr.hookargs) |
|
783 | hookargs = dict(tr.hookargs) | |
768 | hookargs['node'] = hex(cl.node(clstart)) |
|
784 | hookargs['node'] = hex(cl.node(clstart)) | |
769 | repo.hook('pretxnchangegroup', throw=True, pending=p, **hookargs) |
|
785 | repo.hook('pretxnchangegroup', throw=True, pending=p, **hookargs) | |
770 |
|
786 | |||
771 | added = [cl.node(r) for r in xrange(clstart, clend)] |
|
787 | added = [cl.node(r) for r in xrange(clstart, clend)] | |
772 | publishing = repo.ui.configbool('phases', 'publish', True) |
|
788 | publishing = repo.ui.configbool('phases', 'publish', True) | |
773 | if srctype in ('push', 'serve'): |
|
789 | if srctype in ('push', 'serve'): | |
774 | # Old servers can not push the boundary themselves. |
|
790 | # Old servers can not push the boundary themselves. | |
775 | # New servers won't push the boundary if changeset already |
|
791 | # New servers won't push the boundary if changeset already | |
776 | # exists locally as secret |
|
792 | # exists locally as secret | |
777 | # |
|
793 | # | |
778 | # We should not use added here but the list of all change in |
|
794 | # We should not use added here but the list of all change in | |
779 | # the bundle |
|
795 | # the bundle | |
780 | if publishing: |
|
796 | if publishing: | |
781 | phases.advanceboundary(repo, tr, phases.public, srccontent) |
|
797 | phases.advanceboundary(repo, tr, phases.public, srccontent) | |
782 | else: |
|
798 | else: | |
783 | # Those changesets have been pushed from the outside, their |
|
799 | # Those changesets have been pushed from the outside, their | |
784 | # phases are going to be pushed alongside. Therefor |
|
800 | # phases are going to be pushed alongside. Therefor | |
785 | # `targetphase` is ignored. |
|
801 | # `targetphase` is ignored. | |
786 | phases.advanceboundary(repo, tr, phases.draft, srccontent) |
|
802 | phases.advanceboundary(repo, tr, phases.draft, srccontent) | |
787 | phases.retractboundary(repo, tr, phases.draft, added) |
|
803 | phases.retractboundary(repo, tr, phases.draft, added) | |
788 | elif srctype != 'strip': |
|
804 | elif srctype != 'strip': | |
789 | # publishing only alter behavior during push |
|
805 | # publishing only alter behavior during push | |
790 | # |
|
806 | # | |
791 | # strip should not touch boundary at all |
|
807 | # strip should not touch boundary at all | |
792 | phases.retractboundary(repo, tr, targetphase, added) |
|
808 | phases.retractboundary(repo, tr, targetphase, added) | |
793 |
|
809 | |||
794 | if changesets > 0: |
|
810 | if changesets > 0: | |
795 | if srctype != 'strip': |
|
811 | if srctype != 'strip': | |
796 | # During strip, branchcache is invalid but coming call to |
|
812 | # During strip, branchcache is invalid but coming call to | |
797 | # `destroyed` will repair it. |
|
813 | # `destroyed` will repair it. | |
798 | # In other case we can safely update cache on disk. |
|
814 | # In other case we can safely update cache on disk. | |
799 | branchmap.updatecache(repo.filtered('served')) |
|
815 | branchmap.updatecache(repo.filtered('served')) | |
800 |
|
816 | |||
801 | def runhooks(): |
|
817 | def runhooks(): | |
802 | # These hooks run when the lock releases, not when the |
|
818 | # These hooks run when the lock releases, not when the | |
803 | # transaction closes. So it's possible for the changelog |
|
819 | # transaction closes. So it's possible for the changelog | |
804 | # to have changed since we last saw it. |
|
820 | # to have changed since we last saw it. | |
805 | if clstart >= len(repo): |
|
821 | if clstart >= len(repo): | |
806 | return |
|
822 | return | |
807 |
|
823 | |||
808 | # forcefully update the on-disk branch cache |
|
824 | # forcefully update the on-disk branch cache | |
809 | repo.ui.debug("updating the branch cache\n") |
|
825 | repo.ui.debug("updating the branch cache\n") | |
810 | repo.hook("changegroup", **hookargs) |
|
826 | repo.hook("changegroup", **hookargs) | |
811 |
|
827 | |||
812 | for n in added: |
|
828 | for n in added: | |
813 | args = hookargs.copy() |
|
829 | args = hookargs.copy() | |
814 | args['node'] = hex(n) |
|
830 | args['node'] = hex(n) | |
815 | repo.hook("incoming", **args) |
|
831 | repo.hook("incoming", **args) | |
816 |
|
832 | |||
817 | newheads = [h for h in repo.heads() if h not in oldheads] |
|
833 | newheads = [h for h in repo.heads() if h not in oldheads] | |
818 | repo.ui.log("incoming", |
|
834 | repo.ui.log("incoming", | |
819 | "%s incoming changes - new heads: %s\n", |
|
835 | "%s incoming changes - new heads: %s\n", | |
820 | len(added), |
|
836 | len(added), | |
821 | ', '.join([hex(c[:6]) for c in newheads])) |
|
837 | ', '.join([hex(c[:6]) for c in newheads])) | |
822 |
|
838 | |||
823 | tr.addpostclose('changegroup-runhooks-%020i' % clstart, |
|
839 | tr.addpostclose('changegroup-runhooks-%020i' % clstart, | |
824 | lambda tr: repo._afterlock(runhooks)) |
|
840 | lambda tr: repo._afterlock(runhooks)) | |
825 |
|
841 | |||
826 | tr.close() |
|
842 | tr.close() | |
827 |
|
843 | |||
828 | finally: |
|
844 | finally: | |
829 | tr.release() |
|
845 | tr.release() | |
830 | # never return 0 here: |
|
846 | # never return 0 here: | |
831 | if dh < 0: |
|
847 | if dh < 0: | |
832 | return dh - 1 |
|
848 | return dh - 1 | |
833 | else: |
|
849 | else: | |
834 | return dh + 1 |
|
850 | return dh + 1 |
@@ -1,1017 +1,1041 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 |
|
2 | |||
3 | Setup: |
|
3 | Setup: | |
4 |
|
4 | |||
5 | $ echo a >> a |
|
5 | $ echo a >> a | |
6 | $ hg ci -Am 'base' |
|
6 | $ hg ci -Am 'base' | |
7 | adding a |
|
7 | adding a | |
8 |
|
8 | |||
9 | Refuse to amend public csets: |
|
9 | Refuse to amend public csets: | |
10 |
|
10 | |||
11 | $ hg phase -r . -p |
|
11 | $ hg phase -r . -p | |
12 | $ hg ci --amend |
|
12 | $ hg ci --amend | |
13 | abort: cannot amend public changesets |
|
13 | abort: cannot amend public changesets | |
14 | [255] |
|
14 | [255] | |
15 | $ hg phase -r . -f -d |
|
15 | $ hg phase -r . -f -d | |
16 |
|
16 | |||
17 | $ echo a >> a |
|
17 | $ echo a >> a | |
18 | $ hg ci -Am 'base1' |
|
18 | $ hg ci -Am 'base1' | |
19 |
|
19 | |||
20 | Nothing to amend: |
|
20 | Nothing to amend: | |
21 |
|
21 | |||
22 | $ hg ci --amend |
|
22 | $ hg ci --amend | |
23 | nothing changed |
|
23 | nothing changed | |
24 | [1] |
|
24 | [1] | |
25 |
|
25 | |||
26 | $ cat >> $HGRCPATH <<EOF |
|
26 | $ cat >> $HGRCPATH <<EOF | |
27 | > [hooks] |
|
27 | > [hooks] | |
28 | > pretxncommit.foo = sh -c "echo \\"pretxncommit \$HG_NODE\\"; hg id -r \$HG_NODE" |
|
28 | > pretxncommit.foo = sh -c "echo \\"pretxncommit \$HG_NODE\\"; hg id -r \$HG_NODE" | |
29 | > EOF |
|
29 | > EOF | |
30 |
|
30 | |||
31 | Amending changeset with changes in working dir: |
|
31 | Amending changeset with changes in working dir: | |
32 | (and check that --message does not trigger an editor) |
|
32 | (and check that --message does not trigger an editor) | |
33 |
|
33 | |||
34 | $ echo a >> a |
|
34 | $ echo a >> a | |
35 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -m 'amend base1' |
|
35 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -m 'amend base1' | |
36 | pretxncommit 43f1ba15f28a50abf0aae529cf8a16bfced7b149 |
|
36 | pretxncommit 43f1ba15f28a50abf0aae529cf8a16bfced7b149 | |
37 | 43f1ba15f28a tip |
|
37 | 43f1ba15f28a tip | |
38 | saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-amend-backup.hg (glob) |
|
38 | saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-amend-backup.hg (glob) | |
39 | $ echo 'pretxncommit.foo = ' >> $HGRCPATH |
|
39 | $ echo 'pretxncommit.foo = ' >> $HGRCPATH | |
40 | $ hg diff -c . |
|
40 | $ hg diff -c . | |
41 | diff -r ad120869acf0 -r 43f1ba15f28a a |
|
41 | diff -r ad120869acf0 -r 43f1ba15f28a a | |
42 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
42 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
43 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
43 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
44 | @@ -1,1 +1,3 @@ |
|
44 | @@ -1,1 +1,3 @@ | |
45 | a |
|
45 | a | |
46 | +a |
|
46 | +a | |
47 | +a |
|
47 | +a | |
48 | $ hg log |
|
48 | $ hg log | |
49 | changeset: 1:43f1ba15f28a |
|
49 | changeset: 1:43f1ba15f28a | |
50 | tag: tip |
|
50 | tag: tip | |
51 | user: test |
|
51 | user: test | |
52 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
52 | date: Thu Jan 01 00:00:00 1970 +0000 | |
53 | summary: amend base1 |
|
53 | summary: amend base1 | |
54 |
|
54 | |||
55 | changeset: 0:ad120869acf0 |
|
55 | changeset: 0:ad120869acf0 | |
56 | user: test |
|
56 | user: test | |
57 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
57 | date: Thu Jan 01 00:00:00 1970 +0000 | |
58 | summary: base |
|
58 | summary: base | |
59 |
|
59 | |||
60 |
|
60 | |||
61 | Check proper abort for empty message |
|
61 | Check proper abort for empty message | |
62 |
|
62 | |||
63 | $ cat > editor.sh << '__EOF__' |
|
63 | $ cat > editor.sh << '__EOF__' | |
64 | > #!/bin/sh |
|
64 | > #!/bin/sh | |
65 | > echo "" > "$1" |
|
65 | > echo "" > "$1" | |
66 | > __EOF__ |
|
66 | > __EOF__ | |
67 | $ echo b > b |
|
67 | $ echo b > b | |
68 | $ hg add b |
|
68 | $ hg add b | |
69 | $ hg summary |
|
69 | $ hg summary | |
70 | parent: 1:43f1ba15f28a tip |
|
70 | parent: 1:43f1ba15f28a tip | |
71 | amend base1 |
|
71 | amend base1 | |
72 | branch: default |
|
72 | branch: default | |
73 | commit: 1 added, 1 unknown |
|
73 | commit: 1 added, 1 unknown | |
74 | update: (current) |
|
74 | update: (current) | |
75 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend |
|
75 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend | |
76 | transaction abort! |
|
76 | transaction abort! | |
77 | rollback completed |
|
77 | rollback completed | |
78 | abort: empty commit message |
|
78 | abort: empty commit message | |
79 | [255] |
|
79 | [255] | |
80 | $ hg summary |
|
80 | $ hg summary | |
81 | parent: 1:43f1ba15f28a tip |
|
81 | parent: 1:43f1ba15f28a tip | |
82 | amend base1 |
|
82 | amend base1 | |
83 | branch: default |
|
83 | branch: default | |
84 | commit: 1 added, 1 unknown |
|
84 | commit: 1 added, 1 unknown | |
85 | update: (current) |
|
85 | update: (current) | |
86 |
|
86 | |||
87 | Add new file: |
|
87 | Add new file: | |
88 | $ hg ci --amend -m 'amend base1 new file' |
|
88 | $ hg ci --amend -m 'amend base1 new file' | |
89 | saved backup bundle to $TESTTMP/.hg/strip-backup/43f1ba15f28a-amend-backup.hg (glob) |
|
89 | saved backup bundle to $TESTTMP/.hg/strip-backup/43f1ba15f28a-amend-backup.hg (glob) | |
90 |
|
90 | |||
91 | Remove file that was added in amended commit: |
|
91 | Remove file that was added in amended commit: | |
92 | (and test logfile option) |
|
92 | (and test logfile option) | |
93 | (and test that logfile option do not trigger an editor) |
|
93 | (and test that logfile option do not trigger an editor) | |
94 |
|
94 | |||
95 | $ hg rm b |
|
95 | $ hg rm b | |
96 | $ echo 'amend base1 remove new file' > ../logfile |
|
96 | $ echo 'amend base1 remove new file' > ../logfile | |
97 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg ci --amend --logfile ../logfile |
|
97 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg ci --amend --logfile ../logfile | |
98 | saved backup bundle to $TESTTMP/.hg/strip-backup/b8e3cb2b3882-amend-backup.hg (glob) |
|
98 | saved backup bundle to $TESTTMP/.hg/strip-backup/b8e3cb2b3882-amend-backup.hg (glob) | |
99 |
|
99 | |||
100 | $ hg cat b |
|
100 | $ hg cat b | |
101 | b: no such file in rev 74609c7f506e |
|
101 | b: no such file in rev 74609c7f506e | |
102 | [1] |
|
102 | [1] | |
103 |
|
103 | |||
104 | No changes, just a different message: |
|
104 | No changes, just a different message: | |
105 |
|
105 | |||
106 | $ hg ci -v --amend -m 'no changes, new message' |
|
106 | $ hg ci -v --amend -m 'no changes, new message' | |
107 | amending changeset 74609c7f506e |
|
107 | amending changeset 74609c7f506e | |
108 | copying changeset 74609c7f506e to ad120869acf0 |
|
108 | copying changeset 74609c7f506e to ad120869acf0 | |
109 | a |
|
109 | a | |
110 | stripping amended changeset 74609c7f506e |
|
110 | stripping amended changeset 74609c7f506e | |
111 | 1 changesets found |
|
111 | 1 changesets found | |
|
112 | uncompressed size of bundle content: | |||
|
113 | 250 (changelog) | |||
|
114 | 143 (manifests) | |||
|
115 | 109 a | |||
112 | saved backup bundle to $TESTTMP/.hg/strip-backup/74609c7f506e-amend-backup.hg (glob) |
|
116 | saved backup bundle to $TESTTMP/.hg/strip-backup/74609c7f506e-amend-backup.hg (glob) | |
113 | 1 changesets found |
|
117 | 1 changesets found | |
|
118 | uncompressed size of bundle content: | |||
|
119 | 246 (changelog) | |||
|
120 | 143 (manifests) | |||
|
121 | 109 a | |||
114 | adding branch |
|
122 | adding branch | |
115 | adding changesets |
|
123 | adding changesets | |
116 | adding manifests |
|
124 | adding manifests | |
117 | adding file changes |
|
125 | adding file changes | |
118 | added 1 changesets with 1 changes to 1 files |
|
126 | added 1 changesets with 1 changes to 1 files | |
119 | committed changeset 1:1cd866679df8 |
|
127 | committed changeset 1:1cd866679df8 | |
120 | $ hg diff -c . |
|
128 | $ hg diff -c . | |
121 | diff -r ad120869acf0 -r 1cd866679df8 a |
|
129 | diff -r ad120869acf0 -r 1cd866679df8 a | |
122 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
130 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
123 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
131 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
124 | @@ -1,1 +1,3 @@ |
|
132 | @@ -1,1 +1,3 @@ | |
125 | a |
|
133 | a | |
126 | +a |
|
134 | +a | |
127 | +a |
|
135 | +a | |
128 | $ hg log |
|
136 | $ hg log | |
129 | changeset: 1:1cd866679df8 |
|
137 | changeset: 1:1cd866679df8 | |
130 | tag: tip |
|
138 | tag: tip | |
131 | user: test |
|
139 | user: test | |
132 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
140 | date: Thu Jan 01 00:00:00 1970 +0000 | |
133 | summary: no changes, new message |
|
141 | summary: no changes, new message | |
134 |
|
142 | |||
135 | changeset: 0:ad120869acf0 |
|
143 | changeset: 0:ad120869acf0 | |
136 | user: test |
|
144 | user: test | |
137 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
145 | date: Thu Jan 01 00:00:00 1970 +0000 | |
138 | summary: base |
|
146 | summary: base | |
139 |
|
147 | |||
140 |
|
148 | |||
141 | Disable default date on commit so when -d isn't given, the old date is preserved: |
|
149 | Disable default date on commit so when -d isn't given, the old date is preserved: | |
142 |
|
150 | |||
143 | $ echo '[defaults]' >> $HGRCPATH |
|
151 | $ echo '[defaults]' >> $HGRCPATH | |
144 | $ echo 'commit=' >> $HGRCPATH |
|
152 | $ echo 'commit=' >> $HGRCPATH | |
145 |
|
153 | |||
146 | Test -u/-d: |
|
154 | Test -u/-d: | |
147 |
|
155 | |||
148 | $ cat > .hg/checkeditform.sh <<EOF |
|
156 | $ cat > .hg/checkeditform.sh <<EOF | |
149 | > env | grep HGEDITFORM |
|
157 | > env | grep HGEDITFORM | |
150 | > true |
|
158 | > true | |
151 | > EOF |
|
159 | > EOF | |
152 | $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -u foo -d '1 0' |
|
160 | $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -u foo -d '1 0' | |
153 | HGEDITFORM=commit.amend.normal |
|
161 | HGEDITFORM=commit.amend.normal | |
154 | saved backup bundle to $TESTTMP/.hg/strip-backup/1cd866679df8-amend-backup.hg (glob) |
|
162 | saved backup bundle to $TESTTMP/.hg/strip-backup/1cd866679df8-amend-backup.hg (glob) | |
155 | $ echo a >> a |
|
163 | $ echo a >> a | |
156 | $ hg ci --amend -u foo -d '1 0' |
|
164 | $ hg ci --amend -u foo -d '1 0' | |
157 | saved backup bundle to $TESTTMP/.hg/strip-backup/780e6f23e03d-amend-backup.hg (glob) |
|
165 | saved backup bundle to $TESTTMP/.hg/strip-backup/780e6f23e03d-amend-backup.hg (glob) | |
158 | $ hg log -r . |
|
166 | $ hg log -r . | |
159 | changeset: 1:5f357c7560ab |
|
167 | changeset: 1:5f357c7560ab | |
160 | tag: tip |
|
168 | tag: tip | |
161 | user: foo |
|
169 | user: foo | |
162 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
170 | date: Thu Jan 01 00:00:01 1970 +0000 | |
163 | summary: no changes, new message |
|
171 | summary: no changes, new message | |
164 |
|
172 | |||
165 |
|
173 | |||
166 | Open editor with old commit message if a message isn't given otherwise: |
|
174 | Open editor with old commit message if a message isn't given otherwise: | |
167 |
|
175 | |||
168 | $ cat > editor.sh << '__EOF__' |
|
176 | $ cat > editor.sh << '__EOF__' | |
169 | > #!/bin/sh |
|
177 | > #!/bin/sh | |
170 | > cat $1 |
|
178 | > cat $1 | |
171 | > echo "another precious commit message" > "$1" |
|
179 | > echo "another precious commit message" > "$1" | |
172 | > __EOF__ |
|
180 | > __EOF__ | |
173 |
|
181 | |||
174 | at first, test saving last-message.txt |
|
182 | at first, test saving last-message.txt | |
175 |
|
183 | |||
176 | $ cat > .hg/hgrc << '__EOF__' |
|
184 | $ cat > .hg/hgrc << '__EOF__' | |
177 | > [hooks] |
|
185 | > [hooks] | |
178 | > pretxncommit.test-saving-last-message = false |
|
186 | > pretxncommit.test-saving-last-message = false | |
179 | > __EOF__ |
|
187 | > __EOF__ | |
180 |
|
188 | |||
181 | $ rm -f .hg/last-message.txt |
|
189 | $ rm -f .hg/last-message.txt | |
182 | $ hg commit --amend -v -m "message given from command line" |
|
190 | $ hg commit --amend -v -m "message given from command line" | |
183 | amending changeset 5f357c7560ab |
|
191 | amending changeset 5f357c7560ab | |
184 | copying changeset 5f357c7560ab to ad120869acf0 |
|
192 | copying changeset 5f357c7560ab to ad120869acf0 | |
185 | a |
|
193 | a | |
186 | running hook pretxncommit.test-saving-last-message: false |
|
194 | running hook pretxncommit.test-saving-last-message: false | |
187 | transaction abort! |
|
195 | transaction abort! | |
188 | rollback completed |
|
196 | rollback completed | |
189 | abort: pretxncommit.test-saving-last-message hook exited with status 1 |
|
197 | abort: pretxncommit.test-saving-last-message hook exited with status 1 | |
190 | [255] |
|
198 | [255] | |
191 | $ cat .hg/last-message.txt |
|
199 | $ cat .hg/last-message.txt | |
192 | message given from command line (no-eol) |
|
200 | message given from command line (no-eol) | |
193 |
|
201 | |||
194 | $ rm -f .hg/last-message.txt |
|
202 | $ rm -f .hg/last-message.txt | |
195 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v |
|
203 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v | |
196 | amending changeset 5f357c7560ab |
|
204 | amending changeset 5f357c7560ab | |
197 | copying changeset 5f357c7560ab to ad120869acf0 |
|
205 | copying changeset 5f357c7560ab to ad120869acf0 | |
198 | no changes, new message |
|
206 | no changes, new message | |
199 |
|
207 | |||
200 |
|
208 | |||
201 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
209 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
202 | HG: Leave message empty to abort commit. |
|
210 | HG: Leave message empty to abort commit. | |
203 | HG: -- |
|
211 | HG: -- | |
204 | HG: user: foo |
|
212 | HG: user: foo | |
205 | HG: branch 'default' |
|
213 | HG: branch 'default' | |
206 | HG: changed a |
|
214 | HG: changed a | |
207 | a |
|
215 | a | |
208 | running hook pretxncommit.test-saving-last-message: false |
|
216 | running hook pretxncommit.test-saving-last-message: false | |
209 | transaction abort! |
|
217 | transaction abort! | |
210 | rollback completed |
|
218 | rollback completed | |
211 | abort: pretxncommit.test-saving-last-message hook exited with status 1 |
|
219 | abort: pretxncommit.test-saving-last-message hook exited with status 1 | |
212 | [255] |
|
220 | [255] | |
213 |
|
221 | |||
214 | $ cat .hg/last-message.txt |
|
222 | $ cat .hg/last-message.txt | |
215 | another precious commit message |
|
223 | another precious commit message | |
216 |
|
224 | |||
217 | $ cat > .hg/hgrc << '__EOF__' |
|
225 | $ cat > .hg/hgrc << '__EOF__' | |
218 | > [hooks] |
|
226 | > [hooks] | |
219 | > pretxncommit.test-saving-last-message = |
|
227 | > pretxncommit.test-saving-last-message = | |
220 | > __EOF__ |
|
228 | > __EOF__ | |
221 |
|
229 | |||
222 | then, test editing custom commit message |
|
230 | then, test editing custom commit message | |
223 |
|
231 | |||
224 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v |
|
232 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v | |
225 | amending changeset 5f357c7560ab |
|
233 | amending changeset 5f357c7560ab | |
226 | copying changeset 5f357c7560ab to ad120869acf0 |
|
234 | copying changeset 5f357c7560ab to ad120869acf0 | |
227 | no changes, new message |
|
235 | no changes, new message | |
228 |
|
236 | |||
229 |
|
237 | |||
230 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
238 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
231 | HG: Leave message empty to abort commit. |
|
239 | HG: Leave message empty to abort commit. | |
232 | HG: -- |
|
240 | HG: -- | |
233 | HG: user: foo |
|
241 | HG: user: foo | |
234 | HG: branch 'default' |
|
242 | HG: branch 'default' | |
235 | HG: changed a |
|
243 | HG: changed a | |
236 | a |
|
244 | a | |
237 | stripping amended changeset 5f357c7560ab |
|
245 | stripping amended changeset 5f357c7560ab | |
238 | 1 changesets found |
|
246 | 1 changesets found | |
|
247 | uncompressed size of bundle content: | |||
|
248 | 238 (changelog) | |||
|
249 | 143 (manifests) | |||
|
250 | 111 a | |||
239 | saved backup bundle to $TESTTMP/.hg/strip-backup/5f357c7560ab-amend-backup.hg (glob) |
|
251 | saved backup bundle to $TESTTMP/.hg/strip-backup/5f357c7560ab-amend-backup.hg (glob) | |
240 | 1 changesets found |
|
252 | 1 changesets found | |
|
253 | uncompressed size of bundle content: | |||
|
254 | 246 (changelog) | |||
|
255 | 143 (manifests) | |||
|
256 | 111 a | |||
241 | adding branch |
|
257 | adding branch | |
242 | adding changesets |
|
258 | adding changesets | |
243 | adding manifests |
|
259 | adding manifests | |
244 | adding file changes |
|
260 | adding file changes | |
245 | added 1 changesets with 1 changes to 1 files |
|
261 | added 1 changesets with 1 changes to 1 files | |
246 | committed changeset 1:7ab3bf440b54 |
|
262 | committed changeset 1:7ab3bf440b54 | |
247 |
|
263 | |||
248 | Same, but with changes in working dir (different code path): |
|
264 | Same, but with changes in working dir (different code path): | |
249 |
|
265 | |||
250 | $ echo a >> a |
|
266 | $ echo a >> a | |
251 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v |
|
267 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v | |
252 | amending changeset 7ab3bf440b54 |
|
268 | amending changeset 7ab3bf440b54 | |
253 | a |
|
269 | a | |
254 | copying changeset a0ea9b1a4c8c to ad120869acf0 |
|
270 | copying changeset a0ea9b1a4c8c to ad120869acf0 | |
255 | another precious commit message |
|
271 | another precious commit message | |
256 |
|
272 | |||
257 |
|
273 | |||
258 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
274 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
259 | HG: Leave message empty to abort commit. |
|
275 | HG: Leave message empty to abort commit. | |
260 | HG: -- |
|
276 | HG: -- | |
261 | HG: user: foo |
|
277 | HG: user: foo | |
262 | HG: branch 'default' |
|
278 | HG: branch 'default' | |
263 | HG: changed a |
|
279 | HG: changed a | |
264 | a |
|
280 | a | |
265 | stripping intermediate changeset a0ea9b1a4c8c |
|
281 | stripping intermediate changeset a0ea9b1a4c8c | |
266 | stripping amended changeset 7ab3bf440b54 |
|
282 | stripping amended changeset 7ab3bf440b54 | |
267 | 2 changesets found |
|
283 | 2 changesets found | |
|
284 | uncompressed size of bundle content: | |||
|
285 | 450 (changelog) | |||
|
286 | 282 (manifests) | |||
|
287 | 209 a | |||
268 | saved backup bundle to $TESTTMP/.hg/strip-backup/7ab3bf440b54-amend-backup.hg (glob) |
|
288 | saved backup bundle to $TESTTMP/.hg/strip-backup/7ab3bf440b54-amend-backup.hg (glob) | |
269 | 1 changesets found |
|
289 | 1 changesets found | |
|
290 | uncompressed size of bundle content: | |||
|
291 | 246 (changelog) | |||
|
292 | 143 (manifests) | |||
|
293 | 113 a | |||
270 | adding branch |
|
294 | adding branch | |
271 | adding changesets |
|
295 | adding changesets | |
272 | adding manifests |
|
296 | adding manifests | |
273 | adding file changes |
|
297 | adding file changes | |
274 | added 1 changesets with 1 changes to 1 files |
|
298 | added 1 changesets with 1 changes to 1 files | |
275 | committed changeset 1:ea22a388757c |
|
299 | committed changeset 1:ea22a388757c | |
276 |
|
300 | |||
277 | $ rm editor.sh |
|
301 | $ rm editor.sh | |
278 | $ hg log -r . |
|
302 | $ hg log -r . | |
279 | changeset: 1:ea22a388757c |
|
303 | changeset: 1:ea22a388757c | |
280 | tag: tip |
|
304 | tag: tip | |
281 | user: foo |
|
305 | user: foo | |
282 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
306 | date: Thu Jan 01 00:00:01 1970 +0000 | |
283 | summary: another precious commit message |
|
307 | summary: another precious commit message | |
284 |
|
308 | |||
285 |
|
309 | |||
286 | Moving bookmarks, preserve active bookmark: |
|
310 | Moving bookmarks, preserve active bookmark: | |
287 |
|
311 | |||
288 | $ hg book book1 |
|
312 | $ hg book book1 | |
289 | $ hg book book2 |
|
313 | $ hg book book2 | |
290 | $ hg ci --amend -m 'move bookmarks' |
|
314 | $ hg ci --amend -m 'move bookmarks' | |
291 | saved backup bundle to $TESTTMP/.hg/strip-backup/ea22a388757c-amend-backup.hg (glob) |
|
315 | saved backup bundle to $TESTTMP/.hg/strip-backup/ea22a388757c-amend-backup.hg (glob) | |
292 | $ hg book |
|
316 | $ hg book | |
293 | book1 1:6cec5aa930e2 |
|
317 | book1 1:6cec5aa930e2 | |
294 | * book2 1:6cec5aa930e2 |
|
318 | * book2 1:6cec5aa930e2 | |
295 | $ echo a >> a |
|
319 | $ echo a >> a | |
296 | $ hg ci --amend -m 'move bookmarks' |
|
320 | $ hg ci --amend -m 'move bookmarks' | |
297 | saved backup bundle to $TESTTMP/.hg/strip-backup/6cec5aa930e2-amend-backup.hg (glob) |
|
321 | saved backup bundle to $TESTTMP/.hg/strip-backup/6cec5aa930e2-amend-backup.hg (glob) | |
298 | $ hg book |
|
322 | $ hg book | |
299 | book1 1:48bb6e53a15f |
|
323 | book1 1:48bb6e53a15f | |
300 | * book2 1:48bb6e53a15f |
|
324 | * book2 1:48bb6e53a15f | |
301 |
|
325 | |||
302 | abort does not loose bookmarks |
|
326 | abort does not loose bookmarks | |
303 |
|
327 | |||
304 | $ cat > editor.sh << '__EOF__' |
|
328 | $ cat > editor.sh << '__EOF__' | |
305 | > #!/bin/sh |
|
329 | > #!/bin/sh | |
306 | > echo "" > "$1" |
|
330 | > echo "" > "$1" | |
307 | > __EOF__ |
|
331 | > __EOF__ | |
308 | $ echo a >> a |
|
332 | $ echo a >> a | |
309 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend |
|
333 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend | |
310 | transaction abort! |
|
334 | transaction abort! | |
311 | rollback completed |
|
335 | rollback completed | |
312 | abort: empty commit message |
|
336 | abort: empty commit message | |
313 | [255] |
|
337 | [255] | |
314 | $ hg book |
|
338 | $ hg book | |
315 | book1 1:48bb6e53a15f |
|
339 | book1 1:48bb6e53a15f | |
316 | * book2 1:48bb6e53a15f |
|
340 | * book2 1:48bb6e53a15f | |
317 | $ hg revert -Caq |
|
341 | $ hg revert -Caq | |
318 | $ rm editor.sh |
|
342 | $ rm editor.sh | |
319 |
|
343 | |||
320 | $ echo '[defaults]' >> $HGRCPATH |
|
344 | $ echo '[defaults]' >> $HGRCPATH | |
321 | $ echo "commit=-d '0 0'" >> $HGRCPATH |
|
345 | $ echo "commit=-d '0 0'" >> $HGRCPATH | |
322 |
|
346 | |||
323 | Moving branches: |
|
347 | Moving branches: | |
324 |
|
348 | |||
325 | $ hg branch foo |
|
349 | $ hg branch foo | |
326 | marked working directory as branch foo |
|
350 | marked working directory as branch foo | |
327 | (branches are permanent and global, did you want a bookmark?) |
|
351 | (branches are permanent and global, did you want a bookmark?) | |
328 | $ echo a >> a |
|
352 | $ echo a >> a | |
329 | $ hg ci -m 'branch foo' |
|
353 | $ hg ci -m 'branch foo' | |
330 | $ hg branch default -f |
|
354 | $ hg branch default -f | |
331 | marked working directory as branch default |
|
355 | marked working directory as branch default | |
332 | (branches are permanent and global, did you want a bookmark?) |
|
356 | (branches are permanent and global, did you want a bookmark?) | |
333 | $ hg ci --amend -m 'back to default' |
|
357 | $ hg ci --amend -m 'back to default' | |
334 | saved backup bundle to $TESTTMP/.hg/strip-backup/8ac881fbf49d-amend-backup.hg (glob) |
|
358 | saved backup bundle to $TESTTMP/.hg/strip-backup/8ac881fbf49d-amend-backup.hg (glob) | |
335 | $ hg branches |
|
359 | $ hg branches | |
336 | default 2:ce12b0b57d46 |
|
360 | default 2:ce12b0b57d46 | |
337 |
|
361 | |||
338 | Close branch: |
|
362 | Close branch: | |
339 |
|
363 | |||
340 | $ hg up -q 0 |
|
364 | $ hg up -q 0 | |
341 | $ echo b >> b |
|
365 | $ echo b >> b | |
342 | $ hg branch foo |
|
366 | $ hg branch foo | |
343 | marked working directory as branch foo |
|
367 | marked working directory as branch foo | |
344 | (branches are permanent and global, did you want a bookmark?) |
|
368 | (branches are permanent and global, did you want a bookmark?) | |
345 | $ hg ci -Am 'fork' |
|
369 | $ hg ci -Am 'fork' | |
346 | adding b |
|
370 | adding b | |
347 | $ echo b >> b |
|
371 | $ echo b >> b | |
348 | $ hg ci -mb |
|
372 | $ hg ci -mb | |
349 | $ hg ci --amend --close-branch -m 'closing branch foo' |
|
373 | $ hg ci --amend --close-branch -m 'closing branch foo' | |
350 | saved backup bundle to $TESTTMP/.hg/strip-backup/c962248fa264-amend-backup.hg (glob) |
|
374 | saved backup bundle to $TESTTMP/.hg/strip-backup/c962248fa264-amend-backup.hg (glob) | |
351 |
|
375 | |||
352 | Same thing, different code path: |
|
376 | Same thing, different code path: | |
353 |
|
377 | |||
354 | $ echo b >> b |
|
378 | $ echo b >> b | |
355 | $ hg ci -m 'reopen branch' |
|
379 | $ hg ci -m 'reopen branch' | |
356 | reopening closed branch head 4 |
|
380 | reopening closed branch head 4 | |
357 | $ echo b >> b |
|
381 | $ echo b >> b | |
358 | $ hg ci --amend --close-branch |
|
382 | $ hg ci --amend --close-branch | |
359 | saved backup bundle to $TESTTMP/.hg/strip-backup/027371728205-amend-backup.hg (glob) |
|
383 | saved backup bundle to $TESTTMP/.hg/strip-backup/027371728205-amend-backup.hg (glob) | |
360 | $ hg branches |
|
384 | $ hg branches | |
361 | default 2:ce12b0b57d46 |
|
385 | default 2:ce12b0b57d46 | |
362 |
|
386 | |||
363 | Refuse to amend during a merge: |
|
387 | Refuse to amend during a merge: | |
364 |
|
388 | |||
365 | $ hg up -q default |
|
389 | $ hg up -q default | |
366 | $ hg merge foo |
|
390 | $ hg merge foo | |
367 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
391 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
368 | (branch merge, don't forget to commit) |
|
392 | (branch merge, don't forget to commit) | |
369 | $ hg ci --amend |
|
393 | $ hg ci --amend | |
370 | abort: cannot amend while merging |
|
394 | abort: cannot amend while merging | |
371 | [255] |
|
395 | [255] | |
372 | $ hg ci -m 'merge' |
|
396 | $ hg ci -m 'merge' | |
373 |
|
397 | |||
374 | Follow copies/renames: |
|
398 | Follow copies/renames: | |
375 |
|
399 | |||
376 | $ hg mv b c |
|
400 | $ hg mv b c | |
377 | $ hg ci -m 'b -> c' |
|
401 | $ hg ci -m 'b -> c' | |
378 | $ hg mv c d |
|
402 | $ hg mv c d | |
379 | $ hg ci --amend -m 'b -> d' |
|
403 | $ hg ci --amend -m 'b -> d' | |
380 | saved backup bundle to $TESTTMP/.hg/strip-backup/b8c6eac7f12e-amend-backup.hg (glob) |
|
404 | saved backup bundle to $TESTTMP/.hg/strip-backup/b8c6eac7f12e-amend-backup.hg (glob) | |
381 | $ hg st --rev '.^' --copies d |
|
405 | $ hg st --rev '.^' --copies d | |
382 | A d |
|
406 | A d | |
383 | b |
|
407 | b | |
384 | $ hg cp d e |
|
408 | $ hg cp d e | |
385 | $ hg ci -m 'e = d' |
|
409 | $ hg ci -m 'e = d' | |
386 | $ hg cp e f |
|
410 | $ hg cp e f | |
387 | $ hg ci --amend -m 'f = d' |
|
411 | $ hg ci --amend -m 'f = d' | |
388 | saved backup bundle to $TESTTMP/.hg/strip-backup/7f9761d65613-amend-backup.hg (glob) |
|
412 | saved backup bundle to $TESTTMP/.hg/strip-backup/7f9761d65613-amend-backup.hg (glob) | |
389 | $ hg st --rev '.^' --copies f |
|
413 | $ hg st --rev '.^' --copies f | |
390 | A f |
|
414 | A f | |
391 | d |
|
415 | d | |
392 |
|
416 | |||
393 | $ mv f f.orig |
|
417 | $ mv f f.orig | |
394 | $ hg rm -A f |
|
418 | $ hg rm -A f | |
395 | $ hg ci -m removef |
|
419 | $ hg ci -m removef | |
396 | $ hg cp a f |
|
420 | $ hg cp a f | |
397 | $ mv f.orig f |
|
421 | $ mv f.orig f | |
398 | $ hg ci --amend -m replacef |
|
422 | $ hg ci --amend -m replacef | |
399 | saved backup bundle to $TESTTMP/.hg/strip-backup/9e8c5f7e3d95-amend-backup.hg (glob) |
|
423 | saved backup bundle to $TESTTMP/.hg/strip-backup/9e8c5f7e3d95-amend-backup.hg (glob) | |
400 | $ hg st --change . --copies |
|
424 | $ hg st --change . --copies | |
401 | $ hg log -r . --template "{file_copies}\n" |
|
425 | $ hg log -r . --template "{file_copies}\n" | |
402 |
|
426 | |||
403 |
|
427 | |||
404 | Move added file (issue3410): |
|
428 | Move added file (issue3410): | |
405 |
|
429 | |||
406 | $ echo g >> g |
|
430 | $ echo g >> g | |
407 | $ hg ci -Am g |
|
431 | $ hg ci -Am g | |
408 | adding g |
|
432 | adding g | |
409 | $ hg mv g h |
|
433 | $ hg mv g h | |
410 | $ hg ci --amend |
|
434 | $ hg ci --amend | |
411 | saved backup bundle to $TESTTMP/.hg/strip-backup/24aa8eacce2b-amend-backup.hg (glob) |
|
435 | saved backup bundle to $TESTTMP/.hg/strip-backup/24aa8eacce2b-amend-backup.hg (glob) | |
412 | $ hg st --change . --copies h |
|
436 | $ hg st --change . --copies h | |
413 | A h |
|
437 | A h | |
414 | $ hg log -r . --template "{file_copies}\n" |
|
438 | $ hg log -r . --template "{file_copies}\n" | |
415 |
|
439 | |||
416 |
|
440 | |||
417 | Can't rollback an amend: |
|
441 | Can't rollback an amend: | |
418 |
|
442 | |||
419 | $ hg rollback |
|
443 | $ hg rollback | |
420 | no rollback information available |
|
444 | no rollback information available | |
421 | [1] |
|
445 | [1] | |
422 |
|
446 | |||
423 | Preserve extra dict (issue3430): |
|
447 | Preserve extra dict (issue3430): | |
424 |
|
448 | |||
425 | $ hg branch a |
|
449 | $ hg branch a | |
426 | marked working directory as branch a |
|
450 | marked working directory as branch a | |
427 | (branches are permanent and global, did you want a bookmark?) |
|
451 | (branches are permanent and global, did you want a bookmark?) | |
428 | $ echo a >> a |
|
452 | $ echo a >> a | |
429 | $ hg ci -ma |
|
453 | $ hg ci -ma | |
430 | $ hg ci --amend -m "a'" |
|
454 | $ hg ci --amend -m "a'" | |
431 | saved backup bundle to $TESTTMP/.hg/strip-backup/3837aa2a2fdb-amend-backup.hg (glob) |
|
455 | saved backup bundle to $TESTTMP/.hg/strip-backup/3837aa2a2fdb-amend-backup.hg (glob) | |
432 | $ hg log -r . --template "{branch}\n" |
|
456 | $ hg log -r . --template "{branch}\n" | |
433 | a |
|
457 | a | |
434 | $ hg ci --amend -m "a''" |
|
458 | $ hg ci --amend -m "a''" | |
435 | saved backup bundle to $TESTTMP/.hg/strip-backup/c05c06be7514-amend-backup.hg (glob) |
|
459 | saved backup bundle to $TESTTMP/.hg/strip-backup/c05c06be7514-amend-backup.hg (glob) | |
436 | $ hg log -r . --template "{branch}\n" |
|
460 | $ hg log -r . --template "{branch}\n" | |
437 | a |
|
461 | a | |
438 |
|
462 | |||
439 | Also preserve other entries in the dict that are in the old commit, |
|
463 | Also preserve other entries in the dict that are in the old commit, | |
440 | first graft something so there's an additional entry: |
|
464 | first graft something so there's an additional entry: | |
441 |
|
465 | |||
442 | $ hg up 0 -q |
|
466 | $ hg up 0 -q | |
443 | $ echo z > z |
|
467 | $ echo z > z | |
444 | $ hg ci -Am 'fork' |
|
468 | $ hg ci -Am 'fork' | |
445 | adding z |
|
469 | adding z | |
446 | created new head |
|
470 | created new head | |
447 | $ hg up 11 |
|
471 | $ hg up 11 | |
448 | 5 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
472 | 5 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
449 | $ hg graft 12 |
|
473 | $ hg graft 12 | |
450 | grafting 12:2647734878ef "fork" (tip) |
|
474 | grafting 12:2647734878ef "fork" (tip) | |
451 | $ hg ci --amend -m 'graft amend' |
|
475 | $ hg ci --amend -m 'graft amend' | |
452 | saved backup bundle to $TESTTMP/.hg/strip-backup/bd010aea3f39-amend-backup.hg (glob) |
|
476 | saved backup bundle to $TESTTMP/.hg/strip-backup/bd010aea3f39-amend-backup.hg (glob) | |
453 | $ hg log -r . --debug | grep extra |
|
477 | $ hg log -r . --debug | grep extra | |
454 | extra: amend_source=bd010aea3f39f3fb2a2f884b9ccb0471cd77398e |
|
478 | extra: amend_source=bd010aea3f39f3fb2a2f884b9ccb0471cd77398e | |
455 | extra: branch=a |
|
479 | extra: branch=a | |
456 | extra: source=2647734878ef0236dda712fae9c1651cf694ea8a |
|
480 | extra: source=2647734878ef0236dda712fae9c1651cf694ea8a | |
457 |
|
481 | |||
458 | Preserve phase |
|
482 | Preserve phase | |
459 |
|
483 | |||
460 | $ hg phase '.^::.' |
|
484 | $ hg phase '.^::.' | |
461 | 11: draft |
|
485 | 11: draft | |
462 | 13: draft |
|
486 | 13: draft | |
463 | $ hg phase --secret --force . |
|
487 | $ hg phase --secret --force . | |
464 | $ hg phase '.^::.' |
|
488 | $ hg phase '.^::.' | |
465 | 11: draft |
|
489 | 11: draft | |
466 | 13: secret |
|
490 | 13: secret | |
467 | $ hg commit --amend -m 'amend for phase' -q |
|
491 | $ hg commit --amend -m 'amend for phase' -q | |
468 | $ hg phase '.^::.' |
|
492 | $ hg phase '.^::.' | |
469 | 11: draft |
|
493 | 11: draft | |
470 | 13: secret |
|
494 | 13: secret | |
471 |
|
495 | |||
472 | Test amend with obsolete |
|
496 | Test amend with obsolete | |
473 | --------------------------- |
|
497 | --------------------------- | |
474 |
|
498 | |||
475 | Enable obsolete |
|
499 | Enable obsolete | |
476 |
|
500 | |||
477 | $ cat >> $HGRCPATH << EOF |
|
501 | $ cat >> $HGRCPATH << EOF | |
478 | > [experimental] |
|
502 | > [experimental] | |
479 | > evolution=createmarkers,allowunstable |
|
503 | > evolution=createmarkers,allowunstable | |
480 | > EOF |
|
504 | > EOF | |
481 |
|
505 | |||
482 | Amend with no files changes |
|
506 | Amend with no files changes | |
483 |
|
507 | |||
484 | $ hg id -n |
|
508 | $ hg id -n | |
485 | 13 |
|
509 | 13 | |
486 | $ hg ci --amend -m 'babar' |
|
510 | $ hg ci --amend -m 'babar' | |
487 | $ hg id -n |
|
511 | $ hg id -n | |
488 | 14 |
|
512 | 14 | |
489 | $ hg log -Gl 3 --style=compact |
|
513 | $ hg log -Gl 3 --style=compact | |
490 | @ 14[tip]:11 b650e6ee8614 1970-01-01 00:00 +0000 test |
|
514 | @ 14[tip]:11 b650e6ee8614 1970-01-01 00:00 +0000 test | |
491 | | babar |
|
515 | | babar | |
492 | | |
|
516 | | | |
493 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test |
|
517 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test | |
494 | | | fork |
|
518 | | | fork | |
495 | | | |
|
519 | | | | |
496 | o | 11 3334b7925910 1970-01-01 00:00 +0000 test |
|
520 | o | 11 3334b7925910 1970-01-01 00:00 +0000 test | |
497 | | | a'' |
|
521 | | | a'' | |
498 | | | |
|
522 | | | | |
499 | $ hg log -Gl 4 --hidden --style=compact |
|
523 | $ hg log -Gl 4 --hidden --style=compact | |
500 | @ 14[tip]:11 b650e6ee8614 1970-01-01 00:00 +0000 test |
|
524 | @ 14[tip]:11 b650e6ee8614 1970-01-01 00:00 +0000 test | |
501 | | babar |
|
525 | | babar | |
502 | | |
|
526 | | | |
503 | | x 13:11 68ff8ff97044 1970-01-01 00:00 +0000 test |
|
527 | | x 13:11 68ff8ff97044 1970-01-01 00:00 +0000 test | |
504 | |/ amend for phase |
|
528 | |/ amend for phase | |
505 | | |
|
529 | | | |
506 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test |
|
530 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test | |
507 | | | fork |
|
531 | | | fork | |
508 | | | |
|
532 | | | | |
509 | o | 11 3334b7925910 1970-01-01 00:00 +0000 test |
|
533 | o | 11 3334b7925910 1970-01-01 00:00 +0000 test | |
510 | | | a'' |
|
534 | | | a'' | |
511 | | | |
|
535 | | | | |
512 |
|
536 | |||
513 | Amend with files changes |
|
537 | Amend with files changes | |
514 |
|
538 | |||
515 | (note: the extra commit over 15 is a temporary junk I would be happy to get |
|
539 | (note: the extra commit over 15 is a temporary junk I would be happy to get | |
516 | ride of) |
|
540 | ride of) | |
517 |
|
541 | |||
518 | $ echo 'babar' >> a |
|
542 | $ echo 'babar' >> a | |
519 | $ hg commit --amend |
|
543 | $ hg commit --amend | |
520 | $ hg log -Gl 6 --hidden --style=compact |
|
544 | $ hg log -Gl 6 --hidden --style=compact | |
521 | @ 16[tip]:11 9f9e9bccf56c 1970-01-01 00:00 +0000 test |
|
545 | @ 16[tip]:11 9f9e9bccf56c 1970-01-01 00:00 +0000 test | |
522 | | babar |
|
546 | | babar | |
523 | | |
|
547 | | | |
524 | | x 15 90fef497c56f 1970-01-01 00:00 +0000 test |
|
548 | | x 15 90fef497c56f 1970-01-01 00:00 +0000 test | |
525 | | | temporary amend commit for b650e6ee8614 |
|
549 | | | temporary amend commit for b650e6ee8614 | |
526 | | | |
|
550 | | | | |
527 | | x 14:11 b650e6ee8614 1970-01-01 00:00 +0000 test |
|
551 | | x 14:11 b650e6ee8614 1970-01-01 00:00 +0000 test | |
528 | |/ babar |
|
552 | |/ babar | |
529 | | |
|
553 | | | |
530 | | x 13:11 68ff8ff97044 1970-01-01 00:00 +0000 test |
|
554 | | x 13:11 68ff8ff97044 1970-01-01 00:00 +0000 test | |
531 | |/ amend for phase |
|
555 | |/ amend for phase | |
532 | | |
|
556 | | | |
533 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test |
|
557 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test | |
534 | | | fork |
|
558 | | | fork | |
535 | | | |
|
559 | | | | |
536 | o | 11 3334b7925910 1970-01-01 00:00 +0000 test |
|
560 | o | 11 3334b7925910 1970-01-01 00:00 +0000 test | |
537 | | | a'' |
|
561 | | | a'' | |
538 | | | |
|
562 | | | | |
539 |
|
563 | |||
540 |
|
564 | |||
541 | Test that amend does not make it easy to create obsolescence cycle |
|
565 | Test that amend does not make it easy to create obsolescence cycle | |
542 | --------------------------------------------------------------------- |
|
566 | --------------------------------------------------------------------- | |
543 |
|
567 | |||
544 | $ hg id -r 14 --hidden |
|
568 | $ hg id -r 14 --hidden | |
545 | b650e6ee8614 (a) |
|
569 | b650e6ee8614 (a) | |
546 | $ hg revert -ar 14 --hidden |
|
570 | $ hg revert -ar 14 --hidden | |
547 | reverting a |
|
571 | reverting a | |
548 | $ hg commit --amend |
|
572 | $ hg commit --amend | |
549 | $ hg id |
|
573 | $ hg id | |
550 | b99e5df575f7 (a) tip |
|
574 | b99e5df575f7 (a) tip | |
551 |
|
575 | |||
552 | Test that rewriting leaving instability behind is allowed |
|
576 | Test that rewriting leaving instability behind is allowed | |
553 | --------------------------------------------------------------------- |
|
577 | --------------------------------------------------------------------- | |
554 |
|
578 | |||
555 | $ hg up '.^' |
|
579 | $ hg up '.^' | |
556 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
580 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
557 | $ echo 'b' >> a |
|
581 | $ echo 'b' >> a | |
558 | $ hg log --style compact -r 'children(.)' |
|
582 | $ hg log --style compact -r 'children(.)' | |
559 | 18[tip]:11 b99e5df575f7 1970-01-01 00:00 +0000 test |
|
583 | 18[tip]:11 b99e5df575f7 1970-01-01 00:00 +0000 test | |
560 | babar |
|
584 | babar | |
561 |
|
585 | |||
562 | $ hg commit --amend |
|
586 | $ hg commit --amend | |
563 | $ hg log -r 'unstable()' |
|
587 | $ hg log -r 'unstable()' | |
564 | changeset: 18:b99e5df575f7 |
|
588 | changeset: 18:b99e5df575f7 | |
565 | branch: a |
|
589 | branch: a | |
566 | parent: 11:3334b7925910 |
|
590 | parent: 11:3334b7925910 | |
567 | user: test |
|
591 | user: test | |
568 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
592 | date: Thu Jan 01 00:00:00 1970 +0000 | |
569 | summary: babar |
|
593 | summary: babar | |
570 |
|
594 | |||
571 |
|
595 | |||
572 | Amend a merge changeset (with renames and conflicts from the second parent): |
|
596 | Amend a merge changeset (with renames and conflicts from the second parent): | |
573 |
|
597 | |||
574 | $ hg up -q default |
|
598 | $ hg up -q default | |
575 | $ hg branch -q bar |
|
599 | $ hg branch -q bar | |
576 | $ hg cp a aa |
|
600 | $ hg cp a aa | |
577 | $ hg mv z zz |
|
601 | $ hg mv z zz | |
578 | $ echo cc > cc |
|
602 | $ echo cc > cc | |
579 | $ hg add cc |
|
603 | $ hg add cc | |
580 | $ hg ci -m aazzcc |
|
604 | $ hg ci -m aazzcc | |
581 | $ hg up -q default |
|
605 | $ hg up -q default | |
582 | $ echo a >> a |
|
606 | $ echo a >> a | |
583 | $ echo dd > cc |
|
607 | $ echo dd > cc | |
584 | $ hg add cc |
|
608 | $ hg add cc | |
585 | $ hg ci -m aa |
|
609 | $ hg ci -m aa | |
586 | $ hg merge -q bar |
|
610 | $ hg merge -q bar | |
587 | warning: conflicts during merge. |
|
611 | warning: conflicts during merge. | |
588 | merging cc incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
612 | merging cc incomplete! (edit conflicts, then use 'hg resolve --mark') | |
589 | [1] |
|
613 | [1] | |
590 | $ hg resolve -m cc |
|
614 | $ hg resolve -m cc | |
591 | (no more unresolved files) |
|
615 | (no more unresolved files) | |
592 | $ hg ci -m 'merge bar' |
|
616 | $ hg ci -m 'merge bar' | |
593 | $ hg log --config diff.git=1 -pr . |
|
617 | $ hg log --config diff.git=1 -pr . | |
594 | changeset: 23:93cd4445f720 |
|
618 | changeset: 23:93cd4445f720 | |
595 | tag: tip |
|
619 | tag: tip | |
596 | parent: 22:30d96aeaf27b |
|
620 | parent: 22:30d96aeaf27b | |
597 | parent: 21:1aa437659d19 |
|
621 | parent: 21:1aa437659d19 | |
598 | user: test |
|
622 | user: test | |
599 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
623 | date: Thu Jan 01 00:00:00 1970 +0000 | |
600 | summary: merge bar |
|
624 | summary: merge bar | |
601 |
|
625 | |||
602 | diff --git a/a b/aa |
|
626 | diff --git a/a b/aa | |
603 | copy from a |
|
627 | copy from a | |
604 | copy to aa |
|
628 | copy to aa | |
605 | diff --git a/cc b/cc |
|
629 | diff --git a/cc b/cc | |
606 | --- a/cc |
|
630 | --- a/cc | |
607 | +++ b/cc |
|
631 | +++ b/cc | |
608 | @@ -1,1 +1,5 @@ |
|
632 | @@ -1,1 +1,5 @@ | |
609 | +<<<<<<< local: 30d96aeaf27b - test: aa |
|
633 | +<<<<<<< local: 30d96aeaf27b - test: aa | |
610 | dd |
|
634 | dd | |
611 | +======= |
|
635 | +======= | |
612 | +cc |
|
636 | +cc | |
613 | +>>>>>>> other: 1aa437659d19 bar - test: aazzcc |
|
637 | +>>>>>>> other: 1aa437659d19 bar - test: aazzcc | |
614 | diff --git a/z b/zz |
|
638 | diff --git a/z b/zz | |
615 | rename from z |
|
639 | rename from z | |
616 | rename to zz |
|
640 | rename to zz | |
617 |
|
641 | |||
618 | $ hg debugrename aa |
|
642 | $ hg debugrename aa | |
619 | aa renamed from a:a80d06849b333b8a3d5c445f8ba3142010dcdc9e |
|
643 | aa renamed from a:a80d06849b333b8a3d5c445f8ba3142010dcdc9e | |
620 | $ hg debugrename zz |
|
644 | $ hg debugrename zz | |
621 | zz renamed from z:69a1b67522704ec122181c0890bd16e9d3e7516a |
|
645 | zz renamed from z:69a1b67522704ec122181c0890bd16e9d3e7516a | |
622 | $ hg debugrename cc |
|
646 | $ hg debugrename cc | |
623 | cc not renamed |
|
647 | cc not renamed | |
624 | $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -m 'merge bar (amend message)' --edit |
|
648 | $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -m 'merge bar (amend message)' --edit | |
625 | HGEDITFORM=commit.amend.merge |
|
649 | HGEDITFORM=commit.amend.merge | |
626 | $ hg log --config diff.git=1 -pr . |
|
650 | $ hg log --config diff.git=1 -pr . | |
627 | changeset: 24:832b50f2c271 |
|
651 | changeset: 24:832b50f2c271 | |
628 | tag: tip |
|
652 | tag: tip | |
629 | parent: 22:30d96aeaf27b |
|
653 | parent: 22:30d96aeaf27b | |
630 | parent: 21:1aa437659d19 |
|
654 | parent: 21:1aa437659d19 | |
631 | user: test |
|
655 | user: test | |
632 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
656 | date: Thu Jan 01 00:00:00 1970 +0000 | |
633 | summary: merge bar (amend message) |
|
657 | summary: merge bar (amend message) | |
634 |
|
658 | |||
635 | diff --git a/a b/aa |
|
659 | diff --git a/a b/aa | |
636 | copy from a |
|
660 | copy from a | |
637 | copy to aa |
|
661 | copy to aa | |
638 | diff --git a/cc b/cc |
|
662 | diff --git a/cc b/cc | |
639 | --- a/cc |
|
663 | --- a/cc | |
640 | +++ b/cc |
|
664 | +++ b/cc | |
641 | @@ -1,1 +1,5 @@ |
|
665 | @@ -1,1 +1,5 @@ | |
642 | +<<<<<<< local: 30d96aeaf27b - test: aa |
|
666 | +<<<<<<< local: 30d96aeaf27b - test: aa | |
643 | dd |
|
667 | dd | |
644 | +======= |
|
668 | +======= | |
645 | +cc |
|
669 | +cc | |
646 | +>>>>>>> other: 1aa437659d19 bar - test: aazzcc |
|
670 | +>>>>>>> other: 1aa437659d19 bar - test: aazzcc | |
647 | diff --git a/z b/zz |
|
671 | diff --git a/z b/zz | |
648 | rename from z |
|
672 | rename from z | |
649 | rename to zz |
|
673 | rename to zz | |
650 |
|
674 | |||
651 | $ hg debugrename aa |
|
675 | $ hg debugrename aa | |
652 | aa renamed from a:a80d06849b333b8a3d5c445f8ba3142010dcdc9e |
|
676 | aa renamed from a:a80d06849b333b8a3d5c445f8ba3142010dcdc9e | |
653 | $ hg debugrename zz |
|
677 | $ hg debugrename zz | |
654 | zz renamed from z:69a1b67522704ec122181c0890bd16e9d3e7516a |
|
678 | zz renamed from z:69a1b67522704ec122181c0890bd16e9d3e7516a | |
655 | $ hg debugrename cc |
|
679 | $ hg debugrename cc | |
656 | cc not renamed |
|
680 | cc not renamed | |
657 | $ hg mv zz z |
|
681 | $ hg mv zz z | |
658 | $ hg ci --amend -m 'merge bar (undo rename)' |
|
682 | $ hg ci --amend -m 'merge bar (undo rename)' | |
659 | $ hg log --config diff.git=1 -pr . |
|
683 | $ hg log --config diff.git=1 -pr . | |
660 | changeset: 26:bdafc5c72f74 |
|
684 | changeset: 26:bdafc5c72f74 | |
661 | tag: tip |
|
685 | tag: tip | |
662 | parent: 22:30d96aeaf27b |
|
686 | parent: 22:30d96aeaf27b | |
663 | parent: 21:1aa437659d19 |
|
687 | parent: 21:1aa437659d19 | |
664 | user: test |
|
688 | user: test | |
665 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
689 | date: Thu Jan 01 00:00:00 1970 +0000 | |
666 | summary: merge bar (undo rename) |
|
690 | summary: merge bar (undo rename) | |
667 |
|
691 | |||
668 | diff --git a/a b/aa |
|
692 | diff --git a/a b/aa | |
669 | copy from a |
|
693 | copy from a | |
670 | copy to aa |
|
694 | copy to aa | |
671 | diff --git a/cc b/cc |
|
695 | diff --git a/cc b/cc | |
672 | --- a/cc |
|
696 | --- a/cc | |
673 | +++ b/cc |
|
697 | +++ b/cc | |
674 | @@ -1,1 +1,5 @@ |
|
698 | @@ -1,1 +1,5 @@ | |
675 | +<<<<<<< local: 30d96aeaf27b - test: aa |
|
699 | +<<<<<<< local: 30d96aeaf27b - test: aa | |
676 | dd |
|
700 | dd | |
677 | +======= |
|
701 | +======= | |
678 | +cc |
|
702 | +cc | |
679 | +>>>>>>> other: 1aa437659d19 bar - test: aazzcc |
|
703 | +>>>>>>> other: 1aa437659d19 bar - test: aazzcc | |
680 |
|
704 | |||
681 | $ hg debugrename z |
|
705 | $ hg debugrename z | |
682 | z not renamed |
|
706 | z not renamed | |
683 |
|
707 | |||
684 | Amend a merge changeset (with renames during the merge): |
|
708 | Amend a merge changeset (with renames during the merge): | |
685 |
|
709 | |||
686 | $ hg up -q bar |
|
710 | $ hg up -q bar | |
687 | $ echo x > x |
|
711 | $ echo x > x | |
688 | $ hg add x |
|
712 | $ hg add x | |
689 | $ hg ci -m x |
|
713 | $ hg ci -m x | |
690 | $ hg up -q default |
|
714 | $ hg up -q default | |
691 | $ hg merge -q bar |
|
715 | $ hg merge -q bar | |
692 | $ hg mv aa aaa |
|
716 | $ hg mv aa aaa | |
693 | $ echo aa >> aaa |
|
717 | $ echo aa >> aaa | |
694 | $ hg ci -m 'merge bar again' |
|
718 | $ hg ci -m 'merge bar again' | |
695 | $ hg log --config diff.git=1 -pr . |
|
719 | $ hg log --config diff.git=1 -pr . | |
696 | changeset: 28:32f19415b634 |
|
720 | changeset: 28:32f19415b634 | |
697 | tag: tip |
|
721 | tag: tip | |
698 | parent: 26:bdafc5c72f74 |
|
722 | parent: 26:bdafc5c72f74 | |
699 | parent: 27:4c94d5bc65f5 |
|
723 | parent: 27:4c94d5bc65f5 | |
700 | user: test |
|
724 | user: test | |
701 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
725 | date: Thu Jan 01 00:00:00 1970 +0000 | |
702 | summary: merge bar again |
|
726 | summary: merge bar again | |
703 |
|
727 | |||
704 | diff --git a/aa b/aa |
|
728 | diff --git a/aa b/aa | |
705 | deleted file mode 100644 |
|
729 | deleted file mode 100644 | |
706 | --- a/aa |
|
730 | --- a/aa | |
707 | +++ /dev/null |
|
731 | +++ /dev/null | |
708 | @@ -1,2 +0,0 @@ |
|
732 | @@ -1,2 +0,0 @@ | |
709 | -a |
|
733 | -a | |
710 | -a |
|
734 | -a | |
711 | diff --git a/aaa b/aaa |
|
735 | diff --git a/aaa b/aaa | |
712 | new file mode 100644 |
|
736 | new file mode 100644 | |
713 | --- /dev/null |
|
737 | --- /dev/null | |
714 | +++ b/aaa |
|
738 | +++ b/aaa | |
715 | @@ -0,0 +1,3 @@ |
|
739 | @@ -0,0 +1,3 @@ | |
716 | +a |
|
740 | +a | |
717 | +a |
|
741 | +a | |
718 | +aa |
|
742 | +aa | |
719 | diff --git a/x b/x |
|
743 | diff --git a/x b/x | |
720 | new file mode 100644 |
|
744 | new file mode 100644 | |
721 | --- /dev/null |
|
745 | --- /dev/null | |
722 | +++ b/x |
|
746 | +++ b/x | |
723 | @@ -0,0 +1,1 @@ |
|
747 | @@ -0,0 +1,1 @@ | |
724 | +x |
|
748 | +x | |
725 |
|
749 | |||
726 | $ hg debugrename aaa |
|
750 | $ hg debugrename aaa | |
727 | aaa renamed from aa:37d9b5d994eab34eda9c16b195ace52c7b129980 |
|
751 | aaa renamed from aa:37d9b5d994eab34eda9c16b195ace52c7b129980 | |
728 | $ hg mv aaa aa |
|
752 | $ hg mv aaa aa | |
729 | $ hg ci --amend -m 'merge bar again (undo rename)' |
|
753 | $ hg ci --amend -m 'merge bar again (undo rename)' | |
730 | $ hg log --config diff.git=1 -pr . |
|
754 | $ hg log --config diff.git=1 -pr . | |
731 | changeset: 30:1e2a06b3d312 |
|
755 | changeset: 30:1e2a06b3d312 | |
732 | tag: tip |
|
756 | tag: tip | |
733 | parent: 26:bdafc5c72f74 |
|
757 | parent: 26:bdafc5c72f74 | |
734 | parent: 27:4c94d5bc65f5 |
|
758 | parent: 27:4c94d5bc65f5 | |
735 | user: test |
|
759 | user: test | |
736 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
760 | date: Thu Jan 01 00:00:00 1970 +0000 | |
737 | summary: merge bar again (undo rename) |
|
761 | summary: merge bar again (undo rename) | |
738 |
|
762 | |||
739 | diff --git a/aa b/aa |
|
763 | diff --git a/aa b/aa | |
740 | --- a/aa |
|
764 | --- a/aa | |
741 | +++ b/aa |
|
765 | +++ b/aa | |
742 | @@ -1,2 +1,3 @@ |
|
766 | @@ -1,2 +1,3 @@ | |
743 | a |
|
767 | a | |
744 | a |
|
768 | a | |
745 | +aa |
|
769 | +aa | |
746 | diff --git a/x b/x |
|
770 | diff --git a/x b/x | |
747 | new file mode 100644 |
|
771 | new file mode 100644 | |
748 | --- /dev/null |
|
772 | --- /dev/null | |
749 | +++ b/x |
|
773 | +++ b/x | |
750 | @@ -0,0 +1,1 @@ |
|
774 | @@ -0,0 +1,1 @@ | |
751 | +x |
|
775 | +x | |
752 |
|
776 | |||
753 | $ hg debugrename aa |
|
777 | $ hg debugrename aa | |
754 | aa not renamed |
|
778 | aa not renamed | |
755 | $ hg debugrename -r '.^' aa |
|
779 | $ hg debugrename -r '.^' aa | |
756 | aa renamed from a:a80d06849b333b8a3d5c445f8ba3142010dcdc9e |
|
780 | aa renamed from a:a80d06849b333b8a3d5c445f8ba3142010dcdc9e | |
757 |
|
781 | |||
758 | Amend a merge changeset (with manifest-level conflicts): |
|
782 | Amend a merge changeset (with manifest-level conflicts): | |
759 |
|
783 | |||
760 | $ hg up -q bar |
|
784 | $ hg up -q bar | |
761 | $ hg rm aa |
|
785 | $ hg rm aa | |
762 | $ hg ci -m 'rm aa' |
|
786 | $ hg ci -m 'rm aa' | |
763 | $ hg up -q default |
|
787 | $ hg up -q default | |
764 | $ echo aa >> aa |
|
788 | $ echo aa >> aa | |
765 | $ hg ci -m aa |
|
789 | $ hg ci -m aa | |
766 | $ hg merge -q bar |
|
790 | $ hg merge -q bar | |
767 | local changed aa which remote deleted |
|
791 | local changed aa which remote deleted | |
768 | use (c)hanged version or (d)elete? c |
|
792 | use (c)hanged version or (d)elete? c | |
769 | $ hg ci -m 'merge bar (with conflicts)' |
|
793 | $ hg ci -m 'merge bar (with conflicts)' | |
770 | $ hg log --config diff.git=1 -pr . |
|
794 | $ hg log --config diff.git=1 -pr . | |
771 | changeset: 33:97a298b0c59f |
|
795 | changeset: 33:97a298b0c59f | |
772 | tag: tip |
|
796 | tag: tip | |
773 | parent: 32:3d78ce4226b8 |
|
797 | parent: 32:3d78ce4226b8 | |
774 | parent: 31:67db8847a540 |
|
798 | parent: 31:67db8847a540 | |
775 | user: test |
|
799 | user: test | |
776 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
800 | date: Thu Jan 01 00:00:00 1970 +0000 | |
777 | summary: merge bar (with conflicts) |
|
801 | summary: merge bar (with conflicts) | |
778 |
|
802 | |||
779 |
|
803 | |||
780 | $ hg rm aa |
|
804 | $ hg rm aa | |
781 | $ hg ci --amend -m 'merge bar (with conflicts, amended)' |
|
805 | $ hg ci --amend -m 'merge bar (with conflicts, amended)' | |
782 | $ hg log --config diff.git=1 -pr . |
|
806 | $ hg log --config diff.git=1 -pr . | |
783 | changeset: 35:6de0c1bde1c8 |
|
807 | changeset: 35:6de0c1bde1c8 | |
784 | tag: tip |
|
808 | tag: tip | |
785 | parent: 32:3d78ce4226b8 |
|
809 | parent: 32:3d78ce4226b8 | |
786 | parent: 31:67db8847a540 |
|
810 | parent: 31:67db8847a540 | |
787 | user: test |
|
811 | user: test | |
788 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
812 | date: Thu Jan 01 00:00:00 1970 +0000 | |
789 | summary: merge bar (with conflicts, amended) |
|
813 | summary: merge bar (with conflicts, amended) | |
790 |
|
814 | |||
791 | diff --git a/aa b/aa |
|
815 | diff --git a/aa b/aa | |
792 | deleted file mode 100644 |
|
816 | deleted file mode 100644 | |
793 | --- a/aa |
|
817 | --- a/aa | |
794 | +++ /dev/null |
|
818 | +++ /dev/null | |
795 | @@ -1,4 +0,0 @@ |
|
819 | @@ -1,4 +0,0 @@ | |
796 | -a |
|
820 | -a | |
797 | -a |
|
821 | -a | |
798 | -aa |
|
822 | -aa | |
799 | -aa |
|
823 | -aa | |
800 |
|
824 | |||
801 | Issue 3445: amending with --close-branch a commit that created a new head should fail |
|
825 | Issue 3445: amending with --close-branch a commit that created a new head should fail | |
802 | This shouldn't be possible: |
|
826 | This shouldn't be possible: | |
803 |
|
827 | |||
804 | $ hg up -q default |
|
828 | $ hg up -q default | |
805 | $ hg branch closewithamend |
|
829 | $ hg branch closewithamend | |
806 | marked working directory as branch closewithamend |
|
830 | marked working directory as branch closewithamend | |
807 | (branches are permanent and global, did you want a bookmark?) |
|
831 | (branches are permanent and global, did you want a bookmark?) | |
808 | $ echo foo > foo |
|
832 | $ echo foo > foo | |
809 | $ hg add foo |
|
833 | $ hg add foo | |
810 | $ hg ci -m.. |
|
834 | $ hg ci -m.. | |
811 | $ hg ci --amend --close-branch -m 'closing' |
|
835 | $ hg ci --amend --close-branch -m 'closing' | |
812 | abort: can only close branch heads |
|
836 | abort: can only close branch heads | |
813 | [255] |
|
837 | [255] | |
814 |
|
838 | |||
815 | This silliness fails: |
|
839 | This silliness fails: | |
816 |
|
840 | |||
817 | $ hg branch silliness |
|
841 | $ hg branch silliness | |
818 | marked working directory as branch silliness |
|
842 | marked working directory as branch silliness | |
819 | (branches are permanent and global, did you want a bookmark?) |
|
843 | (branches are permanent and global, did you want a bookmark?) | |
820 | $ echo b >> b |
|
844 | $ echo b >> b | |
821 | $ hg ci --close-branch -m'open and close' |
|
845 | $ hg ci --close-branch -m'open and close' | |
822 | abort: can only close branch heads |
|
846 | abort: can only close branch heads | |
823 | [255] |
|
847 | [255] | |
824 |
|
848 | |||
825 | Test that amend with --secret creates new secret changeset forcibly |
|
849 | Test that amend with --secret creates new secret changeset forcibly | |
826 | --------------------------------------------------------------------- |
|
850 | --------------------------------------------------------------------- | |
827 |
|
851 | |||
828 | $ hg phase '.^::.' |
|
852 | $ hg phase '.^::.' | |
829 | 35: draft |
|
853 | 35: draft | |
830 | 36: draft |
|
854 | 36: draft | |
831 | $ hg commit --amend --secret -m 'amend as secret' -q |
|
855 | $ hg commit --amend --secret -m 'amend as secret' -q | |
832 | $ hg phase '.^::.' |
|
856 | $ hg phase '.^::.' | |
833 | 35: draft |
|
857 | 35: draft | |
834 | 38: secret |
|
858 | 38: secret | |
835 |
|
859 | |||
836 | Test that amend with --edit invokes editor forcibly |
|
860 | Test that amend with --edit invokes editor forcibly | |
837 | --------------------------------------------------- |
|
861 | --------------------------------------------------- | |
838 |
|
862 | |||
839 | $ hg parents --template "{desc}\n" |
|
863 | $ hg parents --template "{desc}\n" | |
840 | amend as secret |
|
864 | amend as secret | |
841 | $ HGEDITOR=cat hg commit --amend -m "editor should be suppressed" |
|
865 | $ HGEDITOR=cat hg commit --amend -m "editor should be suppressed" | |
842 | $ hg parents --template "{desc}\n" |
|
866 | $ hg parents --template "{desc}\n" | |
843 | editor should be suppressed |
|
867 | editor should be suppressed | |
844 |
|
868 | |||
845 | $ hg status --rev '.^1::.' |
|
869 | $ hg status --rev '.^1::.' | |
846 | A foo |
|
870 | A foo | |
847 | $ HGEDITOR=cat hg commit --amend -m "editor should be invoked" --edit |
|
871 | $ HGEDITOR=cat hg commit --amend -m "editor should be invoked" --edit | |
848 | editor should be invoked |
|
872 | editor should be invoked | |
849 |
|
873 | |||
850 |
|
874 | |||
851 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
875 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
852 | HG: Leave message empty to abort commit. |
|
876 | HG: Leave message empty to abort commit. | |
853 | HG: -- |
|
877 | HG: -- | |
854 | HG: user: test |
|
878 | HG: user: test | |
855 | HG: branch 'silliness' |
|
879 | HG: branch 'silliness' | |
856 | HG: added foo |
|
880 | HG: added foo | |
857 | $ hg parents --template "{desc}\n" |
|
881 | $ hg parents --template "{desc}\n" | |
858 | editor should be invoked |
|
882 | editor should be invoked | |
859 |
|
883 | |||
860 | Test that "diff()" in committemplate works correctly for amending |
|
884 | Test that "diff()" in committemplate works correctly for amending | |
861 | ----------------------------------------------------------------- |
|
885 | ----------------------------------------------------------------- | |
862 |
|
886 | |||
863 | $ cat >> .hg/hgrc <<EOF |
|
887 | $ cat >> .hg/hgrc <<EOF | |
864 | > [committemplate] |
|
888 | > [committemplate] | |
865 | > changeset.commit.amend = {desc}\n |
|
889 | > changeset.commit.amend = {desc}\n | |
866 | > HG: M: {file_mods} |
|
890 | > HG: M: {file_mods} | |
867 | > HG: A: {file_adds} |
|
891 | > HG: A: {file_adds} | |
868 | > HG: R: {file_dels} |
|
892 | > HG: R: {file_dels} | |
869 | > {splitlines(diff()) % 'HG: {line}\n'} |
|
893 | > {splitlines(diff()) % 'HG: {line}\n'} | |
870 | > EOF |
|
894 | > EOF | |
871 |
|
895 | |||
872 | $ hg parents --template "M: {file_mods}\nA: {file_adds}\nR: {file_dels}\n" |
|
896 | $ hg parents --template "M: {file_mods}\nA: {file_adds}\nR: {file_dels}\n" | |
873 | M: |
|
897 | M: | |
874 | A: foo |
|
898 | A: foo | |
875 | R: |
|
899 | R: | |
876 | $ hg status -amr |
|
900 | $ hg status -amr | |
877 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of foo" |
|
901 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of foo" | |
878 | expecting diff of foo |
|
902 | expecting diff of foo | |
879 |
|
903 | |||
880 | HG: M: |
|
904 | HG: M: | |
881 | HG: A: foo |
|
905 | HG: A: foo | |
882 | HG: R: |
|
906 | HG: R: | |
883 | HG: diff -r 6de0c1bde1c8 foo |
|
907 | HG: diff -r 6de0c1bde1c8 foo | |
884 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
908 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
885 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
909 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
886 | HG: @@ -0,0 +1,1 @@ |
|
910 | HG: @@ -0,0 +1,1 @@ | |
887 | HG: +foo |
|
911 | HG: +foo | |
888 |
|
912 | |||
889 | $ echo y > y |
|
913 | $ echo y > y | |
890 | $ hg add y |
|
914 | $ hg add y | |
891 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of foo and y" |
|
915 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of foo and y" | |
892 | expecting diff of foo and y |
|
916 | expecting diff of foo and y | |
893 |
|
917 | |||
894 | HG: M: |
|
918 | HG: M: | |
895 | HG: A: foo y |
|
919 | HG: A: foo y | |
896 | HG: R: |
|
920 | HG: R: | |
897 | HG: diff -r 6de0c1bde1c8 foo |
|
921 | HG: diff -r 6de0c1bde1c8 foo | |
898 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
922 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
899 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
923 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
900 | HG: @@ -0,0 +1,1 @@ |
|
924 | HG: @@ -0,0 +1,1 @@ | |
901 | HG: +foo |
|
925 | HG: +foo | |
902 | HG: diff -r 6de0c1bde1c8 y |
|
926 | HG: diff -r 6de0c1bde1c8 y | |
903 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
927 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
904 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 |
|
928 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 | |
905 | HG: @@ -0,0 +1,1 @@ |
|
929 | HG: @@ -0,0 +1,1 @@ | |
906 | HG: +y |
|
930 | HG: +y | |
907 |
|
931 | |||
908 | $ hg rm a |
|
932 | $ hg rm a | |
909 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of a, foo and y" |
|
933 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of a, foo and y" | |
910 | expecting diff of a, foo and y |
|
934 | expecting diff of a, foo and y | |
911 |
|
935 | |||
912 | HG: M: |
|
936 | HG: M: | |
913 | HG: A: foo y |
|
937 | HG: A: foo y | |
914 | HG: R: a |
|
938 | HG: R: a | |
915 | HG: diff -r 6de0c1bde1c8 a |
|
939 | HG: diff -r 6de0c1bde1c8 a | |
916 | HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
940 | HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
917 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
941 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
918 | HG: @@ -1,2 +0,0 @@ |
|
942 | HG: @@ -1,2 +0,0 @@ | |
919 | HG: -a |
|
943 | HG: -a | |
920 | HG: -a |
|
944 | HG: -a | |
921 | HG: diff -r 6de0c1bde1c8 foo |
|
945 | HG: diff -r 6de0c1bde1c8 foo | |
922 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
946 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
923 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
947 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
924 | HG: @@ -0,0 +1,1 @@ |
|
948 | HG: @@ -0,0 +1,1 @@ | |
925 | HG: +foo |
|
949 | HG: +foo | |
926 | HG: diff -r 6de0c1bde1c8 y |
|
950 | HG: diff -r 6de0c1bde1c8 y | |
927 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
951 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
928 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 |
|
952 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 | |
929 | HG: @@ -0,0 +1,1 @@ |
|
953 | HG: @@ -0,0 +1,1 @@ | |
930 | HG: +y |
|
954 | HG: +y | |
931 |
|
955 | |||
932 | $ hg rm x |
|
956 | $ hg rm x | |
933 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of a, foo, x and y" |
|
957 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of a, foo, x and y" | |
934 | expecting diff of a, foo, x and y |
|
958 | expecting diff of a, foo, x and y | |
935 |
|
959 | |||
936 | HG: M: |
|
960 | HG: M: | |
937 | HG: A: foo y |
|
961 | HG: A: foo y | |
938 | HG: R: a x |
|
962 | HG: R: a x | |
939 | HG: diff -r 6de0c1bde1c8 a |
|
963 | HG: diff -r 6de0c1bde1c8 a | |
940 | HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
964 | HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
941 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
965 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
942 | HG: @@ -1,2 +0,0 @@ |
|
966 | HG: @@ -1,2 +0,0 @@ | |
943 | HG: -a |
|
967 | HG: -a | |
944 | HG: -a |
|
968 | HG: -a | |
945 | HG: diff -r 6de0c1bde1c8 foo |
|
969 | HG: diff -r 6de0c1bde1c8 foo | |
946 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
970 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
947 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
971 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
948 | HG: @@ -0,0 +1,1 @@ |
|
972 | HG: @@ -0,0 +1,1 @@ | |
949 | HG: +foo |
|
973 | HG: +foo | |
950 | HG: diff -r 6de0c1bde1c8 x |
|
974 | HG: diff -r 6de0c1bde1c8 x | |
951 | HG: --- a/x Thu Jan 01 00:00:00 1970 +0000 |
|
975 | HG: --- a/x Thu Jan 01 00:00:00 1970 +0000 | |
952 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
976 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
953 | HG: @@ -1,1 +0,0 @@ |
|
977 | HG: @@ -1,1 +0,0 @@ | |
954 | HG: -x |
|
978 | HG: -x | |
955 | HG: diff -r 6de0c1bde1c8 y |
|
979 | HG: diff -r 6de0c1bde1c8 y | |
956 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
980 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
957 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 |
|
981 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 | |
958 | HG: @@ -0,0 +1,1 @@ |
|
982 | HG: @@ -0,0 +1,1 @@ | |
959 | HG: +y |
|
983 | HG: +y | |
960 |
|
984 | |||
961 | Check for issue4405 |
|
985 | Check for issue4405 | |
962 | ------------------- |
|
986 | ------------------- | |
963 |
|
987 | |||
964 | Setup the repo with a file that gets moved in a second commit. |
|
988 | Setup the repo with a file that gets moved in a second commit. | |
965 | $ hg init repo |
|
989 | $ hg init repo | |
966 | $ cd repo |
|
990 | $ cd repo | |
967 | $ touch a0 |
|
991 | $ touch a0 | |
968 | $ hg add a0 |
|
992 | $ hg add a0 | |
969 | $ hg commit -m a0 |
|
993 | $ hg commit -m a0 | |
970 | $ hg mv a0 a1 |
|
994 | $ hg mv a0 a1 | |
971 | $ hg commit -m a1 |
|
995 | $ hg commit -m a1 | |
972 | $ hg up -q 0 |
|
996 | $ hg up -q 0 | |
973 | $ hg log -G --template '{rev} {desc}' |
|
997 | $ hg log -G --template '{rev} {desc}' | |
974 | o 1 a1 |
|
998 | o 1 a1 | |
975 | | |
|
999 | | | |
976 | @ 0 a0 |
|
1000 | @ 0 a0 | |
977 |
|
1001 | |||
978 |
|
1002 | |||
979 | Now we branch the repro, but re-use the file contents, so we have a divergence |
|
1003 | Now we branch the repro, but re-use the file contents, so we have a divergence | |
980 | in the file revlog topology and the changelog topology. |
|
1004 | in the file revlog topology and the changelog topology. | |
981 | $ hg revert --rev 1 --all |
|
1005 | $ hg revert --rev 1 --all | |
982 | removing a0 |
|
1006 | removing a0 | |
983 | adding a1 |
|
1007 | adding a1 | |
984 | $ hg ci -qm 'a1-amend' |
|
1008 | $ hg ci -qm 'a1-amend' | |
985 | $ hg log -G --template '{rev} {desc}' |
|
1009 | $ hg log -G --template '{rev} {desc}' | |
986 | @ 2 a1-amend |
|
1010 | @ 2 a1-amend | |
987 | | |
|
1011 | | | |
988 | | o 1 a1 |
|
1012 | | o 1 a1 | |
989 | |/ |
|
1013 | |/ | |
990 | o 0 a0 |
|
1014 | o 0 a0 | |
991 |
|
1015 | |||
992 |
|
1016 | |||
993 | The way mercurial does amends is to create a temporary commit (rev 3) and then |
|
1017 | The way mercurial does amends is to create a temporary commit (rev 3) and then | |
994 | fold the new and old commits together into another commit (rev 4). During this |
|
1018 | fold the new and old commits together into another commit (rev 4). During this | |
995 | process, _findlimit is called to check how far back to look for the transitive |
|
1019 | process, _findlimit is called to check how far back to look for the transitive | |
996 | closure of file copy information, but due to the divergence of the filelog |
|
1020 | closure of file copy information, but due to the divergence of the filelog | |
997 | and changelog graph topologies, before _findlimit was fixed, it returned a rev |
|
1021 | and changelog graph topologies, before _findlimit was fixed, it returned a rev | |
998 | which was not far enough back in this case. |
|
1022 | which was not far enough back in this case. | |
999 | $ hg mv a1 a2 |
|
1023 | $ hg mv a1 a2 | |
1000 | $ hg status --copies --rev 0 |
|
1024 | $ hg status --copies --rev 0 | |
1001 | A a2 |
|
1025 | A a2 | |
1002 | a0 |
|
1026 | a0 | |
1003 | R a0 |
|
1027 | R a0 | |
1004 | $ hg ci --amend -q |
|
1028 | $ hg ci --amend -q | |
1005 | $ hg log -G --template '{rev} {desc}' |
|
1029 | $ hg log -G --template '{rev} {desc}' | |
1006 | @ 4 a1-amend |
|
1030 | @ 4 a1-amend | |
1007 | | |
|
1031 | | | |
1008 | | o 1 a1 |
|
1032 | | o 1 a1 | |
1009 | |/ |
|
1033 | |/ | |
1010 | o 0 a0 |
|
1034 | o 0 a0 | |
1011 |
|
1035 | |||
1012 |
|
1036 | |||
1013 | Before the fix, the copy information was lost. |
|
1037 | Before the fix, the copy information was lost. | |
1014 | $ hg status --copies --rev 0 |
|
1038 | $ hg status --copies --rev 0 | |
1015 | A a2 |
|
1039 | A a2 | |
1016 | a0 |
|
1040 | a0 | |
1017 | R a0 |
|
1041 | R a0 |
@@ -1,37 +1,42 b'' | |||||
1 |
|
1 | |||
2 | Create a test repository: |
|
2 | Create a test repository: | |
3 |
|
3 | |||
4 | $ hg init repo |
|
4 | $ hg init repo | |
5 | $ cd repo |
|
5 | $ cd repo | |
6 | $ touch a ; hg add a ; hg ci -ma |
|
6 | $ touch a ; hg add a ; hg ci -ma | |
7 | $ touch b ; hg add b ; hg ci -mb |
|
7 | $ touch b ; hg add b ; hg ci -mb | |
8 | $ touch c ; hg add c ; hg ci -mc |
|
8 | $ touch c ; hg add c ; hg ci -mc | |
9 | $ hg bundle --base 0 --rev tip bundle.hg |
|
9 | $ hg bundle --base 0 --rev tip bundle.hg -v | |
10 | 2 changesets found |
|
10 | 2 changesets found | |
|
11 | uncompressed size of bundle content: | |||
|
12 | 332 (changelog) | |||
|
13 | 282 (manifests) | |||
|
14 | 105 b | |||
|
15 | 105 c | |||
11 |
|
16 | |||
12 | Terse output: |
|
17 | Terse output: | |
13 |
|
18 | |||
14 | $ hg debugbundle bundle.hg |
|
19 | $ hg debugbundle bundle.hg | |
15 | 0e067c57feba1a5694ca4844f05588bb1bf82342 |
|
20 | 0e067c57feba1a5694ca4844f05588bb1bf82342 | |
16 | 991a3460af53952d10ec8a295d3d2cc2e5fa9690 |
|
21 | 991a3460af53952d10ec8a295d3d2cc2e5fa9690 | |
17 |
|
22 | |||
18 | Verbose output: |
|
23 | Verbose output: | |
19 |
|
24 | |||
20 | $ hg debugbundle --all bundle.hg |
|
25 | $ hg debugbundle --all bundle.hg | |
21 | format: id, p1, p2, cset, delta base, len(delta) |
|
26 | format: id, p1, p2, cset, delta base, len(delta) | |
22 |
|
27 | |||
23 | changelog |
|
28 | changelog | |
24 | 0e067c57feba1a5694ca4844f05588bb1bf82342 3903775176ed42b1458a6281db4a0ccf4d9f287a 0000000000000000000000000000000000000000 0e067c57feba1a5694ca4844f05588bb1bf82342 3903775176ed42b1458a6281db4a0ccf4d9f287a 80 |
|
29 | 0e067c57feba1a5694ca4844f05588bb1bf82342 3903775176ed42b1458a6281db4a0ccf4d9f287a 0000000000000000000000000000000000000000 0e067c57feba1a5694ca4844f05588bb1bf82342 3903775176ed42b1458a6281db4a0ccf4d9f287a 80 | |
25 | 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 0000000000000000000000000000000000000000 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 80 |
|
30 | 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 0000000000000000000000000000000000000000 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 80 | |
26 |
|
31 | |||
27 | manifest |
|
32 | manifest | |
28 | 686dbf0aeca417636fa26a9121c681eabbb15a20 8515d4bfda768e04af4c13a69a72e28c7effbea7 0000000000000000000000000000000000000000 0e067c57feba1a5694ca4844f05588bb1bf82342 8515d4bfda768e04af4c13a69a72e28c7effbea7 55 |
|
33 | 686dbf0aeca417636fa26a9121c681eabbb15a20 8515d4bfda768e04af4c13a69a72e28c7effbea7 0000000000000000000000000000000000000000 0e067c57feba1a5694ca4844f05588bb1bf82342 8515d4bfda768e04af4c13a69a72e28c7effbea7 55 | |
29 | ae25a31b30b3490a981e7b96a3238cc69583fda1 686dbf0aeca417636fa26a9121c681eabbb15a20 0000000000000000000000000000000000000000 991a3460af53952d10ec8a295d3d2cc2e5fa9690 686dbf0aeca417636fa26a9121c681eabbb15a20 55 |
|
34 | ae25a31b30b3490a981e7b96a3238cc69583fda1 686dbf0aeca417636fa26a9121c681eabbb15a20 0000000000000000000000000000000000000000 991a3460af53952d10ec8a295d3d2cc2e5fa9690 686dbf0aeca417636fa26a9121c681eabbb15a20 55 | |
30 |
|
35 | |||
31 | b |
|
36 | b | |
32 | b80de5d138758541c5f05265ad144ab9fa86d1db 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 0e067c57feba1a5694ca4844f05588bb1bf82342 0000000000000000000000000000000000000000 12 |
|
37 | b80de5d138758541c5f05265ad144ab9fa86d1db 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 0e067c57feba1a5694ca4844f05588bb1bf82342 0000000000000000000000000000000000000000 12 | |
33 |
|
38 | |||
34 | c |
|
39 | c | |
35 | b80de5d138758541c5f05265ad144ab9fa86d1db 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0000000000000000000000000000000000000000 12 |
|
40 | b80de5d138758541c5f05265ad144ab9fa86d1db 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0000000000000000000000000000000000000000 12 | |
36 |
|
41 | |||
37 | $ cd .. |
|
42 | $ cd .. |
@@ -1,1823 +1,1834 b'' | |||||
1 | This file used to contains all largefile tests. |
|
1 | This file used to contains all largefile tests. | |
2 | Do not add any new tests in this file as it his already far too long to run. |
|
2 | Do not add any new tests in this file as it his already far too long to run. | |
3 |
|
3 | |||
4 | It contains all the testing of the basic concepts of large file in a single block. |
|
4 | It contains all the testing of the basic concepts of large file in a single block. | |
5 |
|
5 | |||
6 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE |
|
6 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE | |
7 | $ mkdir "${USERCACHE}" |
|
7 | $ mkdir "${USERCACHE}" | |
8 | $ cat >> $HGRCPATH <<EOF |
|
8 | $ cat >> $HGRCPATH <<EOF | |
9 | > [extensions] |
|
9 | > [extensions] | |
10 | > largefiles= |
|
10 | > largefiles= | |
11 | > purge= |
|
11 | > purge= | |
12 | > rebase= |
|
12 | > rebase= | |
13 | > transplant= |
|
13 | > transplant= | |
14 | > [phases] |
|
14 | > [phases] | |
15 | > publish=False |
|
15 | > publish=False | |
16 | > [largefiles] |
|
16 | > [largefiles] | |
17 | > minsize=2 |
|
17 | > minsize=2 | |
18 | > patterns=glob:**.dat |
|
18 | > patterns=glob:**.dat | |
19 | > usercache=${USERCACHE} |
|
19 | > usercache=${USERCACHE} | |
20 | > [hooks] |
|
20 | > [hooks] | |
21 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" |
|
21 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" | |
22 | > EOF |
|
22 | > EOF | |
23 |
|
23 | |||
24 | Create the repo with a couple of revisions of both large and normal |
|
24 | Create the repo with a couple of revisions of both large and normal | |
25 | files. |
|
25 | files. | |
26 | Test status and dirstate of largefiles and that summary output is correct. |
|
26 | Test status and dirstate of largefiles and that summary output is correct. | |
27 |
|
27 | |||
28 | $ hg init a |
|
28 | $ hg init a | |
29 | $ cd a |
|
29 | $ cd a | |
30 | $ mkdir sub |
|
30 | $ mkdir sub | |
31 | $ echo normal1 > normal1 |
|
31 | $ echo normal1 > normal1 | |
32 | $ echo normal2 > sub/normal2 |
|
32 | $ echo normal2 > sub/normal2 | |
33 | $ echo large1 > large1 |
|
33 | $ echo large1 > large1 | |
34 | $ echo large2 > sub/large2 |
|
34 | $ echo large2 > sub/large2 | |
35 | $ hg add normal1 sub/normal2 |
|
35 | $ hg add normal1 sub/normal2 | |
36 | $ hg add --large large1 sub/large2 |
|
36 | $ hg add --large large1 sub/large2 | |
37 | $ hg commit -m "add files" |
|
37 | $ hg commit -m "add files" | |
38 | Invoking status precommit hook |
|
38 | Invoking status precommit hook | |
39 | A large1 |
|
39 | A large1 | |
40 | A normal1 |
|
40 | A normal1 | |
41 | A sub/large2 |
|
41 | A sub/large2 | |
42 | A sub/normal2 |
|
42 | A sub/normal2 | |
43 | $ touch large1 sub/large2 |
|
43 | $ touch large1 sub/large2 | |
44 | $ sleep 1 |
|
44 | $ sleep 1 | |
45 | $ hg st |
|
45 | $ hg st | |
46 | $ hg debugstate --nodates |
|
46 | $ hg debugstate --nodates | |
47 | n 644 41 .hglf/large1 |
|
47 | n 644 41 .hglf/large1 | |
48 | n 644 41 .hglf/sub/large2 |
|
48 | n 644 41 .hglf/sub/large2 | |
49 | n 644 8 normal1 |
|
49 | n 644 8 normal1 | |
50 | n 644 8 sub/normal2 |
|
50 | n 644 8 sub/normal2 | |
51 | $ hg debugstate --large --nodates |
|
51 | $ hg debugstate --large --nodates | |
52 | n 644 7 large1 |
|
52 | n 644 7 large1 | |
53 | n 644 7 sub/large2 |
|
53 | n 644 7 sub/large2 | |
54 | $ echo normal11 > normal1 |
|
54 | $ echo normal11 > normal1 | |
55 | $ echo normal22 > sub/normal2 |
|
55 | $ echo normal22 > sub/normal2 | |
56 | $ echo large11 > large1 |
|
56 | $ echo large11 > large1 | |
57 | $ echo large22 > sub/large2 |
|
57 | $ echo large22 > sub/large2 | |
58 | $ hg commit -m "edit files" |
|
58 | $ hg commit -m "edit files" | |
59 | Invoking status precommit hook |
|
59 | Invoking status precommit hook | |
60 | M large1 |
|
60 | M large1 | |
61 | M normal1 |
|
61 | M normal1 | |
62 | M sub/large2 |
|
62 | M sub/large2 | |
63 | M sub/normal2 |
|
63 | M sub/normal2 | |
64 | $ hg sum --large |
|
64 | $ hg sum --large | |
65 | parent: 1:ce8896473775 tip |
|
65 | parent: 1:ce8896473775 tip | |
66 | edit files |
|
66 | edit files | |
67 | branch: default |
|
67 | branch: default | |
68 | commit: (clean) |
|
68 | commit: (clean) | |
69 | update: (current) |
|
69 | update: (current) | |
70 | largefiles: (no remote repo) |
|
70 | largefiles: (no remote repo) | |
71 |
|
71 | |||
72 | Commit preserved largefile contents. |
|
72 | Commit preserved largefile contents. | |
73 |
|
73 | |||
74 | $ cat normal1 |
|
74 | $ cat normal1 | |
75 | normal11 |
|
75 | normal11 | |
76 | $ cat large1 |
|
76 | $ cat large1 | |
77 | large11 |
|
77 | large11 | |
78 | $ cat sub/normal2 |
|
78 | $ cat sub/normal2 | |
79 | normal22 |
|
79 | normal22 | |
80 | $ cat sub/large2 |
|
80 | $ cat sub/large2 | |
81 | large22 |
|
81 | large22 | |
82 |
|
82 | |||
83 | Test status, subdir and unknown files |
|
83 | Test status, subdir and unknown files | |
84 |
|
84 | |||
85 | $ echo unknown > sub/unknown |
|
85 | $ echo unknown > sub/unknown | |
86 | $ hg st --all |
|
86 | $ hg st --all | |
87 | ? sub/unknown |
|
87 | ? sub/unknown | |
88 | C large1 |
|
88 | C large1 | |
89 | C normal1 |
|
89 | C normal1 | |
90 | C sub/large2 |
|
90 | C sub/large2 | |
91 | C sub/normal2 |
|
91 | C sub/normal2 | |
92 | $ hg st --all sub |
|
92 | $ hg st --all sub | |
93 | ? sub/unknown |
|
93 | ? sub/unknown | |
94 | C sub/large2 |
|
94 | C sub/large2 | |
95 | C sub/normal2 |
|
95 | C sub/normal2 | |
96 | $ rm sub/unknown |
|
96 | $ rm sub/unknown | |
97 |
|
97 | |||
98 | Test messages and exit codes for remove warning cases |
|
98 | Test messages and exit codes for remove warning cases | |
99 |
|
99 | |||
100 | $ hg remove -A large1 |
|
100 | $ hg remove -A large1 | |
101 | not removing large1: file still exists |
|
101 | not removing large1: file still exists | |
102 | [1] |
|
102 | [1] | |
103 | $ echo 'modified' > large1 |
|
103 | $ echo 'modified' > large1 | |
104 | $ hg remove large1 |
|
104 | $ hg remove large1 | |
105 | not removing large1: file is modified (use -f to force removal) |
|
105 | not removing large1: file is modified (use -f to force removal) | |
106 | [1] |
|
106 | [1] | |
107 | $ echo 'new' > normalnew |
|
107 | $ echo 'new' > normalnew | |
108 | $ hg add normalnew |
|
108 | $ hg add normalnew | |
109 | $ echo 'new' > largenew |
|
109 | $ echo 'new' > largenew | |
110 | $ hg add --large normalnew |
|
110 | $ hg add --large normalnew | |
111 | normalnew already tracked! |
|
111 | normalnew already tracked! | |
112 | $ hg remove normalnew largenew |
|
112 | $ hg remove normalnew largenew | |
113 | not removing largenew: file is untracked |
|
113 | not removing largenew: file is untracked | |
114 | not removing normalnew: file has been marked for add (use forget to undo) |
|
114 | not removing normalnew: file has been marked for add (use forget to undo) | |
115 | [1] |
|
115 | [1] | |
116 | $ rm normalnew largenew |
|
116 | $ rm normalnew largenew | |
117 | $ hg up -Cq |
|
117 | $ hg up -Cq | |
118 |
|
118 | |||
119 | Remove both largefiles and normal files. |
|
119 | Remove both largefiles and normal files. | |
120 |
|
120 | |||
121 | $ hg remove normal1 large1 |
|
121 | $ hg remove normal1 large1 | |
122 | $ hg status large1 |
|
122 | $ hg status large1 | |
123 | R large1 |
|
123 | R large1 | |
124 | $ hg commit -m "remove files" |
|
124 | $ hg commit -m "remove files" | |
125 | Invoking status precommit hook |
|
125 | Invoking status precommit hook | |
126 | R large1 |
|
126 | R large1 | |
127 | R normal1 |
|
127 | R normal1 | |
128 | $ ls |
|
128 | $ ls | |
129 | sub |
|
129 | sub | |
130 | $ echo "testlargefile" > large1-test |
|
130 | $ echo "testlargefile" > large1-test | |
131 | $ hg add --large large1-test |
|
131 | $ hg add --large large1-test | |
132 | $ hg st |
|
132 | $ hg st | |
133 | A large1-test |
|
133 | A large1-test | |
134 | $ hg rm large1-test |
|
134 | $ hg rm large1-test | |
135 | not removing large1-test: file has been marked for add (use forget to undo) |
|
135 | not removing large1-test: file has been marked for add (use forget to undo) | |
136 | [1] |
|
136 | [1] | |
137 | $ hg st |
|
137 | $ hg st | |
138 | A large1-test |
|
138 | A large1-test | |
139 | $ hg forget large1-test |
|
139 | $ hg forget large1-test | |
140 | $ hg st |
|
140 | $ hg st | |
141 | ? large1-test |
|
141 | ? large1-test | |
142 | $ hg remove large1-test |
|
142 | $ hg remove large1-test | |
143 | not removing large1-test: file is untracked |
|
143 | not removing large1-test: file is untracked | |
144 | [1] |
|
144 | [1] | |
145 | $ hg forget large1-test |
|
145 | $ hg forget large1-test | |
146 | not removing large1-test: file is already untracked |
|
146 | not removing large1-test: file is already untracked | |
147 | [1] |
|
147 | [1] | |
148 | $ rm large1-test |
|
148 | $ rm large1-test | |
149 |
|
149 | |||
150 | Copy both largefiles and normal files (testing that status output is correct). |
|
150 | Copy both largefiles and normal files (testing that status output is correct). | |
151 |
|
151 | |||
152 | $ hg cp sub/normal2 normal1 |
|
152 | $ hg cp sub/normal2 normal1 | |
153 | $ hg cp sub/large2 large1 |
|
153 | $ hg cp sub/large2 large1 | |
154 | $ hg commit -m "copy files" |
|
154 | $ hg commit -m "copy files" | |
155 | Invoking status precommit hook |
|
155 | Invoking status precommit hook | |
156 | A large1 |
|
156 | A large1 | |
157 | A normal1 |
|
157 | A normal1 | |
158 | $ cat normal1 |
|
158 | $ cat normal1 | |
159 | normal22 |
|
159 | normal22 | |
160 | $ cat large1 |
|
160 | $ cat large1 | |
161 | large22 |
|
161 | large22 | |
162 |
|
162 | |||
163 | Test moving largefiles and verify that normal files are also unaffected. |
|
163 | Test moving largefiles and verify that normal files are also unaffected. | |
164 |
|
164 | |||
165 | $ hg mv normal1 normal3 |
|
165 | $ hg mv normal1 normal3 | |
166 | $ hg mv large1 large3 |
|
166 | $ hg mv large1 large3 | |
167 | $ hg mv sub/normal2 sub/normal4 |
|
167 | $ hg mv sub/normal2 sub/normal4 | |
168 | $ hg mv sub/large2 sub/large4 |
|
168 | $ hg mv sub/large2 sub/large4 | |
169 | $ hg commit -m "move files" |
|
169 | $ hg commit -m "move files" | |
170 | Invoking status precommit hook |
|
170 | Invoking status precommit hook | |
171 | A large3 |
|
171 | A large3 | |
172 | A normal3 |
|
172 | A normal3 | |
173 | A sub/large4 |
|
173 | A sub/large4 | |
174 | A sub/normal4 |
|
174 | A sub/normal4 | |
175 | R large1 |
|
175 | R large1 | |
176 | R normal1 |
|
176 | R normal1 | |
177 | R sub/large2 |
|
177 | R sub/large2 | |
178 | R sub/normal2 |
|
178 | R sub/normal2 | |
179 | $ cat normal3 |
|
179 | $ cat normal3 | |
180 | normal22 |
|
180 | normal22 | |
181 | $ cat large3 |
|
181 | $ cat large3 | |
182 | large22 |
|
182 | large22 | |
183 | $ cat sub/normal4 |
|
183 | $ cat sub/normal4 | |
184 | normal22 |
|
184 | normal22 | |
185 | $ cat sub/large4 |
|
185 | $ cat sub/large4 | |
186 | large22 |
|
186 | large22 | |
187 |
|
187 | |||
188 |
|
188 | |||
189 | #if serve |
|
189 | #if serve | |
190 | Test display of largefiles in hgweb |
|
190 | Test display of largefiles in hgweb | |
191 |
|
191 | |||
192 | $ hg serve -d -p $HGPORT --pid-file ../hg.pid |
|
192 | $ hg serve -d -p $HGPORT --pid-file ../hg.pid | |
193 | $ cat ../hg.pid >> $DAEMON_PIDS |
|
193 | $ cat ../hg.pid >> $DAEMON_PIDS | |
194 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/?style=raw' |
|
194 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/?style=raw' | |
195 | 200 Script output follows |
|
195 | 200 Script output follows | |
196 |
|
196 | |||
197 |
|
197 | |||
198 | drwxr-xr-x sub |
|
198 | drwxr-xr-x sub | |
199 | -rw-r--r-- 41 large3 |
|
199 | -rw-r--r-- 41 large3 | |
200 | -rw-r--r-- 9 normal3 |
|
200 | -rw-r--r-- 9 normal3 | |
201 |
|
201 | |||
202 |
|
202 | |||
203 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/sub/?style=raw' |
|
203 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/sub/?style=raw' | |
204 | 200 Script output follows |
|
204 | 200 Script output follows | |
205 |
|
205 | |||
206 |
|
206 | |||
207 | -rw-r--r-- 41 large4 |
|
207 | -rw-r--r-- 41 large4 | |
208 | -rw-r--r-- 9 normal4 |
|
208 | -rw-r--r-- 9 normal4 | |
209 |
|
209 | |||
210 |
|
210 | |||
211 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
211 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |
212 | #endif |
|
212 | #endif | |
213 |
|
213 | |||
214 | Test archiving the various revisions. These hit corner cases known with |
|
214 | Test archiving the various revisions. These hit corner cases known with | |
215 | archiving. |
|
215 | archiving. | |
216 |
|
216 | |||
217 | $ hg archive -r 0 ../archive0 |
|
217 | $ hg archive -r 0 ../archive0 | |
218 | $ hg archive -r 1 ../archive1 |
|
218 | $ hg archive -r 1 ../archive1 | |
219 | $ hg archive -r 2 ../archive2 |
|
219 | $ hg archive -r 2 ../archive2 | |
220 | $ hg archive -r 3 ../archive3 |
|
220 | $ hg archive -r 3 ../archive3 | |
221 | $ hg archive -r 4 ../archive4 |
|
221 | $ hg archive -r 4 ../archive4 | |
222 | $ cd ../archive0 |
|
222 | $ cd ../archive0 | |
223 | $ cat normal1 |
|
223 | $ cat normal1 | |
224 | normal1 |
|
224 | normal1 | |
225 | $ cat large1 |
|
225 | $ cat large1 | |
226 | large1 |
|
226 | large1 | |
227 | $ cat sub/normal2 |
|
227 | $ cat sub/normal2 | |
228 | normal2 |
|
228 | normal2 | |
229 | $ cat sub/large2 |
|
229 | $ cat sub/large2 | |
230 | large2 |
|
230 | large2 | |
231 | $ cd ../archive1 |
|
231 | $ cd ../archive1 | |
232 | $ cat normal1 |
|
232 | $ cat normal1 | |
233 | normal11 |
|
233 | normal11 | |
234 | $ cat large1 |
|
234 | $ cat large1 | |
235 | large11 |
|
235 | large11 | |
236 | $ cat sub/normal2 |
|
236 | $ cat sub/normal2 | |
237 | normal22 |
|
237 | normal22 | |
238 | $ cat sub/large2 |
|
238 | $ cat sub/large2 | |
239 | large22 |
|
239 | large22 | |
240 | $ cd ../archive2 |
|
240 | $ cd ../archive2 | |
241 | $ ls |
|
241 | $ ls | |
242 | sub |
|
242 | sub | |
243 | $ cat sub/normal2 |
|
243 | $ cat sub/normal2 | |
244 | normal22 |
|
244 | normal22 | |
245 | $ cat sub/large2 |
|
245 | $ cat sub/large2 | |
246 | large22 |
|
246 | large22 | |
247 | $ cd ../archive3 |
|
247 | $ cd ../archive3 | |
248 | $ cat normal1 |
|
248 | $ cat normal1 | |
249 | normal22 |
|
249 | normal22 | |
250 | $ cat large1 |
|
250 | $ cat large1 | |
251 | large22 |
|
251 | large22 | |
252 | $ cat sub/normal2 |
|
252 | $ cat sub/normal2 | |
253 | normal22 |
|
253 | normal22 | |
254 | $ cat sub/large2 |
|
254 | $ cat sub/large2 | |
255 | large22 |
|
255 | large22 | |
256 | $ cd ../archive4 |
|
256 | $ cd ../archive4 | |
257 | $ cat normal3 |
|
257 | $ cat normal3 | |
258 | normal22 |
|
258 | normal22 | |
259 | $ cat large3 |
|
259 | $ cat large3 | |
260 | large22 |
|
260 | large22 | |
261 | $ cat sub/normal4 |
|
261 | $ cat sub/normal4 | |
262 | normal22 |
|
262 | normal22 | |
263 | $ cat sub/large4 |
|
263 | $ cat sub/large4 | |
264 | large22 |
|
264 | large22 | |
265 |
|
265 | |||
266 | Commit corner case: specify files to commit. |
|
266 | Commit corner case: specify files to commit. | |
267 |
|
267 | |||
268 | $ cd ../a |
|
268 | $ cd ../a | |
269 | $ echo normal3 > normal3 |
|
269 | $ echo normal3 > normal3 | |
270 | $ echo large3 > large3 |
|
270 | $ echo large3 > large3 | |
271 | $ echo normal4 > sub/normal4 |
|
271 | $ echo normal4 > sub/normal4 | |
272 | $ echo large4 > sub/large4 |
|
272 | $ echo large4 > sub/large4 | |
273 | $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again" |
|
273 | $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again" | |
274 | Invoking status precommit hook |
|
274 | Invoking status precommit hook | |
275 | M large3 |
|
275 | M large3 | |
276 | M normal3 |
|
276 | M normal3 | |
277 | M sub/large4 |
|
277 | M sub/large4 | |
278 | M sub/normal4 |
|
278 | M sub/normal4 | |
279 | $ cat normal3 |
|
279 | $ cat normal3 | |
280 | normal3 |
|
280 | normal3 | |
281 | $ cat large3 |
|
281 | $ cat large3 | |
282 | large3 |
|
282 | large3 | |
283 | $ cat sub/normal4 |
|
283 | $ cat sub/normal4 | |
284 | normal4 |
|
284 | normal4 | |
285 | $ cat sub/large4 |
|
285 | $ cat sub/large4 | |
286 | large4 |
|
286 | large4 | |
287 |
|
287 | |||
288 | One more commit corner case: commit from a subdirectory. |
|
288 | One more commit corner case: commit from a subdirectory. | |
289 |
|
289 | |||
290 | $ cd ../a |
|
290 | $ cd ../a | |
291 | $ echo normal33 > normal3 |
|
291 | $ echo normal33 > normal3 | |
292 | $ echo large33 > large3 |
|
292 | $ echo large33 > large3 | |
293 | $ echo normal44 > sub/normal4 |
|
293 | $ echo normal44 > sub/normal4 | |
294 | $ echo large44 > sub/large4 |
|
294 | $ echo large44 > sub/large4 | |
295 | $ cd sub |
|
295 | $ cd sub | |
296 | $ hg commit -m "edit files yet again" |
|
296 | $ hg commit -m "edit files yet again" | |
297 | Invoking status precommit hook |
|
297 | Invoking status precommit hook | |
298 | M large3 |
|
298 | M large3 | |
299 | M normal3 |
|
299 | M normal3 | |
300 | M sub/large4 |
|
300 | M sub/large4 | |
301 | M sub/normal4 |
|
301 | M sub/normal4 | |
302 | $ cat ../normal3 |
|
302 | $ cat ../normal3 | |
303 | normal33 |
|
303 | normal33 | |
304 | $ cat ../large3 |
|
304 | $ cat ../large3 | |
305 | large33 |
|
305 | large33 | |
306 | $ cat normal4 |
|
306 | $ cat normal4 | |
307 | normal44 |
|
307 | normal44 | |
308 | $ cat large4 |
|
308 | $ cat large4 | |
309 | large44 |
|
309 | large44 | |
310 |
|
310 | |||
311 | Committing standins is not allowed. |
|
311 | Committing standins is not allowed. | |
312 |
|
312 | |||
313 | $ cd .. |
|
313 | $ cd .. | |
314 | $ echo large3 > large3 |
|
314 | $ echo large3 > large3 | |
315 | $ hg commit .hglf/large3 -m "try to commit standin" |
|
315 | $ hg commit .hglf/large3 -m "try to commit standin" | |
316 | abort: file ".hglf/large3" is a largefile standin |
|
316 | abort: file ".hglf/large3" is a largefile standin | |
317 | (commit the largefile itself instead) |
|
317 | (commit the largefile itself instead) | |
318 | [255] |
|
318 | [255] | |
319 |
|
319 | |||
320 | Corner cases for adding largefiles. |
|
320 | Corner cases for adding largefiles. | |
321 |
|
321 | |||
322 | $ echo large5 > large5 |
|
322 | $ echo large5 > large5 | |
323 | $ hg add --large large5 |
|
323 | $ hg add --large large5 | |
324 | $ hg add --large large5 |
|
324 | $ hg add --large large5 | |
325 | large5 already a largefile |
|
325 | large5 already a largefile | |
326 | $ mkdir sub2 |
|
326 | $ mkdir sub2 | |
327 | $ echo large6 > sub2/large6 |
|
327 | $ echo large6 > sub2/large6 | |
328 | $ echo large7 > sub2/large7 |
|
328 | $ echo large7 > sub2/large7 | |
329 | $ hg add --large sub2 |
|
329 | $ hg add --large sub2 | |
330 | adding sub2/large6 as a largefile (glob) |
|
330 | adding sub2/large6 as a largefile (glob) | |
331 | adding sub2/large7 as a largefile (glob) |
|
331 | adding sub2/large7 as a largefile (glob) | |
332 | $ hg st |
|
332 | $ hg st | |
333 | M large3 |
|
333 | M large3 | |
334 | A large5 |
|
334 | A large5 | |
335 | A sub2/large6 |
|
335 | A sub2/large6 | |
336 | A sub2/large7 |
|
336 | A sub2/large7 | |
337 |
|
337 | |||
338 | Committing directories containing only largefiles. |
|
338 | Committing directories containing only largefiles. | |
339 |
|
339 | |||
340 | $ mkdir -p z/y/x/m |
|
340 | $ mkdir -p z/y/x/m | |
341 | $ touch z/y/x/m/large1 |
|
341 | $ touch z/y/x/m/large1 | |
342 | $ touch z/y/x/large2 |
|
342 | $ touch z/y/x/large2 | |
343 | $ hg add --large z/y/x/m/large1 z/y/x/large2 |
|
343 | $ hg add --large z/y/x/m/large1 z/y/x/large2 | |
344 | $ hg commit -m "Subdir with directory only containing largefiles" z |
|
344 | $ hg commit -m "Subdir with directory only containing largefiles" z | |
345 | Invoking status precommit hook |
|
345 | Invoking status precommit hook | |
346 | M large3 |
|
346 | M large3 | |
347 | A large5 |
|
347 | A large5 | |
348 | A sub2/large6 |
|
348 | A sub2/large6 | |
349 | A sub2/large7 |
|
349 | A sub2/large7 | |
350 | A z/y/x/large2 |
|
350 | A z/y/x/large2 | |
351 | A z/y/x/m/large1 |
|
351 | A z/y/x/m/large1 | |
352 |
|
352 | |||
353 | (and a bit of log testing) |
|
353 | (and a bit of log testing) | |
354 |
|
354 | |||
355 | $ hg log -T '{rev}\n' z/y/x/m/large1 |
|
355 | $ hg log -T '{rev}\n' z/y/x/m/large1 | |
356 | 7 |
|
356 | 7 | |
357 | $ hg log -T '{rev}\n' z/y/x/m # with only a largefile |
|
357 | $ hg log -T '{rev}\n' z/y/x/m # with only a largefile | |
358 | 7 |
|
358 | 7 | |
359 |
|
359 | |||
360 | $ hg rollback --quiet |
|
360 | $ hg rollback --quiet | |
361 | $ touch z/y/x/m/normal |
|
361 | $ touch z/y/x/m/normal | |
362 | $ hg add z/y/x/m/normal |
|
362 | $ hg add z/y/x/m/normal | |
363 | $ hg commit -m "Subdir with mixed contents" z |
|
363 | $ hg commit -m "Subdir with mixed contents" z | |
364 | Invoking status precommit hook |
|
364 | Invoking status precommit hook | |
365 | M large3 |
|
365 | M large3 | |
366 | A large5 |
|
366 | A large5 | |
367 | A sub2/large6 |
|
367 | A sub2/large6 | |
368 | A sub2/large7 |
|
368 | A sub2/large7 | |
369 | A z/y/x/large2 |
|
369 | A z/y/x/large2 | |
370 | A z/y/x/m/large1 |
|
370 | A z/y/x/m/large1 | |
371 | A z/y/x/m/normal |
|
371 | A z/y/x/m/normal | |
372 | $ hg st |
|
372 | $ hg st | |
373 | M large3 |
|
373 | M large3 | |
374 | A large5 |
|
374 | A large5 | |
375 | A sub2/large6 |
|
375 | A sub2/large6 | |
376 | A sub2/large7 |
|
376 | A sub2/large7 | |
377 | $ hg rollback --quiet |
|
377 | $ hg rollback --quiet | |
378 | $ hg revert z/y/x/large2 z/y/x/m/large1 |
|
378 | $ hg revert z/y/x/large2 z/y/x/m/large1 | |
379 | $ rm z/y/x/large2 z/y/x/m/large1 |
|
379 | $ rm z/y/x/large2 z/y/x/m/large1 | |
380 | $ hg commit -m "Subdir with normal contents" z |
|
380 | $ hg commit -m "Subdir with normal contents" z | |
381 | Invoking status precommit hook |
|
381 | Invoking status precommit hook | |
382 | M large3 |
|
382 | M large3 | |
383 | A large5 |
|
383 | A large5 | |
384 | A sub2/large6 |
|
384 | A sub2/large6 | |
385 | A sub2/large7 |
|
385 | A sub2/large7 | |
386 | A z/y/x/m/normal |
|
386 | A z/y/x/m/normal | |
387 | $ hg st |
|
387 | $ hg st | |
388 | M large3 |
|
388 | M large3 | |
389 | A large5 |
|
389 | A large5 | |
390 | A sub2/large6 |
|
390 | A sub2/large6 | |
391 | A sub2/large7 |
|
391 | A sub2/large7 | |
392 | $ hg rollback --quiet |
|
392 | $ hg rollback --quiet | |
393 | $ hg revert --quiet z |
|
393 | $ hg revert --quiet z | |
394 | $ hg commit -m "Empty subdir" z |
|
394 | $ hg commit -m "Empty subdir" z | |
395 | abort: z: no match under directory! |
|
395 | abort: z: no match under directory! | |
396 | [255] |
|
396 | [255] | |
397 | $ rm -rf z |
|
397 | $ rm -rf z | |
398 | $ hg ci -m "standin" .hglf |
|
398 | $ hg ci -m "standin" .hglf | |
399 | abort: file ".hglf" is a largefile standin |
|
399 | abort: file ".hglf" is a largefile standin | |
400 | (commit the largefile itself instead) |
|
400 | (commit the largefile itself instead) | |
401 | [255] |
|
401 | [255] | |
402 |
|
402 | |||
403 | Test "hg status" with combination of 'file pattern' and 'directory |
|
403 | Test "hg status" with combination of 'file pattern' and 'directory | |
404 | pattern' for largefiles: |
|
404 | pattern' for largefiles: | |
405 |
|
405 | |||
406 | $ hg status sub2/large6 sub2 |
|
406 | $ hg status sub2/large6 sub2 | |
407 | A sub2/large6 |
|
407 | A sub2/large6 | |
408 | A sub2/large7 |
|
408 | A sub2/large7 | |
409 |
|
409 | |||
410 | Config settings (pattern **.dat, minsize 2 MB) are respected. |
|
410 | Config settings (pattern **.dat, minsize 2 MB) are respected. | |
411 |
|
411 | |||
412 | $ echo testdata > test.dat |
|
412 | $ echo testdata > test.dat | |
413 | $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null |
|
413 | $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null | |
414 | $ hg add |
|
414 | $ hg add | |
415 | adding reallylarge as a largefile |
|
415 | adding reallylarge as a largefile | |
416 | adding test.dat as a largefile |
|
416 | adding test.dat as a largefile | |
417 |
|
417 | |||
418 | Test that minsize and --lfsize handle float values; |
|
418 | Test that minsize and --lfsize handle float values; | |
419 | also tests that --lfsize overrides largefiles.minsize. |
|
419 | also tests that --lfsize overrides largefiles.minsize. | |
420 | (0.250 MB = 256 kB = 262144 B) |
|
420 | (0.250 MB = 256 kB = 262144 B) | |
421 |
|
421 | |||
422 | $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null |
|
422 | $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null | |
423 | $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null |
|
423 | $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null | |
424 | $ hg --config largefiles.minsize=.25 add |
|
424 | $ hg --config largefiles.minsize=.25 add | |
425 | adding ratherlarge as a largefile |
|
425 | adding ratherlarge as a largefile | |
426 | adding medium |
|
426 | adding medium | |
427 | $ hg forget medium |
|
427 | $ hg forget medium | |
428 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 |
|
428 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 | |
429 | adding medium as a largefile |
|
429 | adding medium as a largefile | |
430 | $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null |
|
430 | $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null | |
431 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 |
|
431 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 | |
432 | adding notlarge |
|
432 | adding notlarge | |
433 | $ hg forget notlarge |
|
433 | $ hg forget notlarge | |
434 |
|
434 | |||
435 | Test forget on largefiles. |
|
435 | Test forget on largefiles. | |
436 |
|
436 | |||
437 | $ hg forget large3 large5 test.dat reallylarge ratherlarge medium |
|
437 | $ hg forget large3 large5 test.dat reallylarge ratherlarge medium | |
438 | $ hg commit -m "add/edit more largefiles" |
|
438 | $ hg commit -m "add/edit more largefiles" | |
439 | Invoking status precommit hook |
|
439 | Invoking status precommit hook | |
440 | A sub2/large6 |
|
440 | A sub2/large6 | |
441 | A sub2/large7 |
|
441 | A sub2/large7 | |
442 | R large3 |
|
442 | R large3 | |
443 | ? large5 |
|
443 | ? large5 | |
444 | ? medium |
|
444 | ? medium | |
445 | ? notlarge |
|
445 | ? notlarge | |
446 | ? ratherlarge |
|
446 | ? ratherlarge | |
447 | ? reallylarge |
|
447 | ? reallylarge | |
448 | ? test.dat |
|
448 | ? test.dat | |
449 | $ hg st |
|
449 | $ hg st | |
450 | ? large3 |
|
450 | ? large3 | |
451 | ? large5 |
|
451 | ? large5 | |
452 | ? medium |
|
452 | ? medium | |
453 | ? notlarge |
|
453 | ? notlarge | |
454 | ? ratherlarge |
|
454 | ? ratherlarge | |
455 | ? reallylarge |
|
455 | ? reallylarge | |
456 | ? test.dat |
|
456 | ? test.dat | |
457 |
|
457 | |||
458 | Purge with largefiles: verify that largefiles are still in the working |
|
458 | Purge with largefiles: verify that largefiles are still in the working | |
459 | dir after a purge. |
|
459 | dir after a purge. | |
460 |
|
460 | |||
461 | $ hg purge --all |
|
461 | $ hg purge --all | |
462 | $ cat sub/large4 |
|
462 | $ cat sub/large4 | |
463 | large44 |
|
463 | large44 | |
464 | $ cat sub2/large6 |
|
464 | $ cat sub2/large6 | |
465 | large6 |
|
465 | large6 | |
466 | $ cat sub2/large7 |
|
466 | $ cat sub2/large7 | |
467 | large7 |
|
467 | large7 | |
468 |
|
468 | |||
469 | Test addremove: verify that files that should be added as largefiles are added as |
|
469 | Test addremove: verify that files that should be added as largefiles are added as | |
470 | such and that already-existing largefiles are not added as normal files by |
|
470 | such and that already-existing largefiles are not added as normal files by | |
471 | accident. |
|
471 | accident. | |
472 |
|
472 | |||
473 | $ rm normal3 |
|
473 | $ rm normal3 | |
474 | $ rm sub/large4 |
|
474 | $ rm sub/large4 | |
475 | $ echo "testing addremove with patterns" > testaddremove.dat |
|
475 | $ echo "testing addremove with patterns" > testaddremove.dat | |
476 | $ echo "normaladdremove" > normaladdremove |
|
476 | $ echo "normaladdremove" > normaladdremove | |
477 | $ hg addremove |
|
477 | $ hg addremove | |
478 | removing sub/large4 |
|
478 | removing sub/large4 | |
479 | adding testaddremove.dat as a largefile |
|
479 | adding testaddremove.dat as a largefile | |
480 | removing normal3 |
|
480 | removing normal3 | |
481 | adding normaladdremove |
|
481 | adding normaladdremove | |
482 |
|
482 | |||
483 | Test addremove with -R |
|
483 | Test addremove with -R | |
484 |
|
484 | |||
485 | $ hg up -C |
|
485 | $ hg up -C | |
486 | getting changed largefiles |
|
486 | getting changed largefiles | |
487 | 1 largefiles updated, 0 removed |
|
487 | 1 largefiles updated, 0 removed | |
488 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
488 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
489 | $ rm normal3 |
|
489 | $ rm normal3 | |
490 | $ rm sub/large4 |
|
490 | $ rm sub/large4 | |
491 | $ echo "testing addremove with patterns" > testaddremove.dat |
|
491 | $ echo "testing addremove with patterns" > testaddremove.dat | |
492 | $ echo "normaladdremove" > normaladdremove |
|
492 | $ echo "normaladdremove" > normaladdremove | |
493 | $ cd .. |
|
493 | $ cd .. | |
494 | $ hg -R a -v addremove |
|
494 | $ hg -R a -v addremove | |
495 | removing sub/large4 |
|
495 | removing sub/large4 | |
496 | adding a/testaddremove.dat as a largefile (glob) |
|
496 | adding a/testaddremove.dat as a largefile (glob) | |
497 | removing normal3 |
|
497 | removing normal3 | |
498 | adding normaladdremove |
|
498 | adding normaladdremove | |
499 | $ cd a |
|
499 | $ cd a | |
500 |
|
500 | |||
501 | Test 3364 |
|
501 | Test 3364 | |
502 | $ hg clone . ../addrm |
|
502 | $ hg clone . ../addrm | |
503 | updating to branch default |
|
503 | updating to branch default | |
504 | getting changed largefiles |
|
504 | getting changed largefiles | |
505 | 3 largefiles updated, 0 removed |
|
505 | 3 largefiles updated, 0 removed | |
506 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
506 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
507 | $ cd ../addrm |
|
507 | $ cd ../addrm | |
508 | $ cat >> .hg/hgrc <<EOF |
|
508 | $ cat >> .hg/hgrc <<EOF | |
509 | > [hooks] |
|
509 | > [hooks] | |
510 | > post-commit.stat=sh -c "echo \\"Invoking status postcommit hook\\"; hg status -A" |
|
510 | > post-commit.stat=sh -c "echo \\"Invoking status postcommit hook\\"; hg status -A" | |
511 | > EOF |
|
511 | > EOF | |
512 | $ touch foo |
|
512 | $ touch foo | |
513 | $ hg add --large foo |
|
513 | $ hg add --large foo | |
514 | $ hg ci -m "add foo" |
|
514 | $ hg ci -m "add foo" | |
515 | Invoking status precommit hook |
|
515 | Invoking status precommit hook | |
516 | A foo |
|
516 | A foo | |
517 | Invoking status postcommit hook |
|
517 | Invoking status postcommit hook | |
518 | C foo |
|
518 | C foo | |
519 | C normal3 |
|
519 | C normal3 | |
520 | C sub/large4 |
|
520 | C sub/large4 | |
521 | C sub/normal4 |
|
521 | C sub/normal4 | |
522 | C sub2/large6 |
|
522 | C sub2/large6 | |
523 | C sub2/large7 |
|
523 | C sub2/large7 | |
524 | $ rm foo |
|
524 | $ rm foo | |
525 | $ hg st |
|
525 | $ hg st | |
526 | ! foo |
|
526 | ! foo | |
527 | hmm.. no precommit invoked, but there is a postcommit?? |
|
527 | hmm.. no precommit invoked, but there is a postcommit?? | |
528 | $ hg ci -m "will not checkin" |
|
528 | $ hg ci -m "will not checkin" | |
529 | nothing changed |
|
529 | nothing changed | |
530 | Invoking status postcommit hook |
|
530 | Invoking status postcommit hook | |
531 | ! foo |
|
531 | ! foo | |
532 | C normal3 |
|
532 | C normal3 | |
533 | C sub/large4 |
|
533 | C sub/large4 | |
534 | C sub/normal4 |
|
534 | C sub/normal4 | |
535 | C sub2/large6 |
|
535 | C sub2/large6 | |
536 | C sub2/large7 |
|
536 | C sub2/large7 | |
537 | [1] |
|
537 | [1] | |
538 | $ hg addremove |
|
538 | $ hg addremove | |
539 | removing foo |
|
539 | removing foo | |
540 | $ hg st |
|
540 | $ hg st | |
541 | R foo |
|
541 | R foo | |
542 | $ hg ci -m "used to say nothing changed" |
|
542 | $ hg ci -m "used to say nothing changed" | |
543 | Invoking status precommit hook |
|
543 | Invoking status precommit hook | |
544 | R foo |
|
544 | R foo | |
545 | Invoking status postcommit hook |
|
545 | Invoking status postcommit hook | |
546 | C normal3 |
|
546 | C normal3 | |
547 | C sub/large4 |
|
547 | C sub/large4 | |
548 | C sub/normal4 |
|
548 | C sub/normal4 | |
549 | C sub2/large6 |
|
549 | C sub2/large6 | |
550 | C sub2/large7 |
|
550 | C sub2/large7 | |
551 | $ hg st |
|
551 | $ hg st | |
552 |
|
552 | |||
553 | Test 3507 (both normal files and largefiles were a problem) |
|
553 | Test 3507 (both normal files and largefiles were a problem) | |
554 |
|
554 | |||
555 | $ touch normal |
|
555 | $ touch normal | |
556 | $ touch large |
|
556 | $ touch large | |
557 | $ hg add normal |
|
557 | $ hg add normal | |
558 | $ hg add --large large |
|
558 | $ hg add --large large | |
559 | $ hg ci -m "added" |
|
559 | $ hg ci -m "added" | |
560 | Invoking status precommit hook |
|
560 | Invoking status precommit hook | |
561 | A large |
|
561 | A large | |
562 | A normal |
|
562 | A normal | |
563 | Invoking status postcommit hook |
|
563 | Invoking status postcommit hook | |
564 | C large |
|
564 | C large | |
565 | C normal |
|
565 | C normal | |
566 | C normal3 |
|
566 | C normal3 | |
567 | C sub/large4 |
|
567 | C sub/large4 | |
568 | C sub/normal4 |
|
568 | C sub/normal4 | |
569 | C sub2/large6 |
|
569 | C sub2/large6 | |
570 | C sub2/large7 |
|
570 | C sub2/large7 | |
571 | $ hg remove normal |
|
571 | $ hg remove normal | |
572 | $ hg addremove --traceback |
|
572 | $ hg addremove --traceback | |
573 | $ hg ci -m "addremoved normal" |
|
573 | $ hg ci -m "addremoved normal" | |
574 | Invoking status precommit hook |
|
574 | Invoking status precommit hook | |
575 | R normal |
|
575 | R normal | |
576 | Invoking status postcommit hook |
|
576 | Invoking status postcommit hook | |
577 | C large |
|
577 | C large | |
578 | C normal3 |
|
578 | C normal3 | |
579 | C sub/large4 |
|
579 | C sub/large4 | |
580 | C sub/normal4 |
|
580 | C sub/normal4 | |
581 | C sub2/large6 |
|
581 | C sub2/large6 | |
582 | C sub2/large7 |
|
582 | C sub2/large7 | |
583 | $ hg up -C '.^' |
|
583 | $ hg up -C '.^' | |
584 | getting changed largefiles |
|
584 | getting changed largefiles | |
585 | 0 largefiles updated, 0 removed |
|
585 | 0 largefiles updated, 0 removed | |
586 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
586 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
587 | $ hg remove large |
|
587 | $ hg remove large | |
588 | $ hg addremove --traceback |
|
588 | $ hg addremove --traceback | |
589 | $ hg ci -m "removed large" |
|
589 | $ hg ci -m "removed large" | |
590 | Invoking status precommit hook |
|
590 | Invoking status precommit hook | |
591 | R large |
|
591 | R large | |
592 | created new head |
|
592 | created new head | |
593 | Invoking status postcommit hook |
|
593 | Invoking status postcommit hook | |
594 | C normal |
|
594 | C normal | |
595 | C normal3 |
|
595 | C normal3 | |
596 | C sub/large4 |
|
596 | C sub/large4 | |
597 | C sub/normal4 |
|
597 | C sub/normal4 | |
598 | C sub2/large6 |
|
598 | C sub2/large6 | |
599 | C sub2/large7 |
|
599 | C sub2/large7 | |
600 |
|
600 | |||
601 | Test commit -A (issue3542) |
|
601 | Test commit -A (issue3542) | |
602 | $ echo large8 > large8 |
|
602 | $ echo large8 > large8 | |
603 | $ hg add --large large8 |
|
603 | $ hg add --large large8 | |
604 | $ hg ci -Am 'this used to add large8 as normal and commit both' |
|
604 | $ hg ci -Am 'this used to add large8 as normal and commit both' | |
605 | Invoking status precommit hook |
|
605 | Invoking status precommit hook | |
606 | A large8 |
|
606 | A large8 | |
607 | Invoking status postcommit hook |
|
607 | Invoking status postcommit hook | |
608 | C large8 |
|
608 | C large8 | |
609 | C normal |
|
609 | C normal | |
610 | C normal3 |
|
610 | C normal3 | |
611 | C sub/large4 |
|
611 | C sub/large4 | |
612 | C sub/normal4 |
|
612 | C sub/normal4 | |
613 | C sub2/large6 |
|
613 | C sub2/large6 | |
614 | C sub2/large7 |
|
614 | C sub2/large7 | |
615 | $ rm large8 |
|
615 | $ rm large8 | |
616 | $ hg ci -Am 'this used to not notice the rm' |
|
616 | $ hg ci -Am 'this used to not notice the rm' | |
617 | removing large8 |
|
617 | removing large8 | |
618 | Invoking status precommit hook |
|
618 | Invoking status precommit hook | |
619 | R large8 |
|
619 | R large8 | |
620 | Invoking status postcommit hook |
|
620 | Invoking status postcommit hook | |
621 | C normal |
|
621 | C normal | |
622 | C normal3 |
|
622 | C normal3 | |
623 | C sub/large4 |
|
623 | C sub/large4 | |
624 | C sub/normal4 |
|
624 | C sub/normal4 | |
625 | C sub2/large6 |
|
625 | C sub2/large6 | |
626 | C sub2/large7 |
|
626 | C sub2/large7 | |
627 |
|
627 | |||
628 | Test that a standin can't be added as a large file |
|
628 | Test that a standin can't be added as a large file | |
629 |
|
629 | |||
630 | $ touch large |
|
630 | $ touch large | |
631 | $ hg add --large large |
|
631 | $ hg add --large large | |
632 | $ hg ci -m "add" |
|
632 | $ hg ci -m "add" | |
633 | Invoking status precommit hook |
|
633 | Invoking status precommit hook | |
634 | A large |
|
634 | A large | |
635 | Invoking status postcommit hook |
|
635 | Invoking status postcommit hook | |
636 | C large |
|
636 | C large | |
637 | C normal |
|
637 | C normal | |
638 | C normal3 |
|
638 | C normal3 | |
639 | C sub/large4 |
|
639 | C sub/large4 | |
640 | C sub/normal4 |
|
640 | C sub/normal4 | |
641 | C sub2/large6 |
|
641 | C sub2/large6 | |
642 | C sub2/large7 |
|
642 | C sub2/large7 | |
643 | $ hg remove large |
|
643 | $ hg remove large | |
644 | $ touch large |
|
644 | $ touch large | |
645 | $ hg addremove --config largefiles.patterns=**large --traceback |
|
645 | $ hg addremove --config largefiles.patterns=**large --traceback | |
646 | adding large as a largefile |
|
646 | adding large as a largefile | |
647 |
|
647 | |||
648 | Test that outgoing --large works (with revsets too) |
|
648 | Test that outgoing --large works (with revsets too) | |
649 | $ hg outgoing --rev '.^' --large |
|
649 | $ hg outgoing --rev '.^' --large | |
650 | comparing with $TESTTMP/a (glob) |
|
650 | comparing with $TESTTMP/a (glob) | |
651 | searching for changes |
|
651 | searching for changes | |
652 | changeset: 8:c02fd3b77ec4 |
|
652 | changeset: 8:c02fd3b77ec4 | |
653 | user: test |
|
653 | user: test | |
654 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
654 | date: Thu Jan 01 00:00:00 1970 +0000 | |
655 | summary: add foo |
|
655 | summary: add foo | |
656 |
|
656 | |||
657 | changeset: 9:289dd08c9bbb |
|
657 | changeset: 9:289dd08c9bbb | |
658 | user: test |
|
658 | user: test | |
659 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
659 | date: Thu Jan 01 00:00:00 1970 +0000 | |
660 | summary: used to say nothing changed |
|
660 | summary: used to say nothing changed | |
661 |
|
661 | |||
662 | changeset: 10:34f23ac6ac12 |
|
662 | changeset: 10:34f23ac6ac12 | |
663 | user: test |
|
663 | user: test | |
664 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
664 | date: Thu Jan 01 00:00:00 1970 +0000 | |
665 | summary: added |
|
665 | summary: added | |
666 |
|
666 | |||
667 | changeset: 12:710c1b2f523c |
|
667 | changeset: 12:710c1b2f523c | |
668 | parent: 10:34f23ac6ac12 |
|
668 | parent: 10:34f23ac6ac12 | |
669 | user: test |
|
669 | user: test | |
670 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
670 | date: Thu Jan 01 00:00:00 1970 +0000 | |
671 | summary: removed large |
|
671 | summary: removed large | |
672 |
|
672 | |||
673 | changeset: 13:0a3e75774479 |
|
673 | changeset: 13:0a3e75774479 | |
674 | user: test |
|
674 | user: test | |
675 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
675 | date: Thu Jan 01 00:00:00 1970 +0000 | |
676 | summary: this used to add large8 as normal and commit both |
|
676 | summary: this used to add large8 as normal and commit both | |
677 |
|
677 | |||
678 | changeset: 14:84f3d378175c |
|
678 | changeset: 14:84f3d378175c | |
679 | user: test |
|
679 | user: test | |
680 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
680 | date: Thu Jan 01 00:00:00 1970 +0000 | |
681 | summary: this used to not notice the rm |
|
681 | summary: this used to not notice the rm | |
682 |
|
682 | |||
683 | largefiles to upload (1 entities): |
|
683 | largefiles to upload (1 entities): | |
684 | large8 |
|
684 | large8 | |
685 |
|
685 | |||
686 | $ cd ../a |
|
686 | $ cd ../a | |
687 |
|
687 | |||
688 | Clone a largefiles repo. |
|
688 | Clone a largefiles repo. | |
689 |
|
689 | |||
690 | $ hg clone . ../b |
|
690 | $ hg clone . ../b | |
691 | updating to branch default |
|
691 | updating to branch default | |
692 | getting changed largefiles |
|
692 | getting changed largefiles | |
693 | 3 largefiles updated, 0 removed |
|
693 | 3 largefiles updated, 0 removed | |
694 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
694 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
695 | $ cd ../b |
|
695 | $ cd ../b | |
696 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
696 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
697 | 7:daea875e9014 add/edit more largefiles |
|
697 | 7:daea875e9014 add/edit more largefiles | |
698 | 6:4355d653f84f edit files yet again |
|
698 | 6:4355d653f84f edit files yet again | |
699 | 5:9d5af5072dbd edit files again |
|
699 | 5:9d5af5072dbd edit files again | |
700 | 4:74c02385b94c move files |
|
700 | 4:74c02385b94c move files | |
701 | 3:9e8fbc4bce62 copy files |
|
701 | 3:9e8fbc4bce62 copy files | |
702 | 2:51a0ae4d5864 remove files |
|
702 | 2:51a0ae4d5864 remove files | |
703 | 1:ce8896473775 edit files |
|
703 | 1:ce8896473775 edit files | |
704 | 0:30d30fe6a5be add files |
|
704 | 0:30d30fe6a5be add files | |
705 | $ cat normal3 |
|
705 | $ cat normal3 | |
706 | normal33 |
|
706 | normal33 | |
707 |
|
707 | |||
708 | Test graph log |
|
708 | Test graph log | |
709 |
|
709 | |||
710 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' |
|
710 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' | |
711 | @ 7:daea875e9014 add/edit more largefiles |
|
711 | @ 7:daea875e9014 add/edit more largefiles | |
712 | | |
|
712 | | | |
713 | o 6:4355d653f84f edit files yet again |
|
713 | o 6:4355d653f84f edit files yet again | |
714 | | |
|
714 | | | |
715 | o 5:9d5af5072dbd edit files again |
|
715 | o 5:9d5af5072dbd edit files again | |
716 | | |
|
716 | | | |
717 | o 4:74c02385b94c move files |
|
717 | o 4:74c02385b94c move files | |
718 | | |
|
718 | | | |
719 | o 3:9e8fbc4bce62 copy files |
|
719 | o 3:9e8fbc4bce62 copy files | |
720 | | |
|
720 | | | |
721 | o 2:51a0ae4d5864 remove files |
|
721 | o 2:51a0ae4d5864 remove files | |
722 | | |
|
722 | | | |
723 | o 1:ce8896473775 edit files |
|
723 | o 1:ce8896473775 edit files | |
724 | | |
|
724 | | | |
725 | o 0:30d30fe6a5be add files |
|
725 | o 0:30d30fe6a5be add files | |
726 |
|
726 | |||
727 |
|
727 | |||
728 | Test log with --patch |
|
728 | Test log with --patch | |
729 |
|
729 | |||
730 | $ hg log --patch -r 6::7 |
|
730 | $ hg log --patch -r 6::7 | |
731 | changeset: 6:4355d653f84f |
|
731 | changeset: 6:4355d653f84f | |
732 | user: test |
|
732 | user: test | |
733 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
733 | date: Thu Jan 01 00:00:00 1970 +0000 | |
734 | summary: edit files yet again |
|
734 | summary: edit files yet again | |
735 |
|
735 | |||
736 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/large3 |
|
736 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/large3 | |
737 | --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 |
|
737 | --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 | |
738 | +++ b/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 |
|
738 | +++ b/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 | |
739 | @@ -1,1 +1,1 @@ |
|
739 | @@ -1,1 +1,1 @@ | |
740 | -baaf12afde9d8d67f25dab6dced0d2bf77dba47c |
|
740 | -baaf12afde9d8d67f25dab6dced0d2bf77dba47c | |
741 | +7838695e10da2bb75ac1156565f40a2595fa2fa0 |
|
741 | +7838695e10da2bb75ac1156565f40a2595fa2fa0 | |
742 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 |
|
742 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 | |
743 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
743 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
744 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
744 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
745 | @@ -1,1 +1,1 @@ |
|
745 | @@ -1,1 +1,1 @@ | |
746 | -aeb2210d19f02886dde00dac279729a48471e2f9 |
|
746 | -aeb2210d19f02886dde00dac279729a48471e2f9 | |
747 | +971fb41e78fea4f8e0ba5244784239371cb00591 |
|
747 | +971fb41e78fea4f8e0ba5244784239371cb00591 | |
748 | diff -r 9d5af5072dbd -r 4355d653f84f normal3 |
|
748 | diff -r 9d5af5072dbd -r 4355d653f84f normal3 | |
749 | --- a/normal3 Thu Jan 01 00:00:00 1970 +0000 |
|
749 | --- a/normal3 Thu Jan 01 00:00:00 1970 +0000 | |
750 | +++ b/normal3 Thu Jan 01 00:00:00 1970 +0000 |
|
750 | +++ b/normal3 Thu Jan 01 00:00:00 1970 +0000 | |
751 | @@ -1,1 +1,1 @@ |
|
751 | @@ -1,1 +1,1 @@ | |
752 | -normal3 |
|
752 | -normal3 | |
753 | +normal33 |
|
753 | +normal33 | |
754 | diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4 |
|
754 | diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4 | |
755 | --- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 |
|
755 | --- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 | |
756 | +++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 |
|
756 | +++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 | |
757 | @@ -1,1 +1,1 @@ |
|
757 | @@ -1,1 +1,1 @@ | |
758 | -normal4 |
|
758 | -normal4 | |
759 | +normal44 |
|
759 | +normal44 | |
760 |
|
760 | |||
761 | changeset: 7:daea875e9014 |
|
761 | changeset: 7:daea875e9014 | |
762 | tag: tip |
|
762 | tag: tip | |
763 | user: test |
|
763 | user: test | |
764 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
764 | date: Thu Jan 01 00:00:00 1970 +0000 | |
765 | summary: add/edit more largefiles |
|
765 | summary: add/edit more largefiles | |
766 |
|
766 | |||
767 | diff -r 4355d653f84f -r daea875e9014 .hglf/large3 |
|
767 | diff -r 4355d653f84f -r daea875e9014 .hglf/large3 | |
768 | --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 |
|
768 | --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 | |
769 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
769 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
770 | @@ -1,1 +0,0 @@ |
|
770 | @@ -1,1 +0,0 @@ | |
771 | -7838695e10da2bb75ac1156565f40a2595fa2fa0 |
|
771 | -7838695e10da2bb75ac1156565f40a2595fa2fa0 | |
772 | diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large6 |
|
772 | diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large6 | |
773 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
773 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
774 | +++ b/.hglf/sub2/large6 Thu Jan 01 00:00:00 1970 +0000 |
|
774 | +++ b/.hglf/sub2/large6 Thu Jan 01 00:00:00 1970 +0000 | |
775 | @@ -0,0 +1,1 @@ |
|
775 | @@ -0,0 +1,1 @@ | |
776 | +0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30 |
|
776 | +0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30 | |
777 | diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large7 |
|
777 | diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large7 | |
778 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
778 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
779 | +++ b/.hglf/sub2/large7 Thu Jan 01 00:00:00 1970 +0000 |
|
779 | +++ b/.hglf/sub2/large7 Thu Jan 01 00:00:00 1970 +0000 | |
780 | @@ -0,0 +1,1 @@ |
|
780 | @@ -0,0 +1,1 @@ | |
781 | +bb3151689acb10f0c3125c560d5e63df914bc1af |
|
781 | +bb3151689acb10f0c3125c560d5e63df914bc1af | |
782 |
|
782 | |||
783 |
|
783 | |||
784 | $ hg log --patch -r 6::7 sub/ |
|
784 | $ hg log --patch -r 6::7 sub/ | |
785 | changeset: 6:4355d653f84f |
|
785 | changeset: 6:4355d653f84f | |
786 | user: test |
|
786 | user: test | |
787 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
787 | date: Thu Jan 01 00:00:00 1970 +0000 | |
788 | summary: edit files yet again |
|
788 | summary: edit files yet again | |
789 |
|
789 | |||
790 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 |
|
790 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 | |
791 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
791 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
792 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
792 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
793 | @@ -1,1 +1,1 @@ |
|
793 | @@ -1,1 +1,1 @@ | |
794 | -aeb2210d19f02886dde00dac279729a48471e2f9 |
|
794 | -aeb2210d19f02886dde00dac279729a48471e2f9 | |
795 | +971fb41e78fea4f8e0ba5244784239371cb00591 |
|
795 | +971fb41e78fea4f8e0ba5244784239371cb00591 | |
796 | diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4 |
|
796 | diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4 | |
797 | --- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 |
|
797 | --- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 | |
798 | +++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 |
|
798 | +++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 | |
799 | @@ -1,1 +1,1 @@ |
|
799 | @@ -1,1 +1,1 @@ | |
800 | -normal4 |
|
800 | -normal4 | |
801 | +normal44 |
|
801 | +normal44 | |
802 |
|
802 | |||
803 |
|
803 | |||
804 | log with both --follow and --patch |
|
804 | log with both --follow and --patch | |
805 |
|
805 | |||
806 | $ hg log --follow --patch --limit 2 |
|
806 | $ hg log --follow --patch --limit 2 | |
807 | changeset: 7:daea875e9014 |
|
807 | changeset: 7:daea875e9014 | |
808 | tag: tip |
|
808 | tag: tip | |
809 | user: test |
|
809 | user: test | |
810 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
810 | date: Thu Jan 01 00:00:00 1970 +0000 | |
811 | summary: add/edit more largefiles |
|
811 | summary: add/edit more largefiles | |
812 |
|
812 | |||
813 | diff -r 4355d653f84f -r daea875e9014 .hglf/large3 |
|
813 | diff -r 4355d653f84f -r daea875e9014 .hglf/large3 | |
814 | --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 |
|
814 | --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 | |
815 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
815 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
816 | @@ -1,1 +0,0 @@ |
|
816 | @@ -1,1 +0,0 @@ | |
817 | -7838695e10da2bb75ac1156565f40a2595fa2fa0 |
|
817 | -7838695e10da2bb75ac1156565f40a2595fa2fa0 | |
818 | diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large6 |
|
818 | diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large6 | |
819 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
819 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
820 | +++ b/.hglf/sub2/large6 Thu Jan 01 00:00:00 1970 +0000 |
|
820 | +++ b/.hglf/sub2/large6 Thu Jan 01 00:00:00 1970 +0000 | |
821 | @@ -0,0 +1,1 @@ |
|
821 | @@ -0,0 +1,1 @@ | |
822 | +0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30 |
|
822 | +0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30 | |
823 | diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large7 |
|
823 | diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large7 | |
824 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
824 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
825 | +++ b/.hglf/sub2/large7 Thu Jan 01 00:00:00 1970 +0000 |
|
825 | +++ b/.hglf/sub2/large7 Thu Jan 01 00:00:00 1970 +0000 | |
826 | @@ -0,0 +1,1 @@ |
|
826 | @@ -0,0 +1,1 @@ | |
827 | +bb3151689acb10f0c3125c560d5e63df914bc1af |
|
827 | +bb3151689acb10f0c3125c560d5e63df914bc1af | |
828 |
|
828 | |||
829 | changeset: 6:4355d653f84f |
|
829 | changeset: 6:4355d653f84f | |
830 | user: test |
|
830 | user: test | |
831 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
831 | date: Thu Jan 01 00:00:00 1970 +0000 | |
832 | summary: edit files yet again |
|
832 | summary: edit files yet again | |
833 |
|
833 | |||
834 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/large3 |
|
834 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/large3 | |
835 | --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 |
|
835 | --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 | |
836 | +++ b/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 |
|
836 | +++ b/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 | |
837 | @@ -1,1 +1,1 @@ |
|
837 | @@ -1,1 +1,1 @@ | |
838 | -baaf12afde9d8d67f25dab6dced0d2bf77dba47c |
|
838 | -baaf12afde9d8d67f25dab6dced0d2bf77dba47c | |
839 | +7838695e10da2bb75ac1156565f40a2595fa2fa0 |
|
839 | +7838695e10da2bb75ac1156565f40a2595fa2fa0 | |
840 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 |
|
840 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 | |
841 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
841 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
842 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
842 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
843 | @@ -1,1 +1,1 @@ |
|
843 | @@ -1,1 +1,1 @@ | |
844 | -aeb2210d19f02886dde00dac279729a48471e2f9 |
|
844 | -aeb2210d19f02886dde00dac279729a48471e2f9 | |
845 | +971fb41e78fea4f8e0ba5244784239371cb00591 |
|
845 | +971fb41e78fea4f8e0ba5244784239371cb00591 | |
846 | diff -r 9d5af5072dbd -r 4355d653f84f normal3 |
|
846 | diff -r 9d5af5072dbd -r 4355d653f84f normal3 | |
847 | --- a/normal3 Thu Jan 01 00:00:00 1970 +0000 |
|
847 | --- a/normal3 Thu Jan 01 00:00:00 1970 +0000 | |
848 | +++ b/normal3 Thu Jan 01 00:00:00 1970 +0000 |
|
848 | +++ b/normal3 Thu Jan 01 00:00:00 1970 +0000 | |
849 | @@ -1,1 +1,1 @@ |
|
849 | @@ -1,1 +1,1 @@ | |
850 | -normal3 |
|
850 | -normal3 | |
851 | +normal33 |
|
851 | +normal33 | |
852 | diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4 |
|
852 | diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4 | |
853 | --- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 |
|
853 | --- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 | |
854 | +++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 |
|
854 | +++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 | |
855 | @@ -1,1 +1,1 @@ |
|
855 | @@ -1,1 +1,1 @@ | |
856 | -normal4 |
|
856 | -normal4 | |
857 | +normal44 |
|
857 | +normal44 | |
858 |
|
858 | |||
859 | $ hg log --follow --patch sub/large4 |
|
859 | $ hg log --follow --patch sub/large4 | |
860 | changeset: 6:4355d653f84f |
|
860 | changeset: 6:4355d653f84f | |
861 | user: test |
|
861 | user: test | |
862 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
862 | date: Thu Jan 01 00:00:00 1970 +0000 | |
863 | summary: edit files yet again |
|
863 | summary: edit files yet again | |
864 |
|
864 | |||
865 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 |
|
865 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 | |
866 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
866 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
867 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
867 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
868 | @@ -1,1 +1,1 @@ |
|
868 | @@ -1,1 +1,1 @@ | |
869 | -aeb2210d19f02886dde00dac279729a48471e2f9 |
|
869 | -aeb2210d19f02886dde00dac279729a48471e2f9 | |
870 | +971fb41e78fea4f8e0ba5244784239371cb00591 |
|
870 | +971fb41e78fea4f8e0ba5244784239371cb00591 | |
871 |
|
871 | |||
872 | changeset: 5:9d5af5072dbd |
|
872 | changeset: 5:9d5af5072dbd | |
873 | user: test |
|
873 | user: test | |
874 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
874 | date: Thu Jan 01 00:00:00 1970 +0000 | |
875 | summary: edit files again |
|
875 | summary: edit files again | |
876 |
|
876 | |||
877 | diff -r 74c02385b94c -r 9d5af5072dbd .hglf/sub/large4 |
|
877 | diff -r 74c02385b94c -r 9d5af5072dbd .hglf/sub/large4 | |
878 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
878 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
879 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
879 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
880 | @@ -1,1 +1,1 @@ |
|
880 | @@ -1,1 +1,1 @@ | |
881 | -eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
|
881 | -eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 | |
882 | +aeb2210d19f02886dde00dac279729a48471e2f9 |
|
882 | +aeb2210d19f02886dde00dac279729a48471e2f9 | |
883 |
|
883 | |||
884 | changeset: 4:74c02385b94c |
|
884 | changeset: 4:74c02385b94c | |
885 | user: test |
|
885 | user: test | |
886 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
886 | date: Thu Jan 01 00:00:00 1970 +0000 | |
887 | summary: move files |
|
887 | summary: move files | |
888 |
|
888 | |||
889 | diff -r 9e8fbc4bce62 -r 74c02385b94c .hglf/sub/large4 |
|
889 | diff -r 9e8fbc4bce62 -r 74c02385b94c .hglf/sub/large4 | |
890 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
890 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
891 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
891 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
892 | @@ -0,0 +1,1 @@ |
|
892 | @@ -0,0 +1,1 @@ | |
893 | +eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
|
893 | +eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 | |
894 |
|
894 | |||
895 | changeset: 1:ce8896473775 |
|
895 | changeset: 1:ce8896473775 | |
896 | user: test |
|
896 | user: test | |
897 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
897 | date: Thu Jan 01 00:00:00 1970 +0000 | |
898 | summary: edit files |
|
898 | summary: edit files | |
899 |
|
899 | |||
900 | diff -r 30d30fe6a5be -r ce8896473775 .hglf/sub/large2 |
|
900 | diff -r 30d30fe6a5be -r ce8896473775 .hglf/sub/large2 | |
901 | --- a/.hglf/sub/large2 Thu Jan 01 00:00:00 1970 +0000 |
|
901 | --- a/.hglf/sub/large2 Thu Jan 01 00:00:00 1970 +0000 | |
902 | +++ b/.hglf/sub/large2 Thu Jan 01 00:00:00 1970 +0000 |
|
902 | +++ b/.hglf/sub/large2 Thu Jan 01 00:00:00 1970 +0000 | |
903 | @@ -1,1 +1,1 @@ |
|
903 | @@ -1,1 +1,1 @@ | |
904 | -1deebade43c8c498a3c8daddac0244dc55d1331d |
|
904 | -1deebade43c8c498a3c8daddac0244dc55d1331d | |
905 | +eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
|
905 | +eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 | |
906 |
|
906 | |||
907 | changeset: 0:30d30fe6a5be |
|
907 | changeset: 0:30d30fe6a5be | |
908 | user: test |
|
908 | user: test | |
909 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
909 | date: Thu Jan 01 00:00:00 1970 +0000 | |
910 | summary: add files |
|
910 | summary: add files | |
911 |
|
911 | |||
912 | diff -r 000000000000 -r 30d30fe6a5be .hglf/sub/large2 |
|
912 | diff -r 000000000000 -r 30d30fe6a5be .hglf/sub/large2 | |
913 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
913 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
914 | +++ b/.hglf/sub/large2 Thu Jan 01 00:00:00 1970 +0000 |
|
914 | +++ b/.hglf/sub/large2 Thu Jan 01 00:00:00 1970 +0000 | |
915 | @@ -0,0 +1,1 @@ |
|
915 | @@ -0,0 +1,1 @@ | |
916 | +1deebade43c8c498a3c8daddac0244dc55d1331d |
|
916 | +1deebade43c8c498a3c8daddac0244dc55d1331d | |
917 |
|
917 | |||
918 | $ cat sub/normal4 |
|
918 | $ cat sub/normal4 | |
919 | normal44 |
|
919 | normal44 | |
920 | $ cat sub/large4 |
|
920 | $ cat sub/large4 | |
921 | large44 |
|
921 | large44 | |
922 | $ cat sub2/large6 |
|
922 | $ cat sub2/large6 | |
923 | large6 |
|
923 | large6 | |
924 | $ cat sub2/large7 |
|
924 | $ cat sub2/large7 | |
925 | large7 |
|
925 | large7 | |
926 | $ hg log -qf sub2/large7 |
|
926 | $ hg log -qf sub2/large7 | |
927 | 7:daea875e9014 |
|
927 | 7:daea875e9014 | |
928 | $ hg log -Gqf sub2/large7 |
|
928 | $ hg log -Gqf sub2/large7 | |
929 | @ 7:daea875e9014 |
|
929 | @ 7:daea875e9014 | |
930 | | |
|
930 | | | |
931 | $ cd .. |
|
931 | $ cd .. | |
932 |
|
932 | |||
933 | Test log from outside repo |
|
933 | Test log from outside repo | |
934 |
|
934 | |||
935 | $ hg log b/sub -T '{rev}:{node|short} {desc|firstline}\n' |
|
935 | $ hg log b/sub -T '{rev}:{node|short} {desc|firstline}\n' | |
936 | 6:4355d653f84f edit files yet again |
|
936 | 6:4355d653f84f edit files yet again | |
937 | 5:9d5af5072dbd edit files again |
|
937 | 5:9d5af5072dbd edit files again | |
938 | 4:74c02385b94c move files |
|
938 | 4:74c02385b94c move files | |
939 | 1:ce8896473775 edit files |
|
939 | 1:ce8896473775 edit files | |
940 | 0:30d30fe6a5be add files |
|
940 | 0:30d30fe6a5be add files | |
941 |
|
941 | |||
942 | Test clone at revision |
|
942 | Test clone at revision | |
943 |
|
943 | |||
944 | $ hg clone a -r 3 c |
|
944 | $ hg clone a -r 3 c | |
945 | adding changesets |
|
945 | adding changesets | |
946 | adding manifests |
|
946 | adding manifests | |
947 | adding file changes |
|
947 | adding file changes | |
948 | added 4 changesets with 10 changes to 4 files |
|
948 | added 4 changesets with 10 changes to 4 files | |
949 | updating to branch default |
|
949 | updating to branch default | |
950 | getting changed largefiles |
|
950 | getting changed largefiles | |
951 | 2 largefiles updated, 0 removed |
|
951 | 2 largefiles updated, 0 removed | |
952 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
952 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
953 | $ cd c |
|
953 | $ cd c | |
954 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
954 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
955 | 3:9e8fbc4bce62 copy files |
|
955 | 3:9e8fbc4bce62 copy files | |
956 | 2:51a0ae4d5864 remove files |
|
956 | 2:51a0ae4d5864 remove files | |
957 | 1:ce8896473775 edit files |
|
957 | 1:ce8896473775 edit files | |
958 | 0:30d30fe6a5be add files |
|
958 | 0:30d30fe6a5be add files | |
959 | $ cat normal1 |
|
959 | $ cat normal1 | |
960 | normal22 |
|
960 | normal22 | |
961 | $ cat large1 |
|
961 | $ cat large1 | |
962 | large22 |
|
962 | large22 | |
963 | $ cat sub/normal2 |
|
963 | $ cat sub/normal2 | |
964 | normal22 |
|
964 | normal22 | |
965 | $ cat sub/large2 |
|
965 | $ cat sub/large2 | |
966 | large22 |
|
966 | large22 | |
967 |
|
967 | |||
968 | Old revisions of a clone have correct largefiles content (this also |
|
968 | Old revisions of a clone have correct largefiles content (this also | |
969 | tests update). |
|
969 | tests update). | |
970 |
|
970 | |||
971 | $ hg update -r 1 |
|
971 | $ hg update -r 1 | |
972 | getting changed largefiles |
|
972 | getting changed largefiles | |
973 | 1 largefiles updated, 0 removed |
|
973 | 1 largefiles updated, 0 removed | |
974 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
974 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
975 | $ cat large1 |
|
975 | $ cat large1 | |
976 | large11 |
|
976 | large11 | |
977 | $ cat sub/large2 |
|
977 | $ cat sub/large2 | |
978 | large22 |
|
978 | large22 | |
979 | $ cd .. |
|
979 | $ cd .. | |
980 |
|
980 | |||
981 | Test cloning with --all-largefiles flag |
|
981 | Test cloning with --all-largefiles flag | |
982 |
|
982 | |||
983 | $ rm "${USERCACHE}"/* |
|
983 | $ rm "${USERCACHE}"/* | |
984 | $ hg clone --all-largefiles a a-backup |
|
984 | $ hg clone --all-largefiles a a-backup | |
985 | updating to branch default |
|
985 | updating to branch default | |
986 | getting changed largefiles |
|
986 | getting changed largefiles | |
987 | 3 largefiles updated, 0 removed |
|
987 | 3 largefiles updated, 0 removed | |
988 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
988 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
989 | 8 additional largefiles cached |
|
989 | 8 additional largefiles cached | |
990 |
|
990 | |||
991 | $ rm "${USERCACHE}"/* |
|
991 | $ rm "${USERCACHE}"/* | |
992 | $ hg clone --all-largefiles -u 0 a a-clone0 |
|
992 | $ hg clone --all-largefiles -u 0 a a-clone0 | |
993 | updating to branch default |
|
993 | updating to branch default | |
994 | getting changed largefiles |
|
994 | getting changed largefiles | |
995 | 2 largefiles updated, 0 removed |
|
995 | 2 largefiles updated, 0 removed | |
996 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
996 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
997 | 9 additional largefiles cached |
|
997 | 9 additional largefiles cached | |
998 | $ hg -R a-clone0 sum |
|
998 | $ hg -R a-clone0 sum | |
999 | parent: 0:30d30fe6a5be |
|
999 | parent: 0:30d30fe6a5be | |
1000 | add files |
|
1000 | add files | |
1001 | branch: default |
|
1001 | branch: default | |
1002 | commit: (clean) |
|
1002 | commit: (clean) | |
1003 | update: 7 new changesets (update) |
|
1003 | update: 7 new changesets (update) | |
1004 |
|
1004 | |||
1005 | $ rm "${USERCACHE}"/* |
|
1005 | $ rm "${USERCACHE}"/* | |
1006 | $ hg clone --all-largefiles -u 1 a a-clone1 |
|
1006 | $ hg clone --all-largefiles -u 1 a a-clone1 | |
1007 | updating to branch default |
|
1007 | updating to branch default | |
1008 | getting changed largefiles |
|
1008 | getting changed largefiles | |
1009 | 2 largefiles updated, 0 removed |
|
1009 | 2 largefiles updated, 0 removed | |
1010 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1010 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1011 | 8 additional largefiles cached |
|
1011 | 8 additional largefiles cached | |
1012 | $ hg -R a-clone1 verify --large --lfa --lfc |
|
1012 | $ hg -R a-clone1 verify --large --lfa --lfc | |
1013 | checking changesets |
|
1013 | checking changesets | |
1014 | checking manifests |
|
1014 | checking manifests | |
1015 | crosschecking files in changesets and manifests |
|
1015 | crosschecking files in changesets and manifests | |
1016 | checking files |
|
1016 | checking files | |
1017 | 10 files, 8 changesets, 24 total revisions |
|
1017 | 10 files, 8 changesets, 24 total revisions | |
1018 | searching 8 changesets for largefiles |
|
1018 | searching 8 changesets for largefiles | |
1019 | verified contents of 13 revisions of 6 largefiles |
|
1019 | verified contents of 13 revisions of 6 largefiles | |
1020 | $ hg -R a-clone1 sum |
|
1020 | $ hg -R a-clone1 sum | |
1021 | parent: 1:ce8896473775 |
|
1021 | parent: 1:ce8896473775 | |
1022 | edit files |
|
1022 | edit files | |
1023 | branch: default |
|
1023 | branch: default | |
1024 | commit: (clean) |
|
1024 | commit: (clean) | |
1025 | update: 6 new changesets (update) |
|
1025 | update: 6 new changesets (update) | |
1026 |
|
1026 | |||
1027 | $ rm "${USERCACHE}"/* |
|
1027 | $ rm "${USERCACHE}"/* | |
1028 | $ hg clone --all-largefiles -U a a-clone-u |
|
1028 | $ hg clone --all-largefiles -U a a-clone-u | |
1029 | 11 additional largefiles cached |
|
1029 | 11 additional largefiles cached | |
1030 | $ hg -R a-clone-u sum |
|
1030 | $ hg -R a-clone-u sum | |
1031 | parent: -1:000000000000 (no revision checked out) |
|
1031 | parent: -1:000000000000 (no revision checked out) | |
1032 | branch: default |
|
1032 | branch: default | |
1033 | commit: (clean) |
|
1033 | commit: (clean) | |
1034 | update: 8 new changesets (update) |
|
1034 | update: 8 new changesets (update) | |
1035 |
|
1035 | |||
1036 | Show computed destination directory: |
|
1036 | Show computed destination directory: | |
1037 |
|
1037 | |||
1038 | $ mkdir xyz |
|
1038 | $ mkdir xyz | |
1039 | $ cd xyz |
|
1039 | $ cd xyz | |
1040 | $ hg clone ../a |
|
1040 | $ hg clone ../a | |
1041 | destination directory: a |
|
1041 | destination directory: a | |
1042 | updating to branch default |
|
1042 | updating to branch default | |
1043 | getting changed largefiles |
|
1043 | getting changed largefiles | |
1044 | 3 largefiles updated, 0 removed |
|
1044 | 3 largefiles updated, 0 removed | |
1045 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1045 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1046 | $ cd .. |
|
1046 | $ cd .. | |
1047 |
|
1047 | |||
1048 | Clone URL without path: |
|
1048 | Clone URL without path: | |
1049 |
|
1049 | |||
1050 | $ hg clone file:// |
|
1050 | $ hg clone file:// | |
1051 | abort: repository / not found! |
|
1051 | abort: repository / not found! | |
1052 | [255] |
|
1052 | [255] | |
1053 |
|
1053 | |||
1054 | Ensure base clone command argument validation |
|
1054 | Ensure base clone command argument validation | |
1055 |
|
1055 | |||
1056 | $ hg clone -U -u 0 a a-clone-failure |
|
1056 | $ hg clone -U -u 0 a a-clone-failure | |
1057 | abort: cannot specify both --noupdate and --updaterev |
|
1057 | abort: cannot specify both --noupdate and --updaterev | |
1058 | [255] |
|
1058 | [255] | |
1059 |
|
1059 | |||
1060 | $ hg clone --all-largefiles a ssh://localhost/a |
|
1060 | $ hg clone --all-largefiles a ssh://localhost/a | |
1061 | abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a |
|
1061 | abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a | |
1062 | [255] |
|
1062 | [255] | |
1063 |
|
1063 | |||
1064 | Test pulling with --all-largefiles flag. Also test that the largefiles are |
|
1064 | Test pulling with --all-largefiles flag. Also test that the largefiles are | |
1065 | downloaded from 'default' instead of 'default-push' when no source is specified |
|
1065 | downloaded from 'default' instead of 'default-push' when no source is specified | |
1066 | (issue3584) |
|
1066 | (issue3584) | |
1067 |
|
1067 | |||
1068 | $ rm -Rf a-backup |
|
1068 | $ rm -Rf a-backup | |
1069 | $ hg clone -r 1 a a-backup |
|
1069 | $ hg clone -r 1 a a-backup | |
1070 | adding changesets |
|
1070 | adding changesets | |
1071 | adding manifests |
|
1071 | adding manifests | |
1072 | adding file changes |
|
1072 | adding file changes | |
1073 | added 2 changesets with 8 changes to 4 files |
|
1073 | added 2 changesets with 8 changes to 4 files | |
1074 | updating to branch default |
|
1074 | updating to branch default | |
1075 | getting changed largefiles |
|
1075 | getting changed largefiles | |
1076 | 2 largefiles updated, 0 removed |
|
1076 | 2 largefiles updated, 0 removed | |
1077 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1077 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1078 | $ rm "${USERCACHE}"/* |
|
1078 | $ rm "${USERCACHE}"/* | |
1079 | $ cd a-backup |
|
1079 | $ cd a-backup | |
1080 | $ hg pull --all-largefiles --config paths.default-push=bogus/path |
|
1080 | $ hg pull --all-largefiles --config paths.default-push=bogus/path | |
1081 | pulling from $TESTTMP/a (glob) |
|
1081 | pulling from $TESTTMP/a (glob) | |
1082 | searching for changes |
|
1082 | searching for changes | |
1083 | adding changesets |
|
1083 | adding changesets | |
1084 | adding manifests |
|
1084 | adding manifests | |
1085 | adding file changes |
|
1085 | adding file changes | |
1086 | added 6 changesets with 16 changes to 8 files |
|
1086 | added 6 changesets with 16 changes to 8 files | |
1087 | (run 'hg update' to get a working copy) |
|
1087 | (run 'hg update' to get a working copy) | |
1088 | 6 largefiles cached |
|
1088 | 6 largefiles cached | |
1089 |
|
1089 | |||
1090 | redo pull with --lfrev and check it pulls largefiles for the right revs |
|
1090 | redo pull with --lfrev and check it pulls largefiles for the right revs | |
1091 |
|
1091 | |||
1092 | $ hg rollback |
|
1092 | $ hg rollback | |
1093 | repository tip rolled back to revision 1 (undo pull) |
|
1093 | repository tip rolled back to revision 1 (undo pull) | |
1094 | $ hg pull -v --lfrev 'heads(pulled())+min(pulled())' |
|
1094 | $ hg pull -v --lfrev 'heads(pulled())+min(pulled())' | |
1095 | pulling from $TESTTMP/a (glob) |
|
1095 | pulling from $TESTTMP/a (glob) | |
1096 | searching for changes |
|
1096 | searching for changes | |
1097 | all local heads known remotely |
|
1097 | all local heads known remotely | |
1098 | 6 changesets found |
|
1098 | 6 changesets found | |
1099 | adding changesets |
|
1099 | adding changesets | |
|
1100 | uncompressed size of bundle content: | |||
|
1101 | 1213 (changelog) | |||
|
1102 | 1479 (manifests) | |||
|
1103 | 234 .hglf/large1 | |||
|
1104 | 504 .hglf/large3 | |||
|
1105 | 512 .hglf/sub/large4 | |||
|
1106 | 162 .hglf/sub2/large6 | |||
|
1107 | 162 .hglf/sub2/large7 | |||
|
1108 | 192 normal1 | |||
|
1109 | 397 normal3 | |||
|
1110 | 405 sub/normal4 | |||
1100 | adding manifests |
|
1111 | adding manifests | |
1101 | adding file changes |
|
1112 | adding file changes | |
1102 | added 6 changesets with 16 changes to 8 files |
|
1113 | added 6 changesets with 16 changes to 8 files | |
1103 | calling hook changegroup.lfiles: hgext.largefiles.reposetup.checkrequireslfiles |
|
1114 | calling hook changegroup.lfiles: hgext.largefiles.reposetup.checkrequireslfiles | |
1104 | (run 'hg update' to get a working copy) |
|
1115 | (run 'hg update' to get a working copy) | |
1105 | pulling largefiles for revision 7 |
|
1116 | pulling largefiles for revision 7 | |
1106 | found 971fb41e78fea4f8e0ba5244784239371cb00591 in store |
|
1117 | found 971fb41e78fea4f8e0ba5244784239371cb00591 in store | |
1107 | found 0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30 in store |
|
1118 | found 0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30 in store | |
1108 | found bb3151689acb10f0c3125c560d5e63df914bc1af in store |
|
1119 | found bb3151689acb10f0c3125c560d5e63df914bc1af in store | |
1109 | pulling largefiles for revision 2 |
|
1120 | pulling largefiles for revision 2 | |
1110 | found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store |
|
1121 | found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store | |
1111 | 0 largefiles cached |
|
1122 | 0 largefiles cached | |
1112 |
|
1123 | |||
1113 | lfpull |
|
1124 | lfpull | |
1114 |
|
1125 | |||
1115 | $ hg lfpull -r : --config largefiles.usercache=usercache-lfpull |
|
1126 | $ hg lfpull -r : --config largefiles.usercache=usercache-lfpull | |
1116 | 2 largefiles cached |
|
1127 | 2 largefiles cached | |
1117 | $ hg lfpull -v -r 4+2 --config largefiles.usercache=usercache-lfpull |
|
1128 | $ hg lfpull -v -r 4+2 --config largefiles.usercache=usercache-lfpull | |
1118 | pulling largefiles for revision 4 |
|
1129 | pulling largefiles for revision 4 | |
1119 | found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store |
|
1130 | found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store | |
1120 | found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store |
|
1131 | found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store | |
1121 | pulling largefiles for revision 2 |
|
1132 | pulling largefiles for revision 2 | |
1122 | found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store |
|
1133 | found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store | |
1123 | 0 largefiles cached |
|
1134 | 0 largefiles cached | |
1124 |
|
1135 | |||
1125 | $ ls usercache-lfpull/* | sort |
|
1136 | $ ls usercache-lfpull/* | sort | |
1126 | usercache-lfpull/1deebade43c8c498a3c8daddac0244dc55d1331d |
|
1137 | usercache-lfpull/1deebade43c8c498a3c8daddac0244dc55d1331d | |
1127 | usercache-lfpull/4669e532d5b2c093a78eca010077e708a071bb64 |
|
1138 | usercache-lfpull/4669e532d5b2c093a78eca010077e708a071bb64 | |
1128 |
|
1139 | |||
1129 | $ cd .. |
|
1140 | $ cd .. | |
1130 |
|
1141 | |||
1131 | Rebasing between two repositories does not revert largefiles to old |
|
1142 | Rebasing between two repositories does not revert largefiles to old | |
1132 | revisions (this was a very bad bug that took a lot of work to fix). |
|
1143 | revisions (this was a very bad bug that took a lot of work to fix). | |
1133 |
|
1144 | |||
1134 | $ hg clone a d |
|
1145 | $ hg clone a d | |
1135 | updating to branch default |
|
1146 | updating to branch default | |
1136 | getting changed largefiles |
|
1147 | getting changed largefiles | |
1137 | 3 largefiles updated, 0 removed |
|
1148 | 3 largefiles updated, 0 removed | |
1138 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1149 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1139 | $ cd b |
|
1150 | $ cd b | |
1140 | $ echo large4-modified > sub/large4 |
|
1151 | $ echo large4-modified > sub/large4 | |
1141 | $ echo normal3-modified > normal3 |
|
1152 | $ echo normal3-modified > normal3 | |
1142 | $ hg commit -m "modify normal file and largefile in repo b" |
|
1153 | $ hg commit -m "modify normal file and largefile in repo b" | |
1143 | Invoking status precommit hook |
|
1154 | Invoking status precommit hook | |
1144 | M normal3 |
|
1155 | M normal3 | |
1145 | M sub/large4 |
|
1156 | M sub/large4 | |
1146 | $ cd ../d |
|
1157 | $ cd ../d | |
1147 | $ echo large6-modified > sub2/large6 |
|
1158 | $ echo large6-modified > sub2/large6 | |
1148 | $ echo normal4-modified > sub/normal4 |
|
1159 | $ echo normal4-modified > sub/normal4 | |
1149 | $ hg commit -m "modify normal file largefile in repo d" |
|
1160 | $ hg commit -m "modify normal file largefile in repo d" | |
1150 | Invoking status precommit hook |
|
1161 | Invoking status precommit hook | |
1151 | M sub/normal4 |
|
1162 | M sub/normal4 | |
1152 | M sub2/large6 |
|
1163 | M sub2/large6 | |
1153 | $ cd .. |
|
1164 | $ cd .. | |
1154 | $ hg clone d e |
|
1165 | $ hg clone d e | |
1155 | updating to branch default |
|
1166 | updating to branch default | |
1156 | getting changed largefiles |
|
1167 | getting changed largefiles | |
1157 | 3 largefiles updated, 0 removed |
|
1168 | 3 largefiles updated, 0 removed | |
1158 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1169 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1159 | $ cd d |
|
1170 | $ cd d | |
1160 |
|
1171 | |||
1161 | More rebase testing, but also test that the largefiles are downloaded from |
|
1172 | More rebase testing, but also test that the largefiles are downloaded from | |
1162 | 'default-push' when no source is specified (issue3584). (The largefile from the |
|
1173 | 'default-push' when no source is specified (issue3584). (The largefile from the | |
1163 | pulled revision is however not downloaded but found in the local cache.) |
|
1174 | pulled revision is however not downloaded but found in the local cache.) | |
1164 | Largefiles are fetched for the new pulled revision, not for existing revisions, |
|
1175 | Largefiles are fetched for the new pulled revision, not for existing revisions, | |
1165 | rebased or not. |
|
1176 | rebased or not. | |
1166 |
|
1177 | |||
1167 | $ [ ! -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ] |
|
1178 | $ [ ! -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ] | |
1168 | $ hg pull --rebase --all-largefiles --config paths.default-push=bogus/path --config paths.default=../b |
|
1179 | $ hg pull --rebase --all-largefiles --config paths.default-push=bogus/path --config paths.default=../b | |
1169 | pulling from $TESTTMP/b (glob) |
|
1180 | pulling from $TESTTMP/b (glob) | |
1170 | searching for changes |
|
1181 | searching for changes | |
1171 | adding changesets |
|
1182 | adding changesets | |
1172 | adding manifests |
|
1183 | adding manifests | |
1173 | adding file changes |
|
1184 | adding file changes | |
1174 | added 1 changesets with 2 changes to 2 files (+1 heads) |
|
1185 | added 1 changesets with 2 changes to 2 files (+1 heads) | |
1175 | 0 largefiles cached |
|
1186 | 0 largefiles cached | |
1176 | rebasing 8:f574fb32bb45 "modify normal file largefile in repo d" |
|
1187 | rebasing 8:f574fb32bb45 "modify normal file largefile in repo d" | |
1177 | Invoking status precommit hook |
|
1188 | Invoking status precommit hook | |
1178 | M sub/normal4 |
|
1189 | M sub/normal4 | |
1179 | M sub2/large6 |
|
1190 | M sub2/large6 | |
1180 | saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob) |
|
1191 | saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob) | |
1181 | $ [ -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ] |
|
1192 | $ [ -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ] | |
1182 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
1193 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
1183 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1194 | 9:598410d3eb9a modify normal file largefile in repo d | |
1184 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1195 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1185 | 7:daea875e9014 add/edit more largefiles |
|
1196 | 7:daea875e9014 add/edit more largefiles | |
1186 | 6:4355d653f84f edit files yet again |
|
1197 | 6:4355d653f84f edit files yet again | |
1187 | 5:9d5af5072dbd edit files again |
|
1198 | 5:9d5af5072dbd edit files again | |
1188 | 4:74c02385b94c move files |
|
1199 | 4:74c02385b94c move files | |
1189 | 3:9e8fbc4bce62 copy files |
|
1200 | 3:9e8fbc4bce62 copy files | |
1190 | 2:51a0ae4d5864 remove files |
|
1201 | 2:51a0ae4d5864 remove files | |
1191 | 1:ce8896473775 edit files |
|
1202 | 1:ce8896473775 edit files | |
1192 | 0:30d30fe6a5be add files |
|
1203 | 0:30d30fe6a5be add files | |
1193 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' |
|
1204 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' | |
1194 | @ 9:598410d3eb9a modify normal file largefile in repo d |
|
1205 | @ 9:598410d3eb9a modify normal file largefile in repo d | |
1195 | | |
|
1206 | | | |
1196 | o 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1207 | o 8:a381d2c8c80e modify normal file and largefile in repo b | |
1197 | | |
|
1208 | | | |
1198 | o 7:daea875e9014 add/edit more largefiles |
|
1209 | o 7:daea875e9014 add/edit more largefiles | |
1199 | | |
|
1210 | | | |
1200 | o 6:4355d653f84f edit files yet again |
|
1211 | o 6:4355d653f84f edit files yet again | |
1201 | | |
|
1212 | | | |
1202 | o 5:9d5af5072dbd edit files again |
|
1213 | o 5:9d5af5072dbd edit files again | |
1203 | | |
|
1214 | | | |
1204 | o 4:74c02385b94c move files |
|
1215 | o 4:74c02385b94c move files | |
1205 | | |
|
1216 | | | |
1206 | o 3:9e8fbc4bce62 copy files |
|
1217 | o 3:9e8fbc4bce62 copy files | |
1207 | | |
|
1218 | | | |
1208 | o 2:51a0ae4d5864 remove files |
|
1219 | o 2:51a0ae4d5864 remove files | |
1209 | | |
|
1220 | | | |
1210 | o 1:ce8896473775 edit files |
|
1221 | o 1:ce8896473775 edit files | |
1211 | | |
|
1222 | | | |
1212 | o 0:30d30fe6a5be add files |
|
1223 | o 0:30d30fe6a5be add files | |
1213 |
|
1224 | |||
1214 | $ cat normal3 |
|
1225 | $ cat normal3 | |
1215 | normal3-modified |
|
1226 | normal3-modified | |
1216 | $ cat sub/normal4 |
|
1227 | $ cat sub/normal4 | |
1217 | normal4-modified |
|
1228 | normal4-modified | |
1218 | $ cat sub/large4 |
|
1229 | $ cat sub/large4 | |
1219 | large4-modified |
|
1230 | large4-modified | |
1220 | $ cat sub2/large6 |
|
1231 | $ cat sub2/large6 | |
1221 | large6-modified |
|
1232 | large6-modified | |
1222 | $ cat sub2/large7 |
|
1233 | $ cat sub2/large7 | |
1223 | large7 |
|
1234 | large7 | |
1224 | $ cd ../e |
|
1235 | $ cd ../e | |
1225 | $ hg pull ../b |
|
1236 | $ hg pull ../b | |
1226 | pulling from ../b |
|
1237 | pulling from ../b | |
1227 | searching for changes |
|
1238 | searching for changes | |
1228 | adding changesets |
|
1239 | adding changesets | |
1229 | adding manifests |
|
1240 | adding manifests | |
1230 | adding file changes |
|
1241 | adding file changes | |
1231 | added 1 changesets with 2 changes to 2 files (+1 heads) |
|
1242 | added 1 changesets with 2 changes to 2 files (+1 heads) | |
1232 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
1243 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
1233 | $ hg rebase |
|
1244 | $ hg rebase | |
1234 | rebasing 8:f574fb32bb45 "modify normal file largefile in repo d" |
|
1245 | rebasing 8:f574fb32bb45 "modify normal file largefile in repo d" | |
1235 | Invoking status precommit hook |
|
1246 | Invoking status precommit hook | |
1236 | M sub/normal4 |
|
1247 | M sub/normal4 | |
1237 | M sub2/large6 |
|
1248 | M sub2/large6 | |
1238 | saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob) |
|
1249 | saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob) | |
1239 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
1250 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
1240 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1251 | 9:598410d3eb9a modify normal file largefile in repo d | |
1241 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1252 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1242 | 7:daea875e9014 add/edit more largefiles |
|
1253 | 7:daea875e9014 add/edit more largefiles | |
1243 | 6:4355d653f84f edit files yet again |
|
1254 | 6:4355d653f84f edit files yet again | |
1244 | 5:9d5af5072dbd edit files again |
|
1255 | 5:9d5af5072dbd edit files again | |
1245 | 4:74c02385b94c move files |
|
1256 | 4:74c02385b94c move files | |
1246 | 3:9e8fbc4bce62 copy files |
|
1257 | 3:9e8fbc4bce62 copy files | |
1247 | 2:51a0ae4d5864 remove files |
|
1258 | 2:51a0ae4d5864 remove files | |
1248 | 1:ce8896473775 edit files |
|
1259 | 1:ce8896473775 edit files | |
1249 | 0:30d30fe6a5be add files |
|
1260 | 0:30d30fe6a5be add files | |
1250 | $ cat normal3 |
|
1261 | $ cat normal3 | |
1251 | normal3-modified |
|
1262 | normal3-modified | |
1252 | $ cat sub/normal4 |
|
1263 | $ cat sub/normal4 | |
1253 | normal4-modified |
|
1264 | normal4-modified | |
1254 | $ cat sub/large4 |
|
1265 | $ cat sub/large4 | |
1255 | large4-modified |
|
1266 | large4-modified | |
1256 | $ cat sub2/large6 |
|
1267 | $ cat sub2/large6 | |
1257 | large6-modified |
|
1268 | large6-modified | |
1258 | $ cat sub2/large7 |
|
1269 | $ cat sub2/large7 | |
1259 | large7 |
|
1270 | large7 | |
1260 |
|
1271 | |||
1261 | Log on largefiles |
|
1272 | Log on largefiles | |
1262 |
|
1273 | |||
1263 | - same output |
|
1274 | - same output | |
1264 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 |
|
1275 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 | |
1265 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1276 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1266 | 6:4355d653f84f edit files yet again |
|
1277 | 6:4355d653f84f edit files yet again | |
1267 | 5:9d5af5072dbd edit files again |
|
1278 | 5:9d5af5072dbd edit files again | |
1268 | 4:74c02385b94c move files |
|
1279 | 4:74c02385b94c move files | |
1269 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 |
|
1280 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 | |
1270 | o 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1281 | o 8:a381d2c8c80e modify normal file and largefile in repo b | |
1271 | | |
|
1282 | | | |
1272 | o 6:4355d653f84f edit files yet again |
|
1283 | o 6:4355d653f84f edit files yet again | |
1273 | | |
|
1284 | | | |
1274 | o 5:9d5af5072dbd edit files again |
|
1285 | o 5:9d5af5072dbd edit files again | |
1275 | | |
|
1286 | | | |
1276 | o 4:74c02385b94c move files |
|
1287 | o 4:74c02385b94c move files | |
1277 | | |
|
1288 | | | |
1278 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub/large4 |
|
1289 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub/large4 | |
1279 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1290 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1280 | 6:4355d653f84f edit files yet again |
|
1291 | 6:4355d653f84f edit files yet again | |
1281 | 5:9d5af5072dbd edit files again |
|
1292 | 5:9d5af5072dbd edit files again | |
1282 | 4:74c02385b94c move files |
|
1293 | 4:74c02385b94c move files | |
1283 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 |
|
1294 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 | |
1284 | o 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1295 | o 8:a381d2c8c80e modify normal file and largefile in repo b | |
1285 | | |
|
1296 | | | |
1286 | o 6:4355d653f84f edit files yet again |
|
1297 | o 6:4355d653f84f edit files yet again | |
1287 | | |
|
1298 | | | |
1288 | o 5:9d5af5072dbd edit files again |
|
1299 | o 5:9d5af5072dbd edit files again | |
1289 | | |
|
1300 | | | |
1290 | o 4:74c02385b94c move files |
|
1301 | o 4:74c02385b94c move files | |
1291 | | |
|
1302 | | | |
1292 |
|
1303 | |||
1293 | - .hglf only matches largefiles, without .hglf it matches 9 bco sub/normal |
|
1304 | - .hglf only matches largefiles, without .hglf it matches 9 bco sub/normal | |
1294 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub |
|
1305 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub | |
1295 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1306 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1296 | 6:4355d653f84f edit files yet again |
|
1307 | 6:4355d653f84f edit files yet again | |
1297 | 5:9d5af5072dbd edit files again |
|
1308 | 5:9d5af5072dbd edit files again | |
1298 | 4:74c02385b94c move files |
|
1309 | 4:74c02385b94c move files | |
1299 | 1:ce8896473775 edit files |
|
1310 | 1:ce8896473775 edit files | |
1300 | 0:30d30fe6a5be add files |
|
1311 | 0:30d30fe6a5be add files | |
1301 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub |
|
1312 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub | |
1302 | o 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1313 | o 8:a381d2c8c80e modify normal file and largefile in repo b | |
1303 | | |
|
1314 | | | |
1304 | o 6:4355d653f84f edit files yet again |
|
1315 | o 6:4355d653f84f edit files yet again | |
1305 | | |
|
1316 | | | |
1306 | o 5:9d5af5072dbd edit files again |
|
1317 | o 5:9d5af5072dbd edit files again | |
1307 | | |
|
1318 | | | |
1308 | o 4:74c02385b94c move files |
|
1319 | o 4:74c02385b94c move files | |
1309 | | |
|
1320 | | | |
1310 | o 1:ce8896473775 edit files |
|
1321 | o 1:ce8896473775 edit files | |
1311 | | |
|
1322 | | | |
1312 | o 0:30d30fe6a5be add files |
|
1323 | o 0:30d30fe6a5be add files | |
1313 |
|
1324 | |||
1314 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub |
|
1325 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub | |
1315 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1326 | 9:598410d3eb9a modify normal file largefile in repo d | |
1316 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1327 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1317 | 6:4355d653f84f edit files yet again |
|
1328 | 6:4355d653f84f edit files yet again | |
1318 | 5:9d5af5072dbd edit files again |
|
1329 | 5:9d5af5072dbd edit files again | |
1319 | 4:74c02385b94c move files |
|
1330 | 4:74c02385b94c move files | |
1320 | 1:ce8896473775 edit files |
|
1331 | 1:ce8896473775 edit files | |
1321 | 0:30d30fe6a5be add files |
|
1332 | 0:30d30fe6a5be add files | |
1322 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' sub |
|
1333 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' sub | |
1323 | @ 9:598410d3eb9a modify normal file largefile in repo d |
|
1334 | @ 9:598410d3eb9a modify normal file largefile in repo d | |
1324 | | |
|
1335 | | | |
1325 | o 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1336 | o 8:a381d2c8c80e modify normal file and largefile in repo b | |
1326 | | |
|
1337 | | | |
1327 | o 6:4355d653f84f edit files yet again |
|
1338 | o 6:4355d653f84f edit files yet again | |
1328 | | |
|
1339 | | | |
1329 | o 5:9d5af5072dbd edit files again |
|
1340 | o 5:9d5af5072dbd edit files again | |
1330 | | |
|
1341 | | | |
1331 | o 4:74c02385b94c move files |
|
1342 | o 4:74c02385b94c move files | |
1332 | | |
|
1343 | | | |
1333 | o 1:ce8896473775 edit files |
|
1344 | o 1:ce8896473775 edit files | |
1334 | | |
|
1345 | | | |
1335 | o 0:30d30fe6a5be add files |
|
1346 | o 0:30d30fe6a5be add files | |
1336 |
|
1347 | |||
1337 | - globbing gives same result |
|
1348 | - globbing gives same result | |
1338 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' 'glob:sub/*' |
|
1349 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' 'glob:sub/*' | |
1339 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1350 | 9:598410d3eb9a modify normal file largefile in repo d | |
1340 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1351 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1341 | 6:4355d653f84f edit files yet again |
|
1352 | 6:4355d653f84f edit files yet again | |
1342 | 5:9d5af5072dbd edit files again |
|
1353 | 5:9d5af5072dbd edit files again | |
1343 | 4:74c02385b94c move files |
|
1354 | 4:74c02385b94c move files | |
1344 | 1:ce8896473775 edit files |
|
1355 | 1:ce8896473775 edit files | |
1345 | 0:30d30fe6a5be add files |
|
1356 | 0:30d30fe6a5be add files | |
1346 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' 'glob:sub/*' |
|
1357 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' 'glob:sub/*' | |
1347 | @ 9:598410d3eb9a modify normal file largefile in repo d |
|
1358 | @ 9:598410d3eb9a modify normal file largefile in repo d | |
1348 | | |
|
1359 | | | |
1349 | o 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1360 | o 8:a381d2c8c80e modify normal file and largefile in repo b | |
1350 | | |
|
1361 | | | |
1351 | o 6:4355d653f84f edit files yet again |
|
1362 | o 6:4355d653f84f edit files yet again | |
1352 | | |
|
1363 | | | |
1353 | o 5:9d5af5072dbd edit files again |
|
1364 | o 5:9d5af5072dbd edit files again | |
1354 | | |
|
1365 | | | |
1355 | o 4:74c02385b94c move files |
|
1366 | o 4:74c02385b94c move files | |
1356 | | |
|
1367 | | | |
1357 | o 1:ce8896473775 edit files |
|
1368 | o 1:ce8896473775 edit files | |
1358 | | |
|
1369 | | | |
1359 | o 0:30d30fe6a5be add files |
|
1370 | o 0:30d30fe6a5be add files | |
1360 |
|
1371 | |||
1361 | Rollback on largefiles. |
|
1372 | Rollback on largefiles. | |
1362 |
|
1373 | |||
1363 | $ echo large4-modified-again > sub/large4 |
|
1374 | $ echo large4-modified-again > sub/large4 | |
1364 | $ hg commit -m "Modify large4 again" |
|
1375 | $ hg commit -m "Modify large4 again" | |
1365 | Invoking status precommit hook |
|
1376 | Invoking status precommit hook | |
1366 | M sub/large4 |
|
1377 | M sub/large4 | |
1367 | $ hg rollback |
|
1378 | $ hg rollback | |
1368 | repository tip rolled back to revision 9 (undo commit) |
|
1379 | repository tip rolled back to revision 9 (undo commit) | |
1369 | working directory now based on revision 9 |
|
1380 | working directory now based on revision 9 | |
1370 | $ hg st |
|
1381 | $ hg st | |
1371 | M sub/large4 |
|
1382 | M sub/large4 | |
1372 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
1383 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
1373 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1384 | 9:598410d3eb9a modify normal file largefile in repo d | |
1374 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1385 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1375 | 7:daea875e9014 add/edit more largefiles |
|
1386 | 7:daea875e9014 add/edit more largefiles | |
1376 | 6:4355d653f84f edit files yet again |
|
1387 | 6:4355d653f84f edit files yet again | |
1377 | 5:9d5af5072dbd edit files again |
|
1388 | 5:9d5af5072dbd edit files again | |
1378 | 4:74c02385b94c move files |
|
1389 | 4:74c02385b94c move files | |
1379 | 3:9e8fbc4bce62 copy files |
|
1390 | 3:9e8fbc4bce62 copy files | |
1380 | 2:51a0ae4d5864 remove files |
|
1391 | 2:51a0ae4d5864 remove files | |
1381 | 1:ce8896473775 edit files |
|
1392 | 1:ce8896473775 edit files | |
1382 | 0:30d30fe6a5be add files |
|
1393 | 0:30d30fe6a5be add files | |
1383 | $ cat sub/large4 |
|
1394 | $ cat sub/large4 | |
1384 | large4-modified-again |
|
1395 | large4-modified-again | |
1385 |
|
1396 | |||
1386 | "update --check" refuses to update with uncommitted changes. |
|
1397 | "update --check" refuses to update with uncommitted changes. | |
1387 | $ hg update --check 8 |
|
1398 | $ hg update --check 8 | |
1388 | abort: uncommitted changes |
|
1399 | abort: uncommitted changes | |
1389 | [255] |
|
1400 | [255] | |
1390 |
|
1401 | |||
1391 | "update --clean" leaves correct largefiles in working copy, even when there is |
|
1402 | "update --clean" leaves correct largefiles in working copy, even when there is | |
1392 | .orig files from revert in .hglf. |
|
1403 | .orig files from revert in .hglf. | |
1393 |
|
1404 | |||
1394 | $ echo mistake > sub2/large7 |
|
1405 | $ echo mistake > sub2/large7 | |
1395 | $ hg revert sub2/large7 |
|
1406 | $ hg revert sub2/large7 | |
1396 | $ cat sub2/large7 |
|
1407 | $ cat sub2/large7 | |
1397 | large7 |
|
1408 | large7 | |
1398 | $ cat sub2/large7.orig |
|
1409 | $ cat sub2/large7.orig | |
1399 | mistake |
|
1410 | mistake | |
1400 | $ test ! -f .hglf/sub2/large7.orig |
|
1411 | $ test ! -f .hglf/sub2/large7.orig | |
1401 |
|
1412 | |||
1402 | $ hg -q update --clean -r null |
|
1413 | $ hg -q update --clean -r null | |
1403 | $ hg update --clean |
|
1414 | $ hg update --clean | |
1404 | getting changed largefiles |
|
1415 | getting changed largefiles | |
1405 | 3 largefiles updated, 0 removed |
|
1416 | 3 largefiles updated, 0 removed | |
1406 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1417 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1407 | $ cat normal3 |
|
1418 | $ cat normal3 | |
1408 | normal3-modified |
|
1419 | normal3-modified | |
1409 | $ cat sub/normal4 |
|
1420 | $ cat sub/normal4 | |
1410 | normal4-modified |
|
1421 | normal4-modified | |
1411 | $ cat sub/large4 |
|
1422 | $ cat sub/large4 | |
1412 | large4-modified |
|
1423 | large4-modified | |
1413 | $ cat sub2/large6 |
|
1424 | $ cat sub2/large6 | |
1414 | large6-modified |
|
1425 | large6-modified | |
1415 | $ cat sub2/large7 |
|
1426 | $ cat sub2/large7 | |
1416 | large7 |
|
1427 | large7 | |
1417 | $ cat sub2/large7.orig |
|
1428 | $ cat sub2/large7.orig | |
1418 | mistake |
|
1429 | mistake | |
1419 | $ test ! -f .hglf/sub2/large7.orig |
|
1430 | $ test ! -f .hglf/sub2/large7.orig | |
1420 |
|
1431 | |||
1421 | verify that largefile .orig file no longer is overwritten on every update -C: |
|
1432 | verify that largefile .orig file no longer is overwritten on every update -C: | |
1422 | $ hg update --clean |
|
1433 | $ hg update --clean | |
1423 | getting changed largefiles |
|
1434 | getting changed largefiles | |
1424 | 0 largefiles updated, 0 removed |
|
1435 | 0 largefiles updated, 0 removed | |
1425 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1436 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1426 | $ cat sub2/large7.orig |
|
1437 | $ cat sub2/large7.orig | |
1427 | mistake |
|
1438 | mistake | |
1428 | $ rm sub2/large7.orig |
|
1439 | $ rm sub2/large7.orig | |
1429 |
|
1440 | |||
1430 | Now "update check" is happy. |
|
1441 | Now "update check" is happy. | |
1431 | $ hg update --check 8 |
|
1442 | $ hg update --check 8 | |
1432 | getting changed largefiles |
|
1443 | getting changed largefiles | |
1433 | 1 largefiles updated, 0 removed |
|
1444 | 1 largefiles updated, 0 removed | |
1434 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1445 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1435 | $ hg update --check |
|
1446 | $ hg update --check | |
1436 | getting changed largefiles |
|
1447 | getting changed largefiles | |
1437 | 1 largefiles updated, 0 removed |
|
1448 | 1 largefiles updated, 0 removed | |
1438 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1449 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1439 |
|
1450 | |||
1440 | Test removing empty largefiles directories on update |
|
1451 | Test removing empty largefiles directories on update | |
1441 | $ test -d sub2 && echo "sub2 exists" |
|
1452 | $ test -d sub2 && echo "sub2 exists" | |
1442 | sub2 exists |
|
1453 | sub2 exists | |
1443 | $ hg update -q null |
|
1454 | $ hg update -q null | |
1444 | $ test -d sub2 && echo "error: sub2 should not exist anymore" |
|
1455 | $ test -d sub2 && echo "error: sub2 should not exist anymore" | |
1445 | [1] |
|
1456 | [1] | |
1446 | $ hg update -q |
|
1457 | $ hg update -q | |
1447 |
|
1458 | |||
1448 | Test hg remove removes empty largefiles directories |
|
1459 | Test hg remove removes empty largefiles directories | |
1449 | $ test -d sub2 && echo "sub2 exists" |
|
1460 | $ test -d sub2 && echo "sub2 exists" | |
1450 | sub2 exists |
|
1461 | sub2 exists | |
1451 | $ hg remove sub2/* |
|
1462 | $ hg remove sub2/* | |
1452 | $ test -d sub2 && echo "error: sub2 should not exist anymore" |
|
1463 | $ test -d sub2 && echo "error: sub2 should not exist anymore" | |
1453 | [1] |
|
1464 | [1] | |
1454 | $ hg revert sub2/large6 sub2/large7 |
|
1465 | $ hg revert sub2/large6 sub2/large7 | |
1455 |
|
1466 | |||
1456 | "revert" works on largefiles (and normal files too). |
|
1467 | "revert" works on largefiles (and normal files too). | |
1457 | $ echo hack3 >> normal3 |
|
1468 | $ echo hack3 >> normal3 | |
1458 | $ echo hack4 >> sub/normal4 |
|
1469 | $ echo hack4 >> sub/normal4 | |
1459 | $ echo hack4 >> sub/large4 |
|
1470 | $ echo hack4 >> sub/large4 | |
1460 | $ rm sub2/large6 |
|
1471 | $ rm sub2/large6 | |
1461 | $ hg revert sub2/large6 |
|
1472 | $ hg revert sub2/large6 | |
1462 | $ hg rm sub2/large6 |
|
1473 | $ hg rm sub2/large6 | |
1463 | $ echo new >> sub2/large8 |
|
1474 | $ echo new >> sub2/large8 | |
1464 | $ hg add --large sub2/large8 |
|
1475 | $ hg add --large sub2/large8 | |
1465 | # XXX we don't really want to report that we're reverting the standin; |
|
1476 | # XXX we don't really want to report that we're reverting the standin; | |
1466 | # that's just an implementation detail. But I don't see an obvious fix. ;-( |
|
1477 | # that's just an implementation detail. But I don't see an obvious fix. ;-( | |
1467 | $ hg revert sub |
|
1478 | $ hg revert sub | |
1468 | reverting .hglf/sub/large4 (glob) |
|
1479 | reverting .hglf/sub/large4 (glob) | |
1469 | reverting sub/normal4 (glob) |
|
1480 | reverting sub/normal4 (glob) | |
1470 | $ hg status |
|
1481 | $ hg status | |
1471 | M normal3 |
|
1482 | M normal3 | |
1472 | A sub2/large8 |
|
1483 | A sub2/large8 | |
1473 | R sub2/large6 |
|
1484 | R sub2/large6 | |
1474 | ? sub/large4.orig |
|
1485 | ? sub/large4.orig | |
1475 | ? sub/normal4.orig |
|
1486 | ? sub/normal4.orig | |
1476 | $ cat sub/normal4 |
|
1487 | $ cat sub/normal4 | |
1477 | normal4-modified |
|
1488 | normal4-modified | |
1478 | $ cat sub/large4 |
|
1489 | $ cat sub/large4 | |
1479 | large4-modified |
|
1490 | large4-modified | |
1480 | $ hg revert -a --no-backup |
|
1491 | $ hg revert -a --no-backup | |
1481 | undeleting .hglf/sub2/large6 (glob) |
|
1492 | undeleting .hglf/sub2/large6 (glob) | |
1482 | forgetting .hglf/sub2/large8 (glob) |
|
1493 | forgetting .hglf/sub2/large8 (glob) | |
1483 | reverting normal3 |
|
1494 | reverting normal3 | |
1484 | $ hg status |
|
1495 | $ hg status | |
1485 | ? sub/large4.orig |
|
1496 | ? sub/large4.orig | |
1486 | ? sub/normal4.orig |
|
1497 | ? sub/normal4.orig | |
1487 | ? sub2/large8 |
|
1498 | ? sub2/large8 | |
1488 | $ cat normal3 |
|
1499 | $ cat normal3 | |
1489 | normal3-modified |
|
1500 | normal3-modified | |
1490 | $ cat sub2/large6 |
|
1501 | $ cat sub2/large6 | |
1491 | large6-modified |
|
1502 | large6-modified | |
1492 | $ rm sub/*.orig sub2/large8 |
|
1503 | $ rm sub/*.orig sub2/large8 | |
1493 |
|
1504 | |||
1494 | revert some files to an older revision |
|
1505 | revert some files to an older revision | |
1495 | $ hg revert --no-backup -r 8 sub2 |
|
1506 | $ hg revert --no-backup -r 8 sub2 | |
1496 | reverting .hglf/sub2/large6 (glob) |
|
1507 | reverting .hglf/sub2/large6 (glob) | |
1497 | $ cat sub2/large6 |
|
1508 | $ cat sub2/large6 | |
1498 | large6 |
|
1509 | large6 | |
1499 | $ hg revert --no-backup -C -r '.^' sub2 |
|
1510 | $ hg revert --no-backup -C -r '.^' sub2 | |
1500 | $ hg revert --no-backup sub2 |
|
1511 | $ hg revert --no-backup sub2 | |
1501 | reverting .hglf/sub2/large6 (glob) |
|
1512 | reverting .hglf/sub2/large6 (glob) | |
1502 | $ hg status |
|
1513 | $ hg status | |
1503 |
|
1514 | |||
1504 | "verify --large" actually verifies largefiles |
|
1515 | "verify --large" actually verifies largefiles | |
1505 |
|
1516 | |||
1506 | - Where Do We Come From? What Are We? Where Are We Going? |
|
1517 | - Where Do We Come From? What Are We? Where Are We Going? | |
1507 | $ pwd |
|
1518 | $ pwd | |
1508 | $TESTTMP/e |
|
1519 | $TESTTMP/e | |
1509 | $ hg paths |
|
1520 | $ hg paths | |
1510 | default = $TESTTMP/d (glob) |
|
1521 | default = $TESTTMP/d (glob) | |
1511 |
|
1522 | |||
1512 | $ hg verify --large |
|
1523 | $ hg verify --large | |
1513 | checking changesets |
|
1524 | checking changesets | |
1514 | checking manifests |
|
1525 | checking manifests | |
1515 | crosschecking files in changesets and manifests |
|
1526 | crosschecking files in changesets and manifests | |
1516 | checking files |
|
1527 | checking files | |
1517 | 10 files, 10 changesets, 28 total revisions |
|
1528 | 10 files, 10 changesets, 28 total revisions | |
1518 | searching 1 changesets for largefiles |
|
1529 | searching 1 changesets for largefiles | |
1519 | verified existence of 3 revisions of 3 largefiles |
|
1530 | verified existence of 3 revisions of 3 largefiles | |
1520 |
|
1531 | |||
1521 | - introduce missing blob in local store repo and make sure that this is caught: |
|
1532 | - introduce missing blob in local store repo and make sure that this is caught: | |
1522 | $ mv $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 . |
|
1533 | $ mv $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 . | |
1523 | $ hg verify --large |
|
1534 | $ hg verify --large | |
1524 | checking changesets |
|
1535 | checking changesets | |
1525 | checking manifests |
|
1536 | checking manifests | |
1526 | crosschecking files in changesets and manifests |
|
1537 | crosschecking files in changesets and manifests | |
1527 | checking files |
|
1538 | checking files | |
1528 | 10 files, 10 changesets, 28 total revisions |
|
1539 | 10 files, 10 changesets, 28 total revisions | |
1529 | searching 1 changesets for largefiles |
|
1540 | searching 1 changesets for largefiles | |
1530 | changeset 9:598410d3eb9a: sub/large4 references missing $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 (glob) |
|
1541 | changeset 9:598410d3eb9a: sub/large4 references missing $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 (glob) | |
1531 | verified existence of 3 revisions of 3 largefiles |
|
1542 | verified existence of 3 revisions of 3 largefiles | |
1532 | [1] |
|
1543 | [1] | |
1533 |
|
1544 | |||
1534 | - introduce corruption and make sure that it is caught when checking content: |
|
1545 | - introduce corruption and make sure that it is caught when checking content: | |
1535 | $ echo '5 cents' > $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 |
|
1546 | $ echo '5 cents' > $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 | |
1536 | $ hg verify -q --large --lfc |
|
1547 | $ hg verify -q --large --lfc | |
1537 | changeset 9:598410d3eb9a: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 (glob) |
|
1548 | changeset 9:598410d3eb9a: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 (glob) | |
1538 | [1] |
|
1549 | [1] | |
1539 |
|
1550 | |||
1540 | - cleanup |
|
1551 | - cleanup | |
1541 | $ mv e166e74c7303192238d60af5a9c4ce9bef0b7928 $TESTTMP/d/.hg/largefiles/ |
|
1552 | $ mv e166e74c7303192238d60af5a9c4ce9bef0b7928 $TESTTMP/d/.hg/largefiles/ | |
1542 |
|
1553 | |||
1543 | - verifying all revisions will fail because we didn't clone all largefiles to d: |
|
1554 | - verifying all revisions will fail because we didn't clone all largefiles to d: | |
1544 | $ echo 'T-shirt' > $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
|
1555 | $ echo 'T-shirt' > $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 | |
1545 | $ hg verify -q --lfa --lfc |
|
1556 | $ hg verify -q --lfa --lfc | |
1546 | changeset 0:30d30fe6a5be: large1 references missing $TESTTMP/d/.hg/largefiles/4669e532d5b2c093a78eca010077e708a071bb64 (glob) |
|
1557 | changeset 0:30d30fe6a5be: large1 references missing $TESTTMP/d/.hg/largefiles/4669e532d5b2c093a78eca010077e708a071bb64 (glob) | |
1547 | changeset 0:30d30fe6a5be: sub/large2 references missing $TESTTMP/d/.hg/largefiles/1deebade43c8c498a3c8daddac0244dc55d1331d (glob) |
|
1558 | changeset 0:30d30fe6a5be: sub/large2 references missing $TESTTMP/d/.hg/largefiles/1deebade43c8c498a3c8daddac0244dc55d1331d (glob) | |
1548 | changeset 1:ce8896473775: large1 references missing $TESTTMP/d/.hg/largefiles/5f78770c0e77ba4287ad6ef3071c9bf9c379742f (glob) |
|
1559 | changeset 1:ce8896473775: large1 references missing $TESTTMP/d/.hg/largefiles/5f78770c0e77ba4287ad6ef3071c9bf9c379742f (glob) | |
1549 | changeset 1:ce8896473775: sub/large2 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) |
|
1560 | changeset 1:ce8896473775: sub/large2 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) | |
1550 | changeset 3:9e8fbc4bce62: large1 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) |
|
1561 | changeset 3:9e8fbc4bce62: large1 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) | |
1551 | changeset 4:74c02385b94c: large3 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) |
|
1562 | changeset 4:74c02385b94c: large3 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) | |
1552 | changeset 4:74c02385b94c: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) |
|
1563 | changeset 4:74c02385b94c: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) | |
1553 | changeset 5:9d5af5072dbd: large3 references missing $TESTTMP/d/.hg/largefiles/baaf12afde9d8d67f25dab6dced0d2bf77dba47c (glob) |
|
1564 | changeset 5:9d5af5072dbd: large3 references missing $TESTTMP/d/.hg/largefiles/baaf12afde9d8d67f25dab6dced0d2bf77dba47c (glob) | |
1554 | changeset 5:9d5af5072dbd: sub/large4 references missing $TESTTMP/d/.hg/largefiles/aeb2210d19f02886dde00dac279729a48471e2f9 (glob) |
|
1565 | changeset 5:9d5af5072dbd: sub/large4 references missing $TESTTMP/d/.hg/largefiles/aeb2210d19f02886dde00dac279729a48471e2f9 (glob) | |
1555 | changeset 6:4355d653f84f: large3 references missing $TESTTMP/d/.hg/largefiles/7838695e10da2bb75ac1156565f40a2595fa2fa0 (glob) |
|
1566 | changeset 6:4355d653f84f: large3 references missing $TESTTMP/d/.hg/largefiles/7838695e10da2bb75ac1156565f40a2595fa2fa0 (glob) | |
1556 | [1] |
|
1567 | [1] | |
1557 |
|
1568 | |||
1558 | - cleanup |
|
1569 | - cleanup | |
1559 | $ rm $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
|
1570 | $ rm $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 | |
1560 | $ rm -f .hglf/sub/*.orig |
|
1571 | $ rm -f .hglf/sub/*.orig | |
1561 |
|
1572 | |||
1562 | Update to revision with missing largefile - and make sure it really is missing |
|
1573 | Update to revision with missing largefile - and make sure it really is missing | |
1563 |
|
1574 | |||
1564 | $ rm ${USERCACHE}/7838695e10da2bb75ac1156565f40a2595fa2fa0 |
|
1575 | $ rm ${USERCACHE}/7838695e10da2bb75ac1156565f40a2595fa2fa0 | |
1565 | $ hg up -r 6 |
|
1576 | $ hg up -r 6 | |
1566 | getting changed largefiles |
|
1577 | getting changed largefiles | |
1567 | large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob) |
|
1578 | large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob) | |
1568 | 1 largefiles updated, 2 removed |
|
1579 | 1 largefiles updated, 2 removed | |
1569 | 4 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1580 | 4 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1570 | $ rm normal3 |
|
1581 | $ rm normal3 | |
1571 | $ echo >> sub/normal4 |
|
1582 | $ echo >> sub/normal4 | |
1572 | $ hg ci -m 'commit with missing files' |
|
1583 | $ hg ci -m 'commit with missing files' | |
1573 | Invoking status precommit hook |
|
1584 | Invoking status precommit hook | |
1574 | M sub/normal4 |
|
1585 | M sub/normal4 | |
1575 | ! large3 |
|
1586 | ! large3 | |
1576 | ! normal3 |
|
1587 | ! normal3 | |
1577 | created new head |
|
1588 | created new head | |
1578 | $ hg st |
|
1589 | $ hg st | |
1579 | ! large3 |
|
1590 | ! large3 | |
1580 | ! normal3 |
|
1591 | ! normal3 | |
1581 | $ hg up -r. |
|
1592 | $ hg up -r. | |
1582 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1593 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1583 | $ hg st |
|
1594 | $ hg st | |
1584 | ! large3 |
|
1595 | ! large3 | |
1585 | ! normal3 |
|
1596 | ! normal3 | |
1586 | $ hg up -Cr. |
|
1597 | $ hg up -Cr. | |
1587 | getting changed largefiles |
|
1598 | getting changed largefiles | |
1588 | large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob) |
|
1599 | large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob) | |
1589 | 0 largefiles updated, 0 removed |
|
1600 | 0 largefiles updated, 0 removed | |
1590 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1601 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1591 | $ hg st |
|
1602 | $ hg st | |
1592 | ! large3 |
|
1603 | ! large3 | |
1593 | $ hg rollback |
|
1604 | $ hg rollback | |
1594 | repository tip rolled back to revision 9 (undo commit) |
|
1605 | repository tip rolled back to revision 9 (undo commit) | |
1595 | working directory now based on revision 6 |
|
1606 | working directory now based on revision 6 | |
1596 |
|
1607 | |||
1597 | Merge with revision with missing largefile - and make sure it tries to fetch it. |
|
1608 | Merge with revision with missing largefile - and make sure it tries to fetch it. | |
1598 |
|
1609 | |||
1599 | $ hg up -Cqr null |
|
1610 | $ hg up -Cqr null | |
1600 | $ echo f > f |
|
1611 | $ echo f > f | |
1601 | $ hg ci -Am branch |
|
1612 | $ hg ci -Am branch | |
1602 | adding f |
|
1613 | adding f | |
1603 | Invoking status precommit hook |
|
1614 | Invoking status precommit hook | |
1604 | A f |
|
1615 | A f | |
1605 | created new head |
|
1616 | created new head | |
1606 | $ hg merge -r 6 |
|
1617 | $ hg merge -r 6 | |
1607 | getting changed largefiles |
|
1618 | getting changed largefiles | |
1608 | large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob) |
|
1619 | large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob) | |
1609 | 1 largefiles updated, 0 removed |
|
1620 | 1 largefiles updated, 0 removed | |
1610 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1621 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1611 | (branch merge, don't forget to commit) |
|
1622 | (branch merge, don't forget to commit) | |
1612 |
|
1623 | |||
1613 | $ hg rollback -q |
|
1624 | $ hg rollback -q | |
1614 | $ hg up -Cq |
|
1625 | $ hg up -Cq | |
1615 |
|
1626 | |||
1616 | Pulling 0 revisions with --all-largefiles should not fetch for all revisions |
|
1627 | Pulling 0 revisions with --all-largefiles should not fetch for all revisions | |
1617 |
|
1628 | |||
1618 | $ hg pull --all-largefiles |
|
1629 | $ hg pull --all-largefiles | |
1619 | pulling from $TESTTMP/d (glob) |
|
1630 | pulling from $TESTTMP/d (glob) | |
1620 | searching for changes |
|
1631 | searching for changes | |
1621 | no changes found |
|
1632 | no changes found | |
1622 |
|
1633 | |||
1623 | Merging does not revert to old versions of largefiles and also check |
|
1634 | Merging does not revert to old versions of largefiles and also check | |
1624 | that merging after having pulled from a non-default remote works |
|
1635 | that merging after having pulled from a non-default remote works | |
1625 | correctly. |
|
1636 | correctly. | |
1626 |
|
1637 | |||
1627 | $ cd .. |
|
1638 | $ cd .. | |
1628 | $ hg clone -r 7 e temp |
|
1639 | $ hg clone -r 7 e temp | |
1629 | adding changesets |
|
1640 | adding changesets | |
1630 | adding manifests |
|
1641 | adding manifests | |
1631 | adding file changes |
|
1642 | adding file changes | |
1632 | added 8 changesets with 24 changes to 10 files |
|
1643 | added 8 changesets with 24 changes to 10 files | |
1633 | updating to branch default |
|
1644 | updating to branch default | |
1634 | getting changed largefiles |
|
1645 | getting changed largefiles | |
1635 | 3 largefiles updated, 0 removed |
|
1646 | 3 largefiles updated, 0 removed | |
1636 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1647 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1637 | $ hg clone temp f |
|
1648 | $ hg clone temp f | |
1638 | updating to branch default |
|
1649 | updating to branch default | |
1639 | getting changed largefiles |
|
1650 | getting changed largefiles | |
1640 | 3 largefiles updated, 0 removed |
|
1651 | 3 largefiles updated, 0 removed | |
1641 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1652 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1642 | # Delete the largefiles in the largefiles system cache so that we have an |
|
1653 | # Delete the largefiles in the largefiles system cache so that we have an | |
1643 | # opportunity to test that caching after a pull works. |
|
1654 | # opportunity to test that caching after a pull works. | |
1644 | $ rm "${USERCACHE}"/* |
|
1655 | $ rm "${USERCACHE}"/* | |
1645 | $ cd f |
|
1656 | $ cd f | |
1646 | $ echo "large4-merge-test" > sub/large4 |
|
1657 | $ echo "large4-merge-test" > sub/large4 | |
1647 | $ hg commit -m "Modify large4 to test merge" |
|
1658 | $ hg commit -m "Modify large4 to test merge" | |
1648 | Invoking status precommit hook |
|
1659 | Invoking status precommit hook | |
1649 | M sub/large4 |
|
1660 | M sub/large4 | |
1650 | # Test --cache-largefiles flag |
|
1661 | # Test --cache-largefiles flag | |
1651 | $ hg pull --lfrev 'heads(pulled())' ../e |
|
1662 | $ hg pull --lfrev 'heads(pulled())' ../e | |
1652 | pulling from ../e |
|
1663 | pulling from ../e | |
1653 | searching for changes |
|
1664 | searching for changes | |
1654 | adding changesets |
|
1665 | adding changesets | |
1655 | adding manifests |
|
1666 | adding manifests | |
1656 | adding file changes |
|
1667 | adding file changes | |
1657 | added 2 changesets with 4 changes to 4 files (+1 heads) |
|
1668 | added 2 changesets with 4 changes to 4 files (+1 heads) | |
1658 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
1669 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
1659 | 2 largefiles cached |
|
1670 | 2 largefiles cached | |
1660 | $ hg merge |
|
1671 | $ hg merge | |
1661 | largefile sub/large4 has a merge conflict |
|
1672 | largefile sub/large4 has a merge conflict | |
1662 | ancestor was 971fb41e78fea4f8e0ba5244784239371cb00591 |
|
1673 | ancestor was 971fb41e78fea4f8e0ba5244784239371cb00591 | |
1663 | keep (l)ocal d846f26643bfa8ec210be40cc93cc6b7ff1128ea or |
|
1674 | keep (l)ocal d846f26643bfa8ec210be40cc93cc6b7ff1128ea or | |
1664 | take (o)ther e166e74c7303192238d60af5a9c4ce9bef0b7928? l |
|
1675 | take (o)ther e166e74c7303192238d60af5a9c4ce9bef0b7928? l | |
1665 | getting changed largefiles |
|
1676 | getting changed largefiles | |
1666 | 1 largefiles updated, 0 removed |
|
1677 | 1 largefiles updated, 0 removed | |
1667 | 3 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
1678 | 3 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
1668 | (branch merge, don't forget to commit) |
|
1679 | (branch merge, don't forget to commit) | |
1669 | $ hg commit -m "Merge repos e and f" |
|
1680 | $ hg commit -m "Merge repos e and f" | |
1670 | Invoking status precommit hook |
|
1681 | Invoking status precommit hook | |
1671 | M normal3 |
|
1682 | M normal3 | |
1672 | M sub/normal4 |
|
1683 | M sub/normal4 | |
1673 | M sub2/large6 |
|
1684 | M sub2/large6 | |
1674 | $ cat normal3 |
|
1685 | $ cat normal3 | |
1675 | normal3-modified |
|
1686 | normal3-modified | |
1676 | $ cat sub/normal4 |
|
1687 | $ cat sub/normal4 | |
1677 | normal4-modified |
|
1688 | normal4-modified | |
1678 | $ cat sub/large4 |
|
1689 | $ cat sub/large4 | |
1679 | large4-merge-test |
|
1690 | large4-merge-test | |
1680 | $ cat sub2/large6 |
|
1691 | $ cat sub2/large6 | |
1681 | large6-modified |
|
1692 | large6-modified | |
1682 | $ cat sub2/large7 |
|
1693 | $ cat sub2/large7 | |
1683 | large7 |
|
1694 | large7 | |
1684 |
|
1695 | |||
1685 | Test status after merging with a branch that introduces a new largefile: |
|
1696 | Test status after merging with a branch that introduces a new largefile: | |
1686 |
|
1697 | |||
1687 | $ echo large > large |
|
1698 | $ echo large > large | |
1688 | $ hg add --large large |
|
1699 | $ hg add --large large | |
1689 | $ hg commit -m 'add largefile' |
|
1700 | $ hg commit -m 'add largefile' | |
1690 | Invoking status precommit hook |
|
1701 | Invoking status precommit hook | |
1691 | A large |
|
1702 | A large | |
1692 | $ hg update -q ".^" |
|
1703 | $ hg update -q ".^" | |
1693 | $ echo change >> normal3 |
|
1704 | $ echo change >> normal3 | |
1694 | $ hg commit -m 'some change' |
|
1705 | $ hg commit -m 'some change' | |
1695 | Invoking status precommit hook |
|
1706 | Invoking status precommit hook | |
1696 | M normal3 |
|
1707 | M normal3 | |
1697 | created new head |
|
1708 | created new head | |
1698 | $ hg merge |
|
1709 | $ hg merge | |
1699 | getting changed largefiles |
|
1710 | getting changed largefiles | |
1700 | 1 largefiles updated, 0 removed |
|
1711 | 1 largefiles updated, 0 removed | |
1701 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1712 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1702 | (branch merge, don't forget to commit) |
|
1713 | (branch merge, don't forget to commit) | |
1703 | $ hg status |
|
1714 | $ hg status | |
1704 | M large |
|
1715 | M large | |
1705 |
|
1716 | |||
1706 | - make sure update of merge with removed largefiles fails as expected |
|
1717 | - make sure update of merge with removed largefiles fails as expected | |
1707 | $ hg rm sub2/large6 |
|
1718 | $ hg rm sub2/large6 | |
1708 | $ hg up -r. |
|
1719 | $ hg up -r. | |
1709 | abort: outstanding uncommitted merge |
|
1720 | abort: outstanding uncommitted merge | |
1710 | [255] |
|
1721 | [255] | |
1711 |
|
1722 | |||
1712 | - revert should be able to revert files introduced in a pending merge |
|
1723 | - revert should be able to revert files introduced in a pending merge | |
1713 | $ hg revert --all -r . |
|
1724 | $ hg revert --all -r . | |
1714 | removing .hglf/large (glob) |
|
1725 | removing .hglf/large (glob) | |
1715 | undeleting .hglf/sub2/large6 (glob) |
|
1726 | undeleting .hglf/sub2/large6 (glob) | |
1716 |
|
1727 | |||
1717 | Test that a normal file and a largefile with the same name and path cannot |
|
1728 | Test that a normal file and a largefile with the same name and path cannot | |
1718 | coexist. |
|
1729 | coexist. | |
1719 |
|
1730 | |||
1720 | $ rm sub2/large7 |
|
1731 | $ rm sub2/large7 | |
1721 | $ echo "largeasnormal" > sub2/large7 |
|
1732 | $ echo "largeasnormal" > sub2/large7 | |
1722 | $ hg add sub2/large7 |
|
1733 | $ hg add sub2/large7 | |
1723 | sub2/large7 already a largefile |
|
1734 | sub2/large7 already a largefile | |
1724 |
|
1735 | |||
1725 | Test that transplanting a largefile change works correctly. |
|
1736 | Test that transplanting a largefile change works correctly. | |
1726 |
|
1737 | |||
1727 | $ cd .. |
|
1738 | $ cd .. | |
1728 | $ hg clone -r 8 d g |
|
1739 | $ hg clone -r 8 d g | |
1729 | adding changesets |
|
1740 | adding changesets | |
1730 | adding manifests |
|
1741 | adding manifests | |
1731 | adding file changes |
|
1742 | adding file changes | |
1732 | added 9 changesets with 26 changes to 10 files |
|
1743 | added 9 changesets with 26 changes to 10 files | |
1733 | updating to branch default |
|
1744 | updating to branch default | |
1734 | getting changed largefiles |
|
1745 | getting changed largefiles | |
1735 | 3 largefiles updated, 0 removed |
|
1746 | 3 largefiles updated, 0 removed | |
1736 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1747 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1737 | $ cd g |
|
1748 | $ cd g | |
1738 | $ hg transplant -s ../d 598410d3eb9a |
|
1749 | $ hg transplant -s ../d 598410d3eb9a | |
1739 | searching for changes |
|
1750 | searching for changes | |
1740 | searching for changes |
|
1751 | searching for changes | |
1741 | adding changesets |
|
1752 | adding changesets | |
1742 | adding manifests |
|
1753 | adding manifests | |
1743 | adding file changes |
|
1754 | adding file changes | |
1744 | added 1 changesets with 2 changes to 2 files |
|
1755 | added 1 changesets with 2 changes to 2 files | |
1745 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
1756 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
1746 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1757 | 9:598410d3eb9a modify normal file largefile in repo d | |
1747 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1758 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1748 | 7:daea875e9014 add/edit more largefiles |
|
1759 | 7:daea875e9014 add/edit more largefiles | |
1749 | 6:4355d653f84f edit files yet again |
|
1760 | 6:4355d653f84f edit files yet again | |
1750 | 5:9d5af5072dbd edit files again |
|
1761 | 5:9d5af5072dbd edit files again | |
1751 | 4:74c02385b94c move files |
|
1762 | 4:74c02385b94c move files | |
1752 | 3:9e8fbc4bce62 copy files |
|
1763 | 3:9e8fbc4bce62 copy files | |
1753 | 2:51a0ae4d5864 remove files |
|
1764 | 2:51a0ae4d5864 remove files | |
1754 | 1:ce8896473775 edit files |
|
1765 | 1:ce8896473775 edit files | |
1755 | 0:30d30fe6a5be add files |
|
1766 | 0:30d30fe6a5be add files | |
1756 | $ cat normal3 |
|
1767 | $ cat normal3 | |
1757 | normal3-modified |
|
1768 | normal3-modified | |
1758 | $ cat sub/normal4 |
|
1769 | $ cat sub/normal4 | |
1759 | normal4-modified |
|
1770 | normal4-modified | |
1760 | $ cat sub/large4 |
|
1771 | $ cat sub/large4 | |
1761 | large4-modified |
|
1772 | large4-modified | |
1762 | $ cat sub2/large6 |
|
1773 | $ cat sub2/large6 | |
1763 | large6-modified |
|
1774 | large6-modified | |
1764 | $ cat sub2/large7 |
|
1775 | $ cat sub2/large7 | |
1765 | large7 |
|
1776 | large7 | |
1766 |
|
1777 | |||
1767 | Cat a largefile |
|
1778 | Cat a largefile | |
1768 | $ hg cat normal3 |
|
1779 | $ hg cat normal3 | |
1769 | normal3-modified |
|
1780 | normal3-modified | |
1770 | $ hg cat sub/large4 |
|
1781 | $ hg cat sub/large4 | |
1771 | large4-modified |
|
1782 | large4-modified | |
1772 | $ rm "${USERCACHE}"/* |
|
1783 | $ rm "${USERCACHE}"/* | |
1773 | $ hg cat -r a381d2c8c80e -o cat.out sub/large4 |
|
1784 | $ hg cat -r a381d2c8c80e -o cat.out sub/large4 | |
1774 | $ cat cat.out |
|
1785 | $ cat cat.out | |
1775 | large4-modified |
|
1786 | large4-modified | |
1776 | $ rm cat.out |
|
1787 | $ rm cat.out | |
1777 | $ hg cat -r a381d2c8c80e normal3 |
|
1788 | $ hg cat -r a381d2c8c80e normal3 | |
1778 | normal3-modified |
|
1789 | normal3-modified | |
1779 | $ hg cat -r '.^' normal3 |
|
1790 | $ hg cat -r '.^' normal3 | |
1780 | normal3-modified |
|
1791 | normal3-modified | |
1781 | $ hg cat -r '.^' sub/large4 doesntexist |
|
1792 | $ hg cat -r '.^' sub/large4 doesntexist | |
1782 | large4-modified |
|
1793 | large4-modified | |
1783 | doesntexist: no such file in rev a381d2c8c80e |
|
1794 | doesntexist: no such file in rev a381d2c8c80e | |
1784 | $ hg --cwd sub cat -r '.^' large4 |
|
1795 | $ hg --cwd sub cat -r '.^' large4 | |
1785 | large4-modified |
|
1796 | large4-modified | |
1786 | $ hg --cwd sub cat -r '.^' ../normal3 |
|
1797 | $ hg --cwd sub cat -r '.^' ../normal3 | |
1787 | normal3-modified |
|
1798 | normal3-modified | |
1788 | Cat a standin |
|
1799 | Cat a standin | |
1789 | $ hg cat .hglf/sub/large4 |
|
1800 | $ hg cat .hglf/sub/large4 | |
1790 | e166e74c7303192238d60af5a9c4ce9bef0b7928 |
|
1801 | e166e74c7303192238d60af5a9c4ce9bef0b7928 | |
1791 | $ hg cat .hglf/normal3 |
|
1802 | $ hg cat .hglf/normal3 | |
1792 | .hglf/normal3: no such file in rev 598410d3eb9a (glob) |
|
1803 | .hglf/normal3: no such file in rev 598410d3eb9a (glob) | |
1793 | [1] |
|
1804 | [1] | |
1794 |
|
1805 | |||
1795 | Test that renaming a largefile results in correct output for status |
|
1806 | Test that renaming a largefile results in correct output for status | |
1796 |
|
1807 | |||
1797 | $ hg rename sub/large4 large4-renamed |
|
1808 | $ hg rename sub/large4 large4-renamed | |
1798 | $ hg commit -m "test rename output" |
|
1809 | $ hg commit -m "test rename output" | |
1799 | Invoking status precommit hook |
|
1810 | Invoking status precommit hook | |
1800 | A large4-renamed |
|
1811 | A large4-renamed | |
1801 | R sub/large4 |
|
1812 | R sub/large4 | |
1802 | $ cat large4-renamed |
|
1813 | $ cat large4-renamed | |
1803 | large4-modified |
|
1814 | large4-modified | |
1804 | $ cd sub2 |
|
1815 | $ cd sub2 | |
1805 | $ hg rename large6 large6-renamed |
|
1816 | $ hg rename large6 large6-renamed | |
1806 | $ hg st |
|
1817 | $ hg st | |
1807 | A sub2/large6-renamed |
|
1818 | A sub2/large6-renamed | |
1808 | R sub2/large6 |
|
1819 | R sub2/large6 | |
1809 | $ cd .. |
|
1820 | $ cd .. | |
1810 |
|
1821 | |||
1811 | Test --normal flag |
|
1822 | Test --normal flag | |
1812 |
|
1823 | |||
1813 | $ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null |
|
1824 | $ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null | |
1814 | $ hg add --normal --large new-largefile |
|
1825 | $ hg add --normal --large new-largefile | |
1815 | abort: --normal cannot be used with --large |
|
1826 | abort: --normal cannot be used with --large | |
1816 | [255] |
|
1827 | [255] | |
1817 | $ hg add --normal new-largefile |
|
1828 | $ hg add --normal new-largefile | |
1818 | new-largefile: up to 69 MB of RAM may be required to manage this file |
|
1829 | new-largefile: up to 69 MB of RAM may be required to manage this file | |
1819 | (use 'hg revert new-largefile' to cancel the pending addition) |
|
1830 | (use 'hg revert new-largefile' to cancel the pending addition) | |
1820 | $ cd .. |
|
1831 | $ cd .. | |
1821 |
|
1832 | |||
1822 |
|
1833 | |||
1823 |
|
1834 |
@@ -1,1178 +1,1182 b'' | |||||
1 | #require killdaemons |
|
1 | #require killdaemons | |
2 |
|
2 | |||
3 | $ hgph() { hg log -G --template "{rev} {phase} {desc} - {node|short}\n" $*; } |
|
3 | $ hgph() { hg log -G --template "{rev} {phase} {desc} - {node|short}\n" $*; } | |
4 |
|
4 | |||
5 | $ mkcommit() { |
|
5 | $ mkcommit() { | |
6 | > echo "$1" > "$1" |
|
6 | > echo "$1" > "$1" | |
7 | > hg add "$1" |
|
7 | > hg add "$1" | |
8 | > message="$1" |
|
8 | > message="$1" | |
9 | > shift |
|
9 | > shift | |
10 | > hg ci -m "$message" $* |
|
10 | > hg ci -m "$message" $* | |
11 | > } |
|
11 | > } | |
12 |
|
12 | |||
13 | $ hg init alpha |
|
13 | $ hg init alpha | |
14 | $ cd alpha |
|
14 | $ cd alpha | |
15 | $ mkcommit a-A |
|
15 | $ mkcommit a-A | |
16 | $ mkcommit a-B |
|
16 | $ mkcommit a-B | |
17 | $ mkcommit a-C |
|
17 | $ mkcommit a-C | |
18 | $ mkcommit a-D |
|
18 | $ mkcommit a-D | |
19 | $ hgph |
|
19 | $ hgph | |
20 | @ 3 draft a-D - b555f63b6063 |
|
20 | @ 3 draft a-D - b555f63b6063 | |
21 | | |
|
21 | | | |
22 | o 2 draft a-C - 54acac6f23ab |
|
22 | o 2 draft a-C - 54acac6f23ab | |
23 | | |
|
23 | | | |
24 | o 1 draft a-B - 548a3d25dbf0 |
|
24 | o 1 draft a-B - 548a3d25dbf0 | |
25 | | |
|
25 | | | |
26 | o 0 draft a-A - 054250a37db4 |
|
26 | o 0 draft a-A - 054250a37db4 | |
27 |
|
27 | |||
28 |
|
28 | |||
29 | $ hg init ../beta |
|
29 | $ hg init ../beta | |
30 | $ hg push -r 1 ../beta |
|
30 | $ hg push -r 1 ../beta | |
31 | pushing to ../beta |
|
31 | pushing to ../beta | |
32 | searching for changes |
|
32 | searching for changes | |
33 | adding changesets |
|
33 | adding changesets | |
34 | adding manifests |
|
34 | adding manifests | |
35 | adding file changes |
|
35 | adding file changes | |
36 | added 2 changesets with 2 changes to 2 files |
|
36 | added 2 changesets with 2 changes to 2 files | |
37 | $ hgph |
|
37 | $ hgph | |
38 | @ 3 draft a-D - b555f63b6063 |
|
38 | @ 3 draft a-D - b555f63b6063 | |
39 | | |
|
39 | | | |
40 | o 2 draft a-C - 54acac6f23ab |
|
40 | o 2 draft a-C - 54acac6f23ab | |
41 | | |
|
41 | | | |
42 | o 1 public a-B - 548a3d25dbf0 |
|
42 | o 1 public a-B - 548a3d25dbf0 | |
43 | | |
|
43 | | | |
44 | o 0 public a-A - 054250a37db4 |
|
44 | o 0 public a-A - 054250a37db4 | |
45 |
|
45 | |||
46 |
|
46 | |||
47 | $ cd ../beta |
|
47 | $ cd ../beta | |
48 | $ hgph |
|
48 | $ hgph | |
49 | o 1 public a-B - 548a3d25dbf0 |
|
49 | o 1 public a-B - 548a3d25dbf0 | |
50 | | |
|
50 | | | |
51 | o 0 public a-A - 054250a37db4 |
|
51 | o 0 public a-A - 054250a37db4 | |
52 |
|
52 | |||
53 | $ hg up -q |
|
53 | $ hg up -q | |
54 | $ mkcommit b-A |
|
54 | $ mkcommit b-A | |
55 | $ hgph |
|
55 | $ hgph | |
56 | @ 2 draft b-A - f54f1bb90ff3 |
|
56 | @ 2 draft b-A - f54f1bb90ff3 | |
57 | | |
|
57 | | | |
58 | o 1 public a-B - 548a3d25dbf0 |
|
58 | o 1 public a-B - 548a3d25dbf0 | |
59 | | |
|
59 | | | |
60 | o 0 public a-A - 054250a37db4 |
|
60 | o 0 public a-A - 054250a37db4 | |
61 |
|
61 | |||
62 | $ hg pull ../alpha |
|
62 | $ hg pull ../alpha | |
63 | pulling from ../alpha |
|
63 | pulling from ../alpha | |
64 | searching for changes |
|
64 | searching for changes | |
65 | adding changesets |
|
65 | adding changesets | |
66 | adding manifests |
|
66 | adding manifests | |
67 | adding file changes |
|
67 | adding file changes | |
68 | added 2 changesets with 2 changes to 2 files (+1 heads) |
|
68 | added 2 changesets with 2 changes to 2 files (+1 heads) | |
69 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
69 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
70 | $ hgph |
|
70 | $ hgph | |
71 | o 4 public a-D - b555f63b6063 |
|
71 | o 4 public a-D - b555f63b6063 | |
72 | | |
|
72 | | | |
73 | o 3 public a-C - 54acac6f23ab |
|
73 | o 3 public a-C - 54acac6f23ab | |
74 | | |
|
74 | | | |
75 | | @ 2 draft b-A - f54f1bb90ff3 |
|
75 | | @ 2 draft b-A - f54f1bb90ff3 | |
76 | |/ |
|
76 | |/ | |
77 | o 1 public a-B - 548a3d25dbf0 |
|
77 | o 1 public a-B - 548a3d25dbf0 | |
78 | | |
|
78 | | | |
79 | o 0 public a-A - 054250a37db4 |
|
79 | o 0 public a-A - 054250a37db4 | |
80 |
|
80 | |||
81 |
|
81 | |||
82 | pull did not updated ../alpha state. |
|
82 | pull did not updated ../alpha state. | |
83 | push from alpha to beta should update phase even if nothing is transferred |
|
83 | push from alpha to beta should update phase even if nothing is transferred | |
84 |
|
84 | |||
85 | $ cd ../alpha |
|
85 | $ cd ../alpha | |
86 | $ hgph # not updated by remote pull |
|
86 | $ hgph # not updated by remote pull | |
87 | @ 3 draft a-D - b555f63b6063 |
|
87 | @ 3 draft a-D - b555f63b6063 | |
88 | | |
|
88 | | | |
89 | o 2 draft a-C - 54acac6f23ab |
|
89 | o 2 draft a-C - 54acac6f23ab | |
90 | | |
|
90 | | | |
91 | o 1 public a-B - 548a3d25dbf0 |
|
91 | o 1 public a-B - 548a3d25dbf0 | |
92 | | |
|
92 | | | |
93 | o 0 public a-A - 054250a37db4 |
|
93 | o 0 public a-A - 054250a37db4 | |
94 |
|
94 | |||
95 | $ hg push -r 2 ../beta |
|
95 | $ hg push -r 2 ../beta | |
96 | pushing to ../beta |
|
96 | pushing to ../beta | |
97 | searching for changes |
|
97 | searching for changes | |
98 | no changes found |
|
98 | no changes found | |
99 | [1] |
|
99 | [1] | |
100 | $ hgph |
|
100 | $ hgph | |
101 | @ 3 draft a-D - b555f63b6063 |
|
101 | @ 3 draft a-D - b555f63b6063 | |
102 | | |
|
102 | | | |
103 | o 2 public a-C - 54acac6f23ab |
|
103 | o 2 public a-C - 54acac6f23ab | |
104 | | |
|
104 | | | |
105 | o 1 public a-B - 548a3d25dbf0 |
|
105 | o 1 public a-B - 548a3d25dbf0 | |
106 | | |
|
106 | | | |
107 | o 0 public a-A - 054250a37db4 |
|
107 | o 0 public a-A - 054250a37db4 | |
108 |
|
108 | |||
109 | $ hg push ../beta |
|
109 | $ hg push ../beta | |
110 | pushing to ../beta |
|
110 | pushing to ../beta | |
111 | searching for changes |
|
111 | searching for changes | |
112 | no changes found |
|
112 | no changes found | |
113 | [1] |
|
113 | [1] | |
114 | $ hgph |
|
114 | $ hgph | |
115 | @ 3 public a-D - b555f63b6063 |
|
115 | @ 3 public a-D - b555f63b6063 | |
116 | | |
|
116 | | | |
117 | o 2 public a-C - 54acac6f23ab |
|
117 | o 2 public a-C - 54acac6f23ab | |
118 | | |
|
118 | | | |
119 | o 1 public a-B - 548a3d25dbf0 |
|
119 | o 1 public a-B - 548a3d25dbf0 | |
120 | | |
|
120 | | | |
121 | o 0 public a-A - 054250a37db4 |
|
121 | o 0 public a-A - 054250a37db4 | |
122 |
|
122 | |||
123 |
|
123 | |||
124 | update must update phase of common changeset too |
|
124 | update must update phase of common changeset too | |
125 |
|
125 | |||
126 | $ hg pull ../beta # getting b-A |
|
126 | $ hg pull ../beta # getting b-A | |
127 | pulling from ../beta |
|
127 | pulling from ../beta | |
128 | searching for changes |
|
128 | searching for changes | |
129 | adding changesets |
|
129 | adding changesets | |
130 | adding manifests |
|
130 | adding manifests | |
131 | adding file changes |
|
131 | adding file changes | |
132 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
132 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
133 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
133 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
134 |
|
134 | |||
135 | $ cd ../beta |
|
135 | $ cd ../beta | |
136 | $ hgph # not updated by remote pull |
|
136 | $ hgph # not updated by remote pull | |
137 | o 4 public a-D - b555f63b6063 |
|
137 | o 4 public a-D - b555f63b6063 | |
138 | | |
|
138 | | | |
139 | o 3 public a-C - 54acac6f23ab |
|
139 | o 3 public a-C - 54acac6f23ab | |
140 | | |
|
140 | | | |
141 | | @ 2 draft b-A - f54f1bb90ff3 |
|
141 | | @ 2 draft b-A - f54f1bb90ff3 | |
142 | |/ |
|
142 | |/ | |
143 | o 1 public a-B - 548a3d25dbf0 |
|
143 | o 1 public a-B - 548a3d25dbf0 | |
144 | | |
|
144 | | | |
145 | o 0 public a-A - 054250a37db4 |
|
145 | o 0 public a-A - 054250a37db4 | |
146 |
|
146 | |||
147 | $ hg pull ../alpha |
|
147 | $ hg pull ../alpha | |
148 | pulling from ../alpha |
|
148 | pulling from ../alpha | |
149 | searching for changes |
|
149 | searching for changes | |
150 | no changes found |
|
150 | no changes found | |
151 | $ hgph |
|
151 | $ hgph | |
152 | o 4 public a-D - b555f63b6063 |
|
152 | o 4 public a-D - b555f63b6063 | |
153 | | |
|
153 | | | |
154 | o 3 public a-C - 54acac6f23ab |
|
154 | o 3 public a-C - 54acac6f23ab | |
155 | | |
|
155 | | | |
156 | | @ 2 public b-A - f54f1bb90ff3 |
|
156 | | @ 2 public b-A - f54f1bb90ff3 | |
157 | |/ |
|
157 | |/ | |
158 | o 1 public a-B - 548a3d25dbf0 |
|
158 | o 1 public a-B - 548a3d25dbf0 | |
159 | | |
|
159 | | | |
160 | o 0 public a-A - 054250a37db4 |
|
160 | o 0 public a-A - 054250a37db4 | |
161 |
|
161 | |||
162 |
|
162 | |||
163 | Publish configuration option |
|
163 | Publish configuration option | |
164 | ---------------------------- |
|
164 | ---------------------------- | |
165 |
|
165 | |||
166 | Pull |
|
166 | Pull | |
167 | ```` |
|
167 | ```` | |
168 |
|
168 | |||
169 | changegroup are added without phase movement |
|
169 | changegroup are added without phase movement | |
170 |
|
170 | |||
171 | $ hg bundle -a ../base.bundle |
|
171 | $ hg bundle -a ../base.bundle | |
172 | 5 changesets found |
|
172 | 5 changesets found | |
173 | $ cd .. |
|
173 | $ cd .. | |
174 | $ hg init mu |
|
174 | $ hg init mu | |
175 | $ cd mu |
|
175 | $ cd mu | |
176 | $ cat > .hg/hgrc << EOF |
|
176 | $ cat > .hg/hgrc << EOF | |
177 | > [phases] |
|
177 | > [phases] | |
178 | > publish=0 |
|
178 | > publish=0 | |
179 | > EOF |
|
179 | > EOF | |
180 | $ hg unbundle ../base.bundle |
|
180 | $ hg unbundle ../base.bundle | |
181 | adding changesets |
|
181 | adding changesets | |
182 | adding manifests |
|
182 | adding manifests | |
183 | adding file changes |
|
183 | adding file changes | |
184 | added 5 changesets with 5 changes to 5 files (+1 heads) |
|
184 | added 5 changesets with 5 changes to 5 files (+1 heads) | |
185 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
185 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
186 | $ hgph |
|
186 | $ hgph | |
187 | o 4 draft a-D - b555f63b6063 |
|
187 | o 4 draft a-D - b555f63b6063 | |
188 | | |
|
188 | | | |
189 | o 3 draft a-C - 54acac6f23ab |
|
189 | o 3 draft a-C - 54acac6f23ab | |
190 | | |
|
190 | | | |
191 | | o 2 draft b-A - f54f1bb90ff3 |
|
191 | | o 2 draft b-A - f54f1bb90ff3 | |
192 | |/ |
|
192 | |/ | |
193 | o 1 draft a-B - 548a3d25dbf0 |
|
193 | o 1 draft a-B - 548a3d25dbf0 | |
194 | | |
|
194 | | | |
195 | o 0 draft a-A - 054250a37db4 |
|
195 | o 0 draft a-A - 054250a37db4 | |
196 |
|
196 | |||
197 | $ cd .. |
|
197 | $ cd .. | |
198 |
|
198 | |||
199 | Pulling from publish=False to publish=False does not move boundary. |
|
199 | Pulling from publish=False to publish=False does not move boundary. | |
200 |
|
200 | |||
201 | $ hg init nu |
|
201 | $ hg init nu | |
202 | $ cd nu |
|
202 | $ cd nu | |
203 | $ cat > .hg/hgrc << EOF |
|
203 | $ cat > .hg/hgrc << EOF | |
204 | > [phases] |
|
204 | > [phases] | |
205 | > publish=0 |
|
205 | > publish=0 | |
206 | > EOF |
|
206 | > EOF | |
207 | $ hg pull ../mu -r 54acac6f23ab |
|
207 | $ hg pull ../mu -r 54acac6f23ab | |
208 | pulling from ../mu |
|
208 | pulling from ../mu | |
209 | adding changesets |
|
209 | adding changesets | |
210 | adding manifests |
|
210 | adding manifests | |
211 | adding file changes |
|
211 | adding file changes | |
212 | added 3 changesets with 3 changes to 3 files |
|
212 | added 3 changesets with 3 changes to 3 files | |
213 | (run 'hg update' to get a working copy) |
|
213 | (run 'hg update' to get a working copy) | |
214 | $ hgph |
|
214 | $ hgph | |
215 | o 2 draft a-C - 54acac6f23ab |
|
215 | o 2 draft a-C - 54acac6f23ab | |
216 | | |
|
216 | | | |
217 | o 1 draft a-B - 548a3d25dbf0 |
|
217 | o 1 draft a-B - 548a3d25dbf0 | |
218 | | |
|
218 | | | |
219 | o 0 draft a-A - 054250a37db4 |
|
219 | o 0 draft a-A - 054250a37db4 | |
220 |
|
220 | |||
221 |
|
221 | |||
222 | Even for common |
|
222 | Even for common | |
223 |
|
223 | |||
224 | $ hg pull ../mu -r f54f1bb90ff3 |
|
224 | $ hg pull ../mu -r f54f1bb90ff3 | |
225 | pulling from ../mu |
|
225 | pulling from ../mu | |
226 | searching for changes |
|
226 | searching for changes | |
227 | adding changesets |
|
227 | adding changesets | |
228 | adding manifests |
|
228 | adding manifests | |
229 | adding file changes |
|
229 | adding file changes | |
230 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
230 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
231 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
231 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
232 | $ hgph |
|
232 | $ hgph | |
233 | o 3 draft b-A - f54f1bb90ff3 |
|
233 | o 3 draft b-A - f54f1bb90ff3 | |
234 | | |
|
234 | | | |
235 | | o 2 draft a-C - 54acac6f23ab |
|
235 | | o 2 draft a-C - 54acac6f23ab | |
236 | |/ |
|
236 | |/ | |
237 | o 1 draft a-B - 548a3d25dbf0 |
|
237 | o 1 draft a-B - 548a3d25dbf0 | |
238 | | |
|
238 | | | |
239 | o 0 draft a-A - 054250a37db4 |
|
239 | o 0 draft a-A - 054250a37db4 | |
240 |
|
240 | |||
241 |
|
241 | |||
242 |
|
242 | |||
243 | Pulling from Publish=True to Publish=False move boundary in common set. |
|
243 | Pulling from Publish=True to Publish=False move boundary in common set. | |
244 | we are in nu |
|
244 | we are in nu | |
245 |
|
245 | |||
246 | $ hg pull ../alpha -r b555f63b6063 |
|
246 | $ hg pull ../alpha -r b555f63b6063 | |
247 | pulling from ../alpha |
|
247 | pulling from ../alpha | |
248 | searching for changes |
|
248 | searching for changes | |
249 | adding changesets |
|
249 | adding changesets | |
250 | adding manifests |
|
250 | adding manifests | |
251 | adding file changes |
|
251 | adding file changes | |
252 | added 1 changesets with 1 changes to 1 files |
|
252 | added 1 changesets with 1 changes to 1 files | |
253 | (run 'hg update' to get a working copy) |
|
253 | (run 'hg update' to get a working copy) | |
254 | $ hgph # f54f1bb90ff3 stay draft, not ancestor of -r |
|
254 | $ hgph # f54f1bb90ff3 stay draft, not ancestor of -r | |
255 | o 4 public a-D - b555f63b6063 |
|
255 | o 4 public a-D - b555f63b6063 | |
256 | | |
|
256 | | | |
257 | | o 3 draft b-A - f54f1bb90ff3 |
|
257 | | o 3 draft b-A - f54f1bb90ff3 | |
258 | | | |
|
258 | | | | |
259 | o | 2 public a-C - 54acac6f23ab |
|
259 | o | 2 public a-C - 54acac6f23ab | |
260 | |/ |
|
260 | |/ | |
261 | o 1 public a-B - 548a3d25dbf0 |
|
261 | o 1 public a-B - 548a3d25dbf0 | |
262 | | |
|
262 | | | |
263 | o 0 public a-A - 054250a37db4 |
|
263 | o 0 public a-A - 054250a37db4 | |
264 |
|
264 | |||
265 |
|
265 | |||
266 | pulling from Publish=False to publish=False with some public |
|
266 | pulling from Publish=False to publish=False with some public | |
267 |
|
267 | |||
268 | $ hg up -q f54f1bb90ff3 |
|
268 | $ hg up -q f54f1bb90ff3 | |
269 | $ mkcommit n-A |
|
269 | $ mkcommit n-A | |
270 | $ mkcommit n-B |
|
270 | $ mkcommit n-B | |
271 | $ hgph |
|
271 | $ hgph | |
272 | @ 6 draft n-B - 145e75495359 |
|
272 | @ 6 draft n-B - 145e75495359 | |
273 | | |
|
273 | | | |
274 | o 5 draft n-A - d6bcb4f74035 |
|
274 | o 5 draft n-A - d6bcb4f74035 | |
275 | | |
|
275 | | | |
276 | | o 4 public a-D - b555f63b6063 |
|
276 | | o 4 public a-D - b555f63b6063 | |
277 | | | |
|
277 | | | | |
278 | o | 3 draft b-A - f54f1bb90ff3 |
|
278 | o | 3 draft b-A - f54f1bb90ff3 | |
279 | | | |
|
279 | | | | |
280 | | o 2 public a-C - 54acac6f23ab |
|
280 | | o 2 public a-C - 54acac6f23ab | |
281 | |/ |
|
281 | |/ | |
282 | o 1 public a-B - 548a3d25dbf0 |
|
282 | o 1 public a-B - 548a3d25dbf0 | |
283 | | |
|
283 | | | |
284 | o 0 public a-A - 054250a37db4 |
|
284 | o 0 public a-A - 054250a37db4 | |
285 |
|
285 | |||
286 | $ cd ../mu |
|
286 | $ cd ../mu | |
287 | $ hg pull ../nu |
|
287 | $ hg pull ../nu | |
288 | pulling from ../nu |
|
288 | pulling from ../nu | |
289 | searching for changes |
|
289 | searching for changes | |
290 | adding changesets |
|
290 | adding changesets | |
291 | adding manifests |
|
291 | adding manifests | |
292 | adding file changes |
|
292 | adding file changes | |
293 | added 2 changesets with 2 changes to 2 files |
|
293 | added 2 changesets with 2 changes to 2 files | |
294 | (run 'hg update' to get a working copy) |
|
294 | (run 'hg update' to get a working copy) | |
295 | $ hgph |
|
295 | $ hgph | |
296 | o 6 draft n-B - 145e75495359 |
|
296 | o 6 draft n-B - 145e75495359 | |
297 | | |
|
297 | | | |
298 | o 5 draft n-A - d6bcb4f74035 |
|
298 | o 5 draft n-A - d6bcb4f74035 | |
299 | | |
|
299 | | | |
300 | | o 4 public a-D - b555f63b6063 |
|
300 | | o 4 public a-D - b555f63b6063 | |
301 | | | |
|
301 | | | | |
302 | | o 3 public a-C - 54acac6f23ab |
|
302 | | o 3 public a-C - 54acac6f23ab | |
303 | | | |
|
303 | | | | |
304 | o | 2 draft b-A - f54f1bb90ff3 |
|
304 | o | 2 draft b-A - f54f1bb90ff3 | |
305 | |/ |
|
305 | |/ | |
306 | o 1 public a-B - 548a3d25dbf0 |
|
306 | o 1 public a-B - 548a3d25dbf0 | |
307 | | |
|
307 | | | |
308 | o 0 public a-A - 054250a37db4 |
|
308 | o 0 public a-A - 054250a37db4 | |
309 |
|
309 | |||
310 | $ cd .. |
|
310 | $ cd .. | |
311 |
|
311 | |||
312 | pulling into publish=True |
|
312 | pulling into publish=True | |
313 |
|
313 | |||
314 | $ cd alpha |
|
314 | $ cd alpha | |
315 | $ hgph |
|
315 | $ hgph | |
316 | o 4 public b-A - f54f1bb90ff3 |
|
316 | o 4 public b-A - f54f1bb90ff3 | |
317 | | |
|
317 | | | |
318 | | @ 3 public a-D - b555f63b6063 |
|
318 | | @ 3 public a-D - b555f63b6063 | |
319 | | | |
|
319 | | | | |
320 | | o 2 public a-C - 54acac6f23ab |
|
320 | | o 2 public a-C - 54acac6f23ab | |
321 | |/ |
|
321 | |/ | |
322 | o 1 public a-B - 548a3d25dbf0 |
|
322 | o 1 public a-B - 548a3d25dbf0 | |
323 | | |
|
323 | | | |
324 | o 0 public a-A - 054250a37db4 |
|
324 | o 0 public a-A - 054250a37db4 | |
325 |
|
325 | |||
326 | $ hg pull ../mu |
|
326 | $ hg pull ../mu | |
327 | pulling from ../mu |
|
327 | pulling from ../mu | |
328 | searching for changes |
|
328 | searching for changes | |
329 | adding changesets |
|
329 | adding changesets | |
330 | adding manifests |
|
330 | adding manifests | |
331 | adding file changes |
|
331 | adding file changes | |
332 | added 2 changesets with 2 changes to 2 files |
|
332 | added 2 changesets with 2 changes to 2 files | |
333 | (run 'hg update' to get a working copy) |
|
333 | (run 'hg update' to get a working copy) | |
334 | $ hgph |
|
334 | $ hgph | |
335 | o 6 draft n-B - 145e75495359 |
|
335 | o 6 draft n-B - 145e75495359 | |
336 | | |
|
336 | | | |
337 | o 5 draft n-A - d6bcb4f74035 |
|
337 | o 5 draft n-A - d6bcb4f74035 | |
338 | | |
|
338 | | | |
339 | o 4 public b-A - f54f1bb90ff3 |
|
339 | o 4 public b-A - f54f1bb90ff3 | |
340 | | |
|
340 | | | |
341 | | @ 3 public a-D - b555f63b6063 |
|
341 | | @ 3 public a-D - b555f63b6063 | |
342 | | | |
|
342 | | | | |
343 | | o 2 public a-C - 54acac6f23ab |
|
343 | | o 2 public a-C - 54acac6f23ab | |
344 | |/ |
|
344 | |/ | |
345 | o 1 public a-B - 548a3d25dbf0 |
|
345 | o 1 public a-B - 548a3d25dbf0 | |
346 | | |
|
346 | | | |
347 | o 0 public a-A - 054250a37db4 |
|
347 | o 0 public a-A - 054250a37db4 | |
348 |
|
348 | |||
349 | $ cd .. |
|
349 | $ cd .. | |
350 |
|
350 | |||
351 | pulling back into original repo |
|
351 | pulling back into original repo | |
352 |
|
352 | |||
353 | $ cd nu |
|
353 | $ cd nu | |
354 | $ hg pull ../alpha |
|
354 | $ hg pull ../alpha | |
355 | pulling from ../alpha |
|
355 | pulling from ../alpha | |
356 | searching for changes |
|
356 | searching for changes | |
357 | no changes found |
|
357 | no changes found | |
358 | $ hgph |
|
358 | $ hgph | |
359 | @ 6 public n-B - 145e75495359 |
|
359 | @ 6 public n-B - 145e75495359 | |
360 | | |
|
360 | | | |
361 | o 5 public n-A - d6bcb4f74035 |
|
361 | o 5 public n-A - d6bcb4f74035 | |
362 | | |
|
362 | | | |
363 | | o 4 public a-D - b555f63b6063 |
|
363 | | o 4 public a-D - b555f63b6063 | |
364 | | | |
|
364 | | | | |
365 | o | 3 public b-A - f54f1bb90ff3 |
|
365 | o | 3 public b-A - f54f1bb90ff3 | |
366 | | | |
|
366 | | | | |
367 | | o 2 public a-C - 54acac6f23ab |
|
367 | | o 2 public a-C - 54acac6f23ab | |
368 | |/ |
|
368 | |/ | |
369 | o 1 public a-B - 548a3d25dbf0 |
|
369 | o 1 public a-B - 548a3d25dbf0 | |
370 | | |
|
370 | | | |
371 | o 0 public a-A - 054250a37db4 |
|
371 | o 0 public a-A - 054250a37db4 | |
372 |
|
372 | |||
373 |
|
373 | |||
374 | Push |
|
374 | Push | |
375 | ```` |
|
375 | ```` | |
376 |
|
376 | |||
377 | (inserted) |
|
377 | (inserted) | |
378 |
|
378 | |||
379 | Test that phase are pushed even when they are nothing to pus |
|
379 | Test that phase are pushed even when they are nothing to pus | |
380 | (this might be tested later bu are very convenient to not alter too much test) |
|
380 | (this might be tested later bu are very convenient to not alter too much test) | |
381 |
|
381 | |||
382 | Push back to alpha |
|
382 | Push back to alpha | |
383 |
|
383 | |||
384 | $ hg push ../alpha # from nu |
|
384 | $ hg push ../alpha # from nu | |
385 | pushing to ../alpha |
|
385 | pushing to ../alpha | |
386 | searching for changes |
|
386 | searching for changes | |
387 | no changes found |
|
387 | no changes found | |
388 | [1] |
|
388 | [1] | |
389 | $ cd .. |
|
389 | $ cd .. | |
390 | $ cd alpha |
|
390 | $ cd alpha | |
391 | $ hgph |
|
391 | $ hgph | |
392 | o 6 public n-B - 145e75495359 |
|
392 | o 6 public n-B - 145e75495359 | |
393 | | |
|
393 | | | |
394 | o 5 public n-A - d6bcb4f74035 |
|
394 | o 5 public n-A - d6bcb4f74035 | |
395 | | |
|
395 | | | |
396 | o 4 public b-A - f54f1bb90ff3 |
|
396 | o 4 public b-A - f54f1bb90ff3 | |
397 | | |
|
397 | | | |
398 | | @ 3 public a-D - b555f63b6063 |
|
398 | | @ 3 public a-D - b555f63b6063 | |
399 | | | |
|
399 | | | | |
400 | | o 2 public a-C - 54acac6f23ab |
|
400 | | o 2 public a-C - 54acac6f23ab | |
401 | |/ |
|
401 | |/ | |
402 | o 1 public a-B - 548a3d25dbf0 |
|
402 | o 1 public a-B - 548a3d25dbf0 | |
403 | | |
|
403 | | | |
404 | o 0 public a-A - 054250a37db4 |
|
404 | o 0 public a-A - 054250a37db4 | |
405 |
|
405 | |||
406 |
|
406 | |||
407 | (end insertion) |
|
407 | (end insertion) | |
408 |
|
408 | |||
409 |
|
409 | |||
410 | initial setup |
|
410 | initial setup | |
411 |
|
411 | |||
412 | $ hg log -G # of alpha |
|
412 | $ hg log -G # of alpha | |
413 | o changeset: 6:145e75495359 |
|
413 | o changeset: 6:145e75495359 | |
414 | | tag: tip |
|
414 | | tag: tip | |
415 | | user: test |
|
415 | | user: test | |
416 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
416 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
417 | | summary: n-B |
|
417 | | summary: n-B | |
418 | | |
|
418 | | | |
419 | o changeset: 5:d6bcb4f74035 |
|
419 | o changeset: 5:d6bcb4f74035 | |
420 | | user: test |
|
420 | | user: test | |
421 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
421 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
422 | | summary: n-A |
|
422 | | summary: n-A | |
423 | | |
|
423 | | | |
424 | o changeset: 4:f54f1bb90ff3 |
|
424 | o changeset: 4:f54f1bb90ff3 | |
425 | | parent: 1:548a3d25dbf0 |
|
425 | | parent: 1:548a3d25dbf0 | |
426 | | user: test |
|
426 | | user: test | |
427 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
427 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
428 | | summary: b-A |
|
428 | | summary: b-A | |
429 | | |
|
429 | | | |
430 | | @ changeset: 3:b555f63b6063 |
|
430 | | @ changeset: 3:b555f63b6063 | |
431 | | | user: test |
|
431 | | | user: test | |
432 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
432 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
433 | | | summary: a-D |
|
433 | | | summary: a-D | |
434 | | | |
|
434 | | | | |
435 | | o changeset: 2:54acac6f23ab |
|
435 | | o changeset: 2:54acac6f23ab | |
436 | |/ user: test |
|
436 | |/ user: test | |
437 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
437 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
438 | | summary: a-C |
|
438 | | summary: a-C | |
439 | | |
|
439 | | | |
440 | o changeset: 1:548a3d25dbf0 |
|
440 | o changeset: 1:548a3d25dbf0 | |
441 | | user: test |
|
441 | | user: test | |
442 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
442 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
443 | | summary: a-B |
|
443 | | summary: a-B | |
444 | | |
|
444 | | | |
445 | o changeset: 0:054250a37db4 |
|
445 | o changeset: 0:054250a37db4 | |
446 | user: test |
|
446 | user: test | |
447 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
447 | date: Thu Jan 01 00:00:00 1970 +0000 | |
448 | summary: a-A |
|
448 | summary: a-A | |
449 |
|
449 | |||
450 | $ mkcommit a-E |
|
450 | $ mkcommit a-E | |
451 | $ mkcommit a-F |
|
451 | $ mkcommit a-F | |
452 | $ mkcommit a-G |
|
452 | $ mkcommit a-G | |
453 | $ hg up d6bcb4f74035 -q |
|
453 | $ hg up d6bcb4f74035 -q | |
454 | $ mkcommit a-H |
|
454 | $ mkcommit a-H | |
455 | created new head |
|
455 | created new head | |
456 | $ hgph |
|
456 | $ hgph | |
457 | @ 10 draft a-H - 967b449fbc94 |
|
457 | @ 10 draft a-H - 967b449fbc94 | |
458 | | |
|
458 | | | |
459 | | o 9 draft a-G - 3e27b6f1eee1 |
|
459 | | o 9 draft a-G - 3e27b6f1eee1 | |
460 | | | |
|
460 | | | | |
461 | | o 8 draft a-F - b740e3e5c05d |
|
461 | | o 8 draft a-F - b740e3e5c05d | |
462 | | | |
|
462 | | | | |
463 | | o 7 draft a-E - e9f537e46dea |
|
463 | | o 7 draft a-E - e9f537e46dea | |
464 | | | |
|
464 | | | | |
465 | +---o 6 public n-B - 145e75495359 |
|
465 | +---o 6 public n-B - 145e75495359 | |
466 | | | |
|
466 | | | | |
467 | o | 5 public n-A - d6bcb4f74035 |
|
467 | o | 5 public n-A - d6bcb4f74035 | |
468 | | | |
|
468 | | | | |
469 | o | 4 public b-A - f54f1bb90ff3 |
|
469 | o | 4 public b-A - f54f1bb90ff3 | |
470 | | | |
|
470 | | | | |
471 | | o 3 public a-D - b555f63b6063 |
|
471 | | o 3 public a-D - b555f63b6063 | |
472 | | | |
|
472 | | | | |
473 | | o 2 public a-C - 54acac6f23ab |
|
473 | | o 2 public a-C - 54acac6f23ab | |
474 | |/ |
|
474 | |/ | |
475 | o 1 public a-B - 548a3d25dbf0 |
|
475 | o 1 public a-B - 548a3d25dbf0 | |
476 | | |
|
476 | | | |
477 | o 0 public a-A - 054250a37db4 |
|
477 | o 0 public a-A - 054250a37db4 | |
478 |
|
478 | |||
479 |
|
479 | |||
480 | Pulling from bundle does not alter phases of changeset not present in the bundle |
|
480 | Pulling from bundle does not alter phases of changeset not present in the bundle | |
481 |
|
481 | |||
482 | $ hg bundle --base 1 -r 6 -r 3 ../partial-bundle.hg |
|
482 | $ hg bundle --base 1 -r 6 -r 3 ../partial-bundle.hg | |
483 | 5 changesets found |
|
483 | 5 changesets found | |
484 | $ hg pull ../partial-bundle.hg |
|
484 | $ hg pull ../partial-bundle.hg | |
485 | pulling from ../partial-bundle.hg |
|
485 | pulling from ../partial-bundle.hg | |
486 | searching for changes |
|
486 | searching for changes | |
487 | no changes found |
|
487 | no changes found | |
488 | $ hgph |
|
488 | $ hgph | |
489 | @ 10 draft a-H - 967b449fbc94 |
|
489 | @ 10 draft a-H - 967b449fbc94 | |
490 | | |
|
490 | | | |
491 | | o 9 draft a-G - 3e27b6f1eee1 |
|
491 | | o 9 draft a-G - 3e27b6f1eee1 | |
492 | | | |
|
492 | | | | |
493 | | o 8 draft a-F - b740e3e5c05d |
|
493 | | o 8 draft a-F - b740e3e5c05d | |
494 | | | |
|
494 | | | | |
495 | | o 7 draft a-E - e9f537e46dea |
|
495 | | o 7 draft a-E - e9f537e46dea | |
496 | | | |
|
496 | | | | |
497 | +---o 6 public n-B - 145e75495359 |
|
497 | +---o 6 public n-B - 145e75495359 | |
498 | | | |
|
498 | | | | |
499 | o | 5 public n-A - d6bcb4f74035 |
|
499 | o | 5 public n-A - d6bcb4f74035 | |
500 | | | |
|
500 | | | | |
501 | o | 4 public b-A - f54f1bb90ff3 |
|
501 | o | 4 public b-A - f54f1bb90ff3 | |
502 | | | |
|
502 | | | | |
503 | | o 3 public a-D - b555f63b6063 |
|
503 | | o 3 public a-D - b555f63b6063 | |
504 | | | |
|
504 | | | | |
505 | | o 2 public a-C - 54acac6f23ab |
|
505 | | o 2 public a-C - 54acac6f23ab | |
506 | |/ |
|
506 | |/ | |
507 | o 1 public a-B - 548a3d25dbf0 |
|
507 | o 1 public a-B - 548a3d25dbf0 | |
508 | | |
|
508 | | | |
509 | o 0 public a-A - 054250a37db4 |
|
509 | o 0 public a-A - 054250a37db4 | |
510 |
|
510 | |||
511 |
|
511 | |||
512 | Pushing to Publish=False (unknown changeset) |
|
512 | Pushing to Publish=False (unknown changeset) | |
513 |
|
513 | |||
514 | $ hg push ../mu -r b740e3e5c05d # a-F |
|
514 | $ hg push ../mu -r b740e3e5c05d # a-F | |
515 | pushing to ../mu |
|
515 | pushing to ../mu | |
516 | searching for changes |
|
516 | searching for changes | |
517 | adding changesets |
|
517 | adding changesets | |
518 | adding manifests |
|
518 | adding manifests | |
519 | adding file changes |
|
519 | adding file changes | |
520 | added 2 changesets with 2 changes to 2 files |
|
520 | added 2 changesets with 2 changes to 2 files | |
521 | $ hgph |
|
521 | $ hgph | |
522 | @ 10 draft a-H - 967b449fbc94 |
|
522 | @ 10 draft a-H - 967b449fbc94 | |
523 | | |
|
523 | | | |
524 | | o 9 draft a-G - 3e27b6f1eee1 |
|
524 | | o 9 draft a-G - 3e27b6f1eee1 | |
525 | | | |
|
525 | | | | |
526 | | o 8 draft a-F - b740e3e5c05d |
|
526 | | o 8 draft a-F - b740e3e5c05d | |
527 | | | |
|
527 | | | | |
528 | | o 7 draft a-E - e9f537e46dea |
|
528 | | o 7 draft a-E - e9f537e46dea | |
529 | | | |
|
529 | | | | |
530 | +---o 6 public n-B - 145e75495359 |
|
530 | +---o 6 public n-B - 145e75495359 | |
531 | | | |
|
531 | | | | |
532 | o | 5 public n-A - d6bcb4f74035 |
|
532 | o | 5 public n-A - d6bcb4f74035 | |
533 | | | |
|
533 | | | | |
534 | o | 4 public b-A - f54f1bb90ff3 |
|
534 | o | 4 public b-A - f54f1bb90ff3 | |
535 | | | |
|
535 | | | | |
536 | | o 3 public a-D - b555f63b6063 |
|
536 | | o 3 public a-D - b555f63b6063 | |
537 | | | |
|
537 | | | | |
538 | | o 2 public a-C - 54acac6f23ab |
|
538 | | o 2 public a-C - 54acac6f23ab | |
539 | |/ |
|
539 | |/ | |
540 | o 1 public a-B - 548a3d25dbf0 |
|
540 | o 1 public a-B - 548a3d25dbf0 | |
541 | | |
|
541 | | | |
542 | o 0 public a-A - 054250a37db4 |
|
542 | o 0 public a-A - 054250a37db4 | |
543 |
|
543 | |||
544 |
|
544 | |||
545 | $ cd ../mu |
|
545 | $ cd ../mu | |
546 | $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft, |
|
546 | $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft, | |
547 | > # not ancestor of -r |
|
547 | > # not ancestor of -r | |
548 | o 8 draft a-F - b740e3e5c05d |
|
548 | o 8 draft a-F - b740e3e5c05d | |
549 | | |
|
549 | | | |
550 | o 7 draft a-E - e9f537e46dea |
|
550 | o 7 draft a-E - e9f537e46dea | |
551 | | |
|
551 | | | |
552 | | o 6 draft n-B - 145e75495359 |
|
552 | | o 6 draft n-B - 145e75495359 | |
553 | | | |
|
553 | | | | |
554 | | o 5 draft n-A - d6bcb4f74035 |
|
554 | | o 5 draft n-A - d6bcb4f74035 | |
555 | | | |
|
555 | | | | |
556 | o | 4 public a-D - b555f63b6063 |
|
556 | o | 4 public a-D - b555f63b6063 | |
557 | | | |
|
557 | | | | |
558 | o | 3 public a-C - 54acac6f23ab |
|
558 | o | 3 public a-C - 54acac6f23ab | |
559 | | | |
|
559 | | | | |
560 | | o 2 draft b-A - f54f1bb90ff3 |
|
560 | | o 2 draft b-A - f54f1bb90ff3 | |
561 | |/ |
|
561 | |/ | |
562 | o 1 public a-B - 548a3d25dbf0 |
|
562 | o 1 public a-B - 548a3d25dbf0 | |
563 | | |
|
563 | | | |
564 | o 0 public a-A - 054250a37db4 |
|
564 | o 0 public a-A - 054250a37db4 | |
565 |
|
565 | |||
566 |
|
566 | |||
567 | Pushing to Publish=True (unknown changeset) |
|
567 | Pushing to Publish=True (unknown changeset) | |
568 |
|
568 | |||
569 | $ hg push ../beta -r b740e3e5c05d |
|
569 | $ hg push ../beta -r b740e3e5c05d | |
570 | pushing to ../beta |
|
570 | pushing to ../beta | |
571 | searching for changes |
|
571 | searching for changes | |
572 | adding changesets |
|
572 | adding changesets | |
573 | adding manifests |
|
573 | adding manifests | |
574 | adding file changes |
|
574 | adding file changes | |
575 | added 2 changesets with 2 changes to 2 files |
|
575 | added 2 changesets with 2 changes to 2 files | |
576 | $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft, |
|
576 | $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft, | |
577 | > # not ancestor of -r |
|
577 | > # not ancestor of -r | |
578 | o 8 public a-F - b740e3e5c05d |
|
578 | o 8 public a-F - b740e3e5c05d | |
579 | | |
|
579 | | | |
580 | o 7 public a-E - e9f537e46dea |
|
580 | o 7 public a-E - e9f537e46dea | |
581 | | |
|
581 | | | |
582 | | o 6 draft n-B - 145e75495359 |
|
582 | | o 6 draft n-B - 145e75495359 | |
583 | | | |
|
583 | | | | |
584 | | o 5 draft n-A - d6bcb4f74035 |
|
584 | | o 5 draft n-A - d6bcb4f74035 | |
585 | | | |
|
585 | | | | |
586 | o | 4 public a-D - b555f63b6063 |
|
586 | o | 4 public a-D - b555f63b6063 | |
587 | | | |
|
587 | | | | |
588 | o | 3 public a-C - 54acac6f23ab |
|
588 | o | 3 public a-C - 54acac6f23ab | |
589 | | | |
|
589 | | | | |
590 | | o 2 draft b-A - f54f1bb90ff3 |
|
590 | | o 2 draft b-A - f54f1bb90ff3 | |
591 | |/ |
|
591 | |/ | |
592 | o 1 public a-B - 548a3d25dbf0 |
|
592 | o 1 public a-B - 548a3d25dbf0 | |
593 | | |
|
593 | | | |
594 | o 0 public a-A - 054250a37db4 |
|
594 | o 0 public a-A - 054250a37db4 | |
595 |
|
595 | |||
596 |
|
596 | |||
597 | Pushing to Publish=True (common changeset) |
|
597 | Pushing to Publish=True (common changeset) | |
598 |
|
598 | |||
599 | $ cd ../beta |
|
599 | $ cd ../beta | |
600 | $ hg push ../alpha |
|
600 | $ hg push ../alpha | |
601 | pushing to ../alpha |
|
601 | pushing to ../alpha | |
602 | searching for changes |
|
602 | searching for changes | |
603 | no changes found |
|
603 | no changes found | |
604 | [1] |
|
604 | [1] | |
605 | $ hgph |
|
605 | $ hgph | |
606 | o 6 public a-F - b740e3e5c05d |
|
606 | o 6 public a-F - b740e3e5c05d | |
607 | | |
|
607 | | | |
608 | o 5 public a-E - e9f537e46dea |
|
608 | o 5 public a-E - e9f537e46dea | |
609 | | |
|
609 | | | |
610 | o 4 public a-D - b555f63b6063 |
|
610 | o 4 public a-D - b555f63b6063 | |
611 | | |
|
611 | | | |
612 | o 3 public a-C - 54acac6f23ab |
|
612 | o 3 public a-C - 54acac6f23ab | |
613 | | |
|
613 | | | |
614 | | @ 2 public b-A - f54f1bb90ff3 |
|
614 | | @ 2 public b-A - f54f1bb90ff3 | |
615 | |/ |
|
615 | |/ | |
616 | o 1 public a-B - 548a3d25dbf0 |
|
616 | o 1 public a-B - 548a3d25dbf0 | |
617 | | |
|
617 | | | |
618 | o 0 public a-A - 054250a37db4 |
|
618 | o 0 public a-A - 054250a37db4 | |
619 |
|
619 | |||
620 | $ cd ../alpha |
|
620 | $ cd ../alpha | |
621 | $ hgph |
|
621 | $ hgph | |
622 | @ 10 draft a-H - 967b449fbc94 |
|
622 | @ 10 draft a-H - 967b449fbc94 | |
623 | | |
|
623 | | | |
624 | | o 9 draft a-G - 3e27b6f1eee1 |
|
624 | | o 9 draft a-G - 3e27b6f1eee1 | |
625 | | | |
|
625 | | | | |
626 | | o 8 public a-F - b740e3e5c05d |
|
626 | | o 8 public a-F - b740e3e5c05d | |
627 | | | |
|
627 | | | | |
628 | | o 7 public a-E - e9f537e46dea |
|
628 | | o 7 public a-E - e9f537e46dea | |
629 | | | |
|
629 | | | | |
630 | +---o 6 public n-B - 145e75495359 |
|
630 | +---o 6 public n-B - 145e75495359 | |
631 | | | |
|
631 | | | | |
632 | o | 5 public n-A - d6bcb4f74035 |
|
632 | o | 5 public n-A - d6bcb4f74035 | |
633 | | | |
|
633 | | | | |
634 | o | 4 public b-A - f54f1bb90ff3 |
|
634 | o | 4 public b-A - f54f1bb90ff3 | |
635 | | | |
|
635 | | | | |
636 | | o 3 public a-D - b555f63b6063 |
|
636 | | o 3 public a-D - b555f63b6063 | |
637 | | | |
|
637 | | | | |
638 | | o 2 public a-C - 54acac6f23ab |
|
638 | | o 2 public a-C - 54acac6f23ab | |
639 | |/ |
|
639 | |/ | |
640 | o 1 public a-B - 548a3d25dbf0 |
|
640 | o 1 public a-B - 548a3d25dbf0 | |
641 | | |
|
641 | | | |
642 | o 0 public a-A - 054250a37db4 |
|
642 | o 0 public a-A - 054250a37db4 | |
643 |
|
643 | |||
644 |
|
644 | |||
645 | Pushing to Publish=False (common changeset that change phase + unknown one) |
|
645 | Pushing to Publish=False (common changeset that change phase + unknown one) | |
646 |
|
646 | |||
647 | $ hg push ../mu -r 967b449fbc94 -f |
|
647 | $ hg push ../mu -r 967b449fbc94 -f | |
648 | pushing to ../mu |
|
648 | pushing to ../mu | |
649 | searching for changes |
|
649 | searching for changes | |
650 | adding changesets |
|
650 | adding changesets | |
651 | adding manifests |
|
651 | adding manifests | |
652 | adding file changes |
|
652 | adding file changes | |
653 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
653 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
654 | $ hgph |
|
654 | $ hgph | |
655 | @ 10 draft a-H - 967b449fbc94 |
|
655 | @ 10 draft a-H - 967b449fbc94 | |
656 | | |
|
656 | | | |
657 | | o 9 draft a-G - 3e27b6f1eee1 |
|
657 | | o 9 draft a-G - 3e27b6f1eee1 | |
658 | | | |
|
658 | | | | |
659 | | o 8 public a-F - b740e3e5c05d |
|
659 | | o 8 public a-F - b740e3e5c05d | |
660 | | | |
|
660 | | | | |
661 | | o 7 public a-E - e9f537e46dea |
|
661 | | o 7 public a-E - e9f537e46dea | |
662 | | | |
|
662 | | | | |
663 | +---o 6 public n-B - 145e75495359 |
|
663 | +---o 6 public n-B - 145e75495359 | |
664 | | | |
|
664 | | | | |
665 | o | 5 public n-A - d6bcb4f74035 |
|
665 | o | 5 public n-A - d6bcb4f74035 | |
666 | | | |
|
666 | | | | |
667 | o | 4 public b-A - f54f1bb90ff3 |
|
667 | o | 4 public b-A - f54f1bb90ff3 | |
668 | | | |
|
668 | | | | |
669 | | o 3 public a-D - b555f63b6063 |
|
669 | | o 3 public a-D - b555f63b6063 | |
670 | | | |
|
670 | | | | |
671 | | o 2 public a-C - 54acac6f23ab |
|
671 | | o 2 public a-C - 54acac6f23ab | |
672 | |/ |
|
672 | |/ | |
673 | o 1 public a-B - 548a3d25dbf0 |
|
673 | o 1 public a-B - 548a3d25dbf0 | |
674 | | |
|
674 | | | |
675 | o 0 public a-A - 054250a37db4 |
|
675 | o 0 public a-A - 054250a37db4 | |
676 |
|
676 | |||
677 | $ cd ../mu |
|
677 | $ cd ../mu | |
678 | $ hgph # d6bcb4f74035 should have changed phase |
|
678 | $ hgph # d6bcb4f74035 should have changed phase | |
679 | > # 145e75495359 is still draft. not ancestor of -r |
|
679 | > # 145e75495359 is still draft. not ancestor of -r | |
680 | o 9 draft a-H - 967b449fbc94 |
|
680 | o 9 draft a-H - 967b449fbc94 | |
681 | | |
|
681 | | | |
682 | | o 8 public a-F - b740e3e5c05d |
|
682 | | o 8 public a-F - b740e3e5c05d | |
683 | | | |
|
683 | | | | |
684 | | o 7 public a-E - e9f537e46dea |
|
684 | | o 7 public a-E - e9f537e46dea | |
685 | | | |
|
685 | | | | |
686 | +---o 6 draft n-B - 145e75495359 |
|
686 | +---o 6 draft n-B - 145e75495359 | |
687 | | | |
|
687 | | | | |
688 | o | 5 public n-A - d6bcb4f74035 |
|
688 | o | 5 public n-A - d6bcb4f74035 | |
689 | | | |
|
689 | | | | |
690 | | o 4 public a-D - b555f63b6063 |
|
690 | | o 4 public a-D - b555f63b6063 | |
691 | | | |
|
691 | | | | |
692 | | o 3 public a-C - 54acac6f23ab |
|
692 | | o 3 public a-C - 54acac6f23ab | |
693 | | | |
|
693 | | | | |
694 | o | 2 public b-A - f54f1bb90ff3 |
|
694 | o | 2 public b-A - f54f1bb90ff3 | |
695 | |/ |
|
695 | |/ | |
696 | o 1 public a-B - 548a3d25dbf0 |
|
696 | o 1 public a-B - 548a3d25dbf0 | |
697 | | |
|
697 | | | |
698 | o 0 public a-A - 054250a37db4 |
|
698 | o 0 public a-A - 054250a37db4 | |
699 |
|
699 | |||
700 |
|
700 | |||
701 |
|
701 | |||
702 | Pushing to Publish=True (common changeset from publish=False) |
|
702 | Pushing to Publish=True (common changeset from publish=False) | |
703 |
|
703 | |||
704 | (in mu) |
|
704 | (in mu) | |
705 | $ hg push ../alpha |
|
705 | $ hg push ../alpha | |
706 | pushing to ../alpha |
|
706 | pushing to ../alpha | |
707 | searching for changes |
|
707 | searching for changes | |
708 | no changes found |
|
708 | no changes found | |
709 | [1] |
|
709 | [1] | |
710 | $ hgph |
|
710 | $ hgph | |
711 | o 9 public a-H - 967b449fbc94 |
|
711 | o 9 public a-H - 967b449fbc94 | |
712 | | |
|
712 | | | |
713 | | o 8 public a-F - b740e3e5c05d |
|
713 | | o 8 public a-F - b740e3e5c05d | |
714 | | | |
|
714 | | | | |
715 | | o 7 public a-E - e9f537e46dea |
|
715 | | o 7 public a-E - e9f537e46dea | |
716 | | | |
|
716 | | | | |
717 | +---o 6 public n-B - 145e75495359 |
|
717 | +---o 6 public n-B - 145e75495359 | |
718 | | | |
|
718 | | | | |
719 | o | 5 public n-A - d6bcb4f74035 |
|
719 | o | 5 public n-A - d6bcb4f74035 | |
720 | | | |
|
720 | | | | |
721 | | o 4 public a-D - b555f63b6063 |
|
721 | | o 4 public a-D - b555f63b6063 | |
722 | | | |
|
722 | | | | |
723 | | o 3 public a-C - 54acac6f23ab |
|
723 | | o 3 public a-C - 54acac6f23ab | |
724 | | | |
|
724 | | | | |
725 | o | 2 public b-A - f54f1bb90ff3 |
|
725 | o | 2 public b-A - f54f1bb90ff3 | |
726 | |/ |
|
726 | |/ | |
727 | o 1 public a-B - 548a3d25dbf0 |
|
727 | o 1 public a-B - 548a3d25dbf0 | |
728 | | |
|
728 | | | |
729 | o 0 public a-A - 054250a37db4 |
|
729 | o 0 public a-A - 054250a37db4 | |
730 |
|
730 | |||
731 | $ hgph -R ../alpha # a-H should have been synced to 0 |
|
731 | $ hgph -R ../alpha # a-H should have been synced to 0 | |
732 | @ 10 public a-H - 967b449fbc94 |
|
732 | @ 10 public a-H - 967b449fbc94 | |
733 | | |
|
733 | | | |
734 | | o 9 draft a-G - 3e27b6f1eee1 |
|
734 | | o 9 draft a-G - 3e27b6f1eee1 | |
735 | | | |
|
735 | | | | |
736 | | o 8 public a-F - b740e3e5c05d |
|
736 | | o 8 public a-F - b740e3e5c05d | |
737 | | | |
|
737 | | | | |
738 | | o 7 public a-E - e9f537e46dea |
|
738 | | o 7 public a-E - e9f537e46dea | |
739 | | | |
|
739 | | | | |
740 | +---o 6 public n-B - 145e75495359 |
|
740 | +---o 6 public n-B - 145e75495359 | |
741 | | | |
|
741 | | | | |
742 | o | 5 public n-A - d6bcb4f74035 |
|
742 | o | 5 public n-A - d6bcb4f74035 | |
743 | | | |
|
743 | | | | |
744 | o | 4 public b-A - f54f1bb90ff3 |
|
744 | o | 4 public b-A - f54f1bb90ff3 | |
745 | | | |
|
745 | | | | |
746 | | o 3 public a-D - b555f63b6063 |
|
746 | | o 3 public a-D - b555f63b6063 | |
747 | | | |
|
747 | | | | |
748 | | o 2 public a-C - 54acac6f23ab |
|
748 | | o 2 public a-C - 54acac6f23ab | |
749 | |/ |
|
749 | |/ | |
750 | o 1 public a-B - 548a3d25dbf0 |
|
750 | o 1 public a-B - 548a3d25dbf0 | |
751 | | |
|
751 | | | |
752 | o 0 public a-A - 054250a37db4 |
|
752 | o 0 public a-A - 054250a37db4 | |
753 |
|
753 | |||
754 |
|
754 | |||
755 |
|
755 | |||
756 | Bare push with next changeset and common changeset needing sync (issue3575) |
|
756 | Bare push with next changeset and common changeset needing sync (issue3575) | |
757 |
|
757 | |||
758 | (reset some stat on remote repo to avoid confusing other tests) |
|
758 | (reset some stat on remote repo to avoid confusing other tests) | |
759 |
|
759 | |||
760 | $ hg -R ../alpha --config extensions.strip= strip --no-backup 967b449fbc94 |
|
760 | $ hg -R ../alpha --config extensions.strip= strip --no-backup 967b449fbc94 | |
761 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
761 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
762 | $ hg phase --force --draft b740e3e5c05d 967b449fbc94 |
|
762 | $ hg phase --force --draft b740e3e5c05d 967b449fbc94 | |
763 | $ hg push -fv ../alpha |
|
763 | $ hg push -fv ../alpha | |
764 | pushing to ../alpha |
|
764 | pushing to ../alpha | |
765 | searching for changes |
|
765 | searching for changes | |
766 | 1 changesets found |
|
766 | 1 changesets found | |
|
767 | uncompressed size of bundle content: | |||
|
768 | 172 (changelog) | |||
|
769 | 145 (manifests) | |||
|
770 | 111 a-H | |||
767 | adding changesets |
|
771 | adding changesets | |
768 | adding manifests |
|
772 | adding manifests | |
769 | adding file changes |
|
773 | adding file changes | |
770 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
774 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
771 | $ hgph |
|
775 | $ hgph | |
772 | o 9 public a-H - 967b449fbc94 |
|
776 | o 9 public a-H - 967b449fbc94 | |
773 | | |
|
777 | | | |
774 | | o 8 public a-F - b740e3e5c05d |
|
778 | | o 8 public a-F - b740e3e5c05d | |
775 | | | |
|
779 | | | | |
776 | | o 7 public a-E - e9f537e46dea |
|
780 | | o 7 public a-E - e9f537e46dea | |
777 | | | |
|
781 | | | | |
778 | +---o 6 public n-B - 145e75495359 |
|
782 | +---o 6 public n-B - 145e75495359 | |
779 | | | |
|
783 | | | | |
780 | o | 5 public n-A - d6bcb4f74035 |
|
784 | o | 5 public n-A - d6bcb4f74035 | |
781 | | | |
|
785 | | | | |
782 | | o 4 public a-D - b555f63b6063 |
|
786 | | o 4 public a-D - b555f63b6063 | |
783 | | | |
|
787 | | | | |
784 | | o 3 public a-C - 54acac6f23ab |
|
788 | | o 3 public a-C - 54acac6f23ab | |
785 | | | |
|
789 | | | | |
786 | o | 2 public b-A - f54f1bb90ff3 |
|
790 | o | 2 public b-A - f54f1bb90ff3 | |
787 | |/ |
|
791 | |/ | |
788 | o 1 public a-B - 548a3d25dbf0 |
|
792 | o 1 public a-B - 548a3d25dbf0 | |
789 | | |
|
793 | | | |
790 | o 0 public a-A - 054250a37db4 |
|
794 | o 0 public a-A - 054250a37db4 | |
791 |
|
795 | |||
792 |
|
796 | |||
793 | $ hg -R ../alpha update 967b449fbc94 #for latter test consistency |
|
797 | $ hg -R ../alpha update 967b449fbc94 #for latter test consistency | |
794 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
798 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
795 | $ hgph -R ../alpha |
|
799 | $ hgph -R ../alpha | |
796 | @ 10 public a-H - 967b449fbc94 |
|
800 | @ 10 public a-H - 967b449fbc94 | |
797 | | |
|
801 | | | |
798 | | o 9 draft a-G - 3e27b6f1eee1 |
|
802 | | o 9 draft a-G - 3e27b6f1eee1 | |
799 | | | |
|
803 | | | | |
800 | | o 8 public a-F - b740e3e5c05d |
|
804 | | o 8 public a-F - b740e3e5c05d | |
801 | | | |
|
805 | | | | |
802 | | o 7 public a-E - e9f537e46dea |
|
806 | | o 7 public a-E - e9f537e46dea | |
803 | | | |
|
807 | | | | |
804 | +---o 6 public n-B - 145e75495359 |
|
808 | +---o 6 public n-B - 145e75495359 | |
805 | | | |
|
809 | | | | |
806 | o | 5 public n-A - d6bcb4f74035 |
|
810 | o | 5 public n-A - d6bcb4f74035 | |
807 | | | |
|
811 | | | | |
808 | o | 4 public b-A - f54f1bb90ff3 |
|
812 | o | 4 public b-A - f54f1bb90ff3 | |
809 | | | |
|
813 | | | | |
810 | | o 3 public a-D - b555f63b6063 |
|
814 | | o 3 public a-D - b555f63b6063 | |
811 | | | |
|
815 | | | | |
812 | | o 2 public a-C - 54acac6f23ab |
|
816 | | o 2 public a-C - 54acac6f23ab | |
813 | |/ |
|
817 | |/ | |
814 | o 1 public a-B - 548a3d25dbf0 |
|
818 | o 1 public a-B - 548a3d25dbf0 | |
815 | | |
|
819 | | | |
816 | o 0 public a-A - 054250a37db4 |
|
820 | o 0 public a-A - 054250a37db4 | |
817 |
|
821 | |||
818 |
|
822 | |||
819 | Discovery locally secret changeset on a remote repository: |
|
823 | Discovery locally secret changeset on a remote repository: | |
820 |
|
824 | |||
821 | - should make it non-secret |
|
825 | - should make it non-secret | |
822 |
|
826 | |||
823 | $ cd ../alpha |
|
827 | $ cd ../alpha | |
824 | $ mkcommit A-secret --config phases.new-commit=2 |
|
828 | $ mkcommit A-secret --config phases.new-commit=2 | |
825 | $ hgph |
|
829 | $ hgph | |
826 | @ 11 secret A-secret - 435b5d83910c |
|
830 | @ 11 secret A-secret - 435b5d83910c | |
827 | | |
|
831 | | | |
828 | o 10 public a-H - 967b449fbc94 |
|
832 | o 10 public a-H - 967b449fbc94 | |
829 | | |
|
833 | | | |
830 | | o 9 draft a-G - 3e27b6f1eee1 |
|
834 | | o 9 draft a-G - 3e27b6f1eee1 | |
831 | | | |
|
835 | | | | |
832 | | o 8 public a-F - b740e3e5c05d |
|
836 | | o 8 public a-F - b740e3e5c05d | |
833 | | | |
|
837 | | | | |
834 | | o 7 public a-E - e9f537e46dea |
|
838 | | o 7 public a-E - e9f537e46dea | |
835 | | | |
|
839 | | | | |
836 | +---o 6 public n-B - 145e75495359 |
|
840 | +---o 6 public n-B - 145e75495359 | |
837 | | | |
|
841 | | | | |
838 | o | 5 public n-A - d6bcb4f74035 |
|
842 | o | 5 public n-A - d6bcb4f74035 | |
839 | | | |
|
843 | | | | |
840 | o | 4 public b-A - f54f1bb90ff3 |
|
844 | o | 4 public b-A - f54f1bb90ff3 | |
841 | | | |
|
845 | | | | |
842 | | o 3 public a-D - b555f63b6063 |
|
846 | | o 3 public a-D - b555f63b6063 | |
843 | | | |
|
847 | | | | |
844 | | o 2 public a-C - 54acac6f23ab |
|
848 | | o 2 public a-C - 54acac6f23ab | |
845 | |/ |
|
849 | |/ | |
846 | o 1 public a-B - 548a3d25dbf0 |
|
850 | o 1 public a-B - 548a3d25dbf0 | |
847 | | |
|
851 | | | |
848 | o 0 public a-A - 054250a37db4 |
|
852 | o 0 public a-A - 054250a37db4 | |
849 |
|
853 | |||
850 | $ hg bundle --base 'parents(.)' -r . ../secret-bundle.hg |
|
854 | $ hg bundle --base 'parents(.)' -r . ../secret-bundle.hg | |
851 | 1 changesets found |
|
855 | 1 changesets found | |
852 | $ hg -R ../mu unbundle ../secret-bundle.hg |
|
856 | $ hg -R ../mu unbundle ../secret-bundle.hg | |
853 | adding changesets |
|
857 | adding changesets | |
854 | adding manifests |
|
858 | adding manifests | |
855 | adding file changes |
|
859 | adding file changes | |
856 | added 1 changesets with 1 changes to 1 files |
|
860 | added 1 changesets with 1 changes to 1 files | |
857 | (run 'hg update' to get a working copy) |
|
861 | (run 'hg update' to get a working copy) | |
858 | $ hgph -R ../mu |
|
862 | $ hgph -R ../mu | |
859 | o 10 draft A-secret - 435b5d83910c |
|
863 | o 10 draft A-secret - 435b5d83910c | |
860 | | |
|
864 | | | |
861 | o 9 public a-H - 967b449fbc94 |
|
865 | o 9 public a-H - 967b449fbc94 | |
862 | | |
|
866 | | | |
863 | | o 8 public a-F - b740e3e5c05d |
|
867 | | o 8 public a-F - b740e3e5c05d | |
864 | | | |
|
868 | | | | |
865 | | o 7 public a-E - e9f537e46dea |
|
869 | | o 7 public a-E - e9f537e46dea | |
866 | | | |
|
870 | | | | |
867 | +---o 6 public n-B - 145e75495359 |
|
871 | +---o 6 public n-B - 145e75495359 | |
868 | | | |
|
872 | | | | |
869 | o | 5 public n-A - d6bcb4f74035 |
|
873 | o | 5 public n-A - d6bcb4f74035 | |
870 | | | |
|
874 | | | | |
871 | | o 4 public a-D - b555f63b6063 |
|
875 | | o 4 public a-D - b555f63b6063 | |
872 | | | |
|
876 | | | | |
873 | | o 3 public a-C - 54acac6f23ab |
|
877 | | o 3 public a-C - 54acac6f23ab | |
874 | | | |
|
878 | | | | |
875 | o | 2 public b-A - f54f1bb90ff3 |
|
879 | o | 2 public b-A - f54f1bb90ff3 | |
876 | |/ |
|
880 | |/ | |
877 | o 1 public a-B - 548a3d25dbf0 |
|
881 | o 1 public a-B - 548a3d25dbf0 | |
878 | | |
|
882 | | | |
879 | o 0 public a-A - 054250a37db4 |
|
883 | o 0 public a-A - 054250a37db4 | |
880 |
|
884 | |||
881 | $ hg pull ../mu |
|
885 | $ hg pull ../mu | |
882 | pulling from ../mu |
|
886 | pulling from ../mu | |
883 | searching for changes |
|
887 | searching for changes | |
884 | no changes found |
|
888 | no changes found | |
885 | $ hgph |
|
889 | $ hgph | |
886 | @ 11 draft A-secret - 435b5d83910c |
|
890 | @ 11 draft A-secret - 435b5d83910c | |
887 | | |
|
891 | | | |
888 | o 10 public a-H - 967b449fbc94 |
|
892 | o 10 public a-H - 967b449fbc94 | |
889 | | |
|
893 | | | |
890 | | o 9 draft a-G - 3e27b6f1eee1 |
|
894 | | o 9 draft a-G - 3e27b6f1eee1 | |
891 | | | |
|
895 | | | | |
892 | | o 8 public a-F - b740e3e5c05d |
|
896 | | o 8 public a-F - b740e3e5c05d | |
893 | | | |
|
897 | | | | |
894 | | o 7 public a-E - e9f537e46dea |
|
898 | | o 7 public a-E - e9f537e46dea | |
895 | | | |
|
899 | | | | |
896 | +---o 6 public n-B - 145e75495359 |
|
900 | +---o 6 public n-B - 145e75495359 | |
897 | | | |
|
901 | | | | |
898 | o | 5 public n-A - d6bcb4f74035 |
|
902 | o | 5 public n-A - d6bcb4f74035 | |
899 | | | |
|
903 | | | | |
900 | o | 4 public b-A - f54f1bb90ff3 |
|
904 | o | 4 public b-A - f54f1bb90ff3 | |
901 | | | |
|
905 | | | | |
902 | | o 3 public a-D - b555f63b6063 |
|
906 | | o 3 public a-D - b555f63b6063 | |
903 | | | |
|
907 | | | | |
904 | | o 2 public a-C - 54acac6f23ab |
|
908 | | o 2 public a-C - 54acac6f23ab | |
905 | |/ |
|
909 | |/ | |
906 | o 1 public a-B - 548a3d25dbf0 |
|
910 | o 1 public a-B - 548a3d25dbf0 | |
907 | | |
|
911 | | | |
908 | o 0 public a-A - 054250a37db4 |
|
912 | o 0 public a-A - 054250a37db4 | |
909 |
|
913 | |||
910 |
|
914 | |||
911 | pushing a locally public and draft changesets remotely secret should make them |
|
915 | pushing a locally public and draft changesets remotely secret should make them | |
912 | appear on the remote side. |
|
916 | appear on the remote side. | |
913 |
|
917 | |||
914 | $ hg -R ../mu phase --secret --force 967b449fbc94 |
|
918 | $ hg -R ../mu phase --secret --force 967b449fbc94 | |
915 | $ hg push -r 435b5d83910c ../mu |
|
919 | $ hg push -r 435b5d83910c ../mu | |
916 | pushing to ../mu |
|
920 | pushing to ../mu | |
917 | searching for changes |
|
921 | searching for changes | |
918 | abort: push creates new remote head 435b5d83910c! |
|
922 | abort: push creates new remote head 435b5d83910c! | |
919 | (merge or see "hg help push" for details about pushing new heads) |
|
923 | (merge or see "hg help push" for details about pushing new heads) | |
920 | [255] |
|
924 | [255] | |
921 | $ hg push -fr 435b5d83910c ../mu # because the push will create new visible head |
|
925 | $ hg push -fr 435b5d83910c ../mu # because the push will create new visible head | |
922 | pushing to ../mu |
|
926 | pushing to ../mu | |
923 | searching for changes |
|
927 | searching for changes | |
924 | adding changesets |
|
928 | adding changesets | |
925 | adding manifests |
|
929 | adding manifests | |
926 | adding file changes |
|
930 | adding file changes | |
927 | added 0 changesets with 0 changes to 2 files |
|
931 | added 0 changesets with 0 changes to 2 files | |
928 | $ hgph -R ../mu |
|
932 | $ hgph -R ../mu | |
929 | o 10 draft A-secret - 435b5d83910c |
|
933 | o 10 draft A-secret - 435b5d83910c | |
930 | | |
|
934 | | | |
931 | o 9 public a-H - 967b449fbc94 |
|
935 | o 9 public a-H - 967b449fbc94 | |
932 | | |
|
936 | | | |
933 | | o 8 public a-F - b740e3e5c05d |
|
937 | | o 8 public a-F - b740e3e5c05d | |
934 | | | |
|
938 | | | | |
935 | | o 7 public a-E - e9f537e46dea |
|
939 | | o 7 public a-E - e9f537e46dea | |
936 | | | |
|
940 | | | | |
937 | +---o 6 public n-B - 145e75495359 |
|
941 | +---o 6 public n-B - 145e75495359 | |
938 | | | |
|
942 | | | | |
939 | o | 5 public n-A - d6bcb4f74035 |
|
943 | o | 5 public n-A - d6bcb4f74035 | |
940 | | | |
|
944 | | | | |
941 | | o 4 public a-D - b555f63b6063 |
|
945 | | o 4 public a-D - b555f63b6063 | |
942 | | | |
|
946 | | | | |
943 | | o 3 public a-C - 54acac6f23ab |
|
947 | | o 3 public a-C - 54acac6f23ab | |
944 | | | |
|
948 | | | | |
945 | o | 2 public b-A - f54f1bb90ff3 |
|
949 | o | 2 public b-A - f54f1bb90ff3 | |
946 | |/ |
|
950 | |/ | |
947 | o 1 public a-B - 548a3d25dbf0 |
|
951 | o 1 public a-B - 548a3d25dbf0 | |
948 | | |
|
952 | | | |
949 | o 0 public a-A - 054250a37db4 |
|
953 | o 0 public a-A - 054250a37db4 | |
950 |
|
954 | |||
951 |
|
955 | |||
952 | pull new changeset with common draft locally |
|
956 | pull new changeset with common draft locally | |
953 |
|
957 | |||
954 | $ hg up -q 967b449fbc94 # create a new root for draft |
|
958 | $ hg up -q 967b449fbc94 # create a new root for draft | |
955 | $ mkcommit 'alpha-more' |
|
959 | $ mkcommit 'alpha-more' | |
956 | created new head |
|
960 | created new head | |
957 | $ hg push -fr . ../mu |
|
961 | $ hg push -fr . ../mu | |
958 | pushing to ../mu |
|
962 | pushing to ../mu | |
959 | searching for changes |
|
963 | searching for changes | |
960 | adding changesets |
|
964 | adding changesets | |
961 | adding manifests |
|
965 | adding manifests | |
962 | adding file changes |
|
966 | adding file changes | |
963 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
967 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
964 | $ cd ../mu |
|
968 | $ cd ../mu | |
965 | $ hg phase --secret --force 1c5cfd894796 |
|
969 | $ hg phase --secret --force 1c5cfd894796 | |
966 | $ hg up -q 435b5d83910c |
|
970 | $ hg up -q 435b5d83910c | |
967 | $ mkcommit 'mu-more' |
|
971 | $ mkcommit 'mu-more' | |
968 | $ cd ../alpha |
|
972 | $ cd ../alpha | |
969 | $ hg pull ../mu |
|
973 | $ hg pull ../mu | |
970 | pulling from ../mu |
|
974 | pulling from ../mu | |
971 | searching for changes |
|
975 | searching for changes | |
972 | adding changesets |
|
976 | adding changesets | |
973 | adding manifests |
|
977 | adding manifests | |
974 | adding file changes |
|
978 | adding file changes | |
975 | added 1 changesets with 1 changes to 1 files |
|
979 | added 1 changesets with 1 changes to 1 files | |
976 | (run 'hg update' to get a working copy) |
|
980 | (run 'hg update' to get a working copy) | |
977 | $ hgph |
|
981 | $ hgph | |
978 | o 13 draft mu-more - 5237fb433fc8 |
|
982 | o 13 draft mu-more - 5237fb433fc8 | |
979 | | |
|
983 | | | |
980 | | @ 12 draft alpha-more - 1c5cfd894796 |
|
984 | | @ 12 draft alpha-more - 1c5cfd894796 | |
981 | | | |
|
985 | | | | |
982 | o | 11 draft A-secret - 435b5d83910c |
|
986 | o | 11 draft A-secret - 435b5d83910c | |
983 | |/ |
|
987 | |/ | |
984 | o 10 public a-H - 967b449fbc94 |
|
988 | o 10 public a-H - 967b449fbc94 | |
985 | | |
|
989 | | | |
986 | | o 9 draft a-G - 3e27b6f1eee1 |
|
990 | | o 9 draft a-G - 3e27b6f1eee1 | |
987 | | | |
|
991 | | | | |
988 | | o 8 public a-F - b740e3e5c05d |
|
992 | | o 8 public a-F - b740e3e5c05d | |
989 | | | |
|
993 | | | | |
990 | | o 7 public a-E - e9f537e46dea |
|
994 | | o 7 public a-E - e9f537e46dea | |
991 | | | |
|
995 | | | | |
992 | +---o 6 public n-B - 145e75495359 |
|
996 | +---o 6 public n-B - 145e75495359 | |
993 | | | |
|
997 | | | | |
994 | o | 5 public n-A - d6bcb4f74035 |
|
998 | o | 5 public n-A - d6bcb4f74035 | |
995 | | | |
|
999 | | | | |
996 | o | 4 public b-A - f54f1bb90ff3 |
|
1000 | o | 4 public b-A - f54f1bb90ff3 | |
997 | | | |
|
1001 | | | | |
998 | | o 3 public a-D - b555f63b6063 |
|
1002 | | o 3 public a-D - b555f63b6063 | |
999 | | | |
|
1003 | | | | |
1000 | | o 2 public a-C - 54acac6f23ab |
|
1004 | | o 2 public a-C - 54acac6f23ab | |
1001 | |/ |
|
1005 | |/ | |
1002 | o 1 public a-B - 548a3d25dbf0 |
|
1006 | o 1 public a-B - 548a3d25dbf0 | |
1003 | | |
|
1007 | | | |
1004 | o 0 public a-A - 054250a37db4 |
|
1008 | o 0 public a-A - 054250a37db4 | |
1005 |
|
1009 | |||
1006 |
|
1010 | |||
1007 | Test that test are properly ignored on remote event when existing locally |
|
1011 | Test that test are properly ignored on remote event when existing locally | |
1008 |
|
1012 | |||
1009 | $ cd .. |
|
1013 | $ cd .. | |
1010 | $ hg clone -qU -r b555f63b6063 -r f54f1bb90ff3 beta gamma |
|
1014 | $ hg clone -qU -r b555f63b6063 -r f54f1bb90ff3 beta gamma | |
1011 |
|
1015 | |||
1012 | # pathological case are |
|
1016 | # pathological case are | |
1013 | # |
|
1017 | # | |
1014 | # * secret remotely |
|
1018 | # * secret remotely | |
1015 | # * known locally |
|
1019 | # * known locally | |
1016 | # * repo have uncommon changeset |
|
1020 | # * repo have uncommon changeset | |
1017 |
|
1021 | |||
1018 | $ hg -R beta phase --secret --force f54f1bb90ff3 |
|
1022 | $ hg -R beta phase --secret --force f54f1bb90ff3 | |
1019 | $ hg -R gamma phase --draft --force f54f1bb90ff3 |
|
1023 | $ hg -R gamma phase --draft --force f54f1bb90ff3 | |
1020 |
|
1024 | |||
1021 | $ cd gamma |
|
1025 | $ cd gamma | |
1022 | $ hg pull ../beta |
|
1026 | $ hg pull ../beta | |
1023 | pulling from ../beta |
|
1027 | pulling from ../beta | |
1024 | searching for changes |
|
1028 | searching for changes | |
1025 | adding changesets |
|
1029 | adding changesets | |
1026 | adding manifests |
|
1030 | adding manifests | |
1027 | adding file changes |
|
1031 | adding file changes | |
1028 | added 2 changesets with 2 changes to 2 files |
|
1032 | added 2 changesets with 2 changes to 2 files | |
1029 | (run 'hg update' to get a working copy) |
|
1033 | (run 'hg update' to get a working copy) | |
1030 | $ hg phase f54f1bb90ff3 |
|
1034 | $ hg phase f54f1bb90ff3 | |
1031 | 2: draft |
|
1035 | 2: draft | |
1032 |
|
1036 | |||
1033 | same over the wire |
|
1037 | same over the wire | |
1034 |
|
1038 | |||
1035 | $ cd ../beta |
|
1039 | $ cd ../beta | |
1036 | $ hg serve -p $HGPORT -d --pid-file=../beta.pid -E ../beta-error.log |
|
1040 | $ hg serve -p $HGPORT -d --pid-file=../beta.pid -E ../beta-error.log | |
1037 | $ cat ../beta.pid >> $DAEMON_PIDS |
|
1041 | $ cat ../beta.pid >> $DAEMON_PIDS | |
1038 | $ cd ../gamma |
|
1042 | $ cd ../gamma | |
1039 |
|
1043 | |||
1040 | $ hg pull http://localhost:$HGPORT/ |
|
1044 | $ hg pull http://localhost:$HGPORT/ | |
1041 | pulling from http://localhost:$HGPORT/ |
|
1045 | pulling from http://localhost:$HGPORT/ | |
1042 | searching for changes |
|
1046 | searching for changes | |
1043 | no changes found |
|
1047 | no changes found | |
1044 | $ hg phase f54f1bb90ff3 |
|
1048 | $ hg phase f54f1bb90ff3 | |
1045 | 2: draft |
|
1049 | 2: draft | |
1046 |
|
1050 | |||
1047 | check that secret local on both side are not synced to public |
|
1051 | check that secret local on both side are not synced to public | |
1048 |
|
1052 | |||
1049 | $ hg push -r b555f63b6063 http://localhost:$HGPORT/ |
|
1053 | $ hg push -r b555f63b6063 http://localhost:$HGPORT/ | |
1050 | pushing to http://localhost:$HGPORT/ |
|
1054 | pushing to http://localhost:$HGPORT/ | |
1051 | searching for changes |
|
1055 | searching for changes | |
1052 | no changes found |
|
1056 | no changes found | |
1053 | [1] |
|
1057 | [1] | |
1054 | $ hg phase f54f1bb90ff3 |
|
1058 | $ hg phase f54f1bb90ff3 | |
1055 | 2: draft |
|
1059 | 2: draft | |
1056 |
|
1060 | |||
1057 | put the changeset in the draft state again |
|
1061 | put the changeset in the draft state again | |
1058 | (first test after this one expect to be able to copy) |
|
1062 | (first test after this one expect to be able to copy) | |
1059 |
|
1063 | |||
1060 | $ cd .. |
|
1064 | $ cd .. | |
1061 |
|
1065 | |||
1062 |
|
1066 | |||
1063 | Test Clone behavior |
|
1067 | Test Clone behavior | |
1064 |
|
1068 | |||
1065 | A. Clone without secret changeset |
|
1069 | A. Clone without secret changeset | |
1066 |
|
1070 | |||
1067 | 1. cloning non-publishing repository |
|
1071 | 1. cloning non-publishing repository | |
1068 | (Phase should be preserved) |
|
1072 | (Phase should be preserved) | |
1069 |
|
1073 | |||
1070 | # make sure there is no secret so we can use a copy clone |
|
1074 | # make sure there is no secret so we can use a copy clone | |
1071 |
|
1075 | |||
1072 | $ hg -R mu phase --draft 'secret()' |
|
1076 | $ hg -R mu phase --draft 'secret()' | |
1073 |
|
1077 | |||
1074 | $ hg clone -U mu Tau |
|
1078 | $ hg clone -U mu Tau | |
1075 | $ hgph -R Tau |
|
1079 | $ hgph -R Tau | |
1076 | o 12 draft mu-more - 5237fb433fc8 |
|
1080 | o 12 draft mu-more - 5237fb433fc8 | |
1077 | | |
|
1081 | | | |
1078 | | o 11 draft alpha-more - 1c5cfd894796 |
|
1082 | | o 11 draft alpha-more - 1c5cfd894796 | |
1079 | | | |
|
1083 | | | | |
1080 | o | 10 draft A-secret - 435b5d83910c |
|
1084 | o | 10 draft A-secret - 435b5d83910c | |
1081 | |/ |
|
1085 | |/ | |
1082 | o 9 public a-H - 967b449fbc94 |
|
1086 | o 9 public a-H - 967b449fbc94 | |
1083 | | |
|
1087 | | | |
1084 | | o 8 public a-F - b740e3e5c05d |
|
1088 | | o 8 public a-F - b740e3e5c05d | |
1085 | | | |
|
1089 | | | | |
1086 | | o 7 public a-E - e9f537e46dea |
|
1090 | | o 7 public a-E - e9f537e46dea | |
1087 | | | |
|
1091 | | | | |
1088 | +---o 6 public n-B - 145e75495359 |
|
1092 | +---o 6 public n-B - 145e75495359 | |
1089 | | | |
|
1093 | | | | |
1090 | o | 5 public n-A - d6bcb4f74035 |
|
1094 | o | 5 public n-A - d6bcb4f74035 | |
1091 | | | |
|
1095 | | | | |
1092 | | o 4 public a-D - b555f63b6063 |
|
1096 | | o 4 public a-D - b555f63b6063 | |
1093 | | | |
|
1097 | | | | |
1094 | | o 3 public a-C - 54acac6f23ab |
|
1098 | | o 3 public a-C - 54acac6f23ab | |
1095 | | | |
|
1099 | | | | |
1096 | o | 2 public b-A - f54f1bb90ff3 |
|
1100 | o | 2 public b-A - f54f1bb90ff3 | |
1097 | |/ |
|
1101 | |/ | |
1098 | o 1 public a-B - 548a3d25dbf0 |
|
1102 | o 1 public a-B - 548a3d25dbf0 | |
1099 | | |
|
1103 | | | |
1100 | o 0 public a-A - 054250a37db4 |
|
1104 | o 0 public a-A - 054250a37db4 | |
1101 |
|
1105 | |||
1102 |
|
1106 | |||
1103 | 2. cloning publishing repository |
|
1107 | 2. cloning publishing repository | |
1104 |
|
1108 | |||
1105 | (everything should be public) |
|
1109 | (everything should be public) | |
1106 |
|
1110 | |||
1107 | $ hg clone -U alpha Upsilon |
|
1111 | $ hg clone -U alpha Upsilon | |
1108 | $ hgph -R Upsilon |
|
1112 | $ hgph -R Upsilon | |
1109 | o 13 public mu-more - 5237fb433fc8 |
|
1113 | o 13 public mu-more - 5237fb433fc8 | |
1110 | | |
|
1114 | | | |
1111 | | o 12 public alpha-more - 1c5cfd894796 |
|
1115 | | o 12 public alpha-more - 1c5cfd894796 | |
1112 | | | |
|
1116 | | | | |
1113 | o | 11 public A-secret - 435b5d83910c |
|
1117 | o | 11 public A-secret - 435b5d83910c | |
1114 | |/ |
|
1118 | |/ | |
1115 | o 10 public a-H - 967b449fbc94 |
|
1119 | o 10 public a-H - 967b449fbc94 | |
1116 | | |
|
1120 | | | |
1117 | | o 9 public a-G - 3e27b6f1eee1 |
|
1121 | | o 9 public a-G - 3e27b6f1eee1 | |
1118 | | | |
|
1122 | | | | |
1119 | | o 8 public a-F - b740e3e5c05d |
|
1123 | | o 8 public a-F - b740e3e5c05d | |
1120 | | | |
|
1124 | | | | |
1121 | | o 7 public a-E - e9f537e46dea |
|
1125 | | o 7 public a-E - e9f537e46dea | |
1122 | | | |
|
1126 | | | | |
1123 | +---o 6 public n-B - 145e75495359 |
|
1127 | +---o 6 public n-B - 145e75495359 | |
1124 | | | |
|
1128 | | | | |
1125 | o | 5 public n-A - d6bcb4f74035 |
|
1129 | o | 5 public n-A - d6bcb4f74035 | |
1126 | | | |
|
1130 | | | | |
1127 | o | 4 public b-A - f54f1bb90ff3 |
|
1131 | o | 4 public b-A - f54f1bb90ff3 | |
1128 | | | |
|
1132 | | | | |
1129 | | o 3 public a-D - b555f63b6063 |
|
1133 | | o 3 public a-D - b555f63b6063 | |
1130 | | | |
|
1134 | | | | |
1131 | | o 2 public a-C - 54acac6f23ab |
|
1135 | | o 2 public a-C - 54acac6f23ab | |
1132 | |/ |
|
1136 | |/ | |
1133 | o 1 public a-B - 548a3d25dbf0 |
|
1137 | o 1 public a-B - 548a3d25dbf0 | |
1134 | | |
|
1138 | | | |
1135 | o 0 public a-A - 054250a37db4 |
|
1139 | o 0 public a-A - 054250a37db4 | |
1136 |
|
1140 | |||
1137 | #if unix-permissions no-root |
|
1141 | #if unix-permissions no-root | |
1138 |
|
1142 | |||
1139 | Pushing From an unlockable repo |
|
1143 | Pushing From an unlockable repo | |
1140 | -------------------------------- |
|
1144 | -------------------------------- | |
1141 | (issue3684) |
|
1145 | (issue3684) | |
1142 |
|
1146 | |||
1143 | Unability to lock the source repo should not prevent the push. It will prevent |
|
1147 | Unability to lock the source repo should not prevent the push. It will prevent | |
1144 | the retrieval of remote phase during push. For example, pushing to a publishing |
|
1148 | the retrieval of remote phase during push. For example, pushing to a publishing | |
1145 | server won't turn changeset public. |
|
1149 | server won't turn changeset public. | |
1146 |
|
1150 | |||
1147 | 1. Test that push is not prevented |
|
1151 | 1. Test that push is not prevented | |
1148 |
|
1152 | |||
1149 | $ hg init Phi |
|
1153 | $ hg init Phi | |
1150 | $ cd Upsilon |
|
1154 | $ cd Upsilon | |
1151 | $ chmod -R -w .hg |
|
1155 | $ chmod -R -w .hg | |
1152 | $ hg push ../Phi |
|
1156 | $ hg push ../Phi | |
1153 | pushing to ../Phi |
|
1157 | pushing to ../Phi | |
1154 | searching for changes |
|
1158 | searching for changes | |
1155 | adding changesets |
|
1159 | adding changesets | |
1156 | adding manifests |
|
1160 | adding manifests | |
1157 | adding file changes |
|
1161 | adding file changes | |
1158 | added 14 changesets with 14 changes to 14 files (+3 heads) |
|
1162 | added 14 changesets with 14 changes to 14 files (+3 heads) | |
1159 | $ chmod -R +w .hg |
|
1163 | $ chmod -R +w .hg | |
1160 |
|
1164 | |||
1161 | 2. Test that failed phases movement are reported |
|
1165 | 2. Test that failed phases movement are reported | |
1162 |
|
1166 | |||
1163 | $ hg phase --force --draft 3 |
|
1167 | $ hg phase --force --draft 3 | |
1164 | $ chmod -R -w .hg |
|
1168 | $ chmod -R -w .hg | |
1165 | $ hg push ../Phi |
|
1169 | $ hg push ../Phi | |
1166 | pushing to ../Phi |
|
1170 | pushing to ../Phi | |
1167 | searching for changes |
|
1171 | searching for changes | |
1168 | no changes found |
|
1172 | no changes found | |
1169 | cannot lock source repo, skipping local public phase update |
|
1173 | cannot lock source repo, skipping local public phase update | |
1170 | [1] |
|
1174 | [1] | |
1171 | $ chmod -R +w .hg |
|
1175 | $ chmod -R +w .hg | |
1172 | $ hgph Upsilon |
|
1176 | $ hgph Upsilon | |
1173 |
|
1177 | |||
1174 | $ cd .. |
|
1178 | $ cd .. | |
1175 |
|
1179 | |||
1176 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
1180 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |
1177 |
|
1181 | |||
1178 | #endif |
|
1182 | #endif |
@@ -1,777 +1,781 b'' | |||||
1 | $ hg init a |
|
1 | $ hg init a | |
2 | $ cd a |
|
2 | $ cd a | |
3 | $ echo foo > t1 |
|
3 | $ echo foo > t1 | |
4 | $ hg add t1 |
|
4 | $ hg add t1 | |
5 | $ hg commit -m "1" |
|
5 | $ hg commit -m "1" | |
6 |
|
6 | |||
7 | $ cd .. |
|
7 | $ cd .. | |
8 | $ hg clone a b |
|
8 | $ hg clone a b | |
9 | updating to branch default |
|
9 | updating to branch default | |
10 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
10 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
11 |
|
11 | |||
12 | $ cd a |
|
12 | $ cd a | |
13 | $ echo foo > t2 |
|
13 | $ echo foo > t2 | |
14 | $ hg add t2 |
|
14 | $ hg add t2 | |
15 | $ hg commit -m "2" |
|
15 | $ hg commit -m "2" | |
16 |
|
16 | |||
17 | $ cd ../b |
|
17 | $ cd ../b | |
18 | $ echo foo > t3 |
|
18 | $ echo foo > t3 | |
19 | $ hg add t3 |
|
19 | $ hg add t3 | |
20 | $ hg commit -m "3" |
|
20 | $ hg commit -m "3" | |
21 |
|
21 | |||
22 | $ hg push ../a |
|
22 | $ hg push ../a | |
23 | pushing to ../a |
|
23 | pushing to ../a | |
24 | searching for changes |
|
24 | searching for changes | |
25 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a |
|
25 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a | |
26 | abort: push creates new remote head 1e108cc5548c! |
|
26 | abort: push creates new remote head 1e108cc5548c! | |
27 | (pull and merge or see "hg help push" for details about pushing new heads) |
|
27 | (pull and merge or see "hg help push" for details about pushing new heads) | |
28 | [255] |
|
28 | [255] | |
29 |
|
29 | |||
30 | $ hg push --debug ../a |
|
30 | $ hg push --debug ../a | |
31 | pushing to ../a |
|
31 | pushing to ../a | |
32 | query 1; heads |
|
32 | query 1; heads | |
33 | searching for changes |
|
33 | searching for changes | |
34 | taking quick initial sample |
|
34 | taking quick initial sample | |
35 | searching: 2 queries |
|
35 | searching: 2 queries | |
36 | query 2; still undecided: 1, sample size is: 1 |
|
36 | query 2; still undecided: 1, sample size is: 1 | |
37 | 2 total queries |
|
37 | 2 total queries | |
38 | listing keys for "phases" |
|
38 | listing keys for "phases" | |
39 | checking for updated bookmarks |
|
39 | checking for updated bookmarks | |
40 | listing keys for "bookmarks" |
|
40 | listing keys for "bookmarks" | |
41 | listing keys for "bookmarks" |
|
41 | listing keys for "bookmarks" | |
42 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a |
|
42 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a | |
43 | new remote heads on branch 'default': |
|
43 | new remote heads on branch 'default': | |
44 | 1e108cc5548c |
|
44 | 1e108cc5548c | |
45 | abort: push creates new remote head 1e108cc5548c! |
|
45 | abort: push creates new remote head 1e108cc5548c! | |
46 | (pull and merge or see "hg help push" for details about pushing new heads) |
|
46 | (pull and merge or see "hg help push" for details about pushing new heads) | |
47 | [255] |
|
47 | [255] | |
48 |
|
48 | |||
49 | $ hg pull ../a |
|
49 | $ hg pull ../a | |
50 | pulling from ../a |
|
50 | pulling from ../a | |
51 | searching for changes |
|
51 | searching for changes | |
52 | adding changesets |
|
52 | adding changesets | |
53 | adding manifests |
|
53 | adding manifests | |
54 | adding file changes |
|
54 | adding file changes | |
55 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
55 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
56 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
56 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
57 |
|
57 | |||
58 | $ hg push ../a |
|
58 | $ hg push ../a | |
59 | pushing to ../a |
|
59 | pushing to ../a | |
60 | searching for changes |
|
60 | searching for changes | |
61 | abort: push creates new remote head 1e108cc5548c! |
|
61 | abort: push creates new remote head 1e108cc5548c! | |
62 | (merge or see "hg help push" for details about pushing new heads) |
|
62 | (merge or see "hg help push" for details about pushing new heads) | |
63 | [255] |
|
63 | [255] | |
64 |
|
64 | |||
65 | $ hg merge |
|
65 | $ hg merge | |
66 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
66 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
67 | (branch merge, don't forget to commit) |
|
67 | (branch merge, don't forget to commit) | |
68 |
|
68 | |||
69 | $ hg commit -m "4" |
|
69 | $ hg commit -m "4" | |
70 | $ hg push ../a |
|
70 | $ hg push ../a | |
71 | pushing to ../a |
|
71 | pushing to ../a | |
72 | searching for changes |
|
72 | searching for changes | |
73 | adding changesets |
|
73 | adding changesets | |
74 | adding manifests |
|
74 | adding manifests | |
75 | adding file changes |
|
75 | adding file changes | |
76 | added 2 changesets with 1 changes to 1 files |
|
76 | added 2 changesets with 1 changes to 1 files | |
77 |
|
77 | |||
78 | $ cd .. |
|
78 | $ cd .. | |
79 |
|
79 | |||
80 | $ hg init c |
|
80 | $ hg init c | |
81 | $ cd c |
|
81 | $ cd c | |
82 | $ for i in 0 1 2; do |
|
82 | $ for i in 0 1 2; do | |
83 | > echo $i >> foo |
|
83 | > echo $i >> foo | |
84 | > hg ci -Am $i |
|
84 | > hg ci -Am $i | |
85 | > done |
|
85 | > done | |
86 | adding foo |
|
86 | adding foo | |
87 | $ cd .. |
|
87 | $ cd .. | |
88 |
|
88 | |||
89 | $ hg clone c d |
|
89 | $ hg clone c d | |
90 | updating to branch default |
|
90 | updating to branch default | |
91 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
91 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
92 |
|
92 | |||
93 | $ cd d |
|
93 | $ cd d | |
94 | $ for i in 0 1; do |
|
94 | $ for i in 0 1; do | |
95 | > hg co -C $i |
|
95 | > hg co -C $i | |
96 | > echo d-$i >> foo |
|
96 | > echo d-$i >> foo | |
97 | > hg ci -m d-$i |
|
97 | > hg ci -m d-$i | |
98 | > done |
|
98 | > done | |
99 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
99 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
100 | created new head |
|
100 | created new head | |
101 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
101 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
102 | created new head |
|
102 | created new head | |
103 |
|
103 | |||
104 | $ HGMERGE=true hg merge 3 |
|
104 | $ HGMERGE=true hg merge 3 | |
105 | merging foo |
|
105 | merging foo | |
106 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
106 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
107 | (branch merge, don't forget to commit) |
|
107 | (branch merge, don't forget to commit) | |
108 |
|
108 | |||
109 | $ hg ci -m c-d |
|
109 | $ hg ci -m c-d | |
110 |
|
110 | |||
111 | $ hg push ../c |
|
111 | $ hg push ../c | |
112 | pushing to ../c |
|
112 | pushing to ../c | |
113 | searching for changes |
|
113 | searching for changes | |
114 | abort: push creates new remote head 6346d66eb9f5! |
|
114 | abort: push creates new remote head 6346d66eb9f5! | |
115 | (merge or see "hg help push" for details about pushing new heads) |
|
115 | (merge or see "hg help push" for details about pushing new heads) | |
116 | [255] |
|
116 | [255] | |
117 |
|
117 | |||
118 | $ hg push -r 2 ../c |
|
118 | $ hg push -r 2 ../c | |
119 | pushing to ../c |
|
119 | pushing to ../c | |
120 | searching for changes |
|
120 | searching for changes | |
121 | no changes found |
|
121 | no changes found | |
122 | [1] |
|
122 | [1] | |
123 |
|
123 | |||
124 | $ hg push -r 3 ../c |
|
124 | $ hg push -r 3 ../c | |
125 | pushing to ../c |
|
125 | pushing to ../c | |
126 | searching for changes |
|
126 | searching for changes | |
127 | abort: push creates new remote head a5dda829a167! |
|
127 | abort: push creates new remote head a5dda829a167! | |
128 | (merge or see "hg help push" for details about pushing new heads) |
|
128 | (merge or see "hg help push" for details about pushing new heads) | |
129 | [255] |
|
129 | [255] | |
130 |
|
130 | |||
131 | $ hg push -v -r 3 -r 4 ../c |
|
131 | $ hg push -v -r 3 -r 4 ../c | |
132 | pushing to ../c |
|
132 | pushing to ../c | |
133 | searching for changes |
|
133 | searching for changes | |
134 | new remote heads on branch 'default': |
|
134 | new remote heads on branch 'default': | |
135 | a5dda829a167 |
|
135 | a5dda829a167 | |
136 | ee8fbc7a0295 |
|
136 | ee8fbc7a0295 | |
137 | abort: push creates new remote head a5dda829a167! |
|
137 | abort: push creates new remote head a5dda829a167! | |
138 | (merge or see "hg help push" for details about pushing new heads) |
|
138 | (merge or see "hg help push" for details about pushing new heads) | |
139 | [255] |
|
139 | [255] | |
140 |
|
140 | |||
141 | $ hg push -v -f -r 3 -r 4 ../c |
|
141 | $ hg push -v -f -r 3 -r 4 ../c | |
142 | pushing to ../c |
|
142 | pushing to ../c | |
143 | searching for changes |
|
143 | searching for changes | |
144 | 2 changesets found |
|
144 | 2 changesets found | |
|
145 | uncompressed size of bundle content: | |||
|
146 | 308 (changelog) | |||
|
147 | 286 (manifests) | |||
|
148 | 213 foo | |||
145 | adding changesets |
|
149 | adding changesets | |
146 | adding manifests |
|
150 | adding manifests | |
147 | adding file changes |
|
151 | adding file changes | |
148 | added 2 changesets with 2 changes to 1 files (+2 heads) |
|
152 | added 2 changesets with 2 changes to 1 files (+2 heads) | |
149 |
|
153 | |||
150 | $ hg push -r 5 ../c |
|
154 | $ hg push -r 5 ../c | |
151 | pushing to ../c |
|
155 | pushing to ../c | |
152 | searching for changes |
|
156 | searching for changes | |
153 | adding changesets |
|
157 | adding changesets | |
154 | adding manifests |
|
158 | adding manifests | |
155 | adding file changes |
|
159 | adding file changes | |
156 | added 1 changesets with 1 changes to 1 files (-1 heads) |
|
160 | added 1 changesets with 1 changes to 1 files (-1 heads) | |
157 |
|
161 | |||
158 | $ hg in ../c |
|
162 | $ hg in ../c | |
159 | comparing with ../c |
|
163 | comparing with ../c | |
160 | searching for changes |
|
164 | searching for changes | |
161 | no changes found |
|
165 | no changes found | |
162 | [1] |
|
166 | [1] | |
163 |
|
167 | |||
164 |
|
168 | |||
165 | Issue450: push -r warns about remote head creation even if no heads |
|
169 | Issue450: push -r warns about remote head creation even if no heads | |
166 | will be created |
|
170 | will be created | |
167 |
|
171 | |||
168 | $ hg init ../e |
|
172 | $ hg init ../e | |
169 | $ hg push -r 0 ../e |
|
173 | $ hg push -r 0 ../e | |
170 | pushing to ../e |
|
174 | pushing to ../e | |
171 | searching for changes |
|
175 | searching for changes | |
172 | adding changesets |
|
176 | adding changesets | |
173 | adding manifests |
|
177 | adding manifests | |
174 | adding file changes |
|
178 | adding file changes | |
175 | added 1 changesets with 1 changes to 1 files |
|
179 | added 1 changesets with 1 changes to 1 files | |
176 |
|
180 | |||
177 | $ hg push -r 1 ../e |
|
181 | $ hg push -r 1 ../e | |
178 | pushing to ../e |
|
182 | pushing to ../e | |
179 | searching for changes |
|
183 | searching for changes | |
180 | adding changesets |
|
184 | adding changesets | |
181 | adding manifests |
|
185 | adding manifests | |
182 | adding file changes |
|
186 | adding file changes | |
183 | added 1 changesets with 1 changes to 1 files |
|
187 | added 1 changesets with 1 changes to 1 files | |
184 |
|
188 | |||
185 | $ cd .. |
|
189 | $ cd .. | |
186 |
|
190 | |||
187 |
|
191 | |||
188 | Issue736: named branches are not considered for detection of |
|
192 | Issue736: named branches are not considered for detection of | |
189 | unmerged heads in "hg push" |
|
193 | unmerged heads in "hg push" | |
190 |
|
194 | |||
191 | $ hg init f |
|
195 | $ hg init f | |
192 | $ cd f |
|
196 | $ cd f | |
193 | $ hg -q branch a |
|
197 | $ hg -q branch a | |
194 | $ echo 0 > foo |
|
198 | $ echo 0 > foo | |
195 | $ hg -q ci -Am 0 |
|
199 | $ hg -q ci -Am 0 | |
196 | $ echo 1 > foo |
|
200 | $ echo 1 > foo | |
197 | $ hg -q ci -m 1 |
|
201 | $ hg -q ci -m 1 | |
198 | $ hg -q up 0 |
|
202 | $ hg -q up 0 | |
199 | $ echo 2 > foo |
|
203 | $ echo 2 > foo | |
200 | $ hg -q ci -m 2 |
|
204 | $ hg -q ci -m 2 | |
201 | $ hg -q up 0 |
|
205 | $ hg -q up 0 | |
202 | $ hg -q branch b |
|
206 | $ hg -q branch b | |
203 | $ echo 3 > foo |
|
207 | $ echo 3 > foo | |
204 | $ hg -q ci -m 3 |
|
208 | $ hg -q ci -m 3 | |
205 | $ cd .. |
|
209 | $ cd .. | |
206 |
|
210 | |||
207 | $ hg -q clone f g |
|
211 | $ hg -q clone f g | |
208 | $ cd g |
|
212 | $ cd g | |
209 |
|
213 | |||
210 | Push on existing branch and new branch: |
|
214 | Push on existing branch and new branch: | |
211 |
|
215 | |||
212 | $ hg -q up 1 |
|
216 | $ hg -q up 1 | |
213 | $ echo 4 > foo |
|
217 | $ echo 4 > foo | |
214 | $ hg -q ci -m 4 |
|
218 | $ hg -q ci -m 4 | |
215 | $ hg -q up 0 |
|
219 | $ hg -q up 0 | |
216 | $ echo 5 > foo |
|
220 | $ echo 5 > foo | |
217 | $ hg -q branch c |
|
221 | $ hg -q branch c | |
218 | $ hg -q ci -m 5 |
|
222 | $ hg -q ci -m 5 | |
219 |
|
223 | |||
220 | $ hg push ../f |
|
224 | $ hg push ../f | |
221 | pushing to ../f |
|
225 | pushing to ../f | |
222 | searching for changes |
|
226 | searching for changes | |
223 | abort: push creates new remote branches: c! |
|
227 | abort: push creates new remote branches: c! | |
224 | (use 'hg push --new-branch' to create new remote branches) |
|
228 | (use 'hg push --new-branch' to create new remote branches) | |
225 | [255] |
|
229 | [255] | |
226 |
|
230 | |||
227 | $ hg push -r 4 -r 5 ../f |
|
231 | $ hg push -r 4 -r 5 ../f | |
228 | pushing to ../f |
|
232 | pushing to ../f | |
229 | searching for changes |
|
233 | searching for changes | |
230 | abort: push creates new remote branches: c! |
|
234 | abort: push creates new remote branches: c! | |
231 | (use 'hg push --new-branch' to create new remote branches) |
|
235 | (use 'hg push --new-branch' to create new remote branches) | |
232 | [255] |
|
236 | [255] | |
233 |
|
237 | |||
234 |
|
238 | |||
235 | Multiple new branches: |
|
239 | Multiple new branches: | |
236 |
|
240 | |||
237 | $ hg -q branch d |
|
241 | $ hg -q branch d | |
238 | $ echo 6 > foo |
|
242 | $ echo 6 > foo | |
239 | $ hg -q ci -m 6 |
|
243 | $ hg -q ci -m 6 | |
240 |
|
244 | |||
241 | $ hg push ../f |
|
245 | $ hg push ../f | |
242 | pushing to ../f |
|
246 | pushing to ../f | |
243 | searching for changes |
|
247 | searching for changes | |
244 | abort: push creates new remote branches: c, d! |
|
248 | abort: push creates new remote branches: c, d! | |
245 | (use 'hg push --new-branch' to create new remote branches) |
|
249 | (use 'hg push --new-branch' to create new remote branches) | |
246 | [255] |
|
250 | [255] | |
247 |
|
251 | |||
248 | $ hg push -r 4 -r 6 ../f |
|
252 | $ hg push -r 4 -r 6 ../f | |
249 | pushing to ../f |
|
253 | pushing to ../f | |
250 | searching for changes |
|
254 | searching for changes | |
251 | abort: push creates new remote branches: c, d! |
|
255 | abort: push creates new remote branches: c, d! | |
252 | (use 'hg push --new-branch' to create new remote branches) |
|
256 | (use 'hg push --new-branch' to create new remote branches) | |
253 | [255] |
|
257 | [255] | |
254 |
|
258 | |||
255 | $ cd ../g |
|
259 | $ cd ../g | |
256 |
|
260 | |||
257 |
|
261 | |||
258 | Fail on multiple head push: |
|
262 | Fail on multiple head push: | |
259 |
|
263 | |||
260 | $ hg -q up 1 |
|
264 | $ hg -q up 1 | |
261 | $ echo 7 > foo |
|
265 | $ echo 7 > foo | |
262 | $ hg -q ci -m 7 |
|
266 | $ hg -q ci -m 7 | |
263 |
|
267 | |||
264 | $ hg push -r 4 -r 7 ../f |
|
268 | $ hg push -r 4 -r 7 ../f | |
265 | pushing to ../f |
|
269 | pushing to ../f | |
266 | searching for changes |
|
270 | searching for changes | |
267 | abort: push creates new remote head 0b715ef6ff8f on branch 'a'! |
|
271 | abort: push creates new remote head 0b715ef6ff8f on branch 'a'! | |
268 | (merge or see "hg help push" for details about pushing new heads) |
|
272 | (merge or see "hg help push" for details about pushing new heads) | |
269 | [255] |
|
273 | [255] | |
270 |
|
274 | |||
271 | Push replacement head on existing branches: |
|
275 | Push replacement head on existing branches: | |
272 |
|
276 | |||
273 | $ hg -q up 3 |
|
277 | $ hg -q up 3 | |
274 | $ echo 8 > foo |
|
278 | $ echo 8 > foo | |
275 | $ hg -q ci -m 8 |
|
279 | $ hg -q ci -m 8 | |
276 |
|
280 | |||
277 | $ hg push -r 7 -r 8 ../f |
|
281 | $ hg push -r 7 -r 8 ../f | |
278 | pushing to ../f |
|
282 | pushing to ../f | |
279 | searching for changes |
|
283 | searching for changes | |
280 | adding changesets |
|
284 | adding changesets | |
281 | adding manifests |
|
285 | adding manifests | |
282 | adding file changes |
|
286 | adding file changes | |
283 | added 2 changesets with 2 changes to 1 files |
|
287 | added 2 changesets with 2 changes to 1 files | |
284 |
|
288 | |||
285 |
|
289 | |||
286 | Merge of branch a to other branch b followed by unrelated push |
|
290 | Merge of branch a to other branch b followed by unrelated push | |
287 | on branch a: |
|
291 | on branch a: | |
288 |
|
292 | |||
289 | $ hg -q up 7 |
|
293 | $ hg -q up 7 | |
290 | $ HGMERGE=true hg -q merge 8 |
|
294 | $ HGMERGE=true hg -q merge 8 | |
291 | $ hg -q ci -m 9 |
|
295 | $ hg -q ci -m 9 | |
292 | $ hg -q up 8 |
|
296 | $ hg -q up 8 | |
293 | $ echo 10 > foo |
|
297 | $ echo 10 > foo | |
294 | $ hg -q ci -m 10 |
|
298 | $ hg -q ci -m 10 | |
295 |
|
299 | |||
296 | $ hg push -r 9 ../f |
|
300 | $ hg push -r 9 ../f | |
297 | pushing to ../f |
|
301 | pushing to ../f | |
298 | searching for changes |
|
302 | searching for changes | |
299 | adding changesets |
|
303 | adding changesets | |
300 | adding manifests |
|
304 | adding manifests | |
301 | adding file changes |
|
305 | adding file changes | |
302 | added 1 changesets with 1 changes to 1 files (-1 heads) |
|
306 | added 1 changesets with 1 changes to 1 files (-1 heads) | |
303 |
|
307 | |||
304 | $ hg push -r 10 ../f |
|
308 | $ hg push -r 10 ../f | |
305 | pushing to ../f |
|
309 | pushing to ../f | |
306 | searching for changes |
|
310 | searching for changes | |
307 | adding changesets |
|
311 | adding changesets | |
308 | adding manifests |
|
312 | adding manifests | |
309 | adding file changes |
|
313 | adding file changes | |
310 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
314 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
311 |
|
315 | |||
312 |
|
316 | |||
313 | Cheating the counting algorithm: |
|
317 | Cheating the counting algorithm: | |
314 |
|
318 | |||
315 | $ hg -q up 9 |
|
319 | $ hg -q up 9 | |
316 | $ HGMERGE=true hg -q merge 2 |
|
320 | $ HGMERGE=true hg -q merge 2 | |
317 | $ hg -q ci -m 11 |
|
321 | $ hg -q ci -m 11 | |
318 | $ hg -q up 1 |
|
322 | $ hg -q up 1 | |
319 | $ echo 12 > foo |
|
323 | $ echo 12 > foo | |
320 | $ hg -q ci -m 12 |
|
324 | $ hg -q ci -m 12 | |
321 |
|
325 | |||
322 | $ hg push -r 11 -r 12 ../f |
|
326 | $ hg push -r 11 -r 12 ../f | |
323 | pushing to ../f |
|
327 | pushing to ../f | |
324 | searching for changes |
|
328 | searching for changes | |
325 | adding changesets |
|
329 | adding changesets | |
326 | adding manifests |
|
330 | adding manifests | |
327 | adding file changes |
|
331 | adding file changes | |
328 | added 2 changesets with 2 changes to 1 files |
|
332 | added 2 changesets with 2 changes to 1 files | |
329 |
|
333 | |||
330 |
|
334 | |||
331 | Failed push of new named branch: |
|
335 | Failed push of new named branch: | |
332 |
|
336 | |||
333 | $ echo 12 > foo |
|
337 | $ echo 12 > foo | |
334 | $ hg -q ci -m 12a |
|
338 | $ hg -q ci -m 12a | |
335 | [1] |
|
339 | [1] | |
336 | $ hg -q up 11 |
|
340 | $ hg -q up 11 | |
337 | $ echo 13 > foo |
|
341 | $ echo 13 > foo | |
338 | $ hg -q branch e |
|
342 | $ hg -q branch e | |
339 | $ hg -q ci -m 13d |
|
343 | $ hg -q ci -m 13d | |
340 |
|
344 | |||
341 | $ hg push -r 12 -r 13 ../f |
|
345 | $ hg push -r 12 -r 13 ../f | |
342 | pushing to ../f |
|
346 | pushing to ../f | |
343 | searching for changes |
|
347 | searching for changes | |
344 | abort: push creates new remote branches: e! |
|
348 | abort: push creates new remote branches: e! | |
345 | (use 'hg push --new-branch' to create new remote branches) |
|
349 | (use 'hg push --new-branch' to create new remote branches) | |
346 | [255] |
|
350 | [255] | |
347 |
|
351 | |||
348 |
|
352 | |||
349 | Using --new-branch to push new named branch: |
|
353 | Using --new-branch to push new named branch: | |
350 |
|
354 | |||
351 | $ hg push --new-branch -r 12 -r 13 ../f |
|
355 | $ hg push --new-branch -r 12 -r 13 ../f | |
352 | pushing to ../f |
|
356 | pushing to ../f | |
353 | searching for changes |
|
357 | searching for changes | |
354 | adding changesets |
|
358 | adding changesets | |
355 | adding manifests |
|
359 | adding manifests | |
356 | adding file changes |
|
360 | adding file changes | |
357 | added 1 changesets with 1 changes to 1 files |
|
361 | added 1 changesets with 1 changes to 1 files | |
358 |
|
362 | |||
359 | Pushing multi headed new branch: |
|
363 | Pushing multi headed new branch: | |
360 |
|
364 | |||
361 | $ echo 14 > foo |
|
365 | $ echo 14 > foo | |
362 | $ hg -q branch f |
|
366 | $ hg -q branch f | |
363 | $ hg -q ci -m 14 |
|
367 | $ hg -q ci -m 14 | |
364 | $ echo 15 > foo |
|
368 | $ echo 15 > foo | |
365 | $ hg -q ci -m 15 |
|
369 | $ hg -q ci -m 15 | |
366 | $ hg -q up 14 |
|
370 | $ hg -q up 14 | |
367 | $ echo 16 > foo |
|
371 | $ echo 16 > foo | |
368 | $ hg -q ci -m 16 |
|
372 | $ hg -q ci -m 16 | |
369 | $ hg push --branch f --new-branch ../f |
|
373 | $ hg push --branch f --new-branch ../f | |
370 | pushing to ../f |
|
374 | pushing to ../f | |
371 | searching for changes |
|
375 | searching for changes | |
372 | abort: push creates new branch 'f' with multiple heads |
|
376 | abort: push creates new branch 'f' with multiple heads | |
373 | (merge or see "hg help push" for details about pushing new heads) |
|
377 | (merge or see "hg help push" for details about pushing new heads) | |
374 | [255] |
|
378 | [255] | |
375 | $ hg push --branch f --new-branch --force ../f |
|
379 | $ hg push --branch f --new-branch --force ../f | |
376 | pushing to ../f |
|
380 | pushing to ../f | |
377 | searching for changes |
|
381 | searching for changes | |
378 | adding changesets |
|
382 | adding changesets | |
379 | adding manifests |
|
383 | adding manifests | |
380 | adding file changes |
|
384 | adding file changes | |
381 | added 3 changesets with 3 changes to 1 files (+1 heads) |
|
385 | added 3 changesets with 3 changes to 1 files (+1 heads) | |
382 |
|
386 | |||
383 | Checking prepush logic does not allow silently pushing |
|
387 | Checking prepush logic does not allow silently pushing | |
384 | multiple new heads but also doesn't report too many heads: |
|
388 | multiple new heads but also doesn't report too many heads: | |
385 |
|
389 | |||
386 | $ cd .. |
|
390 | $ cd .. | |
387 | $ hg init h |
|
391 | $ hg init h | |
388 | $ echo init > h/init |
|
392 | $ echo init > h/init | |
389 | $ hg -R h ci -Am init |
|
393 | $ hg -R h ci -Am init | |
390 | adding init |
|
394 | adding init | |
391 | $ echo a > h/a |
|
395 | $ echo a > h/a | |
392 | $ hg -R h ci -Am a |
|
396 | $ hg -R h ci -Am a | |
393 | adding a |
|
397 | adding a | |
394 | $ hg clone h i |
|
398 | $ hg clone h i | |
395 | updating to branch default |
|
399 | updating to branch default | |
396 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
400 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
397 | $ hg -R h up 0 |
|
401 | $ hg -R h up 0 | |
398 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
402 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
399 | $ echo b > h/b |
|
403 | $ echo b > h/b | |
400 | $ hg -R h ci -Am b |
|
404 | $ hg -R h ci -Am b | |
401 | adding b |
|
405 | adding b | |
402 | created new head |
|
406 | created new head | |
403 | $ hg -R i up 0 |
|
407 | $ hg -R i up 0 | |
404 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
408 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
405 | $ echo c > i/c |
|
409 | $ echo c > i/c | |
406 | $ hg -R i ci -Am c |
|
410 | $ hg -R i ci -Am c | |
407 | adding c |
|
411 | adding c | |
408 | created new head |
|
412 | created new head | |
409 |
|
413 | |||
410 | $ for i in `seq 3`; do hg -R h up -q 0; echo $i > h/b; hg -R h ci -qAm$i; done |
|
414 | $ for i in `seq 3`; do hg -R h up -q 0; echo $i > h/b; hg -R h ci -qAm$i; done | |
411 |
|
415 | |||
412 | $ hg -R i push h |
|
416 | $ hg -R i push h | |
413 | pushing to h |
|
417 | pushing to h | |
414 | searching for changes |
|
418 | searching for changes | |
415 | remote has heads on branch 'default' that are not known locally: 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 |
|
419 | remote has heads on branch 'default' that are not known locally: 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 | |
416 | abort: push creates new remote head 97bd0c84d346! |
|
420 | abort: push creates new remote head 97bd0c84d346! | |
417 | (pull and merge or see "hg help push" for details about pushing new heads) |
|
421 | (pull and merge or see "hg help push" for details about pushing new heads) | |
418 | [255] |
|
422 | [255] | |
419 | $ hg -R h up -q 0; echo x > h/b; hg -R h ci -qAmx |
|
423 | $ hg -R h up -q 0; echo x > h/b; hg -R h ci -qAmx | |
420 | $ hg -R i push h |
|
424 | $ hg -R i push h | |
421 | pushing to h |
|
425 | pushing to h | |
422 | searching for changes |
|
426 | searching for changes | |
423 | remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 and 1 others |
|
427 | remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 and 1 others | |
424 | abort: push creates new remote head 97bd0c84d346! |
|
428 | abort: push creates new remote head 97bd0c84d346! | |
425 | (pull and merge or see "hg help push" for details about pushing new heads) |
|
429 | (pull and merge or see "hg help push" for details about pushing new heads) | |
426 | [255] |
|
430 | [255] | |
427 | $ hg -R i push h -v |
|
431 | $ hg -R i push h -v | |
428 | pushing to h |
|
432 | pushing to h | |
429 | searching for changes |
|
433 | searching for changes | |
430 | remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 |
|
434 | remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 | |
431 | new remote heads on branch 'default': |
|
435 | new remote heads on branch 'default': | |
432 | 97bd0c84d346 |
|
436 | 97bd0c84d346 | |
433 | abort: push creates new remote head 97bd0c84d346! |
|
437 | abort: push creates new remote head 97bd0c84d346! | |
434 | (pull and merge or see "hg help push" for details about pushing new heads) |
|
438 | (pull and merge or see "hg help push" for details about pushing new heads) | |
435 | [255] |
|
439 | [255] | |
436 |
|
440 | |||
437 |
|
441 | |||
438 | Check prepush logic with merged branches: |
|
442 | Check prepush logic with merged branches: | |
439 |
|
443 | |||
440 | $ hg init j |
|
444 | $ hg init j | |
441 | $ hg -R j branch a |
|
445 | $ hg -R j branch a | |
442 | marked working directory as branch a |
|
446 | marked working directory as branch a | |
443 | (branches are permanent and global, did you want a bookmark?) |
|
447 | (branches are permanent and global, did you want a bookmark?) | |
444 | $ echo init > j/foo |
|
448 | $ echo init > j/foo | |
445 | $ hg -R j ci -Am init |
|
449 | $ hg -R j ci -Am init | |
446 | adding foo |
|
450 | adding foo | |
447 | $ hg clone j k |
|
451 | $ hg clone j k | |
448 | updating to branch a |
|
452 | updating to branch a | |
449 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
453 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
450 | $ echo a1 > j/foo |
|
454 | $ echo a1 > j/foo | |
451 | $ hg -R j ci -m a1 |
|
455 | $ hg -R j ci -m a1 | |
452 | $ hg -R k branch b |
|
456 | $ hg -R k branch b | |
453 | marked working directory as branch b |
|
457 | marked working directory as branch b | |
454 | (branches are permanent and global, did you want a bookmark?) |
|
458 | (branches are permanent and global, did you want a bookmark?) | |
455 | $ echo b > k/foo |
|
459 | $ echo b > k/foo | |
456 | $ hg -R k ci -m b |
|
460 | $ hg -R k ci -m b | |
457 | $ hg -R k up 0 |
|
461 | $ hg -R k up 0 | |
458 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
462 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
459 |
|
463 | |||
460 | $ hg -R k merge b |
|
464 | $ hg -R k merge b | |
461 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
465 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
462 | (branch merge, don't forget to commit) |
|
466 | (branch merge, don't forget to commit) | |
463 |
|
467 | |||
464 | $ hg -R k ci -m merge |
|
468 | $ hg -R k ci -m merge | |
465 |
|
469 | |||
466 | $ hg -R k push -r a j |
|
470 | $ hg -R k push -r a j | |
467 | pushing to j |
|
471 | pushing to j | |
468 | searching for changes |
|
472 | searching for changes | |
469 | abort: push creates new remote branches: b! |
|
473 | abort: push creates new remote branches: b! | |
470 | (use 'hg push --new-branch' to create new remote branches) |
|
474 | (use 'hg push --new-branch' to create new remote branches) | |
471 | [255] |
|
475 | [255] | |
472 |
|
476 | |||
473 |
|
477 | |||
474 | Prepush -r should not allow you to sneak in new heads: |
|
478 | Prepush -r should not allow you to sneak in new heads: | |
475 |
|
479 | |||
476 | $ hg init l |
|
480 | $ hg init l | |
477 | $ cd l |
|
481 | $ cd l | |
478 | $ echo a >> foo |
|
482 | $ echo a >> foo | |
479 | $ hg -q add foo |
|
483 | $ hg -q add foo | |
480 | $ hg -q branch a |
|
484 | $ hg -q branch a | |
481 | $ hg -q ci -ma |
|
485 | $ hg -q ci -ma | |
482 | $ hg -q up null |
|
486 | $ hg -q up null | |
483 | $ echo a >> foo |
|
487 | $ echo a >> foo | |
484 | $ hg -q add foo |
|
488 | $ hg -q add foo | |
485 | $ hg -q branch b |
|
489 | $ hg -q branch b | |
486 | $ hg -q ci -mb |
|
490 | $ hg -q ci -mb | |
487 | $ cd .. |
|
491 | $ cd .. | |
488 | $ hg -q clone l m -u a |
|
492 | $ hg -q clone l m -u a | |
489 | $ cd m |
|
493 | $ cd m | |
490 | $ hg -q merge b |
|
494 | $ hg -q merge b | |
491 | $ hg -q ci -mmb |
|
495 | $ hg -q ci -mmb | |
492 | $ hg -q up 0 |
|
496 | $ hg -q up 0 | |
493 | $ echo a >> foo |
|
497 | $ echo a >> foo | |
494 | $ hg -q ci -ma2 |
|
498 | $ hg -q ci -ma2 | |
495 | $ hg -q up 2 |
|
499 | $ hg -q up 2 | |
496 | $ echo a >> foo |
|
500 | $ echo a >> foo | |
497 | $ hg -q branch -f b |
|
501 | $ hg -q branch -f b | |
498 | $ hg -q ci -mb2 |
|
502 | $ hg -q ci -mb2 | |
499 | $ hg -q merge 3 |
|
503 | $ hg -q merge 3 | |
500 | $ hg -q ci -mma |
|
504 | $ hg -q ci -mma | |
501 |
|
505 | |||
502 | $ hg push ../l -b b |
|
506 | $ hg push ../l -b b | |
503 | pushing to ../l |
|
507 | pushing to ../l | |
504 | searching for changes |
|
508 | searching for changes | |
505 | abort: push creates new remote head 451211cc22b0 on branch 'a'! |
|
509 | abort: push creates new remote head 451211cc22b0 on branch 'a'! | |
506 | (merge or see "hg help push" for details about pushing new heads) |
|
510 | (merge or see "hg help push" for details about pushing new heads) | |
507 | [255] |
|
511 | [255] | |
508 |
|
512 | |||
509 | $ cd .. |
|
513 | $ cd .. | |
510 |
|
514 | |||
511 |
|
515 | |||
512 | Check prepush with new branch head on former topo non-head: |
|
516 | Check prepush with new branch head on former topo non-head: | |
513 |
|
517 | |||
514 | $ hg init n |
|
518 | $ hg init n | |
515 | $ cd n |
|
519 | $ cd n | |
516 | $ hg branch A |
|
520 | $ hg branch A | |
517 | marked working directory as branch A |
|
521 | marked working directory as branch A | |
518 | (branches are permanent and global, did you want a bookmark?) |
|
522 | (branches are permanent and global, did you want a bookmark?) | |
519 | $ echo a >a |
|
523 | $ echo a >a | |
520 | $ hg ci -Ama |
|
524 | $ hg ci -Ama | |
521 | adding a |
|
525 | adding a | |
522 | $ hg branch B |
|
526 | $ hg branch B | |
523 | marked working directory as branch B |
|
527 | marked working directory as branch B | |
524 | (branches are permanent and global, did you want a bookmark?) |
|
528 | (branches are permanent and global, did you want a bookmark?) | |
525 | $ echo b >b |
|
529 | $ echo b >b | |
526 | $ hg ci -Amb |
|
530 | $ hg ci -Amb | |
527 | adding b |
|
531 | adding b | |
528 |
|
532 | |||
529 | b is now branch head of B, and a topological head |
|
533 | b is now branch head of B, and a topological head | |
530 | a is now branch head of A, but not a topological head |
|
534 | a is now branch head of A, but not a topological head | |
531 |
|
535 | |||
532 | $ hg clone . inner |
|
536 | $ hg clone . inner | |
533 | updating to branch B |
|
537 | updating to branch B | |
534 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
538 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
535 | $ cd inner |
|
539 | $ cd inner | |
536 | $ hg up B |
|
540 | $ hg up B | |
537 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
541 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
538 | $ echo b1 >b1 |
|
542 | $ echo b1 >b1 | |
539 | $ hg ci -Amb1 |
|
543 | $ hg ci -Amb1 | |
540 | adding b1 |
|
544 | adding b1 | |
541 |
|
545 | |||
542 | in the clone b1 is now the head of B |
|
546 | in the clone b1 is now the head of B | |
543 |
|
547 | |||
544 | $ cd .. |
|
548 | $ cd .. | |
545 | $ hg up 0 |
|
549 | $ hg up 0 | |
546 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
550 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
547 | $ echo a2 >a2 |
|
551 | $ echo a2 >a2 | |
548 | $ hg ci -Ama2 |
|
552 | $ hg ci -Ama2 | |
549 | adding a2 |
|
553 | adding a2 | |
550 |
|
554 | |||
551 | a2 is now the new branch head of A, and a new topological head |
|
555 | a2 is now the new branch head of A, and a new topological head | |
552 | it replaces a former inner branch head, so it should at most warn about |
|
556 | it replaces a former inner branch head, so it should at most warn about | |
553 | A, not B |
|
557 | A, not B | |
554 |
|
558 | |||
555 | glog of local: |
|
559 | glog of local: | |
556 |
|
560 | |||
557 | $ hg log -G --template "{rev}: {branches} {desc}\n" |
|
561 | $ hg log -G --template "{rev}: {branches} {desc}\n" | |
558 | @ 2: A a2 |
|
562 | @ 2: A a2 | |
559 | | |
|
563 | | | |
560 | | o 1: B b |
|
564 | | o 1: B b | |
561 | |/ |
|
565 | |/ | |
562 | o 0: A a |
|
566 | o 0: A a | |
563 |
|
567 | |||
564 | glog of remote: |
|
568 | glog of remote: | |
565 |
|
569 | |||
566 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
|
570 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" | |
567 | @ 2: B b1 |
|
571 | @ 2: B b1 | |
568 | | |
|
572 | | | |
569 | o 1: B b |
|
573 | o 1: B b | |
570 | | |
|
574 | | | |
571 | o 0: A a |
|
575 | o 0: A a | |
572 |
|
576 | |||
573 | outgoing: |
|
577 | outgoing: | |
574 |
|
578 | |||
575 | $ hg out inner --template "{rev}: {branches} {desc}\n" |
|
579 | $ hg out inner --template "{rev}: {branches} {desc}\n" | |
576 | comparing with inner |
|
580 | comparing with inner | |
577 | searching for changes |
|
581 | searching for changes | |
578 | 2: A a2 |
|
582 | 2: A a2 | |
579 |
|
583 | |||
580 | $ hg push inner |
|
584 | $ hg push inner | |
581 | pushing to inner |
|
585 | pushing to inner | |
582 | searching for changes |
|
586 | searching for changes | |
583 | adding changesets |
|
587 | adding changesets | |
584 | adding manifests |
|
588 | adding manifests | |
585 | adding file changes |
|
589 | adding file changes | |
586 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
590 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
587 |
|
591 | |||
588 | $ cd .. |
|
592 | $ cd .. | |
589 |
|
593 | |||
590 |
|
594 | |||
591 | Check prepush with new branch head on former topo head: |
|
595 | Check prepush with new branch head on former topo head: | |
592 |
|
596 | |||
593 | $ hg init o |
|
597 | $ hg init o | |
594 | $ cd o |
|
598 | $ cd o | |
595 | $ hg branch A |
|
599 | $ hg branch A | |
596 | marked working directory as branch A |
|
600 | marked working directory as branch A | |
597 | (branches are permanent and global, did you want a bookmark?) |
|
601 | (branches are permanent and global, did you want a bookmark?) | |
598 | $ echo a >a |
|
602 | $ echo a >a | |
599 | $ hg ci -Ama |
|
603 | $ hg ci -Ama | |
600 | adding a |
|
604 | adding a | |
601 | $ hg branch B |
|
605 | $ hg branch B | |
602 | marked working directory as branch B |
|
606 | marked working directory as branch B | |
603 | (branches are permanent and global, did you want a bookmark?) |
|
607 | (branches are permanent and global, did you want a bookmark?) | |
604 | $ echo b >b |
|
608 | $ echo b >b | |
605 | $ hg ci -Amb |
|
609 | $ hg ci -Amb | |
606 | adding b |
|
610 | adding b | |
607 |
|
611 | |||
608 | b is now branch head of B, and a topological head |
|
612 | b is now branch head of B, and a topological head | |
609 |
|
613 | |||
610 | $ hg up 0 |
|
614 | $ hg up 0 | |
611 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
615 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
612 | $ echo a1 >a1 |
|
616 | $ echo a1 >a1 | |
613 | $ hg ci -Ama1 |
|
617 | $ hg ci -Ama1 | |
614 | adding a1 |
|
618 | adding a1 | |
615 |
|
619 | |||
616 | a1 is now branch head of A, and a topological head |
|
620 | a1 is now branch head of A, and a topological head | |
617 |
|
621 | |||
618 | $ hg clone . inner |
|
622 | $ hg clone . inner | |
619 | updating to branch A |
|
623 | updating to branch A | |
620 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
624 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
621 | $ cd inner |
|
625 | $ cd inner | |
622 | $ hg up B |
|
626 | $ hg up B | |
623 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
627 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
624 | $ echo b1 >b1 |
|
628 | $ echo b1 >b1 | |
625 | $ hg ci -Amb1 |
|
629 | $ hg ci -Amb1 | |
626 | adding b1 |
|
630 | adding b1 | |
627 |
|
631 | |||
628 | in the clone b1 is now the head of B |
|
632 | in the clone b1 is now the head of B | |
629 |
|
633 | |||
630 | $ cd .. |
|
634 | $ cd .. | |
631 | $ echo a2 >a2 |
|
635 | $ echo a2 >a2 | |
632 | $ hg ci -Ama2 |
|
636 | $ hg ci -Ama2 | |
633 | adding a2 |
|
637 | adding a2 | |
634 |
|
638 | |||
635 | a2 is now the new branch head of A, and a topological head |
|
639 | a2 is now the new branch head of A, and a topological head | |
636 | it replaces a former topological and branch head, so this should not warn |
|
640 | it replaces a former topological and branch head, so this should not warn | |
637 |
|
641 | |||
638 | glog of local: |
|
642 | glog of local: | |
639 |
|
643 | |||
640 | $ hg log -G --template "{rev}: {branches} {desc}\n" |
|
644 | $ hg log -G --template "{rev}: {branches} {desc}\n" | |
641 | @ 3: A a2 |
|
645 | @ 3: A a2 | |
642 | | |
|
646 | | | |
643 | o 2: A a1 |
|
647 | o 2: A a1 | |
644 | | |
|
648 | | | |
645 | | o 1: B b |
|
649 | | o 1: B b | |
646 | |/ |
|
650 | |/ | |
647 | o 0: A a |
|
651 | o 0: A a | |
648 |
|
652 | |||
649 | glog of remote: |
|
653 | glog of remote: | |
650 |
|
654 | |||
651 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
|
655 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" | |
652 | @ 3: B b1 |
|
656 | @ 3: B b1 | |
653 | | |
|
657 | | | |
654 | | o 2: A a1 |
|
658 | | o 2: A a1 | |
655 | | | |
|
659 | | | | |
656 | o | 1: B b |
|
660 | o | 1: B b | |
657 | |/ |
|
661 | |/ | |
658 | o 0: A a |
|
662 | o 0: A a | |
659 |
|
663 | |||
660 | outgoing: |
|
664 | outgoing: | |
661 |
|
665 | |||
662 | $ hg out inner --template "{rev}: {branches} {desc}\n" |
|
666 | $ hg out inner --template "{rev}: {branches} {desc}\n" | |
663 | comparing with inner |
|
667 | comparing with inner | |
664 | searching for changes |
|
668 | searching for changes | |
665 | 3: A a2 |
|
669 | 3: A a2 | |
666 |
|
670 | |||
667 | $ hg push inner |
|
671 | $ hg push inner | |
668 | pushing to inner |
|
672 | pushing to inner | |
669 | searching for changes |
|
673 | searching for changes | |
670 | adding changesets |
|
674 | adding changesets | |
671 | adding manifests |
|
675 | adding manifests | |
672 | adding file changes |
|
676 | adding file changes | |
673 | added 1 changesets with 1 changes to 1 files |
|
677 | added 1 changesets with 1 changes to 1 files | |
674 |
|
678 | |||
675 | $ cd .. |
|
679 | $ cd .. | |
676 |
|
680 | |||
677 |
|
681 | |||
678 | Check prepush with new branch head and new child of former branch head |
|
682 | Check prepush with new branch head and new child of former branch head | |
679 | but child is on different branch: |
|
683 | but child is on different branch: | |
680 |
|
684 | |||
681 | $ hg init p |
|
685 | $ hg init p | |
682 | $ cd p |
|
686 | $ cd p | |
683 | $ hg branch A |
|
687 | $ hg branch A | |
684 | marked working directory as branch A |
|
688 | marked working directory as branch A | |
685 | (branches are permanent and global, did you want a bookmark?) |
|
689 | (branches are permanent and global, did you want a bookmark?) | |
686 | $ echo a0 >a |
|
690 | $ echo a0 >a | |
687 | $ hg ci -Ama0 |
|
691 | $ hg ci -Ama0 | |
688 | adding a |
|
692 | adding a | |
689 | $ echo a1 >a |
|
693 | $ echo a1 >a | |
690 | $ hg ci -ma1 |
|
694 | $ hg ci -ma1 | |
691 | $ hg up null |
|
695 | $ hg up null | |
692 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
696 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
693 | $ hg branch B |
|
697 | $ hg branch B | |
694 | marked working directory as branch B |
|
698 | marked working directory as branch B | |
695 | (branches are permanent and global, did you want a bookmark?) |
|
699 | (branches are permanent and global, did you want a bookmark?) | |
696 | $ echo b0 >b |
|
700 | $ echo b0 >b | |
697 | $ hg ci -Amb0 |
|
701 | $ hg ci -Amb0 | |
698 | adding b |
|
702 | adding b | |
699 | $ echo b1 >b |
|
703 | $ echo b1 >b | |
700 | $ hg ci -mb1 |
|
704 | $ hg ci -mb1 | |
701 |
|
705 | |||
702 | $ hg clone . inner |
|
706 | $ hg clone . inner | |
703 | updating to branch B |
|
707 | updating to branch B | |
704 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
708 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
705 |
|
709 | |||
706 | $ hg up A |
|
710 | $ hg up A | |
707 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
711 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
708 | $ hg branch -f B |
|
712 | $ hg branch -f B | |
709 | marked working directory as branch B |
|
713 | marked working directory as branch B | |
710 | (branches are permanent and global, did you want a bookmark?) |
|
714 | (branches are permanent and global, did you want a bookmark?) | |
711 | $ echo a3 >a |
|
715 | $ echo a3 >a | |
712 | $ hg ci -ma3 |
|
716 | $ hg ci -ma3 | |
713 | created new head |
|
717 | created new head | |
714 | $ hg up 3 |
|
718 | $ hg up 3 | |
715 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
719 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
716 | $ hg branch -f A |
|
720 | $ hg branch -f A | |
717 | marked working directory as branch A |
|
721 | marked working directory as branch A | |
718 | (branches are permanent and global, did you want a bookmark?) |
|
722 | (branches are permanent and global, did you want a bookmark?) | |
719 | $ echo b3 >b |
|
723 | $ echo b3 >b | |
720 | $ hg ci -mb3 |
|
724 | $ hg ci -mb3 | |
721 | created new head |
|
725 | created new head | |
722 |
|
726 | |||
723 | glog of local: |
|
727 | glog of local: | |
724 |
|
728 | |||
725 | $ hg log -G --template "{rev}: {branches} {desc}\n" |
|
729 | $ hg log -G --template "{rev}: {branches} {desc}\n" | |
726 | @ 5: A b3 |
|
730 | @ 5: A b3 | |
727 | | |
|
731 | | | |
728 | | o 4: B a3 |
|
732 | | o 4: B a3 | |
729 | | | |
|
733 | | | | |
730 | o | 3: B b1 |
|
734 | o | 3: B b1 | |
731 | | | |
|
735 | | | | |
732 | o | 2: B b0 |
|
736 | o | 2: B b0 | |
733 | / |
|
737 | / | |
734 | o 1: A a1 |
|
738 | o 1: A a1 | |
735 | | |
|
739 | | | |
736 | o 0: A a0 |
|
740 | o 0: A a0 | |
737 |
|
741 | |||
738 | glog of remote: |
|
742 | glog of remote: | |
739 |
|
743 | |||
740 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
|
744 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" | |
741 | @ 3: B b1 |
|
745 | @ 3: B b1 | |
742 | | |
|
746 | | | |
743 | o 2: B b0 |
|
747 | o 2: B b0 | |
744 |
|
748 | |||
745 | o 1: A a1 |
|
749 | o 1: A a1 | |
746 | | |
|
750 | | | |
747 | o 0: A a0 |
|
751 | o 0: A a0 | |
748 |
|
752 | |||
749 | outgoing: |
|
753 | outgoing: | |
750 |
|
754 | |||
751 | $ hg out inner --template "{rev}: {branches} {desc}\n" |
|
755 | $ hg out inner --template "{rev}: {branches} {desc}\n" | |
752 | comparing with inner |
|
756 | comparing with inner | |
753 | searching for changes |
|
757 | searching for changes | |
754 | 4: B a3 |
|
758 | 4: B a3 | |
755 | 5: A b3 |
|
759 | 5: A b3 | |
756 |
|
760 | |||
757 | $ hg push inner |
|
761 | $ hg push inner | |
758 | pushing to inner |
|
762 | pushing to inner | |
759 | searching for changes |
|
763 | searching for changes | |
760 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! |
|
764 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! | |
761 | (merge or see "hg help push" for details about pushing new heads) |
|
765 | (merge or see "hg help push" for details about pushing new heads) | |
762 | [255] |
|
766 | [255] | |
763 |
|
767 | |||
764 | $ hg push inner -r4 -r5 |
|
768 | $ hg push inner -r4 -r5 | |
765 | pushing to inner |
|
769 | pushing to inner | |
766 | searching for changes |
|
770 | searching for changes | |
767 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! |
|
771 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! | |
768 | (merge or see "hg help push" for details about pushing new heads) |
|
772 | (merge or see "hg help push" for details about pushing new heads) | |
769 | [255] |
|
773 | [255] | |
770 |
|
774 | |||
771 | $ hg in inner |
|
775 | $ hg in inner | |
772 | comparing with inner |
|
776 | comparing with inner | |
773 | searching for changes |
|
777 | searching for changes | |
774 | no changes found |
|
778 | no changes found | |
775 | [1] |
|
779 | [1] | |
776 |
|
780 | |||
777 | $ cd .. |
|
781 | $ cd .. |
@@ -1,175 +1,185 b'' | |||||
1 | This emulates the effects of an hg pull --rebase in which the remote repo |
|
1 | This emulates the effects of an hg pull --rebase in which the remote repo | |
2 | already has one local mq patch |
|
2 | already has one local mq patch | |
3 |
|
3 | |||
4 | $ cat >> $HGRCPATH <<EOF |
|
4 | $ cat >> $HGRCPATH <<EOF | |
5 | > [extensions] |
|
5 | > [extensions] | |
6 | > rebase= |
|
6 | > rebase= | |
7 | > mq= |
|
7 | > mq= | |
8 | > |
|
8 | > | |
9 | > [phases] |
|
9 | > [phases] | |
10 | > publish=False |
|
10 | > publish=False | |
11 | > |
|
11 | > | |
12 | > [alias] |
|
12 | > [alias] | |
13 | > tglog = log -G --template "{rev}: '{desc}' tags: {tags}\n" |
|
13 | > tglog = log -G --template "{rev}: '{desc}' tags: {tags}\n" | |
14 | > EOF |
|
14 | > EOF | |
15 |
|
15 | |||
16 |
|
16 | |||
17 | $ hg init a |
|
17 | $ hg init a | |
18 | $ cd a |
|
18 | $ cd a | |
19 | $ hg qinit -c |
|
19 | $ hg qinit -c | |
20 |
|
20 | |||
21 | $ echo c1 > c1 |
|
21 | $ echo c1 > c1 | |
22 | $ hg add c1 |
|
22 | $ hg add c1 | |
23 | $ hg ci -m C1 |
|
23 | $ hg ci -m C1 | |
24 |
|
24 | |||
25 | $ echo r1 > r1 |
|
25 | $ echo r1 > r1 | |
26 | $ hg add r1 |
|
26 | $ hg add r1 | |
27 | $ hg ci -m R1 |
|
27 | $ hg ci -m R1 | |
28 |
|
28 | |||
29 | $ hg up -q 0 |
|
29 | $ hg up -q 0 | |
30 |
|
30 | |||
31 | $ hg qnew p0.patch -d '1 0' |
|
31 | $ hg qnew p0.patch -d '1 0' | |
32 | $ echo p0 > p0 |
|
32 | $ echo p0 > p0 | |
33 | $ hg add p0 |
|
33 | $ hg add p0 | |
34 | $ hg qref -m P0 |
|
34 | $ hg qref -m P0 | |
35 |
|
35 | |||
36 | $ hg qnew p1.patch -d '2 0' |
|
36 | $ hg qnew p1.patch -d '2 0' | |
37 | $ echo p1 > p1 |
|
37 | $ echo p1 > p1 | |
38 | $ hg add p1 |
|
38 | $ hg add p1 | |
39 | $ hg qref -m P1 |
|
39 | $ hg qref -m P1 | |
40 |
|
40 | |||
41 | $ hg export qtip > p1.patch |
|
41 | $ hg export qtip > p1.patch | |
42 |
|
42 | |||
43 | $ hg up -q -C 1 |
|
43 | $ hg up -q -C 1 | |
44 |
|
44 | |||
45 | $ hg import p1.patch |
|
45 | $ hg import p1.patch | |
46 | applying p1.patch |
|
46 | applying p1.patch | |
47 |
|
47 | |||
48 | $ rm p1.patch |
|
48 | $ rm p1.patch | |
49 |
|
49 | |||
50 | $ hg up -q -C qtip |
|
50 | $ hg up -q -C qtip | |
51 |
|
51 | |||
52 | $ hg rebase -v |
|
52 | $ hg rebase -v | |
53 | rebasing 2:13a46ce44f60 "P0" (p0.patch qbase) |
|
53 | rebasing 2:13a46ce44f60 "P0" (p0.patch qbase) | |
54 | resolving manifests |
|
54 | resolving manifests | |
55 | removing p0 |
|
55 | removing p0 | |
56 | getting r1 |
|
56 | getting r1 | |
57 | resolving manifests |
|
57 | resolving manifests | |
58 | getting p0 |
|
58 | getting p0 | |
59 | p0 |
|
59 | p0 | |
60 | rebasing 3:148775c71080 "P1" (p1.patch qtip) |
|
60 | rebasing 3:148775c71080 "P1" (p1.patch qtip) | |
61 | resolving manifests |
|
61 | resolving manifests | |
62 | note: rebase of 3:148775c71080 created no changes to commit |
|
62 | note: rebase of 3:148775c71080 created no changes to commit | |
63 | rebase merging completed |
|
63 | rebase merging completed | |
64 | updating mq patch p0.patch to 5:9ecc820b1737 |
|
64 | updating mq patch p0.patch to 5:9ecc820b1737 | |
65 | $TESTTMP/a/.hg/patches/p0.patch (glob) |
|
65 | $TESTTMP/a/.hg/patches/p0.patch (glob) | |
66 | 2 changesets found |
|
66 | 2 changesets found | |
|
67 | uncompressed size of bundle content: | |||
|
68 | 344 (changelog) | |||
|
69 | 284 (manifests) | |||
|
70 | 109 p0 | |||
|
71 | 109 p1 | |||
67 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/13a46ce44f60-backup.hg (glob) |
|
72 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/13a46ce44f60-backup.hg (glob) | |
68 | 2 changesets found |
|
73 | 2 changesets found | |
|
74 | uncompressed size of bundle content: | |||
|
75 | 399 (changelog) | |||
|
76 | 284 (manifests) | |||
|
77 | 109 p0 | |||
|
78 | 109 p1 | |||
69 | adding branch |
|
79 | adding branch | |
70 | adding changesets |
|
80 | adding changesets | |
71 | adding manifests |
|
81 | adding manifests | |
72 | adding file changes |
|
82 | adding file changes | |
73 | added 2 changesets with 2 changes to 2 files |
|
83 | added 2 changesets with 2 changes to 2 files | |
74 | rebase completed |
|
84 | rebase completed | |
75 | 1 revisions have been skipped |
|
85 | 1 revisions have been skipped | |
76 |
|
86 | |||
77 | $ hg tglog |
|
87 | $ hg tglog | |
78 | @ 3: 'P0' tags: p0.patch qbase qtip tip |
|
88 | @ 3: 'P0' tags: p0.patch qbase qtip tip | |
79 | | |
|
89 | | | |
80 | o 2: 'P1' tags: qparent |
|
90 | o 2: 'P1' tags: qparent | |
81 | | |
|
91 | | | |
82 | o 1: 'R1' tags: |
|
92 | o 1: 'R1' tags: | |
83 | | |
|
93 | | | |
84 | o 0: 'C1' tags: |
|
94 | o 0: 'C1' tags: | |
85 |
|
95 | |||
86 | $ cd .. |
|
96 | $ cd .. | |
87 |
|
97 | |||
88 |
|
98 | |||
89 | $ hg init b |
|
99 | $ hg init b | |
90 | $ cd b |
|
100 | $ cd b | |
91 | $ hg qinit -c |
|
101 | $ hg qinit -c | |
92 |
|
102 | |||
93 | $ for i in r0 r1 r2 r3 r4 r5 r6; |
|
103 | $ for i in r0 r1 r2 r3 r4 r5 r6; | |
94 | > do |
|
104 | > do | |
95 | > echo $i > $i |
|
105 | > echo $i > $i | |
96 | > hg ci -Am $i |
|
106 | > hg ci -Am $i | |
97 | > done |
|
107 | > done | |
98 | adding r0 |
|
108 | adding r0 | |
99 | adding r1 |
|
109 | adding r1 | |
100 | adding r2 |
|
110 | adding r2 | |
101 | adding r3 |
|
111 | adding r3 | |
102 | adding r4 |
|
112 | adding r4 | |
103 | adding r5 |
|
113 | adding r5 | |
104 | adding r6 |
|
114 | adding r6 | |
105 |
|
115 | |||
106 | $ hg qimport -r 1:tip |
|
116 | $ hg qimport -r 1:tip | |
107 |
|
117 | |||
108 | $ hg up -q 0 |
|
118 | $ hg up -q 0 | |
109 |
|
119 | |||
110 | $ for i in r1 r3 r7 r8; |
|
120 | $ for i in r1 r3 r7 r8; | |
111 | > do |
|
121 | > do | |
112 | > echo $i > $i |
|
122 | > echo $i > $i | |
113 | > hg ci -Am branch2-$i |
|
123 | > hg ci -Am branch2-$i | |
114 | > done |
|
124 | > done | |
115 | adding r1 |
|
125 | adding r1 | |
116 | created new head |
|
126 | created new head | |
117 | adding r3 |
|
127 | adding r3 | |
118 | adding r7 |
|
128 | adding r7 | |
119 | adding r8 |
|
129 | adding r8 | |
120 |
|
130 | |||
121 | $ echo somethingelse > r4 |
|
131 | $ echo somethingelse > r4 | |
122 | $ hg ci -Am branch2-r4 |
|
132 | $ hg ci -Am branch2-r4 | |
123 | adding r4 |
|
133 | adding r4 | |
124 |
|
134 | |||
125 | $ echo r6 > r6 |
|
135 | $ echo r6 > r6 | |
126 | $ hg ci -Am branch2-r6 |
|
136 | $ hg ci -Am branch2-r6 | |
127 | adding r6 |
|
137 | adding r6 | |
128 |
|
138 | |||
129 | $ hg up -q qtip |
|
139 | $ hg up -q qtip | |
130 |
|
140 | |||
131 | $ HGMERGE=internal:fail hg rebase |
|
141 | $ HGMERGE=internal:fail hg rebase | |
132 | rebasing 1:b4bffa6e4776 "r1" (1.diff qbase) |
|
142 | rebasing 1:b4bffa6e4776 "r1" (1.diff qbase) | |
133 | note: rebase of 1:b4bffa6e4776 created no changes to commit |
|
143 | note: rebase of 1:b4bffa6e4776 created no changes to commit | |
134 | rebasing 2:c0fd129beb01 "r2" (2.diff) |
|
144 | rebasing 2:c0fd129beb01 "r2" (2.diff) | |
135 | rebasing 3:6ff5b8feed8e "r3" (3.diff) |
|
145 | rebasing 3:6ff5b8feed8e "r3" (3.diff) | |
136 | note: rebase of 3:6ff5b8feed8e created no changes to commit |
|
146 | note: rebase of 3:6ff5b8feed8e created no changes to commit | |
137 | rebasing 4:094320fec554 "r4" (4.diff) |
|
147 | rebasing 4:094320fec554 "r4" (4.diff) | |
138 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
148 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
139 | [1] |
|
149 | [1] | |
140 |
|
150 | |||
141 | $ HGMERGE=internal:local hg resolve --all |
|
151 | $ HGMERGE=internal:local hg resolve --all | |
142 | (no more unresolved files) |
|
152 | (no more unresolved files) | |
143 |
|
153 | |||
144 | $ hg rebase --continue |
|
154 | $ hg rebase --continue | |
145 | already rebased 1:b4bffa6e4776 "r1" (1.diff qbase) as 057f55ff8f44 |
|
155 | already rebased 1:b4bffa6e4776 "r1" (1.diff qbase) as 057f55ff8f44 | |
146 | already rebased 2:c0fd129beb01 "r2" (2.diff) as 1660ab13ce9a |
|
156 | already rebased 2:c0fd129beb01 "r2" (2.diff) as 1660ab13ce9a | |
147 | already rebased 3:6ff5b8feed8e "r3" (3.diff) as 1660ab13ce9a |
|
157 | already rebased 3:6ff5b8feed8e "r3" (3.diff) as 1660ab13ce9a | |
148 | rebasing 4:094320fec554 "r4" (4.diff) |
|
158 | rebasing 4:094320fec554 "r4" (4.diff) | |
149 | note: rebase of 4:094320fec554 created no changes to commit |
|
159 | note: rebase of 4:094320fec554 created no changes to commit | |
150 | rebasing 5:681a378595ba "r5" (5.diff) |
|
160 | rebasing 5:681a378595ba "r5" (5.diff) | |
151 | rebasing 6:512a1f24768b "r6" (6.diff qtip) |
|
161 | rebasing 6:512a1f24768b "r6" (6.diff qtip) | |
152 | note: rebase of 6:512a1f24768b created no changes to commit |
|
162 | note: rebase of 6:512a1f24768b created no changes to commit | |
153 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/b4bffa6e4776-backup.hg (glob) |
|
163 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/b4bffa6e4776-backup.hg (glob) | |
154 |
|
164 | |||
155 | $ hg tglog |
|
165 | $ hg tglog | |
156 | @ 8: 'r5' tags: 5.diff qtip tip |
|
166 | @ 8: 'r5' tags: 5.diff qtip tip | |
157 | | |
|
167 | | | |
158 | o 7: 'r2' tags: 2.diff qbase |
|
168 | o 7: 'r2' tags: 2.diff qbase | |
159 | | |
|
169 | | | |
160 | o 6: 'branch2-r6' tags: qparent |
|
170 | o 6: 'branch2-r6' tags: qparent | |
161 | | |
|
171 | | | |
162 | o 5: 'branch2-r4' tags: |
|
172 | o 5: 'branch2-r4' tags: | |
163 | | |
|
173 | | | |
164 | o 4: 'branch2-r8' tags: |
|
174 | o 4: 'branch2-r8' tags: | |
165 | | |
|
175 | | | |
166 | o 3: 'branch2-r7' tags: |
|
176 | o 3: 'branch2-r7' tags: | |
167 | | |
|
177 | | | |
168 | o 2: 'branch2-r3' tags: |
|
178 | o 2: 'branch2-r3' tags: | |
169 | | |
|
179 | | | |
170 | o 1: 'branch2-r1' tags: |
|
180 | o 1: 'branch2-r1' tags: | |
171 | | |
|
181 | | | |
172 | o 0: 'r0' tags: |
|
182 | o 0: 'r0' tags: | |
173 |
|
183 | |||
174 |
|
184 | |||
175 | $ cd .. |
|
185 | $ cd .. |
@@ -1,319 +1,327 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > rebase= |
|
3 | > rebase= | |
4 | > |
|
4 | > | |
5 | > [alias] |
|
5 | > [alias] | |
6 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
6 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
7 | > EOF |
|
7 | > EOF | |
8 |
|
8 | |||
9 | $ hg init repo |
|
9 | $ hg init repo | |
10 | $ cd repo |
|
10 | $ cd repo | |
11 |
|
11 | |||
12 | $ echo A > a |
|
12 | $ echo A > a | |
13 | $ echo >> a |
|
13 | $ echo >> a | |
14 | $ hg ci -Am A |
|
14 | $ hg ci -Am A | |
15 | adding a |
|
15 | adding a | |
16 |
|
16 | |||
17 | $ echo B > a |
|
17 | $ echo B > a | |
18 | $ echo >> a |
|
18 | $ echo >> a | |
19 | $ hg ci -m B |
|
19 | $ hg ci -m B | |
20 |
|
20 | |||
21 | $ echo C > a |
|
21 | $ echo C > a | |
22 | $ echo >> a |
|
22 | $ echo >> a | |
23 | $ hg ci -m C |
|
23 | $ hg ci -m C | |
24 |
|
24 | |||
25 | $ hg up -q -C 0 |
|
25 | $ hg up -q -C 0 | |
26 |
|
26 | |||
27 | $ echo D >> a |
|
27 | $ echo D >> a | |
28 | $ hg ci -Am AD |
|
28 | $ hg ci -Am AD | |
29 | created new head |
|
29 | created new head | |
30 |
|
30 | |||
31 | $ hg tglog |
|
31 | $ hg tglog | |
32 | @ 3: 'AD' |
|
32 | @ 3: 'AD' | |
33 | | |
|
33 | | | |
34 | | o 2: 'C' |
|
34 | | o 2: 'C' | |
35 | | | |
|
35 | | | | |
36 | | o 1: 'B' |
|
36 | | o 1: 'B' | |
37 | |/ |
|
37 | |/ | |
38 | o 0: 'A' |
|
38 | o 0: 'A' | |
39 |
|
39 | |||
40 | $ hg rebase -s 1 -d 3 |
|
40 | $ hg rebase -s 1 -d 3 | |
41 | rebasing 1:0f4f7cb4f549 "B" |
|
41 | rebasing 1:0f4f7cb4f549 "B" | |
42 | merging a |
|
42 | merging a | |
43 | rebasing 2:30ae917c0e4f "C" |
|
43 | rebasing 2:30ae917c0e4f "C" | |
44 | merging a |
|
44 | merging a | |
45 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/0f4f7cb4f549-backup.hg (glob) |
|
45 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/0f4f7cb4f549-backup.hg (glob) | |
46 |
|
46 | |||
47 | $ hg tglog |
|
47 | $ hg tglog | |
48 | o 3: 'C' |
|
48 | o 3: 'C' | |
49 | | |
|
49 | | | |
50 | o 2: 'B' |
|
50 | o 2: 'B' | |
51 | | |
|
51 | | | |
52 | @ 1: 'AD' |
|
52 | @ 1: 'AD' | |
53 | | |
|
53 | | | |
54 | o 0: 'A' |
|
54 | o 0: 'A' | |
55 |
|
55 | |||
56 |
|
56 | |||
57 | $ cd .. |
|
57 | $ cd .. | |
58 |
|
58 | |||
59 |
|
59 | |||
60 | Test rebasing of merges with ancestors of the rebase destination - a situation |
|
60 | Test rebasing of merges with ancestors of the rebase destination - a situation | |
61 | that often happens when trying to recover from repeated merging with a mainline |
|
61 | that often happens when trying to recover from repeated merging with a mainline | |
62 | branch. |
|
62 | branch. | |
63 |
|
63 | |||
64 | The test case creates a dev branch that contains a couple of merges from the |
|
64 | The test case creates a dev branch that contains a couple of merges from the | |
65 | default branch. When rebasing to the default branch, these merges would be |
|
65 | default branch. When rebasing to the default branch, these merges would be | |
66 | merges with ancestors on the same branch. The merges _could_ contain some |
|
66 | merges with ancestors on the same branch. The merges _could_ contain some | |
67 | interesting conflict resolutions or additional changes in the merge commit, but |
|
67 | interesting conflict resolutions or additional changes in the merge commit, but | |
68 | that is mixed up with the actual merge stuff and there is in general no way to |
|
68 | that is mixed up with the actual merge stuff and there is in general no way to | |
69 | separate them. |
|
69 | separate them. | |
70 |
|
70 | |||
71 | Note: The dev branch contains _no_ changes to f-default. It might be unclear |
|
71 | Note: The dev branch contains _no_ changes to f-default. It might be unclear | |
72 | how rebasing of ancestor merges should be handled, but the current behavior |
|
72 | how rebasing of ancestor merges should be handled, but the current behavior | |
73 | with spurious prompts for conflicts in files that didn't change seems very |
|
73 | with spurious prompts for conflicts in files that didn't change seems very | |
74 | wrong. |
|
74 | wrong. | |
75 |
|
75 | |||
76 | $ hg init ancestor-merge |
|
76 | $ hg init ancestor-merge | |
77 | $ cd ancestor-merge |
|
77 | $ cd ancestor-merge | |
78 |
|
78 | |||
79 | $ touch f-default |
|
79 | $ touch f-default | |
80 | $ hg ci -Aqm 'default: create f-default' |
|
80 | $ hg ci -Aqm 'default: create f-default' | |
81 |
|
81 | |||
82 | $ hg branch -q dev |
|
82 | $ hg branch -q dev | |
83 | $ hg ci -qm 'dev: create branch' |
|
83 | $ hg ci -qm 'dev: create branch' | |
84 |
|
84 | |||
85 | $ echo stuff > f-dev |
|
85 | $ echo stuff > f-dev | |
86 | $ hg ci -Aqm 'dev: f-dev stuff' |
|
86 | $ hg ci -Aqm 'dev: f-dev stuff' | |
87 |
|
87 | |||
88 | $ hg up -q default |
|
88 | $ hg up -q default | |
89 | $ echo stuff > f-default |
|
89 | $ echo stuff > f-default | |
90 | $ hg ci -m 'default: f-default stuff' |
|
90 | $ hg ci -m 'default: f-default stuff' | |
91 |
|
91 | |||
92 | $ hg up -q dev |
|
92 | $ hg up -q dev | |
93 | $ hg merge -q default |
|
93 | $ hg merge -q default | |
94 | $ hg ci -m 'dev: merge default' |
|
94 | $ hg ci -m 'dev: merge default' | |
95 |
|
95 | |||
96 | $ hg up -q default |
|
96 | $ hg up -q default | |
97 | $ hg rm f-default |
|
97 | $ hg rm f-default | |
98 | $ hg ci -m 'default: remove f-default' |
|
98 | $ hg ci -m 'default: remove f-default' | |
99 |
|
99 | |||
100 | $ hg up -q dev |
|
100 | $ hg up -q dev | |
101 | $ hg merge -q default |
|
101 | $ hg merge -q default | |
102 | $ hg ci -m 'dev: merge default' |
|
102 | $ hg ci -m 'dev: merge default' | |
103 |
|
103 | |||
104 | $ hg up -q default |
|
104 | $ hg up -q default | |
105 | $ echo stuff > f-other |
|
105 | $ echo stuff > f-other | |
106 | $ hg ci -Aqm 'default: f-other stuff' |
|
106 | $ hg ci -Aqm 'default: f-other stuff' | |
107 |
|
107 | |||
108 | $ hg tglog |
|
108 | $ hg tglog | |
109 | @ 7: 'default: f-other stuff' |
|
109 | @ 7: 'default: f-other stuff' | |
110 | | |
|
110 | | | |
111 | | o 6: 'dev: merge default' dev |
|
111 | | o 6: 'dev: merge default' dev | |
112 | |/| |
|
112 | |/| | |
113 | o | 5: 'default: remove f-default' |
|
113 | o | 5: 'default: remove f-default' | |
114 | | | |
|
114 | | | | |
115 | | o 4: 'dev: merge default' dev |
|
115 | | o 4: 'dev: merge default' dev | |
116 | |/| |
|
116 | |/| | |
117 | o | 3: 'default: f-default stuff' |
|
117 | o | 3: 'default: f-default stuff' | |
118 | | | |
|
118 | | | | |
119 | | o 2: 'dev: f-dev stuff' dev |
|
119 | | o 2: 'dev: f-dev stuff' dev | |
120 | | | |
|
120 | | | | |
121 | | o 1: 'dev: create branch' dev |
|
121 | | o 1: 'dev: create branch' dev | |
122 | |/ |
|
122 | |/ | |
123 | o 0: 'default: create f-default' |
|
123 | o 0: 'default: create f-default' | |
124 |
|
124 | |||
125 | $ hg clone -qU . ../ancestor-merge-2 |
|
125 | $ hg clone -qU . ../ancestor-merge-2 | |
126 |
|
126 | |||
127 | Full rebase all the way back from branching point: |
|
127 | Full rebase all the way back from branching point: | |
128 |
|
128 | |||
129 | $ hg rebase -r 'only(dev,default)' -d default |
|
129 | $ hg rebase -r 'only(dev,default)' -d default | |
130 | rebasing 1:1d1a643d390e "dev: create branch" |
|
130 | rebasing 1:1d1a643d390e "dev: create branch" | |
131 | note: rebase of 1:1d1a643d390e created no changes to commit |
|
131 | note: rebase of 1:1d1a643d390e created no changes to commit | |
132 | rebasing 2:ec2c14fb2984 "dev: f-dev stuff" |
|
132 | rebasing 2:ec2c14fb2984 "dev: f-dev stuff" | |
133 | rebasing 4:4b019212aaf6 "dev: merge default" |
|
133 | rebasing 4:4b019212aaf6 "dev: merge default" | |
134 | remote changed f-default which local deleted |
|
134 | remote changed f-default which local deleted | |
135 | use (c)hanged version or leave (d)eleted? c |
|
135 | use (c)hanged version or leave (d)eleted? c | |
136 | rebasing 6:9455ee510502 "dev: merge default" |
|
136 | rebasing 6:9455ee510502 "dev: merge default" | |
137 | saved backup bundle to $TESTTMP/ancestor-merge/.hg/strip-backup/1d1a643d390e-backup.hg (glob) |
|
137 | saved backup bundle to $TESTTMP/ancestor-merge/.hg/strip-backup/1d1a643d390e-backup.hg (glob) | |
138 | $ hg tglog |
|
138 | $ hg tglog | |
139 | o 6: 'dev: merge default' |
|
139 | o 6: 'dev: merge default' | |
140 | | |
|
140 | | | |
141 | o 5: 'dev: merge default' |
|
141 | o 5: 'dev: merge default' | |
142 | | |
|
142 | | | |
143 | o 4: 'dev: f-dev stuff' |
|
143 | o 4: 'dev: f-dev stuff' | |
144 | | |
|
144 | | | |
145 | @ 3: 'default: f-other stuff' |
|
145 | @ 3: 'default: f-other stuff' | |
146 | | |
|
146 | | | |
147 | o 2: 'default: remove f-default' |
|
147 | o 2: 'default: remove f-default' | |
148 | | |
|
148 | | | |
149 | o 1: 'default: f-default stuff' |
|
149 | o 1: 'default: f-default stuff' | |
150 | | |
|
150 | | | |
151 | o 0: 'default: create f-default' |
|
151 | o 0: 'default: create f-default' | |
152 |
|
152 | |||
153 | Grafty cherry picking rebasing: |
|
153 | Grafty cherry picking rebasing: | |
154 |
|
154 | |||
155 | $ cd ../ancestor-merge-2 |
|
155 | $ cd ../ancestor-merge-2 | |
156 |
|
156 | |||
157 | $ hg phase -fdr0: |
|
157 | $ hg phase -fdr0: | |
158 | $ hg rebase -r 'children(only(dev,default))' -d default |
|
158 | $ hg rebase -r 'children(only(dev,default))' -d default | |
159 | rebasing 2:ec2c14fb2984 "dev: f-dev stuff" |
|
159 | rebasing 2:ec2c14fb2984 "dev: f-dev stuff" | |
160 | rebasing 4:4b019212aaf6 "dev: merge default" |
|
160 | rebasing 4:4b019212aaf6 "dev: merge default" | |
161 | remote changed f-default which local deleted |
|
161 | remote changed f-default which local deleted | |
162 | use (c)hanged version or leave (d)eleted? c |
|
162 | use (c)hanged version or leave (d)eleted? c | |
163 | rebasing 6:9455ee510502 "dev: merge default" |
|
163 | rebasing 6:9455ee510502 "dev: merge default" | |
164 | saved backup bundle to $TESTTMP/ancestor-merge-2/.hg/strip-backup/ec2c14fb2984-backup.hg (glob) |
|
164 | saved backup bundle to $TESTTMP/ancestor-merge-2/.hg/strip-backup/ec2c14fb2984-backup.hg (glob) | |
165 | $ hg tglog |
|
165 | $ hg tglog | |
166 | o 7: 'dev: merge default' |
|
166 | o 7: 'dev: merge default' | |
167 | | |
|
167 | | | |
168 | o 6: 'dev: merge default' |
|
168 | o 6: 'dev: merge default' | |
169 | | |
|
169 | | | |
170 | o 5: 'dev: f-dev stuff' |
|
170 | o 5: 'dev: f-dev stuff' | |
171 | | |
|
171 | | | |
172 | o 4: 'default: f-other stuff' |
|
172 | o 4: 'default: f-other stuff' | |
173 | | |
|
173 | | | |
174 | o 3: 'default: remove f-default' |
|
174 | o 3: 'default: remove f-default' | |
175 | | |
|
175 | | | |
176 | o 2: 'default: f-default stuff' |
|
176 | o 2: 'default: f-default stuff' | |
177 | | |
|
177 | | | |
178 | | o 1: 'dev: create branch' dev |
|
178 | | o 1: 'dev: create branch' dev | |
179 | |/ |
|
179 | |/ | |
180 | o 0: 'default: create f-default' |
|
180 | o 0: 'default: create f-default' | |
181 |
|
181 | |||
182 | $ cd .. |
|
182 | $ cd .. | |
183 |
|
183 | |||
184 |
|
184 | |||
185 | Test order of parents of rebased merged with un-rebased changes as p1. |
|
185 | Test order of parents of rebased merged with un-rebased changes as p1. | |
186 |
|
186 | |||
187 | $ hg init parentorder |
|
187 | $ hg init parentorder | |
188 | $ cd parentorder |
|
188 | $ cd parentorder | |
189 | $ touch f |
|
189 | $ touch f | |
190 | $ hg ci -Aqm common |
|
190 | $ hg ci -Aqm common | |
191 | $ touch change |
|
191 | $ touch change | |
192 | $ hg ci -Aqm change |
|
192 | $ hg ci -Aqm change | |
193 | $ touch target |
|
193 | $ touch target | |
194 | $ hg ci -Aqm target |
|
194 | $ hg ci -Aqm target | |
195 | $ hg up -qr 0 |
|
195 | $ hg up -qr 0 | |
196 | $ touch outside |
|
196 | $ touch outside | |
197 | $ hg ci -Aqm outside |
|
197 | $ hg ci -Aqm outside | |
198 | $ hg merge -qr 1 |
|
198 | $ hg merge -qr 1 | |
199 | $ hg ci -m 'merge p1 3=outside p2 1=ancestor' |
|
199 | $ hg ci -m 'merge p1 3=outside p2 1=ancestor' | |
200 | $ hg par |
|
200 | $ hg par | |
201 | changeset: 4:6990226659be |
|
201 | changeset: 4:6990226659be | |
202 | tag: tip |
|
202 | tag: tip | |
203 | parent: 3:f59da8fc0fcf |
|
203 | parent: 3:f59da8fc0fcf | |
204 | parent: 1:dd40c13f7a6f |
|
204 | parent: 1:dd40c13f7a6f | |
205 | user: test |
|
205 | user: test | |
206 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
206 | date: Thu Jan 01 00:00:00 1970 +0000 | |
207 | summary: merge p1 3=outside p2 1=ancestor |
|
207 | summary: merge p1 3=outside p2 1=ancestor | |
208 |
|
208 | |||
209 | $ hg up -qr 1 |
|
209 | $ hg up -qr 1 | |
210 | $ hg merge -qr 3 |
|
210 | $ hg merge -qr 3 | |
211 | $ hg ci -qm 'merge p1 1=ancestor p2 3=outside' |
|
211 | $ hg ci -qm 'merge p1 1=ancestor p2 3=outside' | |
212 | $ hg par |
|
212 | $ hg par | |
213 | changeset: 5:a57575f79074 |
|
213 | changeset: 5:a57575f79074 | |
214 | tag: tip |
|
214 | tag: tip | |
215 | parent: 1:dd40c13f7a6f |
|
215 | parent: 1:dd40c13f7a6f | |
216 | parent: 3:f59da8fc0fcf |
|
216 | parent: 3:f59da8fc0fcf | |
217 | user: test |
|
217 | user: test | |
218 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
218 | date: Thu Jan 01 00:00:00 1970 +0000 | |
219 | summary: merge p1 1=ancestor p2 3=outside |
|
219 | summary: merge p1 1=ancestor p2 3=outside | |
220 |
|
220 | |||
221 | $ hg tglog |
|
221 | $ hg tglog | |
222 | @ 5: 'merge p1 1=ancestor p2 3=outside' |
|
222 | @ 5: 'merge p1 1=ancestor p2 3=outside' | |
223 | |\ |
|
223 | |\ | |
224 | +---o 4: 'merge p1 3=outside p2 1=ancestor' |
|
224 | +---o 4: 'merge p1 3=outside p2 1=ancestor' | |
225 | | |/ |
|
225 | | |/ | |
226 | | o 3: 'outside' |
|
226 | | o 3: 'outside' | |
227 | | | |
|
227 | | | | |
228 | +---o 2: 'target' |
|
228 | +---o 2: 'target' | |
229 | | | |
|
229 | | | | |
230 | o | 1: 'change' |
|
230 | o | 1: 'change' | |
231 | |/ |
|
231 | |/ | |
232 | o 0: 'common' |
|
232 | o 0: 'common' | |
233 |
|
233 | |||
234 | $ hg rebase -r 4 -d 2 |
|
234 | $ hg rebase -r 4 -d 2 | |
235 | rebasing 4:6990226659be "merge p1 3=outside p2 1=ancestor" |
|
235 | rebasing 4:6990226659be "merge p1 3=outside p2 1=ancestor" | |
236 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/6990226659be-backup.hg (glob) |
|
236 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/6990226659be-backup.hg (glob) | |
237 | $ hg tip |
|
237 | $ hg tip | |
238 | changeset: 5:cca50676b1c5 |
|
238 | changeset: 5:cca50676b1c5 | |
239 | tag: tip |
|
239 | tag: tip | |
240 | parent: 2:a60552eb93fb |
|
240 | parent: 2:a60552eb93fb | |
241 | parent: 3:f59da8fc0fcf |
|
241 | parent: 3:f59da8fc0fcf | |
242 | user: test |
|
242 | user: test | |
243 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
243 | date: Thu Jan 01 00:00:00 1970 +0000 | |
244 | summary: merge p1 3=outside p2 1=ancestor |
|
244 | summary: merge p1 3=outside p2 1=ancestor | |
245 |
|
245 | |||
246 | $ hg rebase -r 4 -d 2 |
|
246 | $ hg rebase -r 4 -d 2 | |
247 | rebasing 4:a57575f79074 "merge p1 1=ancestor p2 3=outside" |
|
247 | rebasing 4:a57575f79074 "merge p1 1=ancestor p2 3=outside" | |
248 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/a57575f79074-backup.hg (glob) |
|
248 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/a57575f79074-backup.hg (glob) | |
249 | $ hg tip |
|
249 | $ hg tip | |
250 | changeset: 5:f9daf77ffe76 |
|
250 | changeset: 5:f9daf77ffe76 | |
251 | tag: tip |
|
251 | tag: tip | |
252 | parent: 2:a60552eb93fb |
|
252 | parent: 2:a60552eb93fb | |
253 | parent: 3:f59da8fc0fcf |
|
253 | parent: 3:f59da8fc0fcf | |
254 | user: test |
|
254 | user: test | |
255 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
255 | date: Thu Jan 01 00:00:00 1970 +0000 | |
256 | summary: merge p1 1=ancestor p2 3=outside |
|
256 | summary: merge p1 1=ancestor p2 3=outside | |
257 |
|
257 | |||
258 | $ hg tglog |
|
258 | $ hg tglog | |
259 | @ 5: 'merge p1 1=ancestor p2 3=outside' |
|
259 | @ 5: 'merge p1 1=ancestor p2 3=outside' | |
260 | |\ |
|
260 | |\ | |
261 | +---o 4: 'merge p1 3=outside p2 1=ancestor' |
|
261 | +---o 4: 'merge p1 3=outside p2 1=ancestor' | |
262 | | |/ |
|
262 | | |/ | |
263 | | o 3: 'outside' |
|
263 | | o 3: 'outside' | |
264 | | | |
|
264 | | | | |
265 | o | 2: 'target' |
|
265 | o | 2: 'target' | |
266 | | | |
|
266 | | | | |
267 | o | 1: 'change' |
|
267 | o | 1: 'change' | |
268 | |/ |
|
268 | |/ | |
269 | o 0: 'common' |
|
269 | o 0: 'common' | |
270 |
|
270 | |||
271 | rebase of merge of ancestors |
|
271 | rebase of merge of ancestors | |
272 |
|
272 | |||
273 | $ hg up -qr 2 |
|
273 | $ hg up -qr 2 | |
274 | $ hg merge -qr 3 |
|
274 | $ hg merge -qr 3 | |
275 | $ echo 'other change while merging future "rebase ancestors"' > other |
|
275 | $ echo 'other change while merging future "rebase ancestors"' > other | |
276 | $ hg ci -Aqm 'merge rebase ancestors' |
|
276 | $ hg ci -Aqm 'merge rebase ancestors' | |
277 | $ hg rebase -d 5 -v |
|
277 | $ hg rebase -d 5 -v | |
278 | rebasing 6:4c5f12f25ebe "merge rebase ancestors" (tip) |
|
278 | rebasing 6:4c5f12f25ebe "merge rebase ancestors" (tip) | |
279 | resolving manifests |
|
279 | resolving manifests | |
280 | removing other |
|
280 | removing other | |
281 | note: merging f9daf77ffe76+ and 4c5f12f25ebe using bids from ancestors a60552eb93fb and f59da8fc0fcf |
|
281 | note: merging f9daf77ffe76+ and 4c5f12f25ebe using bids from ancestors a60552eb93fb and f59da8fc0fcf | |
282 |
|
282 | |||
283 | calculating bids for ancestor a60552eb93fb |
|
283 | calculating bids for ancestor a60552eb93fb | |
284 | resolving manifests |
|
284 | resolving manifests | |
285 |
|
285 | |||
286 | calculating bids for ancestor f59da8fc0fcf |
|
286 | calculating bids for ancestor f59da8fc0fcf | |
287 | resolving manifests |
|
287 | resolving manifests | |
288 |
|
288 | |||
289 | auction for merging merge bids |
|
289 | auction for merging merge bids | |
290 | other: consensus for g |
|
290 | other: consensus for g | |
291 | end of auction |
|
291 | end of auction | |
292 |
|
292 | |||
293 | getting other |
|
293 | getting other | |
294 | other |
|
294 | other | |
295 | rebase merging completed |
|
295 | rebase merging completed | |
296 | 1 changesets found |
|
296 | 1 changesets found | |
|
297 | uncompressed size of bundle content: | |||
|
298 | 193 (changelog) | |||
|
299 | 196 (manifests) | |||
|
300 | 162 other | |||
297 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/4c5f12f25ebe-backup.hg (glob) |
|
301 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/4c5f12f25ebe-backup.hg (glob) | |
298 | 1 changesets found |
|
302 | 1 changesets found | |
|
303 | uncompressed size of bundle content: | |||
|
304 | 252 (changelog) | |||
|
305 | 147 (manifests) | |||
|
306 | 162 other | |||
299 | adding branch |
|
307 | adding branch | |
300 | adding changesets |
|
308 | adding changesets | |
301 | adding manifests |
|
309 | adding manifests | |
302 | adding file changes |
|
310 | adding file changes | |
303 | added 1 changesets with 1 changes to 1 files |
|
311 | added 1 changesets with 1 changes to 1 files | |
304 | rebase completed |
|
312 | rebase completed | |
305 | $ hg tglog |
|
313 | $ hg tglog | |
306 | @ 6: 'merge rebase ancestors' |
|
314 | @ 6: 'merge rebase ancestors' | |
307 | | |
|
315 | | | |
308 | o 5: 'merge p1 1=ancestor p2 3=outside' |
|
316 | o 5: 'merge p1 1=ancestor p2 3=outside' | |
309 | |\ |
|
317 | |\ | |
310 | +---o 4: 'merge p1 3=outside p2 1=ancestor' |
|
318 | +---o 4: 'merge p1 3=outside p2 1=ancestor' | |
311 | | |/ |
|
319 | | |/ | |
312 | | o 3: 'outside' |
|
320 | | o 3: 'outside' | |
313 | | | |
|
321 | | | | |
314 | o | 2: 'target' |
|
322 | o | 2: 'target' | |
315 | | | |
|
323 | | | | |
316 | o | 1: 'change' |
|
324 | o | 1: 'change' | |
317 | |/ |
|
325 | |/ | |
318 | o 0: 'common' |
|
326 | o 0: 'common' | |
319 |
|
327 |
General Comments 0
You need to be logged in to leave comments.
Login now