Show More
@@ -1,1179 +1,1181 b'' | |||||
1 | # Copyright 2009-2010 Gregory P. Ward |
|
1 | # Copyright 2009-2010 Gregory P. Ward | |
2 | # Copyright 2009-2010 Intelerad Medical Systems Incorporated |
|
2 | # Copyright 2009-2010 Intelerad Medical Systems Incorporated | |
3 | # Copyright 2010-2011 Fog Creek Software |
|
3 | # Copyright 2010-2011 Fog Creek Software | |
4 | # Copyright 2010-2011 Unity Technologies |
|
4 | # Copyright 2010-2011 Unity Technologies | |
5 | # |
|
5 | # | |
6 | # This software may be used and distributed according to the terms of the |
|
6 | # This software may be used and distributed according to the terms of the | |
7 | # GNU General Public License version 2 or any later version. |
|
7 | # GNU General Public License version 2 or any later version. | |
8 |
|
8 | |||
9 | '''Overridden Mercurial commands and functions for the largefiles extension''' |
|
9 | '''Overridden Mercurial commands and functions for the largefiles extension''' | |
10 |
|
10 | |||
11 | import os |
|
11 | import os | |
12 | import copy |
|
12 | import copy | |
13 |
|
13 | |||
14 | from mercurial import hg, commands, util, cmdutil, scmutil, match as match_, \ |
|
14 | from mercurial import hg, commands, util, cmdutil, scmutil, match as match_, \ | |
15 | node, archival, error, merge, discovery |
|
15 | node, archival, error, merge, discovery | |
16 | from mercurial.i18n import _ |
|
16 | from mercurial.i18n import _ | |
17 | from mercurial.node import hex |
|
17 | from mercurial.node import hex | |
18 | from hgext import rebase |
|
18 | from hgext import rebase | |
19 |
|
19 | |||
20 | import lfutil |
|
20 | import lfutil | |
21 | import lfcommands |
|
21 | import lfcommands | |
22 |
|
22 | |||
23 | # -- Utility functions: commonly/repeatedly needed functionality --------------- |
|
23 | # -- Utility functions: commonly/repeatedly needed functionality --------------- | |
24 |
|
24 | |||
25 | def installnormalfilesmatchfn(manifest): |
|
25 | def installnormalfilesmatchfn(manifest): | |
26 | '''overrides scmutil.match so that the matcher it returns will ignore all |
|
26 | '''overrides scmutil.match so that the matcher it returns will ignore all | |
27 | largefiles''' |
|
27 | largefiles''' | |
28 | oldmatch = None # for the closure |
|
28 | oldmatch = None # for the closure | |
29 | def overridematch(ctx, pats=[], opts={}, globbed=False, |
|
29 | def overridematch(ctx, pats=[], opts={}, globbed=False, | |
30 | default='relpath'): |
|
30 | default='relpath'): | |
31 | match = oldmatch(ctx, pats, opts, globbed, default) |
|
31 | match = oldmatch(ctx, pats, opts, globbed, default) | |
32 | m = copy.copy(match) |
|
32 | m = copy.copy(match) | |
33 | notlfile = lambda f: not (lfutil.isstandin(f) or lfutil.standin(f) in |
|
33 | notlfile = lambda f: not (lfutil.isstandin(f) or lfutil.standin(f) in | |
34 | manifest) |
|
34 | manifest) | |
35 | m._files = filter(notlfile, m._files) |
|
35 | m._files = filter(notlfile, m._files) | |
36 | m._fmap = set(m._files) |
|
36 | m._fmap = set(m._files) | |
37 | origmatchfn = m.matchfn |
|
37 | origmatchfn = m.matchfn | |
38 | m.matchfn = lambda f: notlfile(f) and origmatchfn(f) or None |
|
38 | m.matchfn = lambda f: notlfile(f) and origmatchfn(f) or None | |
39 | return m |
|
39 | return m | |
40 | oldmatch = installmatchfn(overridematch) |
|
40 | oldmatch = installmatchfn(overridematch) | |
41 |
|
41 | |||
42 | def installmatchfn(f): |
|
42 | def installmatchfn(f): | |
43 | oldmatch = scmutil.match |
|
43 | oldmatch = scmutil.match | |
44 | setattr(f, 'oldmatch', oldmatch) |
|
44 | setattr(f, 'oldmatch', oldmatch) | |
45 | scmutil.match = f |
|
45 | scmutil.match = f | |
46 | return oldmatch |
|
46 | return oldmatch | |
47 |
|
47 | |||
48 | def restorematchfn(): |
|
48 | def restorematchfn(): | |
49 | '''restores scmutil.match to what it was before installnormalfilesmatchfn |
|
49 | '''restores scmutil.match to what it was before installnormalfilesmatchfn | |
50 | was called. no-op if scmutil.match is its original function. |
|
50 | was called. no-op if scmutil.match is its original function. | |
51 |
|
51 | |||
52 | Note that n calls to installnormalfilesmatchfn will require n calls to |
|
52 | Note that n calls to installnormalfilesmatchfn will require n calls to | |
53 | restore matchfn to reverse''' |
|
53 | restore matchfn to reverse''' | |
54 | scmutil.match = getattr(scmutil.match, 'oldmatch', scmutil.match) |
|
54 | scmutil.match = getattr(scmutil.match, 'oldmatch', scmutil.match) | |
55 |
|
55 | |||
56 | def addlargefiles(ui, repo, *pats, **opts): |
|
56 | def addlargefiles(ui, repo, *pats, **opts): | |
57 | large = opts.pop('large', None) |
|
57 | large = opts.pop('large', None) | |
58 | lfsize = lfutil.getminsize( |
|
58 | lfsize = lfutil.getminsize( | |
59 | ui, lfutil.islfilesrepo(repo), opts.pop('lfsize', None)) |
|
59 | ui, lfutil.islfilesrepo(repo), opts.pop('lfsize', None)) | |
60 |
|
60 | |||
61 | lfmatcher = None |
|
61 | lfmatcher = None | |
62 | if lfutil.islfilesrepo(repo): |
|
62 | if lfutil.islfilesrepo(repo): | |
63 | lfpats = ui.configlist(lfutil.longname, 'patterns', default=[]) |
|
63 | lfpats = ui.configlist(lfutil.longname, 'patterns', default=[]) | |
64 | if lfpats: |
|
64 | if lfpats: | |
65 | lfmatcher = match_.match(repo.root, '', list(lfpats)) |
|
65 | lfmatcher = match_.match(repo.root, '', list(lfpats)) | |
66 |
|
66 | |||
67 | lfnames = [] |
|
67 | lfnames = [] | |
68 | m = scmutil.match(repo[None], pats, opts) |
|
68 | m = scmutil.match(repo[None], pats, opts) | |
69 | m.bad = lambda x, y: None |
|
69 | m.bad = lambda x, y: None | |
70 | wctx = repo[None] |
|
70 | wctx = repo[None] | |
71 | for f in repo.walk(m): |
|
71 | for f in repo.walk(m): | |
72 | exact = m.exact(f) |
|
72 | exact = m.exact(f) | |
73 | lfile = lfutil.standin(f) in wctx |
|
73 | lfile = lfutil.standin(f) in wctx | |
74 | nfile = f in wctx |
|
74 | nfile = f in wctx | |
75 | exists = lfile or nfile |
|
75 | exists = lfile or nfile | |
76 |
|
76 | |||
77 | # Don't warn the user when they attempt to add a normal tracked file. |
|
77 | # Don't warn the user when they attempt to add a normal tracked file. | |
78 | # The normal add code will do that for us. |
|
78 | # The normal add code will do that for us. | |
79 | if exact and exists: |
|
79 | if exact and exists: | |
80 | if lfile: |
|
80 | if lfile: | |
81 | ui.warn(_('%s already a largefile\n') % f) |
|
81 | ui.warn(_('%s already a largefile\n') % f) | |
82 | continue |
|
82 | continue | |
83 |
|
83 | |||
84 | if (exact or not exists) and not lfutil.isstandin(f): |
|
84 | if (exact or not exists) and not lfutil.isstandin(f): | |
85 | wfile = repo.wjoin(f) |
|
85 | wfile = repo.wjoin(f) | |
86 |
|
86 | |||
87 | # In case the file was removed previously, but not committed |
|
87 | # In case the file was removed previously, but not committed | |
88 | # (issue3507) |
|
88 | # (issue3507) | |
89 | if not os.path.exists(wfile): |
|
89 | if not os.path.exists(wfile): | |
90 | continue |
|
90 | continue | |
91 |
|
91 | |||
92 | abovemin = (lfsize and |
|
92 | abovemin = (lfsize and | |
93 | os.lstat(wfile).st_size >= lfsize * 1024 * 1024) |
|
93 | os.lstat(wfile).st_size >= lfsize * 1024 * 1024) | |
94 | if large or abovemin or (lfmatcher and lfmatcher(f)): |
|
94 | if large or abovemin or (lfmatcher and lfmatcher(f)): | |
95 | lfnames.append(f) |
|
95 | lfnames.append(f) | |
96 | if ui.verbose or not exact: |
|
96 | if ui.verbose or not exact: | |
97 | ui.status(_('adding %s as a largefile\n') % m.rel(f)) |
|
97 | ui.status(_('adding %s as a largefile\n') % m.rel(f)) | |
98 |
|
98 | |||
99 | bad = [] |
|
99 | bad = [] | |
100 | standins = [] |
|
100 | standins = [] | |
101 |
|
101 | |||
102 | # Need to lock, otherwise there could be a race condition between |
|
102 | # Need to lock, otherwise there could be a race condition between | |
103 | # when standins are created and added to the repo. |
|
103 | # when standins are created and added to the repo. | |
104 | wlock = repo.wlock() |
|
104 | wlock = repo.wlock() | |
105 | try: |
|
105 | try: | |
106 | if not opts.get('dry_run'): |
|
106 | if not opts.get('dry_run'): | |
107 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
107 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |
108 | for f in lfnames: |
|
108 | for f in lfnames: | |
109 | standinname = lfutil.standin(f) |
|
109 | standinname = lfutil.standin(f) | |
110 | lfutil.writestandin(repo, standinname, hash='', |
|
110 | lfutil.writestandin(repo, standinname, hash='', | |
111 | executable=lfutil.getexecutable(repo.wjoin(f))) |
|
111 | executable=lfutil.getexecutable(repo.wjoin(f))) | |
112 | standins.append(standinname) |
|
112 | standins.append(standinname) | |
113 | if lfdirstate[f] == 'r': |
|
113 | if lfdirstate[f] == 'r': | |
114 | lfdirstate.normallookup(f) |
|
114 | lfdirstate.normallookup(f) | |
115 | else: |
|
115 | else: | |
116 | lfdirstate.add(f) |
|
116 | lfdirstate.add(f) | |
117 | lfdirstate.write() |
|
117 | lfdirstate.write() | |
118 | bad += [lfutil.splitstandin(f) |
|
118 | bad += [lfutil.splitstandin(f) | |
119 | for f in repo[None].add(standins) |
|
119 | for f in repo[None].add(standins) | |
120 | if f in m.files()] |
|
120 | if f in m.files()] | |
121 | finally: |
|
121 | finally: | |
122 | wlock.release() |
|
122 | wlock.release() | |
123 | return bad |
|
123 | return bad | |
124 |
|
124 | |||
125 | def removelargefiles(ui, repo, *pats, **opts): |
|
125 | def removelargefiles(ui, repo, *pats, **opts): | |
126 | after = opts.get('after') |
|
126 | after = opts.get('after') | |
127 | if not pats and not after: |
|
127 | if not pats and not after: | |
128 | raise util.Abort(_('no files specified')) |
|
128 | raise util.Abort(_('no files specified')) | |
129 | m = scmutil.match(repo[None], pats, opts) |
|
129 | m = scmutil.match(repo[None], pats, opts) | |
130 | try: |
|
130 | try: | |
131 | repo.lfstatus = True |
|
131 | repo.lfstatus = True | |
132 | s = repo.status(match=m, clean=True) |
|
132 | s = repo.status(match=m, clean=True) | |
133 | finally: |
|
133 | finally: | |
134 | repo.lfstatus = False |
|
134 | repo.lfstatus = False | |
135 | manifest = repo[None].manifest() |
|
135 | manifest = repo[None].manifest() | |
136 | modified, added, deleted, clean = [[f for f in list |
|
136 | modified, added, deleted, clean = [[f for f in list | |
137 | if lfutil.standin(f) in manifest] |
|
137 | if lfutil.standin(f) in manifest] | |
138 | for list in [s[0], s[1], s[3], s[6]]] |
|
138 | for list in [s[0], s[1], s[3], s[6]]] | |
139 |
|
139 | |||
140 | def warn(files, msg): |
|
140 | def warn(files, msg): | |
141 | for f in files: |
|
141 | for f in files: | |
142 | ui.warn(msg % m.rel(f)) |
|
142 | ui.warn(msg % m.rel(f)) | |
143 | return int(len(files) > 0) |
|
143 | return int(len(files) > 0) | |
144 |
|
144 | |||
145 | result = 0 |
|
145 | result = 0 | |
146 |
|
146 | |||
147 | if after: |
|
147 | if after: | |
148 | remove, forget = deleted, [] |
|
148 | remove, forget = deleted, [] | |
149 | result = warn(modified + added + clean, |
|
149 | result = warn(modified + added + clean, | |
150 | _('not removing %s: file still exists\n')) |
|
150 | _('not removing %s: file still exists\n')) | |
151 | else: |
|
151 | else: | |
152 | remove, forget = deleted + clean, [] |
|
152 | remove, forget = deleted + clean, [] | |
153 | result = warn(modified, _('not removing %s: file is modified (use -f' |
|
153 | result = warn(modified, _('not removing %s: file is modified (use -f' | |
154 | ' to force removal)\n')) |
|
154 | ' to force removal)\n')) | |
155 | result = warn(added, _('not removing %s: file has been marked for add' |
|
155 | result = warn(added, _('not removing %s: file has been marked for add' | |
156 | ' (use forget to undo)\n')) or result |
|
156 | ' (use forget to undo)\n')) or result | |
157 |
|
157 | |||
158 | for f in sorted(remove + forget): |
|
158 | for f in sorted(remove + forget): | |
159 | if ui.verbose or not m.exact(f): |
|
159 | if ui.verbose or not m.exact(f): | |
160 | ui.status(_('removing %s\n') % m.rel(f)) |
|
160 | ui.status(_('removing %s\n') % m.rel(f)) | |
161 |
|
161 | |||
162 | # Need to lock because standin files are deleted then removed from the |
|
162 | # Need to lock because standin files are deleted then removed from the | |
163 | # repository and we could race in-between. |
|
163 | # repository and we could race in-between. | |
164 | wlock = repo.wlock() |
|
164 | wlock = repo.wlock() | |
165 | try: |
|
165 | try: | |
166 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
166 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |
167 | for f in remove: |
|
167 | for f in remove: | |
168 | if not after: |
|
168 | if not after: | |
169 | # If this is being called by addremove, notify the user that we |
|
169 | # If this is being called by addremove, notify the user that we | |
170 | # are removing the file. |
|
170 | # are removing the file. | |
171 | if getattr(repo, "_isaddremove", False): |
|
171 | if getattr(repo, "_isaddremove", False): | |
172 | ui.status(_('removing %s\n') % f) |
|
172 | ui.status(_('removing %s\n') % f) | |
173 | util.unlinkpath(repo.wjoin(f), ignoremissing=True) |
|
173 | util.unlinkpath(repo.wjoin(f), ignoremissing=True) | |
174 | lfdirstate.remove(f) |
|
174 | lfdirstate.remove(f) | |
175 | lfdirstate.write() |
|
175 | lfdirstate.write() | |
176 | forget = [lfutil.standin(f) for f in forget] |
|
176 | forget = [lfutil.standin(f) for f in forget] | |
177 | remove = [lfutil.standin(f) for f in remove] |
|
177 | remove = [lfutil.standin(f) for f in remove] | |
178 | repo[None].forget(forget) |
|
178 | repo[None].forget(forget) | |
179 | # If this is being called by addremove, let the original addremove |
|
179 | # If this is being called by addremove, let the original addremove | |
180 | # function handle this. |
|
180 | # function handle this. | |
181 | if not getattr(repo, "_isaddremove", False): |
|
181 | if not getattr(repo, "_isaddremove", False): | |
182 | for f in remove: |
|
182 | for f in remove: | |
183 | util.unlinkpath(repo.wjoin(f), ignoremissing=True) |
|
183 | util.unlinkpath(repo.wjoin(f), ignoremissing=True) | |
184 | repo[None].forget(remove) |
|
184 | repo[None].forget(remove) | |
185 | finally: |
|
185 | finally: | |
186 | wlock.release() |
|
186 | wlock.release() | |
187 |
|
187 | |||
188 | return result |
|
188 | return result | |
189 |
|
189 | |||
190 | # For overriding mercurial.hgweb.webcommands so that largefiles will |
|
190 | # For overriding mercurial.hgweb.webcommands so that largefiles will | |
191 | # appear at their right place in the manifests. |
|
191 | # appear at their right place in the manifests. | |
192 | def decodepath(orig, path): |
|
192 | def decodepath(orig, path): | |
193 | return lfutil.splitstandin(path) or path |
|
193 | return lfutil.splitstandin(path) or path | |
194 |
|
194 | |||
195 | # -- Wrappers: modify existing commands -------------------------------- |
|
195 | # -- Wrappers: modify existing commands -------------------------------- | |
196 |
|
196 | |||
197 | # Add works by going through the files that the user wanted to add and |
|
197 | # Add works by going through the files that the user wanted to add and | |
198 | # checking if they should be added as largefiles. Then it makes a new |
|
198 | # checking if they should be added as largefiles. Then it makes a new | |
199 | # matcher which matches only the normal files and runs the original |
|
199 | # matcher which matches only the normal files and runs the original | |
200 | # version of add. |
|
200 | # version of add. | |
201 | def overrideadd(orig, ui, repo, *pats, **opts): |
|
201 | def overrideadd(orig, ui, repo, *pats, **opts): | |
202 | normal = opts.pop('normal') |
|
202 | normal = opts.pop('normal') | |
203 | if normal: |
|
203 | if normal: | |
204 | if opts.get('large'): |
|
204 | if opts.get('large'): | |
205 | raise util.Abort(_('--normal cannot be used with --large')) |
|
205 | raise util.Abort(_('--normal cannot be used with --large')) | |
206 | return orig(ui, repo, *pats, **opts) |
|
206 | return orig(ui, repo, *pats, **opts) | |
207 | bad = addlargefiles(ui, repo, *pats, **opts) |
|
207 | bad = addlargefiles(ui, repo, *pats, **opts) | |
208 | installnormalfilesmatchfn(repo[None].manifest()) |
|
208 | installnormalfilesmatchfn(repo[None].manifest()) | |
209 | result = orig(ui, repo, *pats, **opts) |
|
209 | result = orig(ui, repo, *pats, **opts) | |
210 | restorematchfn() |
|
210 | restorematchfn() | |
211 |
|
211 | |||
212 | return (result == 1 or bad) and 1 or 0 |
|
212 | return (result == 1 or bad) and 1 or 0 | |
213 |
|
213 | |||
214 | def overrideremove(orig, ui, repo, *pats, **opts): |
|
214 | def overrideremove(orig, ui, repo, *pats, **opts): | |
215 | installnormalfilesmatchfn(repo[None].manifest()) |
|
215 | installnormalfilesmatchfn(repo[None].manifest()) | |
216 | result = orig(ui, repo, *pats, **opts) |
|
216 | result = orig(ui, repo, *pats, **opts) | |
217 | restorematchfn() |
|
217 | restorematchfn() | |
218 | return removelargefiles(ui, repo, *pats, **opts) or result |
|
218 | return removelargefiles(ui, repo, *pats, **opts) or result | |
219 |
|
219 | |||
220 | def overridestatusfn(orig, repo, rev2, **opts): |
|
220 | def overridestatusfn(orig, repo, rev2, **opts): | |
221 | try: |
|
221 | try: | |
222 | repo._repo.lfstatus = True |
|
222 | repo._repo.lfstatus = True | |
223 | return orig(repo, rev2, **opts) |
|
223 | return orig(repo, rev2, **opts) | |
224 | finally: |
|
224 | finally: | |
225 | repo._repo.lfstatus = False |
|
225 | repo._repo.lfstatus = False | |
226 |
|
226 | |||
227 | def overridestatus(orig, ui, repo, *pats, **opts): |
|
227 | def overridestatus(orig, ui, repo, *pats, **opts): | |
228 | try: |
|
228 | try: | |
229 | repo.lfstatus = True |
|
229 | repo.lfstatus = True | |
230 | return orig(ui, repo, *pats, **opts) |
|
230 | return orig(ui, repo, *pats, **opts) | |
231 | finally: |
|
231 | finally: | |
232 | repo.lfstatus = False |
|
232 | repo.lfstatus = False | |
233 |
|
233 | |||
234 | def overridedirty(orig, repo, ignoreupdate=False): |
|
234 | def overridedirty(orig, repo, ignoreupdate=False): | |
235 | try: |
|
235 | try: | |
236 | repo._repo.lfstatus = True |
|
236 | repo._repo.lfstatus = True | |
237 | return orig(repo, ignoreupdate) |
|
237 | return orig(repo, ignoreupdate) | |
238 | finally: |
|
238 | finally: | |
239 | repo._repo.lfstatus = False |
|
239 | repo._repo.lfstatus = False | |
240 |
|
240 | |||
241 | def overridelog(orig, ui, repo, *pats, **opts): |
|
241 | def overridelog(orig, ui, repo, *pats, **opts): | |
242 | def overridematch(ctx, pats=[], opts={}, globbed=False, |
|
242 | def overridematch(ctx, pats=[], opts={}, globbed=False, | |
243 | default='relpath'): |
|
243 | default='relpath'): | |
244 | """Matcher that merges root directory with .hglf, suitable for log. |
|
244 | """Matcher that merges root directory with .hglf, suitable for log. | |
245 | It is still possible to match .hglf directly. |
|
245 | It is still possible to match .hglf directly. | |
246 | For any listed files run log on the standin too. |
|
246 | For any listed files run log on the standin too. | |
247 | matchfn tries both the given filename and with .hglf stripped. |
|
247 | matchfn tries both the given filename and with .hglf stripped. | |
248 | """ |
|
248 | """ | |
249 | match = oldmatch(ctx, pats, opts, globbed, default) |
|
249 | match = oldmatch(ctx, pats, opts, globbed, default) | |
250 | m = copy.copy(match) |
|
250 | m = copy.copy(match) | |
251 | standins = [lfutil.standin(f) for f in m._files] |
|
251 | standins = [lfutil.standin(f) for f in m._files] | |
252 | m._files.extend(standins) |
|
252 | m._files.extend(standins) | |
253 | m._fmap = set(m._files) |
|
253 | m._fmap = set(m._files) | |
254 | origmatchfn = m.matchfn |
|
254 | origmatchfn = m.matchfn | |
255 | def lfmatchfn(f): |
|
255 | def lfmatchfn(f): | |
256 | lf = lfutil.splitstandin(f) |
|
256 | lf = lfutil.splitstandin(f) | |
257 | if lf is not None and origmatchfn(lf): |
|
257 | if lf is not None and origmatchfn(lf): | |
258 | return True |
|
258 | return True | |
259 | r = origmatchfn(f) |
|
259 | r = origmatchfn(f) | |
260 | return r |
|
260 | return r | |
261 | m.matchfn = lfmatchfn |
|
261 | m.matchfn = lfmatchfn | |
262 | return m |
|
262 | return m | |
263 | oldmatch = installmatchfn(overridematch) |
|
263 | oldmatch = installmatchfn(overridematch) | |
264 | try: |
|
264 | try: | |
265 | repo.lfstatus = True |
|
265 | repo.lfstatus = True | |
266 | return orig(ui, repo, *pats, **opts) |
|
266 | return orig(ui, repo, *pats, **opts) | |
267 | finally: |
|
267 | finally: | |
268 | repo.lfstatus = False |
|
268 | repo.lfstatus = False | |
269 | restorematchfn() |
|
269 | restorematchfn() | |
270 |
|
270 | |||
271 | def overrideverify(orig, ui, repo, *pats, **opts): |
|
271 | def overrideverify(orig, ui, repo, *pats, **opts): | |
272 | large = opts.pop('large', False) |
|
272 | large = opts.pop('large', False) | |
273 | all = opts.pop('lfa', False) |
|
273 | all = opts.pop('lfa', False) | |
274 | contents = opts.pop('lfc', False) |
|
274 | contents = opts.pop('lfc', False) | |
275 |
|
275 | |||
276 | result = orig(ui, repo, *pats, **opts) |
|
276 | result = orig(ui, repo, *pats, **opts) | |
277 | if large or all or contents: |
|
277 | if large or all or contents: | |
278 | result = result or lfcommands.verifylfiles(ui, repo, all, contents) |
|
278 | result = result or lfcommands.verifylfiles(ui, repo, all, contents) | |
279 | return result |
|
279 | return result | |
280 |
|
280 | |||
281 | def overridedebugstate(orig, ui, repo, *pats, **opts): |
|
281 | def overridedebugstate(orig, ui, repo, *pats, **opts): | |
282 | large = opts.pop('large', False) |
|
282 | large = opts.pop('large', False) | |
283 | if large: |
|
283 | if large: | |
284 | lfcommands.debugdirstate(ui, repo) |
|
284 | lfcommands.debugdirstate(ui, repo) | |
285 | else: |
|
285 | else: | |
286 | orig(ui, repo, *pats, **opts) |
|
286 | orig(ui, repo, *pats, **opts) | |
287 |
|
287 | |||
288 | # Override needs to refresh standins so that update's normal merge |
|
288 | # Override needs to refresh standins so that update's normal merge | |
289 | # will go through properly. Then the other update hook (overriding repo.update) |
|
289 | # will go through properly. Then the other update hook (overriding repo.update) | |
290 | # will get the new files. Filemerge is also overridden so that the merge |
|
290 | # will get the new files. Filemerge is also overridden so that the merge | |
291 | # will merge standins correctly. |
|
291 | # will merge standins correctly. | |
292 | def overrideupdate(orig, ui, repo, *pats, **opts): |
|
292 | def overrideupdate(orig, ui, repo, *pats, **opts): | |
293 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
293 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |
294 | s = lfdirstate.status(match_.always(repo.root, repo.getcwd()), [], False, |
|
294 | s = lfdirstate.status(match_.always(repo.root, repo.getcwd()), [], False, | |
295 | False, False) |
|
295 | False, False) | |
296 | (unsure, modified, added, removed, missing, unknown, ignored, clean) = s |
|
296 | (unsure, modified, added, removed, missing, unknown, ignored, clean) = s | |
297 |
|
297 | |||
298 | # Need to lock between the standins getting updated and their |
|
298 | # Need to lock between the standins getting updated and their | |
299 | # largefiles getting updated |
|
299 | # largefiles getting updated | |
300 | wlock = repo.wlock() |
|
300 | wlock = repo.wlock() | |
301 | try: |
|
301 | try: | |
302 | if opts['check']: |
|
302 | if opts['check']: | |
303 | mod = len(modified) > 0 |
|
303 | mod = len(modified) > 0 | |
304 | for lfile in unsure: |
|
304 | for lfile in unsure: | |
305 | standin = lfutil.standin(lfile) |
|
305 | standin = lfutil.standin(lfile) | |
306 | if repo['.'][standin].data().strip() != \ |
|
306 | if repo['.'][standin].data().strip() != \ | |
307 | lfutil.hashfile(repo.wjoin(lfile)): |
|
307 | lfutil.hashfile(repo.wjoin(lfile)): | |
308 | mod = True |
|
308 | mod = True | |
309 | else: |
|
309 | else: | |
310 | lfdirstate.normal(lfile) |
|
310 | lfdirstate.normal(lfile) | |
311 | lfdirstate.write() |
|
311 | lfdirstate.write() | |
312 | if mod: |
|
312 | if mod: | |
313 | raise util.Abort(_('uncommitted local changes')) |
|
313 | raise util.Abort(_('uncommitted local changes')) | |
314 | # XXX handle removed differently |
|
314 | # XXX handle removed differently | |
315 | if not opts['clean']: |
|
315 | if not opts['clean']: | |
316 | for lfile in unsure + modified + added: |
|
316 | for lfile in unsure + modified + added: | |
317 | lfutil.updatestandin(repo, lfutil.standin(lfile)) |
|
317 | lfutil.updatestandin(repo, lfutil.standin(lfile)) | |
318 | finally: |
|
318 | finally: | |
319 | wlock.release() |
|
319 | wlock.release() | |
320 | return orig(ui, repo, *pats, **opts) |
|
320 | return orig(ui, repo, *pats, **opts) | |
321 |
|
321 | |||
322 | # Before starting the manifest merge, merge.updates will call |
|
322 | # Before starting the manifest merge, merge.updates will call | |
323 | # _checkunknown to check if there are any files in the merged-in |
|
323 | # _checkunknown to check if there are any files in the merged-in | |
324 | # changeset that collide with unknown files in the working copy. |
|
324 | # changeset that collide with unknown files in the working copy. | |
325 | # |
|
325 | # | |
326 | # The largefiles are seen as unknown, so this prevents us from merging |
|
326 | # The largefiles are seen as unknown, so this prevents us from merging | |
327 | # in a file 'foo' if we already have a largefile with the same name. |
|
327 | # in a file 'foo' if we already have a largefile with the same name. | |
328 | # |
|
328 | # | |
329 | # The overridden function filters the unknown files by removing any |
|
329 | # The overridden function filters the unknown files by removing any | |
330 | # largefiles. This makes the merge proceed and we can then handle this |
|
330 | # largefiles. This makes the merge proceed and we can then handle this | |
331 | # case further in the overridden manifestmerge function below. |
|
331 | # case further in the overridden manifestmerge function below. | |
332 | def overridecheckunknownfile(origfn, repo, wctx, mctx, f): |
|
332 | def overridecheckunknownfile(origfn, repo, wctx, mctx, f): | |
333 | if lfutil.standin(f) in wctx: |
|
333 | if lfutil.standin(f) in wctx: | |
334 | return False |
|
334 | return False | |
335 | return origfn(repo, wctx, mctx, f) |
|
335 | return origfn(repo, wctx, mctx, f) | |
336 |
|
336 | |||
337 | # The manifest merge handles conflicts on the manifest level. We want |
|
337 | # The manifest merge handles conflicts on the manifest level. We want | |
338 | # to handle changes in largefile-ness of files at this level too. |
|
338 | # to handle changes in largefile-ness of files at this level too. | |
339 | # |
|
339 | # | |
340 | # The strategy is to run the original manifestmerge and then process |
|
340 | # The strategy is to run the original manifestmerge and then process | |
341 | # the action list it outputs. There are two cases we need to deal with: |
|
341 | # the action list it outputs. There are two cases we need to deal with: | |
342 | # |
|
342 | # | |
343 | # 1. Normal file in p1, largefile in p2. Here the largefile is |
|
343 | # 1. Normal file in p1, largefile in p2. Here the largefile is | |
344 | # detected via its standin file, which will enter the working copy |
|
344 | # detected via its standin file, which will enter the working copy | |
345 | # with a "get" action. It is not "merge" since the standin is all |
|
345 | # with a "get" action. It is not "merge" since the standin is all | |
346 | # Mercurial is concerned with at this level -- the link to the |
|
346 | # Mercurial is concerned with at this level -- the link to the | |
347 | # existing normal file is not relevant here. |
|
347 | # existing normal file is not relevant here. | |
348 | # |
|
348 | # | |
349 | # 2. Largefile in p1, normal file in p2. Here we get a "merge" action |
|
349 | # 2. Largefile in p1, normal file in p2. Here we get a "merge" action | |
350 | # since the largefile will be present in the working copy and |
|
350 | # since the largefile will be present in the working copy and | |
351 | # different from the normal file in p2. Mercurial therefore |
|
351 | # different from the normal file in p2. Mercurial therefore | |
352 | # triggers a merge action. |
|
352 | # triggers a merge action. | |
353 | # |
|
353 | # | |
354 | # In both cases, we prompt the user and emit new actions to either |
|
354 | # In both cases, we prompt the user and emit new actions to either | |
355 | # remove the standin (if the normal file was kept) or to remove the |
|
355 | # remove the standin (if the normal file was kept) or to remove the | |
356 | # normal file and get the standin (if the largefile was kept). The |
|
356 | # normal file and get the standin (if the largefile was kept). The | |
357 | # default prompt answer is to use the largefile version since it was |
|
357 | # default prompt answer is to use the largefile version since it was | |
358 | # presumably changed on purpose. |
|
358 | # presumably changed on purpose. | |
359 | # |
|
359 | # | |
360 | # Finally, the merge.applyupdates function will then take care of |
|
360 | # Finally, the merge.applyupdates function will then take care of | |
361 | # writing the files into the working copy and lfcommands.updatelfiles |
|
361 | # writing the files into the working copy and lfcommands.updatelfiles | |
362 | # will update the largefiles. |
|
362 | # will update the largefiles. | |
363 |
def overridemanifestmerge(origfn, repo, p1, p2, pa, |
|
363 | def overridemanifestmerge(origfn, repo, p1, p2, pa, branchmerge, force, | |
364 | actions = origfn(repo, p1, p2, pa, overwrite, partial) |
|
364 | partial): | |
|
365 | overwrite = force and not branchmerge | |||
|
366 | actions = origfn(repo, p1, p2, pa, branchmerge, force, partial) | |||
365 | processed = [] |
|
367 | processed = [] | |
366 |
|
368 | |||
367 | for action in actions: |
|
369 | for action in actions: | |
368 | if overwrite: |
|
370 | if overwrite: | |
369 | processed.append(action) |
|
371 | processed.append(action) | |
370 | continue |
|
372 | continue | |
371 | f, m, args, msg = action |
|
373 | f, m, args, msg = action | |
372 |
|
374 | |||
373 | choices = (_('&Largefile'), _('&Normal file')) |
|
375 | choices = (_('&Largefile'), _('&Normal file')) | |
374 | if m == "g" and lfutil.splitstandin(f) in p1 and f in p2: |
|
376 | if m == "g" and lfutil.splitstandin(f) in p1 and f in p2: | |
375 | # Case 1: normal file in the working copy, largefile in |
|
377 | # Case 1: normal file in the working copy, largefile in | |
376 | # the second parent |
|
378 | # the second parent | |
377 | lfile = lfutil.splitstandin(f) |
|
379 | lfile = lfutil.splitstandin(f) | |
378 | standin = f |
|
380 | standin = f | |
379 | msg = _('%s has been turned into a largefile\n' |
|
381 | msg = _('%s has been turned into a largefile\n' | |
380 | 'use (l)argefile or keep as (n)ormal file?') % lfile |
|
382 | 'use (l)argefile or keep as (n)ormal file?') % lfile | |
381 | if repo.ui.promptchoice(msg, choices, 0) == 0: |
|
383 | if repo.ui.promptchoice(msg, choices, 0) == 0: | |
382 | processed.append((lfile, "r", None, msg)) |
|
384 | processed.append((lfile, "r", None, msg)) | |
383 | processed.append((standin, "g", (p2.flags(standin),), msg)) |
|
385 | processed.append((standin, "g", (p2.flags(standin),), msg)) | |
384 | else: |
|
386 | else: | |
385 | processed.append((standin, "r", None, msg)) |
|
387 | processed.append((standin, "r", None, msg)) | |
386 | elif m == "g" and lfutil.standin(f) in p1 and f in p2: |
|
388 | elif m == "g" and lfutil.standin(f) in p1 and f in p2: | |
387 | # Case 2: largefile in the working copy, normal file in |
|
389 | # Case 2: largefile in the working copy, normal file in | |
388 | # the second parent |
|
390 | # the second parent | |
389 | standin = lfutil.standin(f) |
|
391 | standin = lfutil.standin(f) | |
390 | lfile = f |
|
392 | lfile = f | |
391 | msg = _('%s has been turned into a normal file\n' |
|
393 | msg = _('%s has been turned into a normal file\n' | |
392 | 'keep as (l)argefile or use (n)ormal file?') % lfile |
|
394 | 'keep as (l)argefile or use (n)ormal file?') % lfile | |
393 | if repo.ui.promptchoice(msg, choices, 0) == 0: |
|
395 | if repo.ui.promptchoice(msg, choices, 0) == 0: | |
394 | processed.append((lfile, "r", None, msg)) |
|
396 | processed.append((lfile, "r", None, msg)) | |
395 | else: |
|
397 | else: | |
396 | processed.append((standin, "r", None, msg)) |
|
398 | processed.append((standin, "r", None, msg)) | |
397 | processed.append((lfile, "g", (p2.flags(lfile),), msg)) |
|
399 | processed.append((lfile, "g", (p2.flags(lfile),), msg)) | |
398 | else: |
|
400 | else: | |
399 | processed.append(action) |
|
401 | processed.append(action) | |
400 |
|
402 | |||
401 | return processed |
|
403 | return processed | |
402 |
|
404 | |||
403 | # Override filemerge to prompt the user about how they wish to merge |
|
405 | # Override filemerge to prompt the user about how they wish to merge | |
404 | # largefiles. This will handle identical edits, and copy/rename + |
|
406 | # largefiles. This will handle identical edits, and copy/rename + | |
405 | # edit without prompting the user. |
|
407 | # edit without prompting the user. | |
406 | def overridefilemerge(origfn, repo, mynode, orig, fcd, fco, fca): |
|
408 | def overridefilemerge(origfn, repo, mynode, orig, fcd, fco, fca): | |
407 | # Use better variable names here. Because this is a wrapper we cannot |
|
409 | # Use better variable names here. Because this is a wrapper we cannot | |
408 | # change the variable names in the function declaration. |
|
410 | # change the variable names in the function declaration. | |
409 | fcdest, fcother, fcancestor = fcd, fco, fca |
|
411 | fcdest, fcother, fcancestor = fcd, fco, fca | |
410 | if not lfutil.isstandin(orig): |
|
412 | if not lfutil.isstandin(orig): | |
411 | return origfn(repo, mynode, orig, fcdest, fcother, fcancestor) |
|
413 | return origfn(repo, mynode, orig, fcdest, fcother, fcancestor) | |
412 | else: |
|
414 | else: | |
413 | if not fcother.cmp(fcdest): # files identical? |
|
415 | if not fcother.cmp(fcdest): # files identical? | |
414 | return None |
|
416 | return None | |
415 |
|
417 | |||
416 | # backwards, use working dir parent as ancestor |
|
418 | # backwards, use working dir parent as ancestor | |
417 | if fcancestor == fcother: |
|
419 | if fcancestor == fcother: | |
418 | fcancestor = fcdest.parents()[0] |
|
420 | fcancestor = fcdest.parents()[0] | |
419 |
|
421 | |||
420 | if orig != fcother.path(): |
|
422 | if orig != fcother.path(): | |
421 | repo.ui.status(_('merging %s and %s to %s\n') |
|
423 | repo.ui.status(_('merging %s and %s to %s\n') | |
422 | % (lfutil.splitstandin(orig), |
|
424 | % (lfutil.splitstandin(orig), | |
423 | lfutil.splitstandin(fcother.path()), |
|
425 | lfutil.splitstandin(fcother.path()), | |
424 | lfutil.splitstandin(fcdest.path()))) |
|
426 | lfutil.splitstandin(fcdest.path()))) | |
425 | else: |
|
427 | else: | |
426 | repo.ui.status(_('merging %s\n') |
|
428 | repo.ui.status(_('merging %s\n') | |
427 | % lfutil.splitstandin(fcdest.path())) |
|
429 | % lfutil.splitstandin(fcdest.path())) | |
428 |
|
430 | |||
429 | if fcancestor.path() != fcother.path() and fcother.data() == \ |
|
431 | if fcancestor.path() != fcother.path() and fcother.data() == \ | |
430 | fcancestor.data(): |
|
432 | fcancestor.data(): | |
431 | return 0 |
|
433 | return 0 | |
432 | if fcancestor.path() != fcdest.path() and fcdest.data() == \ |
|
434 | if fcancestor.path() != fcdest.path() and fcdest.data() == \ | |
433 | fcancestor.data(): |
|
435 | fcancestor.data(): | |
434 | repo.wwrite(fcdest.path(), fcother.data(), fcother.flags()) |
|
436 | repo.wwrite(fcdest.path(), fcother.data(), fcother.flags()) | |
435 | return 0 |
|
437 | return 0 | |
436 |
|
438 | |||
437 | if repo.ui.promptchoice(_('largefile %s has a merge conflict\n' |
|
439 | if repo.ui.promptchoice(_('largefile %s has a merge conflict\n' | |
438 | 'keep (l)ocal or take (o)ther?') % |
|
440 | 'keep (l)ocal or take (o)ther?') % | |
439 | lfutil.splitstandin(orig), |
|
441 | lfutil.splitstandin(orig), | |
440 | (_('&Local'), _('&Other')), 0) == 0: |
|
442 | (_('&Local'), _('&Other')), 0) == 0: | |
441 | return 0 |
|
443 | return 0 | |
442 | else: |
|
444 | else: | |
443 | repo.wwrite(fcdest.path(), fcother.data(), fcother.flags()) |
|
445 | repo.wwrite(fcdest.path(), fcother.data(), fcother.flags()) | |
444 | return 0 |
|
446 | return 0 | |
445 |
|
447 | |||
446 | # Copy first changes the matchers to match standins instead of |
|
448 | # Copy first changes the matchers to match standins instead of | |
447 | # largefiles. Then it overrides util.copyfile in that function it |
|
449 | # largefiles. Then it overrides util.copyfile in that function it | |
448 | # checks if the destination largefile already exists. It also keeps a |
|
450 | # checks if the destination largefile already exists. It also keeps a | |
449 | # list of copied files so that the largefiles can be copied and the |
|
451 | # list of copied files so that the largefiles can be copied and the | |
450 | # dirstate updated. |
|
452 | # dirstate updated. | |
451 | def overridecopy(orig, ui, repo, pats, opts, rename=False): |
|
453 | def overridecopy(orig, ui, repo, pats, opts, rename=False): | |
452 | # doesn't remove largefile on rename |
|
454 | # doesn't remove largefile on rename | |
453 | if len(pats) < 2: |
|
455 | if len(pats) < 2: | |
454 | # this isn't legal, let the original function deal with it |
|
456 | # this isn't legal, let the original function deal with it | |
455 | return orig(ui, repo, pats, opts, rename) |
|
457 | return orig(ui, repo, pats, opts, rename) | |
456 |
|
458 | |||
457 | def makestandin(relpath): |
|
459 | def makestandin(relpath): | |
458 | path = scmutil.canonpath(repo.root, repo.getcwd(), relpath) |
|
460 | path = scmutil.canonpath(repo.root, repo.getcwd(), relpath) | |
459 | return os.path.join(repo.wjoin(lfutil.standin(path))) |
|
461 | return os.path.join(repo.wjoin(lfutil.standin(path))) | |
460 |
|
462 | |||
461 | fullpats = scmutil.expandpats(pats) |
|
463 | fullpats = scmutil.expandpats(pats) | |
462 | dest = fullpats[-1] |
|
464 | dest = fullpats[-1] | |
463 |
|
465 | |||
464 | if os.path.isdir(dest): |
|
466 | if os.path.isdir(dest): | |
465 | if not os.path.isdir(makestandin(dest)): |
|
467 | if not os.path.isdir(makestandin(dest)): | |
466 | os.makedirs(makestandin(dest)) |
|
468 | os.makedirs(makestandin(dest)) | |
467 | # This could copy both lfiles and normal files in one command, |
|
469 | # This could copy both lfiles and normal files in one command, | |
468 | # but we don't want to do that. First replace their matcher to |
|
470 | # but we don't want to do that. First replace their matcher to | |
469 | # only match normal files and run it, then replace it to just |
|
471 | # only match normal files and run it, then replace it to just | |
470 | # match largefiles and run it again. |
|
472 | # match largefiles and run it again. | |
471 | nonormalfiles = False |
|
473 | nonormalfiles = False | |
472 | nolfiles = False |
|
474 | nolfiles = False | |
473 | try: |
|
475 | try: | |
474 | try: |
|
476 | try: | |
475 | installnormalfilesmatchfn(repo[None].manifest()) |
|
477 | installnormalfilesmatchfn(repo[None].manifest()) | |
476 | result = orig(ui, repo, pats, opts, rename) |
|
478 | result = orig(ui, repo, pats, opts, rename) | |
477 | except util.Abort, e: |
|
479 | except util.Abort, e: | |
478 | if str(e) != _('no files to copy'): |
|
480 | if str(e) != _('no files to copy'): | |
479 | raise e |
|
481 | raise e | |
480 | else: |
|
482 | else: | |
481 | nonormalfiles = True |
|
483 | nonormalfiles = True | |
482 | result = 0 |
|
484 | result = 0 | |
483 | finally: |
|
485 | finally: | |
484 | restorematchfn() |
|
486 | restorematchfn() | |
485 |
|
487 | |||
486 | # The first rename can cause our current working directory to be removed. |
|
488 | # The first rename can cause our current working directory to be removed. | |
487 | # In that case there is nothing left to copy/rename so just quit. |
|
489 | # In that case there is nothing left to copy/rename so just quit. | |
488 | try: |
|
490 | try: | |
489 | repo.getcwd() |
|
491 | repo.getcwd() | |
490 | except OSError: |
|
492 | except OSError: | |
491 | return result |
|
493 | return result | |
492 |
|
494 | |||
493 | try: |
|
495 | try: | |
494 | try: |
|
496 | try: | |
495 | # When we call orig below it creates the standins but we don't add |
|
497 | # When we call orig below it creates the standins but we don't add | |
496 | # them to the dir state until later so lock during that time. |
|
498 | # them to the dir state until later so lock during that time. | |
497 | wlock = repo.wlock() |
|
499 | wlock = repo.wlock() | |
498 |
|
500 | |||
499 | manifest = repo[None].manifest() |
|
501 | manifest = repo[None].manifest() | |
500 | oldmatch = None # for the closure |
|
502 | oldmatch = None # for the closure | |
501 | def overridematch(ctx, pats=[], opts={}, globbed=False, |
|
503 | def overridematch(ctx, pats=[], opts={}, globbed=False, | |
502 | default='relpath'): |
|
504 | default='relpath'): | |
503 | newpats = [] |
|
505 | newpats = [] | |
504 | # The patterns were previously mangled to add the standin |
|
506 | # The patterns were previously mangled to add the standin | |
505 | # directory; we need to remove that now |
|
507 | # directory; we need to remove that now | |
506 | for pat in pats: |
|
508 | for pat in pats: | |
507 | if match_.patkind(pat) is None and lfutil.shortname in pat: |
|
509 | if match_.patkind(pat) is None and lfutil.shortname in pat: | |
508 | newpats.append(pat.replace(lfutil.shortname, '')) |
|
510 | newpats.append(pat.replace(lfutil.shortname, '')) | |
509 | else: |
|
511 | else: | |
510 | newpats.append(pat) |
|
512 | newpats.append(pat) | |
511 | match = oldmatch(ctx, newpats, opts, globbed, default) |
|
513 | match = oldmatch(ctx, newpats, opts, globbed, default) | |
512 | m = copy.copy(match) |
|
514 | m = copy.copy(match) | |
513 | lfile = lambda f: lfutil.standin(f) in manifest |
|
515 | lfile = lambda f: lfutil.standin(f) in manifest | |
514 | m._files = [lfutil.standin(f) for f in m._files if lfile(f)] |
|
516 | m._files = [lfutil.standin(f) for f in m._files if lfile(f)] | |
515 | m._fmap = set(m._files) |
|
517 | m._fmap = set(m._files) | |
516 | origmatchfn = m.matchfn |
|
518 | origmatchfn = m.matchfn | |
517 | m.matchfn = lambda f: (lfutil.isstandin(f) and |
|
519 | m.matchfn = lambda f: (lfutil.isstandin(f) and | |
518 | (f in manifest) and |
|
520 | (f in manifest) and | |
519 | origmatchfn(lfutil.splitstandin(f)) or |
|
521 | origmatchfn(lfutil.splitstandin(f)) or | |
520 | None) |
|
522 | None) | |
521 | return m |
|
523 | return m | |
522 | oldmatch = installmatchfn(overridematch) |
|
524 | oldmatch = installmatchfn(overridematch) | |
523 | listpats = [] |
|
525 | listpats = [] | |
524 | for pat in pats: |
|
526 | for pat in pats: | |
525 | if match_.patkind(pat) is not None: |
|
527 | if match_.patkind(pat) is not None: | |
526 | listpats.append(pat) |
|
528 | listpats.append(pat) | |
527 | else: |
|
529 | else: | |
528 | listpats.append(makestandin(pat)) |
|
530 | listpats.append(makestandin(pat)) | |
529 |
|
531 | |||
530 | try: |
|
532 | try: | |
531 | origcopyfile = util.copyfile |
|
533 | origcopyfile = util.copyfile | |
532 | copiedfiles = [] |
|
534 | copiedfiles = [] | |
533 | def overridecopyfile(src, dest): |
|
535 | def overridecopyfile(src, dest): | |
534 | if (lfutil.shortname in src and |
|
536 | if (lfutil.shortname in src and | |
535 | dest.startswith(repo.wjoin(lfutil.shortname))): |
|
537 | dest.startswith(repo.wjoin(lfutil.shortname))): | |
536 | destlfile = dest.replace(lfutil.shortname, '') |
|
538 | destlfile = dest.replace(lfutil.shortname, '') | |
537 | if not opts['force'] and os.path.exists(destlfile): |
|
539 | if not opts['force'] and os.path.exists(destlfile): | |
538 | raise IOError('', |
|
540 | raise IOError('', | |
539 | _('destination largefile already exists')) |
|
541 | _('destination largefile already exists')) | |
540 | copiedfiles.append((src, dest)) |
|
542 | copiedfiles.append((src, dest)) | |
541 | origcopyfile(src, dest) |
|
543 | origcopyfile(src, dest) | |
542 |
|
544 | |||
543 | util.copyfile = overridecopyfile |
|
545 | util.copyfile = overridecopyfile | |
544 | result += orig(ui, repo, listpats, opts, rename) |
|
546 | result += orig(ui, repo, listpats, opts, rename) | |
545 | finally: |
|
547 | finally: | |
546 | util.copyfile = origcopyfile |
|
548 | util.copyfile = origcopyfile | |
547 |
|
549 | |||
548 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
550 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |
549 | for (src, dest) in copiedfiles: |
|
551 | for (src, dest) in copiedfiles: | |
550 | if (lfutil.shortname in src and |
|
552 | if (lfutil.shortname in src and | |
551 | dest.startswith(repo.wjoin(lfutil.shortname))): |
|
553 | dest.startswith(repo.wjoin(lfutil.shortname))): | |
552 | srclfile = src.replace(repo.wjoin(lfutil.standin('')), '') |
|
554 | srclfile = src.replace(repo.wjoin(lfutil.standin('')), '') | |
553 | destlfile = dest.replace(repo.wjoin(lfutil.standin('')), '') |
|
555 | destlfile = dest.replace(repo.wjoin(lfutil.standin('')), '') | |
554 | destlfiledir = os.path.dirname(repo.wjoin(destlfile)) or '.' |
|
556 | destlfiledir = os.path.dirname(repo.wjoin(destlfile)) or '.' | |
555 | if not os.path.isdir(destlfiledir): |
|
557 | if not os.path.isdir(destlfiledir): | |
556 | os.makedirs(destlfiledir) |
|
558 | os.makedirs(destlfiledir) | |
557 | if rename: |
|
559 | if rename: | |
558 | os.rename(repo.wjoin(srclfile), repo.wjoin(destlfile)) |
|
560 | os.rename(repo.wjoin(srclfile), repo.wjoin(destlfile)) | |
559 | lfdirstate.remove(srclfile) |
|
561 | lfdirstate.remove(srclfile) | |
560 | else: |
|
562 | else: | |
561 | util.copyfile(repo.wjoin(srclfile), |
|
563 | util.copyfile(repo.wjoin(srclfile), | |
562 | repo.wjoin(destlfile)) |
|
564 | repo.wjoin(destlfile)) | |
563 |
|
565 | |||
564 | lfdirstate.add(destlfile) |
|
566 | lfdirstate.add(destlfile) | |
565 | lfdirstate.write() |
|
567 | lfdirstate.write() | |
566 | except util.Abort, e: |
|
568 | except util.Abort, e: | |
567 | if str(e) != _('no files to copy'): |
|
569 | if str(e) != _('no files to copy'): | |
568 | raise e |
|
570 | raise e | |
569 | else: |
|
571 | else: | |
570 | nolfiles = True |
|
572 | nolfiles = True | |
571 | finally: |
|
573 | finally: | |
572 | restorematchfn() |
|
574 | restorematchfn() | |
573 | wlock.release() |
|
575 | wlock.release() | |
574 |
|
576 | |||
575 | if nolfiles and nonormalfiles: |
|
577 | if nolfiles and nonormalfiles: | |
576 | raise util.Abort(_('no files to copy')) |
|
578 | raise util.Abort(_('no files to copy')) | |
577 |
|
579 | |||
578 | return result |
|
580 | return result | |
579 |
|
581 | |||
580 | # When the user calls revert, we have to be careful to not revert any |
|
582 | # When the user calls revert, we have to be careful to not revert any | |
581 | # changes to other largefiles accidentally. This means we have to keep |
|
583 | # changes to other largefiles accidentally. This means we have to keep | |
582 | # track of the largefiles that are being reverted so we only pull down |
|
584 | # track of the largefiles that are being reverted so we only pull down | |
583 | # the necessary largefiles. |
|
585 | # the necessary largefiles. | |
584 | # |
|
586 | # | |
585 | # Standins are only updated (to match the hash of largefiles) before |
|
587 | # Standins are only updated (to match the hash of largefiles) before | |
586 | # commits. Update the standins then run the original revert, changing |
|
588 | # commits. Update the standins then run the original revert, changing | |
587 | # the matcher to hit standins instead of largefiles. Based on the |
|
589 | # the matcher to hit standins instead of largefiles. Based on the | |
588 | # resulting standins update the largefiles. Then return the standins |
|
590 | # resulting standins update the largefiles. Then return the standins | |
589 | # to their proper state |
|
591 | # to their proper state | |
590 | def overriderevert(orig, ui, repo, *pats, **opts): |
|
592 | def overriderevert(orig, ui, repo, *pats, **opts): | |
591 | # Because we put the standins in a bad state (by updating them) |
|
593 | # Because we put the standins in a bad state (by updating them) | |
592 | # and then return them to a correct state we need to lock to |
|
594 | # and then return them to a correct state we need to lock to | |
593 | # prevent others from changing them in their incorrect state. |
|
595 | # prevent others from changing them in their incorrect state. | |
594 | wlock = repo.wlock() |
|
596 | wlock = repo.wlock() | |
595 | try: |
|
597 | try: | |
596 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
598 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |
597 | (modified, added, removed, missing, unknown, ignored, clean) = \ |
|
599 | (modified, added, removed, missing, unknown, ignored, clean) = \ | |
598 | lfutil.lfdirstatestatus(lfdirstate, repo, repo['.'].rev()) |
|
600 | lfutil.lfdirstatestatus(lfdirstate, repo, repo['.'].rev()) | |
599 | lfdirstate.write() |
|
601 | lfdirstate.write() | |
600 | for lfile in modified: |
|
602 | for lfile in modified: | |
601 | lfutil.updatestandin(repo, lfutil.standin(lfile)) |
|
603 | lfutil.updatestandin(repo, lfutil.standin(lfile)) | |
602 | for lfile in missing: |
|
604 | for lfile in missing: | |
603 | if (os.path.exists(repo.wjoin(lfutil.standin(lfile)))): |
|
605 | if (os.path.exists(repo.wjoin(lfutil.standin(lfile)))): | |
604 | os.unlink(repo.wjoin(lfutil.standin(lfile))) |
|
606 | os.unlink(repo.wjoin(lfutil.standin(lfile))) | |
605 |
|
607 | |||
606 | try: |
|
608 | try: | |
607 | ctx = scmutil.revsingle(repo, opts.get('rev')) |
|
609 | ctx = scmutil.revsingle(repo, opts.get('rev')) | |
608 | oldmatch = None # for the closure |
|
610 | oldmatch = None # for the closure | |
609 | def overridematch(ctx, pats=[], opts={}, globbed=False, |
|
611 | def overridematch(ctx, pats=[], opts={}, globbed=False, | |
610 | default='relpath'): |
|
612 | default='relpath'): | |
611 | match = oldmatch(ctx, pats, opts, globbed, default) |
|
613 | match = oldmatch(ctx, pats, opts, globbed, default) | |
612 | m = copy.copy(match) |
|
614 | m = copy.copy(match) | |
613 | def tostandin(f): |
|
615 | def tostandin(f): | |
614 | if lfutil.standin(f) in ctx: |
|
616 | if lfutil.standin(f) in ctx: | |
615 | return lfutil.standin(f) |
|
617 | return lfutil.standin(f) | |
616 | elif lfutil.standin(f) in repo[None]: |
|
618 | elif lfutil.standin(f) in repo[None]: | |
617 | return None |
|
619 | return None | |
618 | return f |
|
620 | return f | |
619 | m._files = [tostandin(f) for f in m._files] |
|
621 | m._files = [tostandin(f) for f in m._files] | |
620 | m._files = [f for f in m._files if f is not None] |
|
622 | m._files = [f for f in m._files if f is not None] | |
621 | m._fmap = set(m._files) |
|
623 | m._fmap = set(m._files) | |
622 | origmatchfn = m.matchfn |
|
624 | origmatchfn = m.matchfn | |
623 | def matchfn(f): |
|
625 | def matchfn(f): | |
624 | if lfutil.isstandin(f): |
|
626 | if lfutil.isstandin(f): | |
625 | # We need to keep track of what largefiles are being |
|
627 | # We need to keep track of what largefiles are being | |
626 | # matched so we know which ones to update later -- |
|
628 | # matched so we know which ones to update later -- | |
627 | # otherwise we accidentally revert changes to other |
|
629 | # otherwise we accidentally revert changes to other | |
628 | # largefiles. This is repo-specific, so duckpunch the |
|
630 | # largefiles. This is repo-specific, so duckpunch the | |
629 | # repo object to keep the list of largefiles for us |
|
631 | # repo object to keep the list of largefiles for us | |
630 | # later. |
|
632 | # later. | |
631 | if origmatchfn(lfutil.splitstandin(f)) and \ |
|
633 | if origmatchfn(lfutil.splitstandin(f)) and \ | |
632 | (f in repo[None] or f in ctx): |
|
634 | (f in repo[None] or f in ctx): | |
633 | lfileslist = getattr(repo, '_lfilestoupdate', []) |
|
635 | lfileslist = getattr(repo, '_lfilestoupdate', []) | |
634 | lfileslist.append(lfutil.splitstandin(f)) |
|
636 | lfileslist.append(lfutil.splitstandin(f)) | |
635 | repo._lfilestoupdate = lfileslist |
|
637 | repo._lfilestoupdate = lfileslist | |
636 | return True |
|
638 | return True | |
637 | else: |
|
639 | else: | |
638 | return False |
|
640 | return False | |
639 | return origmatchfn(f) |
|
641 | return origmatchfn(f) | |
640 | m.matchfn = matchfn |
|
642 | m.matchfn = matchfn | |
641 | return m |
|
643 | return m | |
642 | oldmatch = installmatchfn(overridematch) |
|
644 | oldmatch = installmatchfn(overridematch) | |
643 | scmutil.match |
|
645 | scmutil.match | |
644 | matches = overridematch(repo[None], pats, opts) |
|
646 | matches = overridematch(repo[None], pats, opts) | |
645 | orig(ui, repo, *pats, **opts) |
|
647 | orig(ui, repo, *pats, **opts) | |
646 | finally: |
|
648 | finally: | |
647 | restorematchfn() |
|
649 | restorematchfn() | |
648 | lfileslist = getattr(repo, '_lfilestoupdate', []) |
|
650 | lfileslist = getattr(repo, '_lfilestoupdate', []) | |
649 | lfcommands.updatelfiles(ui, repo, filelist=lfileslist, |
|
651 | lfcommands.updatelfiles(ui, repo, filelist=lfileslist, | |
650 | printmessage=False) |
|
652 | printmessage=False) | |
651 |
|
653 | |||
652 | # empty out the largefiles list so we start fresh next time |
|
654 | # empty out the largefiles list so we start fresh next time | |
653 | repo._lfilestoupdate = [] |
|
655 | repo._lfilestoupdate = [] | |
654 | for lfile in modified: |
|
656 | for lfile in modified: | |
655 | if lfile in lfileslist: |
|
657 | if lfile in lfileslist: | |
656 | if os.path.exists(repo.wjoin(lfutil.standin(lfile))) and lfile\ |
|
658 | if os.path.exists(repo.wjoin(lfutil.standin(lfile))) and lfile\ | |
657 | in repo['.']: |
|
659 | in repo['.']: | |
658 | lfutil.writestandin(repo, lfutil.standin(lfile), |
|
660 | lfutil.writestandin(repo, lfutil.standin(lfile), | |
659 | repo['.'][lfile].data().strip(), |
|
661 | repo['.'][lfile].data().strip(), | |
660 | 'x' in repo['.'][lfile].flags()) |
|
662 | 'x' in repo['.'][lfile].flags()) | |
661 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
663 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |
662 | for lfile in added: |
|
664 | for lfile in added: | |
663 | standin = lfutil.standin(lfile) |
|
665 | standin = lfutil.standin(lfile) | |
664 | if standin not in ctx and (standin in matches or opts.get('all')): |
|
666 | if standin not in ctx and (standin in matches or opts.get('all')): | |
665 | if lfile in lfdirstate: |
|
667 | if lfile in lfdirstate: | |
666 | lfdirstate.drop(lfile) |
|
668 | lfdirstate.drop(lfile) | |
667 | util.unlinkpath(repo.wjoin(standin)) |
|
669 | util.unlinkpath(repo.wjoin(standin)) | |
668 | lfdirstate.write() |
|
670 | lfdirstate.write() | |
669 | finally: |
|
671 | finally: | |
670 | wlock.release() |
|
672 | wlock.release() | |
671 |
|
673 | |||
672 | def hgupdaterepo(orig, repo, node, overwrite): |
|
674 | def hgupdaterepo(orig, repo, node, overwrite): | |
673 | if not overwrite: |
|
675 | if not overwrite: | |
674 | # Only call updatelfiles on the standins that have changed to save time |
|
676 | # Only call updatelfiles on the standins that have changed to save time | |
675 | oldstandins = lfutil.getstandinsstate(repo) |
|
677 | oldstandins = lfutil.getstandinsstate(repo) | |
676 |
|
678 | |||
677 | result = orig(repo, node, overwrite) |
|
679 | result = orig(repo, node, overwrite) | |
678 |
|
680 | |||
679 | filelist = None |
|
681 | filelist = None | |
680 | if not overwrite: |
|
682 | if not overwrite: | |
681 | newstandins = lfutil.getstandinsstate(repo) |
|
683 | newstandins = lfutil.getstandinsstate(repo) | |
682 | filelist = lfutil.getlfilestoupdate(oldstandins, newstandins) |
|
684 | filelist = lfutil.getlfilestoupdate(oldstandins, newstandins) | |
683 | lfcommands.updatelfiles(repo.ui, repo, filelist=filelist) |
|
685 | lfcommands.updatelfiles(repo.ui, repo, filelist=filelist) | |
684 | return result |
|
686 | return result | |
685 |
|
687 | |||
686 | def hgmerge(orig, repo, node, force=None, remind=True): |
|
688 | def hgmerge(orig, repo, node, force=None, remind=True): | |
687 | # Mark the repo as being in the middle of a merge, so that |
|
689 | # Mark the repo as being in the middle of a merge, so that | |
688 | # updatelfiles() will know that it needs to trust the standins in |
|
690 | # updatelfiles() will know that it needs to trust the standins in | |
689 | # the working copy, not in the standins in the current node |
|
691 | # the working copy, not in the standins in the current node | |
690 | repo._ismerging = True |
|
692 | repo._ismerging = True | |
691 | try: |
|
693 | try: | |
692 | result = orig(repo, node, force, remind) |
|
694 | result = orig(repo, node, force, remind) | |
693 | lfcommands.updatelfiles(repo.ui, repo) |
|
695 | lfcommands.updatelfiles(repo.ui, repo) | |
694 | finally: |
|
696 | finally: | |
695 | repo._ismerging = False |
|
697 | repo._ismerging = False | |
696 | return result |
|
698 | return result | |
697 |
|
699 | |||
698 | # When we rebase a repository with remotely changed largefiles, we need to |
|
700 | # When we rebase a repository with remotely changed largefiles, we need to | |
699 | # take some extra care so that the largefiles are correctly updated in the |
|
701 | # take some extra care so that the largefiles are correctly updated in the | |
700 | # working copy |
|
702 | # working copy | |
701 | def overridepull(orig, ui, repo, source=None, **opts): |
|
703 | def overridepull(orig, ui, repo, source=None, **opts): | |
702 | revsprepull = len(repo) |
|
704 | revsprepull = len(repo) | |
703 | if opts.get('rebase', False): |
|
705 | if opts.get('rebase', False): | |
704 | repo._isrebasing = True |
|
706 | repo._isrebasing = True | |
705 | try: |
|
707 | try: | |
706 | if opts.get('update'): |
|
708 | if opts.get('update'): | |
707 | del opts['update'] |
|
709 | del opts['update'] | |
708 | ui.debug('--update and --rebase are not compatible, ignoring ' |
|
710 | ui.debug('--update and --rebase are not compatible, ignoring ' | |
709 | 'the update flag\n') |
|
711 | 'the update flag\n') | |
710 | del opts['rebase'] |
|
712 | del opts['rebase'] | |
711 | cmdutil.bailifchanged(repo) |
|
713 | cmdutil.bailifchanged(repo) | |
712 | origpostincoming = commands.postincoming |
|
714 | origpostincoming = commands.postincoming | |
713 | def _dummy(*args, **kwargs): |
|
715 | def _dummy(*args, **kwargs): | |
714 | pass |
|
716 | pass | |
715 | commands.postincoming = _dummy |
|
717 | commands.postincoming = _dummy | |
716 | if not source: |
|
718 | if not source: | |
717 | source = 'default' |
|
719 | source = 'default' | |
718 | repo.lfpullsource = source |
|
720 | repo.lfpullsource = source | |
719 | try: |
|
721 | try: | |
720 | result = commands.pull(ui, repo, source, **opts) |
|
722 | result = commands.pull(ui, repo, source, **opts) | |
721 | finally: |
|
723 | finally: | |
722 | commands.postincoming = origpostincoming |
|
724 | commands.postincoming = origpostincoming | |
723 | revspostpull = len(repo) |
|
725 | revspostpull = len(repo) | |
724 | if revspostpull > revsprepull: |
|
726 | if revspostpull > revsprepull: | |
725 | result = result or rebase.rebase(ui, repo) |
|
727 | result = result or rebase.rebase(ui, repo) | |
726 | finally: |
|
728 | finally: | |
727 | repo._isrebasing = False |
|
729 | repo._isrebasing = False | |
728 | else: |
|
730 | else: | |
729 | if not source: |
|
731 | if not source: | |
730 | source = 'default' |
|
732 | source = 'default' | |
731 | repo.lfpullsource = source |
|
733 | repo.lfpullsource = source | |
732 | oldheads = lfutil.getcurrentheads(repo) |
|
734 | oldheads = lfutil.getcurrentheads(repo) | |
733 | result = orig(ui, repo, source, **opts) |
|
735 | result = orig(ui, repo, source, **opts) | |
734 | # If we do not have the new largefiles for any new heads we pulled, we |
|
736 | # If we do not have the new largefiles for any new heads we pulled, we | |
735 | # will run into a problem later if we try to merge or rebase with one of |
|
737 | # will run into a problem later if we try to merge or rebase with one of | |
736 | # these heads, so cache the largefiles now directly into the system |
|
738 | # these heads, so cache the largefiles now directly into the system | |
737 | # cache. |
|
739 | # cache. | |
738 | numcached = 0 |
|
740 | numcached = 0 | |
739 | heads = lfutil.getcurrentheads(repo) |
|
741 | heads = lfutil.getcurrentheads(repo) | |
740 | newheads = set(heads).difference(set(oldheads)) |
|
742 | newheads = set(heads).difference(set(oldheads)) | |
741 | if len(newheads) > 0: |
|
743 | if len(newheads) > 0: | |
742 | ui.status(_("caching largefiles for %s heads\n" % len(newheads))) |
|
744 | ui.status(_("caching largefiles for %s heads\n" % len(newheads))) | |
743 | for head in newheads: |
|
745 | for head in newheads: | |
744 | (cached, missing) = lfcommands.cachelfiles(ui, repo, head) |
|
746 | (cached, missing) = lfcommands.cachelfiles(ui, repo, head) | |
745 | numcached += len(cached) |
|
747 | numcached += len(cached) | |
746 | ui.status(_("%d largefiles cached\n") % numcached) |
|
748 | ui.status(_("%d largefiles cached\n") % numcached) | |
747 | if opts.get('all_largefiles'): |
|
749 | if opts.get('all_largefiles'): | |
748 | revspostpull = len(repo) |
|
750 | revspostpull = len(repo) | |
749 | revs = [] |
|
751 | revs = [] | |
750 | for rev in xrange(revsprepull + 1, revspostpull): |
|
752 | for rev in xrange(revsprepull + 1, revspostpull): | |
751 | revs.append(repo[rev].rev()) |
|
753 | revs.append(repo[rev].rev()) | |
752 | lfcommands.downloadlfiles(ui, repo, revs) |
|
754 | lfcommands.downloadlfiles(ui, repo, revs) | |
753 | return result |
|
755 | return result | |
754 |
|
756 | |||
755 | def overrideclone(orig, ui, source, dest=None, **opts): |
|
757 | def overrideclone(orig, ui, source, dest=None, **opts): | |
756 | d = dest |
|
758 | d = dest | |
757 | if d is None: |
|
759 | if d is None: | |
758 | d = hg.defaultdest(source) |
|
760 | d = hg.defaultdest(source) | |
759 | if opts.get('all_largefiles') and not hg.islocal(d): |
|
761 | if opts.get('all_largefiles') and not hg.islocal(d): | |
760 | raise util.Abort(_( |
|
762 | raise util.Abort(_( | |
761 | '--all-largefiles is incompatible with non-local destination %s' % |
|
763 | '--all-largefiles is incompatible with non-local destination %s' % | |
762 | d)) |
|
764 | d)) | |
763 |
|
765 | |||
764 | return orig(ui, source, dest, **opts) |
|
766 | return orig(ui, source, dest, **opts) | |
765 |
|
767 | |||
766 | def hgclone(orig, ui, opts, *args, **kwargs): |
|
768 | def hgclone(orig, ui, opts, *args, **kwargs): | |
767 | result = orig(ui, opts, *args, **kwargs) |
|
769 | result = orig(ui, opts, *args, **kwargs) | |
768 |
|
770 | |||
769 | if result is not None: |
|
771 | if result is not None: | |
770 | sourcerepo, destrepo = result |
|
772 | sourcerepo, destrepo = result | |
771 | repo = destrepo.local() |
|
773 | repo = destrepo.local() | |
772 |
|
774 | |||
773 | # The .hglf directory must exist for the standin matcher to match |
|
775 | # The .hglf directory must exist for the standin matcher to match | |
774 | # anything (which listlfiles uses for each rev), and .hg/largefiles is |
|
776 | # anything (which listlfiles uses for each rev), and .hg/largefiles is | |
775 | # assumed to exist by the code that caches the downloaded file. These |
|
777 | # assumed to exist by the code that caches the downloaded file. These | |
776 | # directories exist if clone updated to any rev. (If the repo does not |
|
778 | # directories exist if clone updated to any rev. (If the repo does not | |
777 | # have largefiles, download never gets to the point of needing |
|
779 | # have largefiles, download never gets to the point of needing | |
778 | # .hg/largefiles, and the standin matcher won't match anything anyway.) |
|
780 | # .hg/largefiles, and the standin matcher won't match anything anyway.) | |
779 | if 'largefiles' in repo.requirements: |
|
781 | if 'largefiles' in repo.requirements: | |
780 | if opts.get('noupdate'): |
|
782 | if opts.get('noupdate'): | |
781 | util.makedirs(repo.wjoin(lfutil.shortname)) |
|
783 | util.makedirs(repo.wjoin(lfutil.shortname)) | |
782 | util.makedirs(repo.join(lfutil.longname)) |
|
784 | util.makedirs(repo.join(lfutil.longname)) | |
783 |
|
785 | |||
784 | # Caching is implicitly limited to 'rev' option, since the dest repo was |
|
786 | # Caching is implicitly limited to 'rev' option, since the dest repo was | |
785 | # truncated at that point. The user may expect a download count with |
|
787 | # truncated at that point. The user may expect a download count with | |
786 | # this option, so attempt whether or not this is a largefile repo. |
|
788 | # this option, so attempt whether or not this is a largefile repo. | |
787 | if opts.get('all_largefiles'): |
|
789 | if opts.get('all_largefiles'): | |
788 | success, missing = lfcommands.downloadlfiles(ui, repo, None) |
|
790 | success, missing = lfcommands.downloadlfiles(ui, repo, None) | |
789 |
|
791 | |||
790 | if missing != 0: |
|
792 | if missing != 0: | |
791 | return None |
|
793 | return None | |
792 |
|
794 | |||
793 | return result |
|
795 | return result | |
794 |
|
796 | |||
795 | def overriderebase(orig, ui, repo, **opts): |
|
797 | def overriderebase(orig, ui, repo, **opts): | |
796 | repo._isrebasing = True |
|
798 | repo._isrebasing = True | |
797 | try: |
|
799 | try: | |
798 | return orig(ui, repo, **opts) |
|
800 | return orig(ui, repo, **opts) | |
799 | finally: |
|
801 | finally: | |
800 | repo._isrebasing = False |
|
802 | repo._isrebasing = False | |
801 |
|
803 | |||
802 | def overridearchive(orig, repo, dest, node, kind, decode=True, matchfn=None, |
|
804 | def overridearchive(orig, repo, dest, node, kind, decode=True, matchfn=None, | |
803 | prefix=None, mtime=None, subrepos=None): |
|
805 | prefix=None, mtime=None, subrepos=None): | |
804 | # No need to lock because we are only reading history and |
|
806 | # No need to lock because we are only reading history and | |
805 | # largefile caches, neither of which are modified. |
|
807 | # largefile caches, neither of which are modified. | |
806 | lfcommands.cachelfiles(repo.ui, repo, node) |
|
808 | lfcommands.cachelfiles(repo.ui, repo, node) | |
807 |
|
809 | |||
808 | if kind not in archival.archivers: |
|
810 | if kind not in archival.archivers: | |
809 | raise util.Abort(_("unknown archive type '%s'") % kind) |
|
811 | raise util.Abort(_("unknown archive type '%s'") % kind) | |
810 |
|
812 | |||
811 | ctx = repo[node] |
|
813 | ctx = repo[node] | |
812 |
|
814 | |||
813 | if kind == 'files': |
|
815 | if kind == 'files': | |
814 | if prefix: |
|
816 | if prefix: | |
815 | raise util.Abort( |
|
817 | raise util.Abort( | |
816 | _('cannot give prefix when archiving to files')) |
|
818 | _('cannot give prefix when archiving to files')) | |
817 | else: |
|
819 | else: | |
818 | prefix = archival.tidyprefix(dest, kind, prefix) |
|
820 | prefix = archival.tidyprefix(dest, kind, prefix) | |
819 |
|
821 | |||
820 | def write(name, mode, islink, getdata): |
|
822 | def write(name, mode, islink, getdata): | |
821 | if matchfn and not matchfn(name): |
|
823 | if matchfn and not matchfn(name): | |
822 | return |
|
824 | return | |
823 | data = getdata() |
|
825 | data = getdata() | |
824 | if decode: |
|
826 | if decode: | |
825 | data = repo.wwritedata(name, data) |
|
827 | data = repo.wwritedata(name, data) | |
826 | archiver.addfile(prefix + name, mode, islink, data) |
|
828 | archiver.addfile(prefix + name, mode, islink, data) | |
827 |
|
829 | |||
828 | archiver = archival.archivers[kind](dest, mtime or ctx.date()[0]) |
|
830 | archiver = archival.archivers[kind](dest, mtime or ctx.date()[0]) | |
829 |
|
831 | |||
830 | if repo.ui.configbool("ui", "archivemeta", True): |
|
832 | if repo.ui.configbool("ui", "archivemeta", True): | |
831 | def metadata(): |
|
833 | def metadata(): | |
832 | base = 'repo: %s\nnode: %s\nbranch: %s\n' % ( |
|
834 | base = 'repo: %s\nnode: %s\nbranch: %s\n' % ( | |
833 | hex(repo.changelog.node(0)), hex(node), ctx.branch()) |
|
835 | hex(repo.changelog.node(0)), hex(node), ctx.branch()) | |
834 |
|
836 | |||
835 | tags = ''.join('tag: %s\n' % t for t in ctx.tags() |
|
837 | tags = ''.join('tag: %s\n' % t for t in ctx.tags() | |
836 | if repo.tagtype(t) == 'global') |
|
838 | if repo.tagtype(t) == 'global') | |
837 | if not tags: |
|
839 | if not tags: | |
838 | repo.ui.pushbuffer() |
|
840 | repo.ui.pushbuffer() | |
839 | opts = {'template': '{latesttag}\n{latesttagdistance}', |
|
841 | opts = {'template': '{latesttag}\n{latesttagdistance}', | |
840 | 'style': '', 'patch': None, 'git': None} |
|
842 | 'style': '', 'patch': None, 'git': None} | |
841 | cmdutil.show_changeset(repo.ui, repo, opts).show(ctx) |
|
843 | cmdutil.show_changeset(repo.ui, repo, opts).show(ctx) | |
842 | ltags, dist = repo.ui.popbuffer().split('\n') |
|
844 | ltags, dist = repo.ui.popbuffer().split('\n') | |
843 | tags = ''.join('latesttag: %s\n' % t for t in ltags.split(':')) |
|
845 | tags = ''.join('latesttag: %s\n' % t for t in ltags.split(':')) | |
844 | tags += 'latesttagdistance: %s\n' % dist |
|
846 | tags += 'latesttagdistance: %s\n' % dist | |
845 |
|
847 | |||
846 | return base + tags |
|
848 | return base + tags | |
847 |
|
849 | |||
848 | write('.hg_archival.txt', 0644, False, metadata) |
|
850 | write('.hg_archival.txt', 0644, False, metadata) | |
849 |
|
851 | |||
850 | for f in ctx: |
|
852 | for f in ctx: | |
851 | ff = ctx.flags(f) |
|
853 | ff = ctx.flags(f) | |
852 | getdata = ctx[f].data |
|
854 | getdata = ctx[f].data | |
853 | if lfutil.isstandin(f): |
|
855 | if lfutil.isstandin(f): | |
854 | path = lfutil.findfile(repo, getdata().strip()) |
|
856 | path = lfutil.findfile(repo, getdata().strip()) | |
855 | if path is None: |
|
857 | if path is None: | |
856 | raise util.Abort( |
|
858 | raise util.Abort( | |
857 | _('largefile %s not found in repo store or system cache') |
|
859 | _('largefile %s not found in repo store or system cache') | |
858 | % lfutil.splitstandin(f)) |
|
860 | % lfutil.splitstandin(f)) | |
859 | f = lfutil.splitstandin(f) |
|
861 | f = lfutil.splitstandin(f) | |
860 |
|
862 | |||
861 | def getdatafn(): |
|
863 | def getdatafn(): | |
862 | fd = None |
|
864 | fd = None | |
863 | try: |
|
865 | try: | |
864 | fd = open(path, 'rb') |
|
866 | fd = open(path, 'rb') | |
865 | return fd.read() |
|
867 | return fd.read() | |
866 | finally: |
|
868 | finally: | |
867 | if fd: |
|
869 | if fd: | |
868 | fd.close() |
|
870 | fd.close() | |
869 |
|
871 | |||
870 | getdata = getdatafn |
|
872 | getdata = getdatafn | |
871 | write(f, 'x' in ff and 0755 or 0644, 'l' in ff, getdata) |
|
873 | write(f, 'x' in ff and 0755 or 0644, 'l' in ff, getdata) | |
872 |
|
874 | |||
873 | if subrepos: |
|
875 | if subrepos: | |
874 | for subpath in sorted(ctx.substate): |
|
876 | for subpath in sorted(ctx.substate): | |
875 | sub = ctx.sub(subpath) |
|
877 | sub = ctx.sub(subpath) | |
876 | submatch = match_.narrowmatcher(subpath, matchfn) |
|
878 | submatch = match_.narrowmatcher(subpath, matchfn) | |
877 | sub.archive(repo.ui, archiver, prefix, submatch) |
|
879 | sub.archive(repo.ui, archiver, prefix, submatch) | |
878 |
|
880 | |||
879 | archiver.done() |
|
881 | archiver.done() | |
880 |
|
882 | |||
881 | def hgsubrepoarchive(orig, repo, ui, archiver, prefix, match=None): |
|
883 | def hgsubrepoarchive(orig, repo, ui, archiver, prefix, match=None): | |
882 | repo._get(repo._state + ('hg',)) |
|
884 | repo._get(repo._state + ('hg',)) | |
883 | rev = repo._state[1] |
|
885 | rev = repo._state[1] | |
884 | ctx = repo._repo[rev] |
|
886 | ctx = repo._repo[rev] | |
885 |
|
887 | |||
886 | lfcommands.cachelfiles(ui, repo._repo, ctx.node()) |
|
888 | lfcommands.cachelfiles(ui, repo._repo, ctx.node()) | |
887 |
|
889 | |||
888 | def write(name, mode, islink, getdata): |
|
890 | def write(name, mode, islink, getdata): | |
889 | # At this point, the standin has been replaced with the largefile name, |
|
891 | # At this point, the standin has been replaced with the largefile name, | |
890 | # so the normal matcher works here without the lfutil variants. |
|
892 | # so the normal matcher works here without the lfutil variants. | |
891 | if match and not match(f): |
|
893 | if match and not match(f): | |
892 | return |
|
894 | return | |
893 | data = getdata() |
|
895 | data = getdata() | |
894 |
|
896 | |||
895 | archiver.addfile(prefix + repo._path + '/' + name, mode, islink, data) |
|
897 | archiver.addfile(prefix + repo._path + '/' + name, mode, islink, data) | |
896 |
|
898 | |||
897 | for f in ctx: |
|
899 | for f in ctx: | |
898 | ff = ctx.flags(f) |
|
900 | ff = ctx.flags(f) | |
899 | getdata = ctx[f].data |
|
901 | getdata = ctx[f].data | |
900 | if lfutil.isstandin(f): |
|
902 | if lfutil.isstandin(f): | |
901 | path = lfutil.findfile(repo._repo, getdata().strip()) |
|
903 | path = lfutil.findfile(repo._repo, getdata().strip()) | |
902 | if path is None: |
|
904 | if path is None: | |
903 | raise util.Abort( |
|
905 | raise util.Abort( | |
904 | _('largefile %s not found in repo store or system cache') |
|
906 | _('largefile %s not found in repo store or system cache') | |
905 | % lfutil.splitstandin(f)) |
|
907 | % lfutil.splitstandin(f)) | |
906 | f = lfutil.splitstandin(f) |
|
908 | f = lfutil.splitstandin(f) | |
907 |
|
909 | |||
908 | def getdatafn(): |
|
910 | def getdatafn(): | |
909 | fd = None |
|
911 | fd = None | |
910 | try: |
|
912 | try: | |
911 | fd = open(os.path.join(prefix, path), 'rb') |
|
913 | fd = open(os.path.join(prefix, path), 'rb') | |
912 | return fd.read() |
|
914 | return fd.read() | |
913 | finally: |
|
915 | finally: | |
914 | if fd: |
|
916 | if fd: | |
915 | fd.close() |
|
917 | fd.close() | |
916 |
|
918 | |||
917 | getdata = getdatafn |
|
919 | getdata = getdatafn | |
918 |
|
920 | |||
919 | write(f, 'x' in ff and 0755 or 0644, 'l' in ff, getdata) |
|
921 | write(f, 'x' in ff and 0755 or 0644, 'l' in ff, getdata) | |
920 |
|
922 | |||
921 | for subpath in sorted(ctx.substate): |
|
923 | for subpath in sorted(ctx.substate): | |
922 | sub = ctx.sub(subpath) |
|
924 | sub = ctx.sub(subpath) | |
923 | submatch = match_.narrowmatcher(subpath, match) |
|
925 | submatch = match_.narrowmatcher(subpath, match) | |
924 | sub.archive(ui, archiver, os.path.join(prefix, repo._path) + '/', |
|
926 | sub.archive(ui, archiver, os.path.join(prefix, repo._path) + '/', | |
925 | submatch) |
|
927 | submatch) | |
926 |
|
928 | |||
927 | # If a largefile is modified, the change is not reflected in its |
|
929 | # If a largefile is modified, the change is not reflected in its | |
928 | # standin until a commit. cmdutil.bailifchanged() raises an exception |
|
930 | # standin until a commit. cmdutil.bailifchanged() raises an exception | |
929 | # if the repo has uncommitted changes. Wrap it to also check if |
|
931 | # if the repo has uncommitted changes. Wrap it to also check if | |
930 | # largefiles were changed. This is used by bisect and backout. |
|
932 | # largefiles were changed. This is used by bisect and backout. | |
931 | def overridebailifchanged(orig, repo): |
|
933 | def overridebailifchanged(orig, repo): | |
932 | orig(repo) |
|
934 | orig(repo) | |
933 | repo.lfstatus = True |
|
935 | repo.lfstatus = True | |
934 | modified, added, removed, deleted = repo.status()[:4] |
|
936 | modified, added, removed, deleted = repo.status()[:4] | |
935 | repo.lfstatus = False |
|
937 | repo.lfstatus = False | |
936 | if modified or added or removed or deleted: |
|
938 | if modified or added or removed or deleted: | |
937 | raise util.Abort(_('outstanding uncommitted changes')) |
|
939 | raise util.Abort(_('outstanding uncommitted changes')) | |
938 |
|
940 | |||
939 | # Fetch doesn't use cmdutil.bailifchanged so override it to add the check |
|
941 | # Fetch doesn't use cmdutil.bailifchanged so override it to add the check | |
940 | def overridefetch(orig, ui, repo, *pats, **opts): |
|
942 | def overridefetch(orig, ui, repo, *pats, **opts): | |
941 | repo.lfstatus = True |
|
943 | repo.lfstatus = True | |
942 | modified, added, removed, deleted = repo.status()[:4] |
|
944 | modified, added, removed, deleted = repo.status()[:4] | |
943 | repo.lfstatus = False |
|
945 | repo.lfstatus = False | |
944 | if modified or added or removed or deleted: |
|
946 | if modified or added or removed or deleted: | |
945 | raise util.Abort(_('outstanding uncommitted changes')) |
|
947 | raise util.Abort(_('outstanding uncommitted changes')) | |
946 | return orig(ui, repo, *pats, **opts) |
|
948 | return orig(ui, repo, *pats, **opts) | |
947 |
|
949 | |||
948 | def overrideforget(orig, ui, repo, *pats, **opts): |
|
950 | def overrideforget(orig, ui, repo, *pats, **opts): | |
949 | installnormalfilesmatchfn(repo[None].manifest()) |
|
951 | installnormalfilesmatchfn(repo[None].manifest()) | |
950 | result = orig(ui, repo, *pats, **opts) |
|
952 | result = orig(ui, repo, *pats, **opts) | |
951 | restorematchfn() |
|
953 | restorematchfn() | |
952 | m = scmutil.match(repo[None], pats, opts) |
|
954 | m = scmutil.match(repo[None], pats, opts) | |
953 |
|
955 | |||
954 | try: |
|
956 | try: | |
955 | repo.lfstatus = True |
|
957 | repo.lfstatus = True | |
956 | s = repo.status(match=m, clean=True) |
|
958 | s = repo.status(match=m, clean=True) | |
957 | finally: |
|
959 | finally: | |
958 | repo.lfstatus = False |
|
960 | repo.lfstatus = False | |
959 | forget = sorted(s[0] + s[1] + s[3] + s[6]) |
|
961 | forget = sorted(s[0] + s[1] + s[3] + s[6]) | |
960 | forget = [f for f in forget if lfutil.standin(f) in repo[None].manifest()] |
|
962 | forget = [f for f in forget if lfutil.standin(f) in repo[None].manifest()] | |
961 |
|
963 | |||
962 | for f in forget: |
|
964 | for f in forget: | |
963 | if lfutil.standin(f) not in repo.dirstate and not \ |
|
965 | if lfutil.standin(f) not in repo.dirstate and not \ | |
964 | os.path.isdir(m.rel(lfutil.standin(f))): |
|
966 | os.path.isdir(m.rel(lfutil.standin(f))): | |
965 | ui.warn(_('not removing %s: file is already untracked\n') |
|
967 | ui.warn(_('not removing %s: file is already untracked\n') | |
966 | % m.rel(f)) |
|
968 | % m.rel(f)) | |
967 | result = 1 |
|
969 | result = 1 | |
968 |
|
970 | |||
969 | for f in forget: |
|
971 | for f in forget: | |
970 | if ui.verbose or not m.exact(f): |
|
972 | if ui.verbose or not m.exact(f): | |
971 | ui.status(_('removing %s\n') % m.rel(f)) |
|
973 | ui.status(_('removing %s\n') % m.rel(f)) | |
972 |
|
974 | |||
973 | # Need to lock because standin files are deleted then removed from the |
|
975 | # Need to lock because standin files are deleted then removed from the | |
974 | # repository and we could race in-between. |
|
976 | # repository and we could race in-between. | |
975 | wlock = repo.wlock() |
|
977 | wlock = repo.wlock() | |
976 | try: |
|
978 | try: | |
977 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
979 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |
978 | for f in forget: |
|
980 | for f in forget: | |
979 | if lfdirstate[f] == 'a': |
|
981 | if lfdirstate[f] == 'a': | |
980 | lfdirstate.drop(f) |
|
982 | lfdirstate.drop(f) | |
981 | else: |
|
983 | else: | |
982 | lfdirstate.remove(f) |
|
984 | lfdirstate.remove(f) | |
983 | lfdirstate.write() |
|
985 | lfdirstate.write() | |
984 | standins = [lfutil.standin(f) for f in forget] |
|
986 | standins = [lfutil.standin(f) for f in forget] | |
985 | for f in standins: |
|
987 | for f in standins: | |
986 | util.unlinkpath(repo.wjoin(f), ignoremissing=True) |
|
988 | util.unlinkpath(repo.wjoin(f), ignoremissing=True) | |
987 | repo[None].forget(standins) |
|
989 | repo[None].forget(standins) | |
988 | finally: |
|
990 | finally: | |
989 | wlock.release() |
|
991 | wlock.release() | |
990 |
|
992 | |||
991 | return result |
|
993 | return result | |
992 |
|
994 | |||
993 | def getoutgoinglfiles(ui, repo, dest=None, **opts): |
|
995 | def getoutgoinglfiles(ui, repo, dest=None, **opts): | |
994 | dest = ui.expandpath(dest or 'default-push', dest or 'default') |
|
996 | dest = ui.expandpath(dest or 'default-push', dest or 'default') | |
995 | dest, branches = hg.parseurl(dest, opts.get('branch')) |
|
997 | dest, branches = hg.parseurl(dest, opts.get('branch')) | |
996 | revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev')) |
|
998 | revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev')) | |
997 | if revs: |
|
999 | if revs: | |
998 | revs = [repo.lookup(rev) for rev in scmutil.revrange(repo, revs)] |
|
1000 | revs = [repo.lookup(rev) for rev in scmutil.revrange(repo, revs)] | |
999 |
|
1001 | |||
1000 | try: |
|
1002 | try: | |
1001 | remote = hg.peer(repo, opts, dest) |
|
1003 | remote = hg.peer(repo, opts, dest) | |
1002 | except error.RepoError: |
|
1004 | except error.RepoError: | |
1003 | return None |
|
1005 | return None | |
1004 | outgoing = discovery.findcommonoutgoing(repo, remote.peer(), force=False) |
|
1006 | outgoing = discovery.findcommonoutgoing(repo, remote.peer(), force=False) | |
1005 | if not outgoing.missing: |
|
1007 | if not outgoing.missing: | |
1006 | return outgoing.missing |
|
1008 | return outgoing.missing | |
1007 | o = repo.changelog.nodesbetween(outgoing.missing, revs)[0] |
|
1009 | o = repo.changelog.nodesbetween(outgoing.missing, revs)[0] | |
1008 | if opts.get('newest_first'): |
|
1010 | if opts.get('newest_first'): | |
1009 | o.reverse() |
|
1011 | o.reverse() | |
1010 |
|
1012 | |||
1011 | toupload = set() |
|
1013 | toupload = set() | |
1012 | for n in o: |
|
1014 | for n in o: | |
1013 | parents = [p for p in repo.changelog.parents(n) if p != node.nullid] |
|
1015 | parents = [p for p in repo.changelog.parents(n) if p != node.nullid] | |
1014 | ctx = repo[n] |
|
1016 | ctx = repo[n] | |
1015 | files = set(ctx.files()) |
|
1017 | files = set(ctx.files()) | |
1016 | if len(parents) == 2: |
|
1018 | if len(parents) == 2: | |
1017 | mc = ctx.manifest() |
|
1019 | mc = ctx.manifest() | |
1018 | mp1 = ctx.parents()[0].manifest() |
|
1020 | mp1 = ctx.parents()[0].manifest() | |
1019 | mp2 = ctx.parents()[1].manifest() |
|
1021 | mp2 = ctx.parents()[1].manifest() | |
1020 | for f in mp1: |
|
1022 | for f in mp1: | |
1021 | if f not in mc: |
|
1023 | if f not in mc: | |
1022 | files.add(f) |
|
1024 | files.add(f) | |
1023 | for f in mp2: |
|
1025 | for f in mp2: | |
1024 | if f not in mc: |
|
1026 | if f not in mc: | |
1025 | files.add(f) |
|
1027 | files.add(f) | |
1026 | for f in mc: |
|
1028 | for f in mc: | |
1027 | if mc[f] != mp1.get(f, None) or mc[f] != mp2.get(f, None): |
|
1029 | if mc[f] != mp1.get(f, None) or mc[f] != mp2.get(f, None): | |
1028 | files.add(f) |
|
1030 | files.add(f) | |
1029 | toupload = toupload.union( |
|
1031 | toupload = toupload.union( | |
1030 | set([f for f in files if lfutil.isstandin(f) and f in ctx])) |
|
1032 | set([f for f in files if lfutil.isstandin(f) and f in ctx])) | |
1031 | return sorted(toupload) |
|
1033 | return sorted(toupload) | |
1032 |
|
1034 | |||
1033 | def overrideoutgoing(orig, ui, repo, dest=None, **opts): |
|
1035 | def overrideoutgoing(orig, ui, repo, dest=None, **opts): | |
1034 | result = orig(ui, repo, dest, **opts) |
|
1036 | result = orig(ui, repo, dest, **opts) | |
1035 |
|
1037 | |||
1036 | if opts.pop('large', None): |
|
1038 | if opts.pop('large', None): | |
1037 | toupload = getoutgoinglfiles(ui, repo, dest, **opts) |
|
1039 | toupload = getoutgoinglfiles(ui, repo, dest, **opts) | |
1038 | if toupload is None: |
|
1040 | if toupload is None: | |
1039 | ui.status(_('largefiles: No remote repo\n')) |
|
1041 | ui.status(_('largefiles: No remote repo\n')) | |
1040 | elif not toupload: |
|
1042 | elif not toupload: | |
1041 | ui.status(_('largefiles: no files to upload\n')) |
|
1043 | ui.status(_('largefiles: no files to upload\n')) | |
1042 | else: |
|
1044 | else: | |
1043 | ui.status(_('largefiles to upload:\n')) |
|
1045 | ui.status(_('largefiles to upload:\n')) | |
1044 | for file in toupload: |
|
1046 | for file in toupload: | |
1045 | ui.status(lfutil.splitstandin(file) + '\n') |
|
1047 | ui.status(lfutil.splitstandin(file) + '\n') | |
1046 | ui.status('\n') |
|
1048 | ui.status('\n') | |
1047 |
|
1049 | |||
1048 | return result |
|
1050 | return result | |
1049 |
|
1051 | |||
1050 | def overridesummary(orig, ui, repo, *pats, **opts): |
|
1052 | def overridesummary(orig, ui, repo, *pats, **opts): | |
1051 | try: |
|
1053 | try: | |
1052 | repo.lfstatus = True |
|
1054 | repo.lfstatus = True | |
1053 | orig(ui, repo, *pats, **opts) |
|
1055 | orig(ui, repo, *pats, **opts) | |
1054 | finally: |
|
1056 | finally: | |
1055 | repo.lfstatus = False |
|
1057 | repo.lfstatus = False | |
1056 |
|
1058 | |||
1057 | if opts.pop('large', None): |
|
1059 | if opts.pop('large', None): | |
1058 | toupload = getoutgoinglfiles(ui, repo, None, **opts) |
|
1060 | toupload = getoutgoinglfiles(ui, repo, None, **opts) | |
1059 | if toupload is None: |
|
1061 | if toupload is None: | |
1060 | # i18n: column positioning for "hg summary" |
|
1062 | # i18n: column positioning for "hg summary" | |
1061 | ui.status(_('largefiles: (no remote repo)\n')) |
|
1063 | ui.status(_('largefiles: (no remote repo)\n')) | |
1062 | elif not toupload: |
|
1064 | elif not toupload: | |
1063 | # i18n: column positioning for "hg summary" |
|
1065 | # i18n: column positioning for "hg summary" | |
1064 | ui.status(_('largefiles: (no files to upload)\n')) |
|
1066 | ui.status(_('largefiles: (no files to upload)\n')) | |
1065 | else: |
|
1067 | else: | |
1066 | # i18n: column positioning for "hg summary" |
|
1068 | # i18n: column positioning for "hg summary" | |
1067 | ui.status(_('largefiles: %d to upload\n') % len(toupload)) |
|
1069 | ui.status(_('largefiles: %d to upload\n') % len(toupload)) | |
1068 |
|
1070 | |||
1069 | def scmutiladdremove(orig, repo, pats=[], opts={}, dry_run=None, |
|
1071 | def scmutiladdremove(orig, repo, pats=[], opts={}, dry_run=None, | |
1070 | similarity=None): |
|
1072 | similarity=None): | |
1071 | if not lfutil.islfilesrepo(repo): |
|
1073 | if not lfutil.islfilesrepo(repo): | |
1072 | return orig(repo, pats, opts, dry_run, similarity) |
|
1074 | return orig(repo, pats, opts, dry_run, similarity) | |
1073 | # Get the list of missing largefiles so we can remove them |
|
1075 | # Get the list of missing largefiles so we can remove them | |
1074 | lfdirstate = lfutil.openlfdirstate(repo.ui, repo) |
|
1076 | lfdirstate = lfutil.openlfdirstate(repo.ui, repo) | |
1075 | s = lfdirstate.status(match_.always(repo.root, repo.getcwd()), [], False, |
|
1077 | s = lfdirstate.status(match_.always(repo.root, repo.getcwd()), [], False, | |
1076 | False, False) |
|
1078 | False, False) | |
1077 | (unsure, modified, added, removed, missing, unknown, ignored, clean) = s |
|
1079 | (unsure, modified, added, removed, missing, unknown, ignored, clean) = s | |
1078 |
|
1080 | |||
1079 | # Call into the normal remove code, but the removing of the standin, we want |
|
1081 | # Call into the normal remove code, but the removing of the standin, we want | |
1080 | # to have handled by original addremove. Monkey patching here makes sure |
|
1082 | # to have handled by original addremove. Monkey patching here makes sure | |
1081 | # we don't remove the standin in the largefiles code, preventing a very |
|
1083 | # we don't remove the standin in the largefiles code, preventing a very | |
1082 | # confused state later. |
|
1084 | # confused state later. | |
1083 | if missing: |
|
1085 | if missing: | |
1084 | m = [repo.wjoin(f) for f in missing] |
|
1086 | m = [repo.wjoin(f) for f in missing] | |
1085 | repo._isaddremove = True |
|
1087 | repo._isaddremove = True | |
1086 | removelargefiles(repo.ui, repo, *m, **opts) |
|
1088 | removelargefiles(repo.ui, repo, *m, **opts) | |
1087 | repo._isaddremove = False |
|
1089 | repo._isaddremove = False | |
1088 | # Call into the normal add code, and any files that *should* be added as |
|
1090 | # Call into the normal add code, and any files that *should* be added as | |
1089 | # largefiles will be |
|
1091 | # largefiles will be | |
1090 | addlargefiles(repo.ui, repo, *pats, **opts) |
|
1092 | addlargefiles(repo.ui, repo, *pats, **opts) | |
1091 | # Now that we've handled largefiles, hand off to the original addremove |
|
1093 | # Now that we've handled largefiles, hand off to the original addremove | |
1092 | # function to take care of the rest. Make sure it doesn't do anything with |
|
1094 | # function to take care of the rest. Make sure it doesn't do anything with | |
1093 | # largefiles by installing a matcher that will ignore them. |
|
1095 | # largefiles by installing a matcher that will ignore them. | |
1094 | installnormalfilesmatchfn(repo[None].manifest()) |
|
1096 | installnormalfilesmatchfn(repo[None].manifest()) | |
1095 | result = orig(repo, pats, opts, dry_run, similarity) |
|
1097 | result = orig(repo, pats, opts, dry_run, similarity) | |
1096 | restorematchfn() |
|
1098 | restorematchfn() | |
1097 | return result |
|
1099 | return result | |
1098 |
|
1100 | |||
1099 | # Calling purge with --all will cause the largefiles to be deleted. |
|
1101 | # Calling purge with --all will cause the largefiles to be deleted. | |
1100 | # Override repo.status to prevent this from happening. |
|
1102 | # Override repo.status to prevent this from happening. | |
1101 | def overridepurge(orig, ui, repo, *dirs, **opts): |
|
1103 | def overridepurge(orig, ui, repo, *dirs, **opts): | |
1102 | # XXX large file status is buggy when used on repo proxy. |
|
1104 | # XXX large file status is buggy when used on repo proxy. | |
1103 | # XXX this needs to be investigate. |
|
1105 | # XXX this needs to be investigate. | |
1104 | repo = repo.unfiltered() |
|
1106 | repo = repo.unfiltered() | |
1105 | oldstatus = repo.status |
|
1107 | oldstatus = repo.status | |
1106 | def overridestatus(node1='.', node2=None, match=None, ignored=False, |
|
1108 | def overridestatus(node1='.', node2=None, match=None, ignored=False, | |
1107 | clean=False, unknown=False, listsubrepos=False): |
|
1109 | clean=False, unknown=False, listsubrepos=False): | |
1108 | r = oldstatus(node1, node2, match, ignored, clean, unknown, |
|
1110 | r = oldstatus(node1, node2, match, ignored, clean, unknown, | |
1109 | listsubrepos) |
|
1111 | listsubrepos) | |
1110 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
1112 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |
1111 | modified, added, removed, deleted, unknown, ignored, clean = r |
|
1113 | modified, added, removed, deleted, unknown, ignored, clean = r | |
1112 | unknown = [f for f in unknown if lfdirstate[f] == '?'] |
|
1114 | unknown = [f for f in unknown if lfdirstate[f] == '?'] | |
1113 | ignored = [f for f in ignored if lfdirstate[f] == '?'] |
|
1115 | ignored = [f for f in ignored if lfdirstate[f] == '?'] | |
1114 | return modified, added, removed, deleted, unknown, ignored, clean |
|
1116 | return modified, added, removed, deleted, unknown, ignored, clean | |
1115 | repo.status = overridestatus |
|
1117 | repo.status = overridestatus | |
1116 | orig(ui, repo, *dirs, **opts) |
|
1118 | orig(ui, repo, *dirs, **opts) | |
1117 | repo.status = oldstatus |
|
1119 | repo.status = oldstatus | |
1118 |
|
1120 | |||
1119 | def overriderollback(orig, ui, repo, **opts): |
|
1121 | def overriderollback(orig, ui, repo, **opts): | |
1120 | result = orig(ui, repo, **opts) |
|
1122 | result = orig(ui, repo, **opts) | |
1121 | merge.update(repo, node=None, branchmerge=False, force=True, |
|
1123 | merge.update(repo, node=None, branchmerge=False, force=True, | |
1122 | partial=lfutil.isstandin) |
|
1124 | partial=lfutil.isstandin) | |
1123 | wlock = repo.wlock() |
|
1125 | wlock = repo.wlock() | |
1124 | try: |
|
1126 | try: | |
1125 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
1127 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |
1126 | lfiles = lfutil.listlfiles(repo) |
|
1128 | lfiles = lfutil.listlfiles(repo) | |
1127 | oldlfiles = lfutil.listlfiles(repo, repo[None].parents()[0].rev()) |
|
1129 | oldlfiles = lfutil.listlfiles(repo, repo[None].parents()[0].rev()) | |
1128 | for file in lfiles: |
|
1130 | for file in lfiles: | |
1129 | if file in oldlfiles: |
|
1131 | if file in oldlfiles: | |
1130 | lfdirstate.normallookup(file) |
|
1132 | lfdirstate.normallookup(file) | |
1131 | else: |
|
1133 | else: | |
1132 | lfdirstate.add(file) |
|
1134 | lfdirstate.add(file) | |
1133 | lfdirstate.write() |
|
1135 | lfdirstate.write() | |
1134 | finally: |
|
1136 | finally: | |
1135 | wlock.release() |
|
1137 | wlock.release() | |
1136 | return result |
|
1138 | return result | |
1137 |
|
1139 | |||
1138 | def overridetransplant(orig, ui, repo, *revs, **opts): |
|
1140 | def overridetransplant(orig, ui, repo, *revs, **opts): | |
1139 | try: |
|
1141 | try: | |
1140 | oldstandins = lfutil.getstandinsstate(repo) |
|
1142 | oldstandins = lfutil.getstandinsstate(repo) | |
1141 | repo._istransplanting = True |
|
1143 | repo._istransplanting = True | |
1142 | result = orig(ui, repo, *revs, **opts) |
|
1144 | result = orig(ui, repo, *revs, **opts) | |
1143 | newstandins = lfutil.getstandinsstate(repo) |
|
1145 | newstandins = lfutil.getstandinsstate(repo) | |
1144 | filelist = lfutil.getlfilestoupdate(oldstandins, newstandins) |
|
1146 | filelist = lfutil.getlfilestoupdate(oldstandins, newstandins) | |
1145 | lfcommands.updatelfiles(repo.ui, repo, filelist=filelist, |
|
1147 | lfcommands.updatelfiles(repo.ui, repo, filelist=filelist, | |
1146 | printmessage=True) |
|
1148 | printmessage=True) | |
1147 | finally: |
|
1149 | finally: | |
1148 | repo._istransplanting = False |
|
1150 | repo._istransplanting = False | |
1149 | return result |
|
1151 | return result | |
1150 |
|
1152 | |||
1151 | def overridecat(orig, ui, repo, file1, *pats, **opts): |
|
1153 | def overridecat(orig, ui, repo, file1, *pats, **opts): | |
1152 | ctx = scmutil.revsingle(repo, opts.get('rev')) |
|
1154 | ctx = scmutil.revsingle(repo, opts.get('rev')) | |
1153 | err = 1 |
|
1155 | err = 1 | |
1154 | notbad = set() |
|
1156 | notbad = set() | |
1155 | m = scmutil.match(ctx, (file1,) + pats, opts) |
|
1157 | m = scmutil.match(ctx, (file1,) + pats, opts) | |
1156 | origmatchfn = m.matchfn |
|
1158 | origmatchfn = m.matchfn | |
1157 | def lfmatchfn(f): |
|
1159 | def lfmatchfn(f): | |
1158 | lf = lfutil.splitstandin(f) |
|
1160 | lf = lfutil.splitstandin(f) | |
1159 | if lf is None: |
|
1161 | if lf is None: | |
1160 | return origmatchfn(f) |
|
1162 | return origmatchfn(f) | |
1161 | notbad.add(lf) |
|
1163 | notbad.add(lf) | |
1162 | return origmatchfn(lf) |
|
1164 | return origmatchfn(lf) | |
1163 | m.matchfn = lfmatchfn |
|
1165 | m.matchfn = lfmatchfn | |
1164 | m.bad = lambda f, msg: f not in notbad |
|
1166 | m.bad = lambda f, msg: f not in notbad | |
1165 | for f in ctx.walk(m): |
|
1167 | for f in ctx.walk(m): | |
1166 | lf = lfutil.splitstandin(f) |
|
1168 | lf = lfutil.splitstandin(f) | |
1167 | if lf is None: |
|
1169 | if lf is None: | |
1168 | err = orig(ui, repo, f, **opts) |
|
1170 | err = orig(ui, repo, f, **opts) | |
1169 | else: |
|
1171 | else: | |
1170 | err = lfcommands.catlfile(repo, lf, ctx.rev(), opts.get('output')) |
|
1172 | err = lfcommands.catlfile(repo, lf, ctx.rev(), opts.get('output')) | |
1171 | return err |
|
1173 | return err | |
1172 |
|
1174 | |||
1173 | def mercurialsinkbefore(orig, sink): |
|
1175 | def mercurialsinkbefore(orig, sink): | |
1174 | sink.repo._isconverting = True |
|
1176 | sink.repo._isconverting = True | |
1175 | orig(sink) |
|
1177 | orig(sink) | |
1176 |
|
1178 | |||
1177 | def mercurialsinkafter(orig, sink): |
|
1179 | def mercurialsinkafter(orig, sink): | |
1178 | sink.repo._isconverting = False |
|
1180 | sink.repo._isconverting = False | |
1179 | orig(sink) |
|
1181 | orig(sink) |
@@ -1,641 +1,642 b'' | |||||
1 | # merge.py - directory-level update/merge handling for Mercurial |
|
1 | # merge.py - directory-level update/merge handling for Mercurial | |
2 | # |
|
2 | # | |
3 | # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | from node import nullid, nullrev, hex, bin |
|
8 | from node import nullid, nullrev, hex, bin | |
9 | from i18n import _ |
|
9 | from i18n import _ | |
10 | import error, util, filemerge, copies, subrepo |
|
10 | import error, util, filemerge, copies, subrepo | |
11 | import errno, os, shutil |
|
11 | import errno, os, shutil | |
12 |
|
12 | |||
13 | class mergestate(object): |
|
13 | class mergestate(object): | |
14 | '''track 3-way merge state of individual files''' |
|
14 | '''track 3-way merge state of individual files''' | |
15 | def __init__(self, repo): |
|
15 | def __init__(self, repo): | |
16 | self._repo = repo |
|
16 | self._repo = repo | |
17 | self._dirty = False |
|
17 | self._dirty = False | |
18 | self._read() |
|
18 | self._read() | |
19 | def reset(self, node=None): |
|
19 | def reset(self, node=None): | |
20 | self._state = {} |
|
20 | self._state = {} | |
21 | if node: |
|
21 | if node: | |
22 | self._local = node |
|
22 | self._local = node | |
23 | shutil.rmtree(self._repo.join("merge"), True) |
|
23 | shutil.rmtree(self._repo.join("merge"), True) | |
24 | self._dirty = False |
|
24 | self._dirty = False | |
25 | def _read(self): |
|
25 | def _read(self): | |
26 | self._state = {} |
|
26 | self._state = {} | |
27 | try: |
|
27 | try: | |
28 | f = self._repo.opener("merge/state") |
|
28 | f = self._repo.opener("merge/state") | |
29 | for i, l in enumerate(f): |
|
29 | for i, l in enumerate(f): | |
30 | if i == 0: |
|
30 | if i == 0: | |
31 | self._local = bin(l[:-1]) |
|
31 | self._local = bin(l[:-1]) | |
32 | else: |
|
32 | else: | |
33 | bits = l[:-1].split("\0") |
|
33 | bits = l[:-1].split("\0") | |
34 | self._state[bits[0]] = bits[1:] |
|
34 | self._state[bits[0]] = bits[1:] | |
35 | f.close() |
|
35 | f.close() | |
36 | except IOError, err: |
|
36 | except IOError, err: | |
37 | if err.errno != errno.ENOENT: |
|
37 | if err.errno != errno.ENOENT: | |
38 | raise |
|
38 | raise | |
39 | self._dirty = False |
|
39 | self._dirty = False | |
40 | def commit(self): |
|
40 | def commit(self): | |
41 | if self._dirty: |
|
41 | if self._dirty: | |
42 | f = self._repo.opener("merge/state", "w") |
|
42 | f = self._repo.opener("merge/state", "w") | |
43 | f.write(hex(self._local) + "\n") |
|
43 | f.write(hex(self._local) + "\n") | |
44 | for d, v in self._state.iteritems(): |
|
44 | for d, v in self._state.iteritems(): | |
45 | f.write("\0".join([d] + v) + "\n") |
|
45 | f.write("\0".join([d] + v) + "\n") | |
46 | f.close() |
|
46 | f.close() | |
47 | self._dirty = False |
|
47 | self._dirty = False | |
48 | def add(self, fcl, fco, fca, fd): |
|
48 | def add(self, fcl, fco, fca, fd): | |
49 | hash = util.sha1(fcl.path()).hexdigest() |
|
49 | hash = util.sha1(fcl.path()).hexdigest() | |
50 | self._repo.opener.write("merge/" + hash, fcl.data()) |
|
50 | self._repo.opener.write("merge/" + hash, fcl.data()) | |
51 | self._state[fd] = ['u', hash, fcl.path(), fca.path(), |
|
51 | self._state[fd] = ['u', hash, fcl.path(), fca.path(), | |
52 | hex(fca.filenode()), fco.path(), fcl.flags()] |
|
52 | hex(fca.filenode()), fco.path(), fcl.flags()] | |
53 | self._dirty = True |
|
53 | self._dirty = True | |
54 | def __contains__(self, dfile): |
|
54 | def __contains__(self, dfile): | |
55 | return dfile in self._state |
|
55 | return dfile in self._state | |
56 | def __getitem__(self, dfile): |
|
56 | def __getitem__(self, dfile): | |
57 | return self._state[dfile][0] |
|
57 | return self._state[dfile][0] | |
58 | def __iter__(self): |
|
58 | def __iter__(self): | |
59 | l = self._state.keys() |
|
59 | l = self._state.keys() | |
60 | l.sort() |
|
60 | l.sort() | |
61 | for f in l: |
|
61 | for f in l: | |
62 | yield f |
|
62 | yield f | |
63 | def mark(self, dfile, state): |
|
63 | def mark(self, dfile, state): | |
64 | self._state[dfile][0] = state |
|
64 | self._state[dfile][0] = state | |
65 | self._dirty = True |
|
65 | self._dirty = True | |
66 | def resolve(self, dfile, wctx, octx): |
|
66 | def resolve(self, dfile, wctx, octx): | |
67 | if self[dfile] == 'r': |
|
67 | if self[dfile] == 'r': | |
68 | return 0 |
|
68 | return 0 | |
69 | state, hash, lfile, afile, anode, ofile, flags = self._state[dfile] |
|
69 | state, hash, lfile, afile, anode, ofile, flags = self._state[dfile] | |
70 | fcd = wctx[dfile] |
|
70 | fcd = wctx[dfile] | |
71 | fco = octx[ofile] |
|
71 | fco = octx[ofile] | |
72 | fca = self._repo.filectx(afile, fileid=anode) |
|
72 | fca = self._repo.filectx(afile, fileid=anode) | |
73 | # "premerge" x flags |
|
73 | # "premerge" x flags | |
74 | flo = fco.flags() |
|
74 | flo = fco.flags() | |
75 | fla = fca.flags() |
|
75 | fla = fca.flags() | |
76 | if 'x' in flags + flo + fla and 'l' not in flags + flo + fla: |
|
76 | if 'x' in flags + flo + fla and 'l' not in flags + flo + fla: | |
77 | if fca.node() == nullid: |
|
77 | if fca.node() == nullid: | |
78 | self._repo.ui.warn(_('warning: cannot merge flags for %s\n') % |
|
78 | self._repo.ui.warn(_('warning: cannot merge flags for %s\n') % | |
79 | afile) |
|
79 | afile) | |
80 | elif flags == fla: |
|
80 | elif flags == fla: | |
81 | flags = flo |
|
81 | flags = flo | |
82 | # restore local |
|
82 | # restore local | |
83 | f = self._repo.opener("merge/" + hash) |
|
83 | f = self._repo.opener("merge/" + hash) | |
84 | self._repo.wwrite(dfile, f.read(), flags) |
|
84 | self._repo.wwrite(dfile, f.read(), flags) | |
85 | f.close() |
|
85 | f.close() | |
86 | r = filemerge.filemerge(self._repo, self._local, lfile, fcd, fco, fca) |
|
86 | r = filemerge.filemerge(self._repo, self._local, lfile, fcd, fco, fca) | |
87 | if r is None: |
|
87 | if r is None: | |
88 | # no real conflict |
|
88 | # no real conflict | |
89 | del self._state[dfile] |
|
89 | del self._state[dfile] | |
90 | elif not r: |
|
90 | elif not r: | |
91 | self.mark(dfile, 'r') |
|
91 | self.mark(dfile, 'r') | |
92 | return r |
|
92 | return r | |
93 |
|
93 | |||
94 | def _checkunknownfile(repo, wctx, mctx, f): |
|
94 | def _checkunknownfile(repo, wctx, mctx, f): | |
95 | return (not repo.dirstate._ignore(f) |
|
95 | return (not repo.dirstate._ignore(f) | |
96 | and os.path.isfile(repo.wjoin(f)) |
|
96 | and os.path.isfile(repo.wjoin(f)) | |
97 | and repo.dirstate.normalize(f) not in repo.dirstate |
|
97 | and repo.dirstate.normalize(f) not in repo.dirstate | |
98 | and mctx[f].cmp(wctx[f])) |
|
98 | and mctx[f].cmp(wctx[f])) | |
99 |
|
99 | |||
100 | def _checkunknown(repo, wctx, mctx): |
|
100 | def _checkunknown(repo, wctx, mctx): | |
101 | "check for collisions between unknown files and files in mctx" |
|
101 | "check for collisions between unknown files and files in mctx" | |
102 |
|
102 | |||
103 | error = False |
|
103 | error = False | |
104 | for f in mctx: |
|
104 | for f in mctx: | |
105 | if f not in wctx and _checkunknownfile(repo, wctx, mctx, f): |
|
105 | if f not in wctx and _checkunknownfile(repo, wctx, mctx, f): | |
106 | error = True |
|
106 | error = True | |
107 | wctx._repo.ui.warn(_("%s: untracked file differs\n") % f) |
|
107 | wctx._repo.ui.warn(_("%s: untracked file differs\n") % f) | |
108 | if error: |
|
108 | if error: | |
109 | raise util.Abort(_("untracked files in working directory differ " |
|
109 | raise util.Abort(_("untracked files in working directory differ " | |
110 | "from files in requested revision")) |
|
110 | "from files in requested revision")) | |
111 |
|
111 | |||
112 | def _remains(f, m, ma, workingctx=False): |
|
112 | def _remains(f, m, ma, workingctx=False): | |
113 | """check whether specified file remains after merge. |
|
113 | """check whether specified file remains after merge. | |
114 |
|
114 | |||
115 | It is assumed that specified file is not contained in the manifest |
|
115 | It is assumed that specified file is not contained in the manifest | |
116 | of the other context. |
|
116 | of the other context. | |
117 | """ |
|
117 | """ | |
118 | if f in ma: |
|
118 | if f in ma: | |
119 | n = m[f] |
|
119 | n = m[f] | |
120 | if n != ma[f]: |
|
120 | if n != ma[f]: | |
121 | return True # because it is changed locally |
|
121 | return True # because it is changed locally | |
122 | # even though it doesn't remain, if "remote deleted" is |
|
122 | # even though it doesn't remain, if "remote deleted" is | |
123 | # chosen in manifestmerge() |
|
123 | # chosen in manifestmerge() | |
124 | elif workingctx and n[20:] == "a": |
|
124 | elif workingctx and n[20:] == "a": | |
125 | return True # because it is added locally (linear merge specific) |
|
125 | return True # because it is added locally (linear merge specific) | |
126 | else: |
|
126 | else: | |
127 | return False # because it is removed remotely |
|
127 | return False # because it is removed remotely | |
128 | else: |
|
128 | else: | |
129 | return True # because it is added locally |
|
129 | return True # because it is added locally | |
130 |
|
130 | |||
131 | def _checkcollision(mctx, extractxs): |
|
131 | def _checkcollision(mctx, extractxs): | |
132 | "check for case folding collisions in the destination context" |
|
132 | "check for case folding collisions in the destination context" | |
133 | folded = {} |
|
133 | folded = {} | |
134 | for fn in mctx: |
|
134 | for fn in mctx: | |
135 | fold = util.normcase(fn) |
|
135 | fold = util.normcase(fn) | |
136 | if fold in folded: |
|
136 | if fold in folded: | |
137 | raise util.Abort(_("case-folding collision between %s and %s") |
|
137 | raise util.Abort(_("case-folding collision between %s and %s") | |
138 | % (fn, folded[fold])) |
|
138 | % (fn, folded[fold])) | |
139 | folded[fold] = fn |
|
139 | folded[fold] = fn | |
140 |
|
140 | |||
141 | if extractxs: |
|
141 | if extractxs: | |
142 | wctx, actx = extractxs |
|
142 | wctx, actx = extractxs | |
143 | # class to delay looking up copy mapping |
|
143 | # class to delay looking up copy mapping | |
144 | class pathcopies(object): |
|
144 | class pathcopies(object): | |
145 | @util.propertycache |
|
145 | @util.propertycache | |
146 | def map(self): |
|
146 | def map(self): | |
147 | # {dst@mctx: src@wctx} copy mapping |
|
147 | # {dst@mctx: src@wctx} copy mapping | |
148 | return copies.pathcopies(wctx, mctx) |
|
148 | return copies.pathcopies(wctx, mctx) | |
149 | pc = pathcopies() |
|
149 | pc = pathcopies() | |
150 |
|
150 | |||
151 | for fn in wctx: |
|
151 | for fn in wctx: | |
152 | fold = util.normcase(fn) |
|
152 | fold = util.normcase(fn) | |
153 | mfn = folded.get(fold, None) |
|
153 | mfn = folded.get(fold, None) | |
154 | if (mfn and mfn != fn and pc.map.get(mfn) != fn and |
|
154 | if (mfn and mfn != fn and pc.map.get(mfn) != fn and | |
155 | _remains(fn, wctx.manifest(), actx.manifest(), True) and |
|
155 | _remains(fn, wctx.manifest(), actx.manifest(), True) and | |
156 | _remains(mfn, mctx.manifest(), actx.manifest())): |
|
156 | _remains(mfn, mctx.manifest(), actx.manifest())): | |
157 | raise util.Abort(_("case-folding collision between %s and %s") |
|
157 | raise util.Abort(_("case-folding collision between %s and %s") | |
158 | % (mfn, fn)) |
|
158 | % (mfn, fn)) | |
159 |
|
159 | |||
160 | def _forgetremoved(wctx, mctx, branchmerge): |
|
160 | def _forgetremoved(wctx, mctx, branchmerge): | |
161 | """ |
|
161 | """ | |
162 | Forget removed files |
|
162 | Forget removed files | |
163 |
|
163 | |||
164 | If we're jumping between revisions (as opposed to merging), and if |
|
164 | If we're jumping between revisions (as opposed to merging), and if | |
165 | neither the working directory nor the target rev has the file, |
|
165 | neither the working directory nor the target rev has the file, | |
166 | then we need to remove it from the dirstate, to prevent the |
|
166 | then we need to remove it from the dirstate, to prevent the | |
167 | dirstate from listing the file when it is no longer in the |
|
167 | dirstate from listing the file when it is no longer in the | |
168 | manifest. |
|
168 | manifest. | |
169 |
|
169 | |||
170 | If we're merging, and the other revision has removed a file |
|
170 | If we're merging, and the other revision has removed a file | |
171 | that is not present in the working directory, we need to mark it |
|
171 | that is not present in the working directory, we need to mark it | |
172 | as removed. |
|
172 | as removed. | |
173 | """ |
|
173 | """ | |
174 |
|
174 | |||
175 | actions = [] |
|
175 | actions = [] | |
176 | state = branchmerge and 'r' or 'f' |
|
176 | state = branchmerge and 'r' or 'f' | |
177 | for f in wctx.deleted(): |
|
177 | for f in wctx.deleted(): | |
178 | if f not in mctx: |
|
178 | if f not in mctx: | |
179 | actions.append((f, state, None, "forget deleted")) |
|
179 | actions.append((f, state, None, "forget deleted")) | |
180 |
|
180 | |||
181 | if not branchmerge: |
|
181 | if not branchmerge: | |
182 | for f in wctx.removed(): |
|
182 | for f in wctx.removed(): | |
183 | if f not in mctx: |
|
183 | if f not in mctx: | |
184 | actions.append((f, "f", None, "forget removed")) |
|
184 | actions.append((f, "f", None, "forget removed")) | |
185 |
|
185 | |||
186 | return actions |
|
186 | return actions | |
187 |
|
187 | |||
188 |
def manifestmerge(repo, p1, p2, pa, |
|
188 | def manifestmerge(repo, p1, p2, pa, branchmerge, force, partial): | |
189 | """ |
|
189 | """ | |
190 | Merge p1 and p2 with ancestor pa and generate merge action list |
|
190 | Merge p1 and p2 with ancestor pa and generate merge action list | |
191 |
|
191 | |||
192 | overwrite = whether we clobber working files |
|
192 | branchmerge and force are as passed in to update | |
193 | partial = function to filter file lists |
|
193 | partial = function to filter file lists | |
194 | """ |
|
194 | """ | |
195 |
|
195 | |||
|
196 | overwrite = force and not branchmerge | |||
196 | actions, copy, movewithdir = [], {}, {} |
|
197 | actions, copy, movewithdir = [], {}, {} | |
197 |
|
198 | |||
198 | if overwrite: |
|
199 | if overwrite: | |
199 | pa = p1 |
|
200 | pa = p1 | |
200 | elif pa == p2: # backwards |
|
201 | elif pa == p2: # backwards | |
201 | pa = p1.p1() |
|
202 | pa = p1.p1() | |
202 | elif pa and repo.ui.configbool("merge", "followcopies", True): |
|
203 | elif pa and repo.ui.configbool("merge", "followcopies", True): | |
203 | ret = copies.mergecopies(repo, p1, p2, pa) |
|
204 | ret = copies.mergecopies(repo, p1, p2, pa) | |
204 | copy, movewithdir, diverge, renamedelete = ret |
|
205 | copy, movewithdir, diverge, renamedelete = ret | |
205 | for of, fl in diverge.iteritems(): |
|
206 | for of, fl in diverge.iteritems(): | |
206 | actions.append((of, "dr", (fl,), "divergent renames")) |
|
207 | actions.append((of, "dr", (fl,), "divergent renames")) | |
207 | for of, fl in renamedelete.iteritems(): |
|
208 | for of, fl in renamedelete.iteritems(): | |
208 | actions.append((of, "rd", (fl,), "rename and delete")) |
|
209 | actions.append((of, "rd", (fl,), "rename and delete")) | |
209 |
|
210 | |||
210 | repo.ui.note(_("resolving manifests\n")) |
|
211 | repo.ui.note(_("resolving manifests\n")) | |
211 |
repo.ui.debug(" |
|
212 | repo.ui.debug(" branchmerge: %s, force: %s, partial: %s\n" | |
212 |
% (bool( |
|
213 | % (bool(branchmerge), bool(force), bool(partial))) | |
213 | repo.ui.debug(" ancestor: %s, local: %s, remote: %s\n" % (pa, p1, p2)) |
|
214 | repo.ui.debug(" ancestor: %s, local: %s, remote: %s\n" % (pa, p1, p2)) | |
214 |
|
215 | |||
215 | m1, m2, ma = p1.manifest(), p2.manifest(), pa.manifest() |
|
216 | m1, m2, ma = p1.manifest(), p2.manifest(), pa.manifest() | |
216 | copied = set(copy.values()) |
|
217 | copied = set(copy.values()) | |
217 | copied.update(movewithdir.values()) |
|
218 | copied.update(movewithdir.values()) | |
218 |
|
219 | |||
219 | if '.hgsubstate' in m1: |
|
220 | if '.hgsubstate' in m1: | |
220 | # check whether sub state is modified |
|
221 | # check whether sub state is modified | |
221 | for s in sorted(p1.substate): |
|
222 | for s in sorted(p1.substate): | |
222 | if p1.sub(s).dirty(): |
|
223 | if p1.sub(s).dirty(): | |
223 | m1['.hgsubstate'] += "+" |
|
224 | m1['.hgsubstate'] += "+" | |
224 | break |
|
225 | break | |
225 |
|
226 | |||
226 | prompts = [] |
|
227 | prompts = [] | |
227 | # Compare manifests |
|
228 | # Compare manifests | |
228 | for f, n in m1.iteritems(): |
|
229 | for f, n in m1.iteritems(): | |
229 | if partial and not partial(f): |
|
230 | if partial and not partial(f): | |
230 | continue |
|
231 | continue | |
231 | if f in m2: |
|
232 | if f in m2: | |
232 | n2 = m2[f] |
|
233 | n2 = m2[f] | |
233 | fl1, fl2, fla = m1.flags(f), m2.flags(f), ma.flags(f) |
|
234 | fl1, fl2, fla = m1.flags(f), m2.flags(f), ma.flags(f) | |
234 | nol = 'l' not in fl1 + fl2 + fla |
|
235 | nol = 'l' not in fl1 + fl2 + fla | |
235 | a = ma.get(f, nullid) |
|
236 | a = ma.get(f, nullid) | |
236 | if n == n2 and fl1 == fl2: |
|
237 | if n == n2 and fl1 == fl2: | |
237 | pass # same - keep local |
|
238 | pass # same - keep local | |
238 | elif n2 == a and fl2 == fla: |
|
239 | elif n2 == a and fl2 == fla: | |
239 | pass # remote unchanged - keep local |
|
240 | pass # remote unchanged - keep local | |
240 | elif n == a and fl1 == fla: # local unchanged - use remote |
|
241 | elif n == a and fl1 == fla: # local unchanged - use remote | |
241 | if n == n2: # optimization: keep local content |
|
242 | if n == n2: # optimization: keep local content | |
242 | actions.append((f, "e", (fl2,), "update permissions")) |
|
243 | actions.append((f, "e", (fl2,), "update permissions")) | |
243 | else: |
|
244 | else: | |
244 | actions.append((f, "g", (fl2,), "remote is newer")) |
|
245 | actions.append((f, "g", (fl2,), "remote is newer")) | |
245 | elif nol and n2 == a: # remote only changed 'x' |
|
246 | elif nol and n2 == a: # remote only changed 'x' | |
246 | actions.append((f, "e", (fl2,), "update permissions")) |
|
247 | actions.append((f, "e", (fl2,), "update permissions")) | |
247 | elif nol and n == a: # local only changed 'x' |
|
248 | elif nol and n == a: # local only changed 'x' | |
248 | actions.append((f, "g", (fl1,), "remote is newer")) |
|
249 | actions.append((f, "g", (fl1,), "remote is newer")) | |
249 | else: # both changed something |
|
250 | else: # both changed something | |
250 | actions.append((f, "m", (f, f, False), "versions differ")) |
|
251 | actions.append((f, "m", (f, f, False), "versions differ")) | |
251 | elif f in copied: # files we'll deal with on m2 side |
|
252 | elif f in copied: # files we'll deal with on m2 side | |
252 | pass |
|
253 | pass | |
253 | elif f in movewithdir: # directory rename |
|
254 | elif f in movewithdir: # directory rename | |
254 | f2 = movewithdir[f] |
|
255 | f2 = movewithdir[f] | |
255 | actions.append((f, "d", (None, f2, m1.flags(f)), |
|
256 | actions.append((f, "d", (None, f2, m1.flags(f)), | |
256 | "remote renamed directory to " + f2)) |
|
257 | "remote renamed directory to " + f2)) | |
257 | elif f in copy: |
|
258 | elif f in copy: | |
258 | f2 = copy[f] |
|
259 | f2 = copy[f] | |
259 | actions.append((f, "m", (f2, f, False), |
|
260 | actions.append((f, "m", (f2, f, False), | |
260 | "local copied/moved to " + f2)) |
|
261 | "local copied/moved to " + f2)) | |
261 | elif f in ma: # clean, a different, no remote |
|
262 | elif f in ma: # clean, a different, no remote | |
262 | if n != ma[f]: |
|
263 | if n != ma[f]: | |
263 | prompts.append((f, "cd")) # prompt changed/deleted |
|
264 | prompts.append((f, "cd")) # prompt changed/deleted | |
264 | elif n[20:] == "a": # added, no remote |
|
265 | elif n[20:] == "a": # added, no remote | |
265 | actions.append((f, "f", None, "remote deleted")) |
|
266 | actions.append((f, "f", None, "remote deleted")) | |
266 | else: |
|
267 | else: | |
267 | actions.append((f, "r", None, "other deleted")) |
|
268 | actions.append((f, "r", None, "other deleted")) | |
268 |
|
269 | |||
269 | for f, n in m2.iteritems(): |
|
270 | for f, n in m2.iteritems(): | |
270 | if partial and not partial(f): |
|
271 | if partial and not partial(f): | |
271 | continue |
|
272 | continue | |
272 | if f in m1 or f in copied: # files already visited |
|
273 | if f in m1 or f in copied: # files already visited | |
273 | continue |
|
274 | continue | |
274 | if f in movewithdir: |
|
275 | if f in movewithdir: | |
275 | f2 = movewithdir[f] |
|
276 | f2 = movewithdir[f] | |
276 | actions.append((None, "d", (f, f2, m2.flags(f)), |
|
277 | actions.append((None, "d", (f, f2, m2.flags(f)), | |
277 | "local renamed directory to " + f2)) |
|
278 | "local renamed directory to " + f2)) | |
278 | elif f in copy: |
|
279 | elif f in copy: | |
279 | f2 = copy[f] |
|
280 | f2 = copy[f] | |
280 | if f2 in m2: |
|
281 | if f2 in m2: | |
281 | actions.append((f2, "m", (f, f, False), |
|
282 | actions.append((f2, "m", (f, f, False), | |
282 | "remote copied to " + f)) |
|
283 | "remote copied to " + f)) | |
283 | else: |
|
284 | else: | |
284 | actions.append((f2, "m", (f, f, True), |
|
285 | actions.append((f2, "m", (f, f, True), | |
285 | "remote moved to " + f)) |
|
286 | "remote moved to " + f)) | |
286 | elif f not in ma: |
|
287 | elif f not in ma: | |
287 | if (not overwrite |
|
288 | if (not overwrite | |
288 | and _checkunknownfile(repo, p1, p2, f)): |
|
289 | and _checkunknownfile(repo, p1, p2, f)): | |
289 | actions.append((f, "m", (f, f, False), |
|
290 | actions.append((f, "m", (f, f, False), | |
290 | "remote differs from untracked local")) |
|
291 | "remote differs from untracked local")) | |
291 | else: |
|
292 | else: | |
292 | actions.append((f, "g", (m2.flags(f),), "remote created")) |
|
293 | actions.append((f, "g", (m2.flags(f),), "remote created")) | |
293 | elif n != ma[f]: |
|
294 | elif n != ma[f]: | |
294 | prompts.append((f, "dc")) # prompt deleted/changed |
|
295 | prompts.append((f, "dc")) # prompt deleted/changed | |
295 |
|
296 | |||
296 | for f, m in sorted(prompts): |
|
297 | for f, m in sorted(prompts): | |
297 | if m == "cd": |
|
298 | if m == "cd": | |
298 | if repo.ui.promptchoice( |
|
299 | if repo.ui.promptchoice( | |
299 | _("local changed %s which remote deleted\n" |
|
300 | _("local changed %s which remote deleted\n" | |
300 | "use (c)hanged version or (d)elete?") % f, |
|
301 | "use (c)hanged version or (d)elete?") % f, | |
301 | (_("&Changed"), _("&Delete")), 0): |
|
302 | (_("&Changed"), _("&Delete")), 0): | |
302 | actions.append((f, "r", None, "prompt delete")) |
|
303 | actions.append((f, "r", None, "prompt delete")) | |
303 | else: |
|
304 | else: | |
304 | actions.append((f, "a", None, "prompt keep")) |
|
305 | actions.append((f, "a", None, "prompt keep")) | |
305 | elif m == "dc": |
|
306 | elif m == "dc": | |
306 | if repo.ui.promptchoice( |
|
307 | if repo.ui.promptchoice( | |
307 | _("remote changed %s which local deleted\n" |
|
308 | _("remote changed %s which local deleted\n" | |
308 | "use (c)hanged version or leave (d)eleted?") % f, |
|
309 | "use (c)hanged version or leave (d)eleted?") % f, | |
309 | (_("&Changed"), _("&Deleted")), 0) == 0: |
|
310 | (_("&Changed"), _("&Deleted")), 0) == 0: | |
310 | actions.append((f, "g", (m2.flags(f),), "prompt recreating")) |
|
311 | actions.append((f, "g", (m2.flags(f),), "prompt recreating")) | |
311 | else: assert False, m |
|
312 | else: assert False, m | |
312 | return actions |
|
313 | return actions | |
313 |
|
314 | |||
314 | def actionkey(a): |
|
315 | def actionkey(a): | |
315 | return a[1] == "r" and -1 or 0, a |
|
316 | return a[1] == "r" and -1 or 0, a | |
316 |
|
317 | |||
317 | def applyupdates(repo, actions, wctx, mctx, actx, overwrite): |
|
318 | def applyupdates(repo, actions, wctx, mctx, actx, overwrite): | |
318 | """apply the merge action list to the working directory |
|
319 | """apply the merge action list to the working directory | |
319 |
|
320 | |||
320 | wctx is the working copy context |
|
321 | wctx is the working copy context | |
321 | mctx is the context to be merged into the working copy |
|
322 | mctx is the context to be merged into the working copy | |
322 | actx is the context of the common ancestor |
|
323 | actx is the context of the common ancestor | |
323 |
|
324 | |||
324 | Return a tuple of counts (updated, merged, removed, unresolved) that |
|
325 | Return a tuple of counts (updated, merged, removed, unresolved) that | |
325 | describes how many files were affected by the update. |
|
326 | describes how many files were affected by the update. | |
326 | """ |
|
327 | """ | |
327 |
|
328 | |||
328 | updated, merged, removed, unresolved = 0, 0, 0, 0 |
|
329 | updated, merged, removed, unresolved = 0, 0, 0, 0 | |
329 | ms = mergestate(repo) |
|
330 | ms = mergestate(repo) | |
330 | ms.reset(wctx.p1().node()) |
|
331 | ms.reset(wctx.p1().node()) | |
331 | moves = [] |
|
332 | moves = [] | |
332 | actions.sort(key=actionkey) |
|
333 | actions.sort(key=actionkey) | |
333 |
|
334 | |||
334 | # prescan for merges |
|
335 | # prescan for merges | |
335 | for a in actions: |
|
336 | for a in actions: | |
336 | f, m, args, msg = a |
|
337 | f, m, args, msg = a | |
337 | repo.ui.debug(" %s: %s -> %s\n" % (f, msg, m)) |
|
338 | repo.ui.debug(" %s: %s -> %s\n" % (f, msg, m)) | |
338 | if m == "m": # merge |
|
339 | if m == "m": # merge | |
339 | f2, fd, move = args |
|
340 | f2, fd, move = args | |
340 | if fd == '.hgsubstate': # merged internally |
|
341 | if fd == '.hgsubstate': # merged internally | |
341 | continue |
|
342 | continue | |
342 | repo.ui.debug(" preserving %s for resolve of %s\n" % (f, fd)) |
|
343 | repo.ui.debug(" preserving %s for resolve of %s\n" % (f, fd)) | |
343 | fcl = wctx[f] |
|
344 | fcl = wctx[f] | |
344 | fco = mctx[f2] |
|
345 | fco = mctx[f2] | |
345 | if mctx == actx: # backwards, use working dir parent as ancestor |
|
346 | if mctx == actx: # backwards, use working dir parent as ancestor | |
346 | if fcl.parents(): |
|
347 | if fcl.parents(): | |
347 | fca = fcl.p1() |
|
348 | fca = fcl.p1() | |
348 | else: |
|
349 | else: | |
349 | fca = repo.filectx(f, fileid=nullrev) |
|
350 | fca = repo.filectx(f, fileid=nullrev) | |
350 | else: |
|
351 | else: | |
351 | fca = fcl.ancestor(fco, actx) |
|
352 | fca = fcl.ancestor(fco, actx) | |
352 | if not fca: |
|
353 | if not fca: | |
353 | fca = repo.filectx(f, fileid=nullrev) |
|
354 | fca = repo.filectx(f, fileid=nullrev) | |
354 | ms.add(fcl, fco, fca, fd) |
|
355 | ms.add(fcl, fco, fca, fd) | |
355 | if f != fd and move: |
|
356 | if f != fd and move: | |
356 | moves.append(f) |
|
357 | moves.append(f) | |
357 |
|
358 | |||
358 | audit = repo.wopener.audit |
|
359 | audit = repo.wopener.audit | |
359 |
|
360 | |||
360 | # remove renamed files after safely stored |
|
361 | # remove renamed files after safely stored | |
361 | for f in moves: |
|
362 | for f in moves: | |
362 | if os.path.lexists(repo.wjoin(f)): |
|
363 | if os.path.lexists(repo.wjoin(f)): | |
363 | repo.ui.debug("removing %s\n" % f) |
|
364 | repo.ui.debug("removing %s\n" % f) | |
364 | audit(f) |
|
365 | audit(f) | |
365 | util.unlinkpath(repo.wjoin(f)) |
|
366 | util.unlinkpath(repo.wjoin(f)) | |
366 |
|
367 | |||
367 | numupdates = len(actions) |
|
368 | numupdates = len(actions) | |
368 | for i, a in enumerate(actions): |
|
369 | for i, a in enumerate(actions): | |
369 | f, m, args, msg = a |
|
370 | f, m, args, msg = a | |
370 | repo.ui.progress(_('updating'), i + 1, item=f, total=numupdates, |
|
371 | repo.ui.progress(_('updating'), i + 1, item=f, total=numupdates, | |
371 | unit=_('files')) |
|
372 | unit=_('files')) | |
372 | if m == "r": # remove |
|
373 | if m == "r": # remove | |
373 | repo.ui.note(_("removing %s\n") % f) |
|
374 | repo.ui.note(_("removing %s\n") % f) | |
374 | audit(f) |
|
375 | audit(f) | |
375 | if f == '.hgsubstate': # subrepo states need updating |
|
376 | if f == '.hgsubstate': # subrepo states need updating | |
376 | subrepo.submerge(repo, wctx, mctx, wctx, overwrite) |
|
377 | subrepo.submerge(repo, wctx, mctx, wctx, overwrite) | |
377 | try: |
|
378 | try: | |
378 | util.unlinkpath(repo.wjoin(f), ignoremissing=True) |
|
379 | util.unlinkpath(repo.wjoin(f), ignoremissing=True) | |
379 | except OSError, inst: |
|
380 | except OSError, inst: | |
380 | repo.ui.warn(_("update failed to remove %s: %s!\n") % |
|
381 | repo.ui.warn(_("update failed to remove %s: %s!\n") % | |
381 | (f, inst.strerror)) |
|
382 | (f, inst.strerror)) | |
382 | removed += 1 |
|
383 | removed += 1 | |
383 | elif m == "m": # merge |
|
384 | elif m == "m": # merge | |
384 | if fd == '.hgsubstate': # subrepo states need updating |
|
385 | if fd == '.hgsubstate': # subrepo states need updating | |
385 | subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx), |
|
386 | subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx), | |
386 | overwrite) |
|
387 | overwrite) | |
387 | continue |
|
388 | continue | |
388 | f2, fd, move = args |
|
389 | f2, fd, move = args | |
389 | audit(fd) |
|
390 | audit(fd) | |
390 | r = ms.resolve(fd, wctx, mctx) |
|
391 | r = ms.resolve(fd, wctx, mctx) | |
391 | if r is not None and r > 0: |
|
392 | if r is not None and r > 0: | |
392 | unresolved += 1 |
|
393 | unresolved += 1 | |
393 | else: |
|
394 | else: | |
394 | if r is None: |
|
395 | if r is None: | |
395 | updated += 1 |
|
396 | updated += 1 | |
396 | else: |
|
397 | else: | |
397 | merged += 1 |
|
398 | merged += 1 | |
398 | elif m == "g": # get |
|
399 | elif m == "g": # get | |
399 | flags, = args |
|
400 | flags, = args | |
400 | repo.ui.note(_("getting %s\n") % f) |
|
401 | repo.ui.note(_("getting %s\n") % f) | |
401 | repo.wwrite(f, mctx.filectx(f).data(), flags) |
|
402 | repo.wwrite(f, mctx.filectx(f).data(), flags) | |
402 | updated += 1 |
|
403 | updated += 1 | |
403 | if f == '.hgsubstate': # subrepo states need updating |
|
404 | if f == '.hgsubstate': # subrepo states need updating | |
404 | subrepo.submerge(repo, wctx, mctx, wctx, overwrite) |
|
405 | subrepo.submerge(repo, wctx, mctx, wctx, overwrite) | |
405 | elif m == "d": # directory rename |
|
406 | elif m == "d": # directory rename | |
406 | f2, fd, flags = args |
|
407 | f2, fd, flags = args | |
407 | if f: |
|
408 | if f: | |
408 | repo.ui.note(_("moving %s to %s\n") % (f, fd)) |
|
409 | repo.ui.note(_("moving %s to %s\n") % (f, fd)) | |
409 | audit(f) |
|
410 | audit(f) | |
410 | repo.wwrite(fd, wctx.filectx(f).data(), flags) |
|
411 | repo.wwrite(fd, wctx.filectx(f).data(), flags) | |
411 | util.unlinkpath(repo.wjoin(f)) |
|
412 | util.unlinkpath(repo.wjoin(f)) | |
412 | if f2: |
|
413 | if f2: | |
413 | repo.ui.note(_("getting %s to %s\n") % (f2, fd)) |
|
414 | repo.ui.note(_("getting %s to %s\n") % (f2, fd)) | |
414 | repo.wwrite(fd, mctx.filectx(f2).data(), flags) |
|
415 | repo.wwrite(fd, mctx.filectx(f2).data(), flags) | |
415 | updated += 1 |
|
416 | updated += 1 | |
416 | elif m == "dr": # divergent renames |
|
417 | elif m == "dr": # divergent renames | |
417 | fl, = args |
|
418 | fl, = args | |
418 | repo.ui.warn(_("note: possible conflict - %s was renamed " |
|
419 | repo.ui.warn(_("note: possible conflict - %s was renamed " | |
419 | "multiple times to:\n") % f) |
|
420 | "multiple times to:\n") % f) | |
420 | for nf in fl: |
|
421 | for nf in fl: | |
421 | repo.ui.warn(" %s\n" % nf) |
|
422 | repo.ui.warn(" %s\n" % nf) | |
422 | elif m == "rd": # rename and delete |
|
423 | elif m == "rd": # rename and delete | |
423 | fl, = args |
|
424 | fl, = args | |
424 | repo.ui.warn(_("note: possible conflict - %s was deleted " |
|
425 | repo.ui.warn(_("note: possible conflict - %s was deleted " | |
425 | "and renamed to:\n") % f) |
|
426 | "and renamed to:\n") % f) | |
426 | for nf in fl: |
|
427 | for nf in fl: | |
427 | repo.ui.warn(" %s\n" % nf) |
|
428 | repo.ui.warn(" %s\n" % nf) | |
428 | elif m == "e": # exec |
|
429 | elif m == "e": # exec | |
429 | flags, = args |
|
430 | flags, = args | |
430 | audit(f) |
|
431 | audit(f) | |
431 | util.setflags(repo.wjoin(f), 'l' in flags, 'x' in flags) |
|
432 | util.setflags(repo.wjoin(f), 'l' in flags, 'x' in flags) | |
432 | updated += 1 |
|
433 | updated += 1 | |
433 | ms.commit() |
|
434 | ms.commit() | |
434 | repo.ui.progress(_('updating'), None, total=numupdates, unit=_('files')) |
|
435 | repo.ui.progress(_('updating'), None, total=numupdates, unit=_('files')) | |
435 |
|
436 | |||
436 | return updated, merged, removed, unresolved |
|
437 | return updated, merged, removed, unresolved | |
437 |
|
438 | |||
438 | def calculateupdates(repo, tctx, mctx, ancestor, branchmerge, force, partial): |
|
439 | def calculateupdates(repo, tctx, mctx, ancestor, branchmerge, force, partial): | |
439 | "Calculate the actions needed to merge mctx into tctx" |
|
440 | "Calculate the actions needed to merge mctx into tctx" | |
440 | actions = [] |
|
441 | actions = [] | |
441 | folding = not util.checkcase(repo.path) |
|
442 | folding = not util.checkcase(repo.path) | |
442 | if folding: |
|
443 | if folding: | |
443 | # collision check is not needed for clean update |
|
444 | # collision check is not needed for clean update | |
444 | if (not branchmerge and |
|
445 | if (not branchmerge and | |
445 | (force or not tctx.dirty(missing=True, branch=False))): |
|
446 | (force or not tctx.dirty(missing=True, branch=False))): | |
446 | _checkcollision(mctx, None) |
|
447 | _checkcollision(mctx, None) | |
447 | else: |
|
448 | else: | |
448 | _checkcollision(mctx, (tctx, ancestor)) |
|
449 | _checkcollision(mctx, (tctx, ancestor)) | |
449 | if not force: |
|
450 | if not force: | |
450 | _checkunknown(repo, tctx, mctx) |
|
451 | _checkunknown(repo, tctx, mctx) | |
451 | if tctx.rev() is None: |
|
452 | if tctx.rev() is None: | |
452 | actions += _forgetremoved(tctx, mctx, branchmerge) |
|
453 | actions += _forgetremoved(tctx, mctx, branchmerge) | |
453 | actions += manifestmerge(repo, tctx, mctx, |
|
454 | actions += manifestmerge(repo, tctx, mctx, | |
454 | ancestor, |
|
455 | ancestor, | |
455 |
|
|
456 | branchmerge, force, | |
456 | partial) |
|
457 | partial) | |
457 | return actions |
|
458 | return actions | |
458 |
|
459 | |||
459 | def recordupdates(repo, actions, branchmerge): |
|
460 | def recordupdates(repo, actions, branchmerge): | |
460 | "record merge actions to the dirstate" |
|
461 | "record merge actions to the dirstate" | |
461 |
|
462 | |||
462 | for a in actions: |
|
463 | for a in actions: | |
463 | f, m, args, msg = a |
|
464 | f, m, args, msg = a | |
464 | if m == "r": # remove |
|
465 | if m == "r": # remove | |
465 | if branchmerge: |
|
466 | if branchmerge: | |
466 | repo.dirstate.remove(f) |
|
467 | repo.dirstate.remove(f) | |
467 | else: |
|
468 | else: | |
468 | repo.dirstate.drop(f) |
|
469 | repo.dirstate.drop(f) | |
469 | elif m == "a": # re-add |
|
470 | elif m == "a": # re-add | |
470 | if not branchmerge: |
|
471 | if not branchmerge: | |
471 | repo.dirstate.add(f) |
|
472 | repo.dirstate.add(f) | |
472 | elif m == "f": # forget |
|
473 | elif m == "f": # forget | |
473 | repo.dirstate.drop(f) |
|
474 | repo.dirstate.drop(f) | |
474 | elif m == "e": # exec change |
|
475 | elif m == "e": # exec change | |
475 | repo.dirstate.normallookup(f) |
|
476 | repo.dirstate.normallookup(f) | |
476 | elif m == "g": # get |
|
477 | elif m == "g": # get | |
477 | if branchmerge: |
|
478 | if branchmerge: | |
478 | repo.dirstate.otherparent(f) |
|
479 | repo.dirstate.otherparent(f) | |
479 | else: |
|
480 | else: | |
480 | repo.dirstate.normal(f) |
|
481 | repo.dirstate.normal(f) | |
481 | elif m == "m": # merge |
|
482 | elif m == "m": # merge | |
482 | f2, fd, move = args |
|
483 | f2, fd, move = args | |
483 | if branchmerge: |
|
484 | if branchmerge: | |
484 | # We've done a branch merge, mark this file as merged |
|
485 | # We've done a branch merge, mark this file as merged | |
485 | # so that we properly record the merger later |
|
486 | # so that we properly record the merger later | |
486 | repo.dirstate.merge(fd) |
|
487 | repo.dirstate.merge(fd) | |
487 | if f != f2: # copy/rename |
|
488 | if f != f2: # copy/rename | |
488 | if move: |
|
489 | if move: | |
489 | repo.dirstate.remove(f) |
|
490 | repo.dirstate.remove(f) | |
490 | if f != fd: |
|
491 | if f != fd: | |
491 | repo.dirstate.copy(f, fd) |
|
492 | repo.dirstate.copy(f, fd) | |
492 | else: |
|
493 | else: | |
493 | repo.dirstate.copy(f2, fd) |
|
494 | repo.dirstate.copy(f2, fd) | |
494 | else: |
|
495 | else: | |
495 | # We've update-merged a locally modified file, so |
|
496 | # We've update-merged a locally modified file, so | |
496 | # we set the dirstate to emulate a normal checkout |
|
497 | # we set the dirstate to emulate a normal checkout | |
497 | # of that file some time in the past. Thus our |
|
498 | # of that file some time in the past. Thus our | |
498 | # merge will appear as a normal local file |
|
499 | # merge will appear as a normal local file | |
499 | # modification. |
|
500 | # modification. | |
500 | if f2 == fd: # file not locally copied/moved |
|
501 | if f2 == fd: # file not locally copied/moved | |
501 | repo.dirstate.normallookup(fd) |
|
502 | repo.dirstate.normallookup(fd) | |
502 | if move: |
|
503 | if move: | |
503 | repo.dirstate.drop(f) |
|
504 | repo.dirstate.drop(f) | |
504 | elif m == "d": # directory rename |
|
505 | elif m == "d": # directory rename | |
505 | f2, fd, flag = args |
|
506 | f2, fd, flag = args | |
506 | if not f2 and f not in repo.dirstate: |
|
507 | if not f2 and f not in repo.dirstate: | |
507 | # untracked file moved |
|
508 | # untracked file moved | |
508 | continue |
|
509 | continue | |
509 | if branchmerge: |
|
510 | if branchmerge: | |
510 | repo.dirstate.add(fd) |
|
511 | repo.dirstate.add(fd) | |
511 | if f: |
|
512 | if f: | |
512 | repo.dirstate.remove(f) |
|
513 | repo.dirstate.remove(f) | |
513 | repo.dirstate.copy(f, fd) |
|
514 | repo.dirstate.copy(f, fd) | |
514 | if f2: |
|
515 | if f2: | |
515 | repo.dirstate.copy(f2, fd) |
|
516 | repo.dirstate.copy(f2, fd) | |
516 | else: |
|
517 | else: | |
517 | repo.dirstate.normal(fd) |
|
518 | repo.dirstate.normal(fd) | |
518 | if f: |
|
519 | if f: | |
519 | repo.dirstate.drop(f) |
|
520 | repo.dirstate.drop(f) | |
520 |
|
521 | |||
521 | def update(repo, node, branchmerge, force, partial, ancestor=None, |
|
522 | def update(repo, node, branchmerge, force, partial, ancestor=None, | |
522 | mergeancestor=False): |
|
523 | mergeancestor=False): | |
523 | """ |
|
524 | """ | |
524 | Perform a merge between the working directory and the given node |
|
525 | Perform a merge between the working directory and the given node | |
525 |
|
526 | |||
526 | node = the node to update to, or None if unspecified |
|
527 | node = the node to update to, or None if unspecified | |
527 | branchmerge = whether to merge between branches |
|
528 | branchmerge = whether to merge between branches | |
528 | force = whether to force branch merging or file overwriting |
|
529 | force = whether to force branch merging or file overwriting | |
529 | partial = a function to filter file lists (dirstate not updated) |
|
530 | partial = a function to filter file lists (dirstate not updated) | |
530 | mergeancestor = if false, merging with an ancestor (fast-forward) |
|
531 | mergeancestor = if false, merging with an ancestor (fast-forward) | |
531 | is only allowed between different named branches. This flag |
|
532 | is only allowed between different named branches. This flag | |
532 | is used by rebase extension as a temporary fix and should be |
|
533 | is used by rebase extension as a temporary fix and should be | |
533 | avoided in general. |
|
534 | avoided in general. | |
534 |
|
535 | |||
535 | The table below shows all the behaviors of the update command |
|
536 | The table below shows all the behaviors of the update command | |
536 | given the -c and -C or no options, whether the working directory |
|
537 | given the -c and -C or no options, whether the working directory | |
537 | is dirty, whether a revision is specified, and the relationship of |
|
538 | is dirty, whether a revision is specified, and the relationship of | |
538 | the parent rev to the target rev (linear, on the same named |
|
539 | the parent rev to the target rev (linear, on the same named | |
539 | branch, or on another named branch). |
|
540 | branch, or on another named branch). | |
540 |
|
541 | |||
541 | This logic is tested by test-update-branches.t. |
|
542 | This logic is tested by test-update-branches.t. | |
542 |
|
543 | |||
543 | -c -C dirty rev | linear same cross |
|
544 | -c -C dirty rev | linear same cross | |
544 | n n n n | ok (1) x |
|
545 | n n n n | ok (1) x | |
545 | n n n y | ok ok ok |
|
546 | n n n y | ok ok ok | |
546 | n n y * | merge (2) (2) |
|
547 | n n y * | merge (2) (2) | |
547 | n y * * | --- discard --- |
|
548 | n y * * | --- discard --- | |
548 | y n y * | --- (3) --- |
|
549 | y n y * | --- (3) --- | |
549 | y n n * | --- ok --- |
|
550 | y n n * | --- ok --- | |
550 | y y * * | --- (4) --- |
|
551 | y y * * | --- (4) --- | |
551 |
|
552 | |||
552 | x = can't happen |
|
553 | x = can't happen | |
553 | * = don't-care |
|
554 | * = don't-care | |
554 | 1 = abort: crosses branches (use 'hg merge' or 'hg update -c') |
|
555 | 1 = abort: crosses branches (use 'hg merge' or 'hg update -c') | |
555 | 2 = abort: crosses branches (use 'hg merge' to merge or |
|
556 | 2 = abort: crosses branches (use 'hg merge' to merge or | |
556 | use 'hg update -C' to discard changes) |
|
557 | use 'hg update -C' to discard changes) | |
557 | 3 = abort: uncommitted local changes |
|
558 | 3 = abort: uncommitted local changes | |
558 | 4 = incompatible options (checked in commands.py) |
|
559 | 4 = incompatible options (checked in commands.py) | |
559 |
|
560 | |||
560 | Return the same tuple as applyupdates(). |
|
561 | Return the same tuple as applyupdates(). | |
561 | """ |
|
562 | """ | |
562 |
|
563 | |||
563 | onode = node |
|
564 | onode = node | |
564 | wlock = repo.wlock() |
|
565 | wlock = repo.wlock() | |
565 | try: |
|
566 | try: | |
566 | wc = repo[None] |
|
567 | wc = repo[None] | |
567 | if node is None: |
|
568 | if node is None: | |
568 | # tip of current branch |
|
569 | # tip of current branch | |
569 | try: |
|
570 | try: | |
570 | node = repo.branchtip(wc.branch()) |
|
571 | node = repo.branchtip(wc.branch()) | |
571 | except error.RepoLookupError: |
|
572 | except error.RepoLookupError: | |
572 | if wc.branch() == "default": # no default branch! |
|
573 | if wc.branch() == "default": # no default branch! | |
573 | node = repo.lookup("tip") # update to tip |
|
574 | node = repo.lookup("tip") # update to tip | |
574 | else: |
|
575 | else: | |
575 | raise util.Abort(_("branch %s not found") % wc.branch()) |
|
576 | raise util.Abort(_("branch %s not found") % wc.branch()) | |
576 | overwrite = force and not branchmerge |
|
577 | overwrite = force and not branchmerge | |
577 | pl = wc.parents() |
|
578 | pl = wc.parents() | |
578 | p1, p2 = pl[0], repo[node] |
|
579 | p1, p2 = pl[0], repo[node] | |
579 | if ancestor: |
|
580 | if ancestor: | |
580 | pa = repo[ancestor] |
|
581 | pa = repo[ancestor] | |
581 | else: |
|
582 | else: | |
582 | pa = p1.ancestor(p2) |
|
583 | pa = p1.ancestor(p2) | |
583 |
|
584 | |||
584 | fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2) |
|
585 | fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2) | |
585 |
|
586 | |||
586 | ### check phase |
|
587 | ### check phase | |
587 | if not overwrite and len(pl) > 1: |
|
588 | if not overwrite and len(pl) > 1: | |
588 | raise util.Abort(_("outstanding uncommitted merges")) |
|
589 | raise util.Abort(_("outstanding uncommitted merges")) | |
589 | if branchmerge: |
|
590 | if branchmerge: | |
590 | if pa == p2: |
|
591 | if pa == p2: | |
591 | raise util.Abort(_("merging with a working directory ancestor" |
|
592 | raise util.Abort(_("merging with a working directory ancestor" | |
592 | " has no effect")) |
|
593 | " has no effect")) | |
593 | elif pa == p1: |
|
594 | elif pa == p1: | |
594 | if not mergeancestor and p1.branch() == p2.branch(): |
|
595 | if not mergeancestor and p1.branch() == p2.branch(): | |
595 | raise util.Abort(_("nothing to merge"), |
|
596 | raise util.Abort(_("nothing to merge"), | |
596 | hint=_("use 'hg update' " |
|
597 | hint=_("use 'hg update' " | |
597 | "or check 'hg heads'")) |
|
598 | "or check 'hg heads'")) | |
598 | if not force and (wc.files() or wc.deleted()): |
|
599 | if not force and (wc.files() or wc.deleted()): | |
599 | raise util.Abort(_("outstanding uncommitted changes"), |
|
600 | raise util.Abort(_("outstanding uncommitted changes"), | |
600 | hint=_("use 'hg status' to list changes")) |
|
601 | hint=_("use 'hg status' to list changes")) | |
601 | for s in sorted(wc.substate): |
|
602 | for s in sorted(wc.substate): | |
602 | if wc.sub(s).dirty(): |
|
603 | if wc.sub(s).dirty(): | |
603 | raise util.Abort(_("outstanding uncommitted changes in " |
|
604 | raise util.Abort(_("outstanding uncommitted changes in " | |
604 | "subrepository '%s'") % s) |
|
605 | "subrepository '%s'") % s) | |
605 |
|
606 | |||
606 | elif not overwrite: |
|
607 | elif not overwrite: | |
607 | if pa == p1 or pa == p2: # linear |
|
608 | if pa == p1 or pa == p2: # linear | |
608 | pass # all good |
|
609 | pass # all good | |
609 | elif wc.dirty(missing=True): |
|
610 | elif wc.dirty(missing=True): | |
610 | raise util.Abort(_("crosses branches (merge branches or use" |
|
611 | raise util.Abort(_("crosses branches (merge branches or use" | |
611 | " --clean to discard changes)")) |
|
612 | " --clean to discard changes)")) | |
612 | elif onode is None: |
|
613 | elif onode is None: | |
613 | raise util.Abort(_("crosses branches (merge branches or update" |
|
614 | raise util.Abort(_("crosses branches (merge branches or update" | |
614 | " --check to force update)")) |
|
615 | " --check to force update)")) | |
615 | else: |
|
616 | else: | |
616 | # Allow jumping branches if clean and specific rev given |
|
617 | # Allow jumping branches if clean and specific rev given | |
617 | pa = p1 |
|
618 | pa = p1 | |
618 |
|
619 | |||
619 | ### calculate phase |
|
620 | ### calculate phase | |
620 | actions = calculateupdates(repo, wc, p2, pa, |
|
621 | actions = calculateupdates(repo, wc, p2, pa, | |
621 | branchmerge, force, partial) |
|
622 | branchmerge, force, partial) | |
622 |
|
623 | |||
623 | ### apply phase |
|
624 | ### apply phase | |
624 | if not branchmerge: # just jump to the new rev |
|
625 | if not branchmerge: # just jump to the new rev | |
625 | fp1, fp2, xp1, xp2 = fp2, nullid, xp2, '' |
|
626 | fp1, fp2, xp1, xp2 = fp2, nullid, xp2, '' | |
626 | if not partial: |
|
627 | if not partial: | |
627 | repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2) |
|
628 | repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2) | |
628 |
|
629 | |||
629 | stats = applyupdates(repo, actions, wc, p2, pa, overwrite) |
|
630 | stats = applyupdates(repo, actions, wc, p2, pa, overwrite) | |
630 |
|
631 | |||
631 | if not partial: |
|
632 | if not partial: | |
632 | repo.setparents(fp1, fp2) |
|
633 | repo.setparents(fp1, fp2) | |
633 | recordupdates(repo, actions, branchmerge) |
|
634 | recordupdates(repo, actions, branchmerge) | |
634 | if not branchmerge: |
|
635 | if not branchmerge: | |
635 | repo.dirstate.setbranch(p2.branch()) |
|
636 | repo.dirstate.setbranch(p2.branch()) | |
636 | finally: |
|
637 | finally: | |
637 | wlock.release() |
|
638 | wlock.release() | |
638 |
|
639 | |||
639 | if not partial: |
|
640 | if not partial: | |
640 | repo.hook('update', parent1=xp1, parent2=xp2, error=stats[3]) |
|
641 | repo.hook('update', parent1=xp1, parent2=xp2, error=stats[3]) | |
641 | return stats |
|
642 | return stats |
@@ -1,64 +1,64 b'' | |||||
1 | $ hg init t |
|
1 | $ hg init t | |
2 | $ cd t |
|
2 | $ cd t | |
3 |
|
3 | |||
4 | $ echo 1 > a |
|
4 | $ echo 1 > a | |
5 | $ hg ci -qAm "first" |
|
5 | $ hg ci -qAm "first" | |
6 |
|
6 | |||
7 | $ hg cp a b |
|
7 | $ hg cp a b | |
8 | $ hg mv a c |
|
8 | $ hg mv a c | |
9 | $ echo 2 >> b |
|
9 | $ echo 2 >> b | |
10 | $ echo 2 >> c |
|
10 | $ echo 2 >> c | |
11 |
|
11 | |||
12 | $ hg ci -qAm "second" |
|
12 | $ hg ci -qAm "second" | |
13 |
|
13 | |||
14 | $ hg co -C 0 |
|
14 | $ hg co -C 0 | |
15 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
15 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
16 |
|
16 | |||
17 | $ echo 0 > a |
|
17 | $ echo 0 > a | |
18 | $ echo 1 >> a |
|
18 | $ echo 1 >> a | |
19 |
|
19 | |||
20 | $ hg ci -qAm "other" |
|
20 | $ hg ci -qAm "other" | |
21 |
|
21 | |||
22 | $ hg merge --debug |
|
22 | $ hg merge --debug | |
23 | searching for copies back to rev 1 |
|
23 | searching for copies back to rev 1 | |
24 | unmatched files in other: |
|
24 | unmatched files in other: | |
25 | b |
|
25 | b | |
26 | c |
|
26 | c | |
27 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
27 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
28 | src: 'a' -> dst: 'b' * |
|
28 | src: 'a' -> dst: 'b' * | |
29 | src: 'a' -> dst: 'c' * |
|
29 | src: 'a' -> dst: 'c' * | |
30 | checking for directory renames |
|
30 | checking for directory renames | |
31 | resolving manifests |
|
31 | resolving manifests | |
32 |
|
|
32 | branchmerge: True, force: False, partial: False | |
33 | ancestor: b8bf91eeebbc, local: add3f11052fa+, remote: 17c05bb7fcb6 |
|
33 | ancestor: b8bf91eeebbc, local: add3f11052fa+, remote: 17c05bb7fcb6 | |
34 | a: remote moved to b -> m |
|
34 | a: remote moved to b -> m | |
35 | preserving a for resolve of b |
|
35 | preserving a for resolve of b | |
36 | a: remote moved to c -> m |
|
36 | a: remote moved to c -> m | |
37 | preserving a for resolve of c |
|
37 | preserving a for resolve of c | |
38 | removing a |
|
38 | removing a | |
39 | updating: a 1/2 files (50.00%) |
|
39 | updating: a 1/2 files (50.00%) | |
40 | picked tool 'internal:merge' for b (binary False symlink False) |
|
40 | picked tool 'internal:merge' for b (binary False symlink False) | |
41 | merging a and b to b |
|
41 | merging a and b to b | |
42 | my b@add3f11052fa+ other b@17c05bb7fcb6 ancestor a@b8bf91eeebbc |
|
42 | my b@add3f11052fa+ other b@17c05bb7fcb6 ancestor a@b8bf91eeebbc | |
43 | premerge successful |
|
43 | premerge successful | |
44 | updating: a 2/2 files (100.00%) |
|
44 | updating: a 2/2 files (100.00%) | |
45 | picked tool 'internal:merge' for c (binary False symlink False) |
|
45 | picked tool 'internal:merge' for c (binary False symlink False) | |
46 | merging a and c to c |
|
46 | merging a and c to c | |
47 | my c@add3f11052fa+ other c@17c05bb7fcb6 ancestor a@b8bf91eeebbc |
|
47 | my c@add3f11052fa+ other c@17c05bb7fcb6 ancestor a@b8bf91eeebbc | |
48 | premerge successful |
|
48 | premerge successful | |
49 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
49 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
50 | (branch merge, don't forget to commit) |
|
50 | (branch merge, don't forget to commit) | |
51 |
|
51 | |||
52 | file b |
|
52 | file b | |
53 | $ cat b |
|
53 | $ cat b | |
54 | 0 |
|
54 | 0 | |
55 | 1 |
|
55 | 1 | |
56 | 2 |
|
56 | 2 | |
57 |
|
57 | |||
58 | file c |
|
58 | file c | |
59 | $ cat c |
|
59 | $ cat c | |
60 | 0 |
|
60 | 0 | |
61 | 1 |
|
61 | 1 | |
62 | 2 |
|
62 | 2 | |
63 |
|
63 | |||
64 | $ cd .. |
|
64 | $ cd .. |
@@ -1,67 +1,67 b'' | |||||
1 | $ hg init repo |
|
1 | $ hg init repo | |
2 | $ cd repo |
|
2 | $ cd repo | |
3 |
|
3 | |||
4 | $ echo line 1 > foo |
|
4 | $ echo line 1 > foo | |
5 | $ hg ci -qAm 'add foo' |
|
5 | $ hg ci -qAm 'add foo' | |
6 |
|
6 | |||
7 | copy foo to bar and change both files |
|
7 | copy foo to bar and change both files | |
8 | $ hg cp foo bar |
|
8 | $ hg cp foo bar | |
9 | $ echo line 2-1 >> foo |
|
9 | $ echo line 2-1 >> foo | |
10 | $ echo line 2-2 >> bar |
|
10 | $ echo line 2-2 >> bar | |
11 | $ hg ci -m 'cp foo bar; change both' |
|
11 | $ hg ci -m 'cp foo bar; change both' | |
12 |
|
12 | |||
13 | in another branch, change foo in a way that doesn't conflict with |
|
13 | in another branch, change foo in a way that doesn't conflict with | |
14 | the other changes |
|
14 | the other changes | |
15 | $ hg up -qC 0 |
|
15 | $ hg up -qC 0 | |
16 | $ echo line 0 > foo |
|
16 | $ echo line 0 > foo | |
17 | $ hg cat foo >> foo |
|
17 | $ hg cat foo >> foo | |
18 | $ hg ci -m 'change foo' |
|
18 | $ hg ci -m 'change foo' | |
19 | created new head |
|
19 | created new head | |
20 |
|
20 | |||
21 | we get conflicts that shouldn't be there |
|
21 | we get conflicts that shouldn't be there | |
22 | $ hg merge -P |
|
22 | $ hg merge -P | |
23 | changeset: 1:484bf6903104 |
|
23 | changeset: 1:484bf6903104 | |
24 | user: test |
|
24 | user: test | |
25 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
25 | date: Thu Jan 01 00:00:00 1970 +0000 | |
26 | summary: cp foo bar; change both |
|
26 | summary: cp foo bar; change both | |
27 |
|
27 | |||
28 | $ hg merge --debug |
|
28 | $ hg merge --debug | |
29 | searching for copies back to rev 1 |
|
29 | searching for copies back to rev 1 | |
30 | unmatched files in other: |
|
30 | unmatched files in other: | |
31 | bar |
|
31 | bar | |
32 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
32 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
33 | src: 'foo' -> dst: 'bar' * |
|
33 | src: 'foo' -> dst: 'bar' * | |
34 | checking for directory renames |
|
34 | checking for directory renames | |
35 | resolving manifests |
|
35 | resolving manifests | |
36 |
|
|
36 | branchmerge: True, force: False, partial: False | |
37 | ancestor: e6dc8efe11cc, local: 6a0df1dad128+, remote: 484bf6903104 |
|
37 | ancestor: e6dc8efe11cc, local: 6a0df1dad128+, remote: 484bf6903104 | |
38 | foo: remote copied to bar -> m |
|
38 | foo: remote copied to bar -> m | |
39 | preserving foo for resolve of bar |
|
39 | preserving foo for resolve of bar | |
40 | foo: versions differ -> m |
|
40 | foo: versions differ -> m | |
41 | preserving foo for resolve of foo |
|
41 | preserving foo for resolve of foo | |
42 | updating: foo 1/2 files (50.00%) |
|
42 | updating: foo 1/2 files (50.00%) | |
43 | picked tool 'internal:merge' for bar (binary False symlink False) |
|
43 | picked tool 'internal:merge' for bar (binary False symlink False) | |
44 | merging foo and bar to bar |
|
44 | merging foo and bar to bar | |
45 | my bar@6a0df1dad128+ other bar@484bf6903104 ancestor foo@e6dc8efe11cc |
|
45 | my bar@6a0df1dad128+ other bar@484bf6903104 ancestor foo@e6dc8efe11cc | |
46 | premerge successful |
|
46 | premerge successful | |
47 | updating: foo 2/2 files (100.00%) |
|
47 | updating: foo 2/2 files (100.00%) | |
48 | picked tool 'internal:merge' for foo (binary False symlink False) |
|
48 | picked tool 'internal:merge' for foo (binary False symlink False) | |
49 | merging foo |
|
49 | merging foo | |
50 | my foo@6a0df1dad128+ other foo@484bf6903104 ancestor foo@e6dc8efe11cc |
|
50 | my foo@6a0df1dad128+ other foo@484bf6903104 ancestor foo@e6dc8efe11cc | |
51 | premerge successful |
|
51 | premerge successful | |
52 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
52 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
53 | (branch merge, don't forget to commit) |
|
53 | (branch merge, don't forget to commit) | |
54 |
|
54 | |||
55 | contents of foo |
|
55 | contents of foo | |
56 | $ cat foo |
|
56 | $ cat foo | |
57 | line 0 |
|
57 | line 0 | |
58 | line 1 |
|
58 | line 1 | |
59 | line 2-1 |
|
59 | line 2-1 | |
60 |
|
60 | |||
61 | contents of bar |
|
61 | contents of bar | |
62 | $ cat bar |
|
62 | $ cat bar | |
63 | line 0 |
|
63 | line 0 | |
64 | line 1 |
|
64 | line 1 | |
65 | line 2-2 |
|
65 | line 2-2 | |
66 |
|
66 | |||
67 | $ cd .. |
|
67 | $ cd .. |
@@ -1,535 +1,535 b'' | |||||
1 | Create a repo with some stuff in it: |
|
1 | Create a repo with some stuff in it: | |
2 |
|
2 | |||
3 | $ hg init a |
|
3 | $ hg init a | |
4 | $ cd a |
|
4 | $ cd a | |
5 | $ echo a > a |
|
5 | $ echo a > a | |
6 | $ echo a > d |
|
6 | $ echo a > d | |
7 | $ echo a > e |
|
7 | $ echo a > e | |
8 | $ hg ci -qAm0 |
|
8 | $ hg ci -qAm0 | |
9 | $ echo b > a |
|
9 | $ echo b > a | |
10 | $ hg ci -m1 -u bar |
|
10 | $ hg ci -m1 -u bar | |
11 | $ hg mv a b |
|
11 | $ hg mv a b | |
12 | $ hg ci -m2 |
|
12 | $ hg ci -m2 | |
13 | $ hg cp b c |
|
13 | $ hg cp b c | |
14 | $ hg ci -m3 -u baz |
|
14 | $ hg ci -m3 -u baz | |
15 | $ echo b > d |
|
15 | $ echo b > d | |
16 | $ echo f > e |
|
16 | $ echo f > e | |
17 | $ hg ci -m4 |
|
17 | $ hg ci -m4 | |
18 | $ hg up -q 3 |
|
18 | $ hg up -q 3 | |
19 | $ echo b > e |
|
19 | $ echo b > e | |
20 | $ hg branch -q stable |
|
20 | $ hg branch -q stable | |
21 | $ hg ci -m5 |
|
21 | $ hg ci -m5 | |
22 | $ hg merge -q default --tool internal:local |
|
22 | $ hg merge -q default --tool internal:local | |
23 | $ hg branch -q default |
|
23 | $ hg branch -q default | |
24 | $ hg ci -m6 |
|
24 | $ hg ci -m6 | |
25 | $ hg phase --public 3 |
|
25 | $ hg phase --public 3 | |
26 | $ hg phase --force --secret 6 |
|
26 | $ hg phase --force --secret 6 | |
27 |
|
27 | |||
28 | $ hg --config extensions.graphlog= log -G --template '{author}@{rev}.{phase}: {desc}\n' |
|
28 | $ hg --config extensions.graphlog= log -G --template '{author}@{rev}.{phase}: {desc}\n' | |
29 | @ test@6.secret: 6 |
|
29 | @ test@6.secret: 6 | |
30 | |\ |
|
30 | |\ | |
31 | | o test@5.draft: 5 |
|
31 | | o test@5.draft: 5 | |
32 | | | |
|
32 | | | | |
33 | o | test@4.draft: 4 |
|
33 | o | test@4.draft: 4 | |
34 | |/ |
|
34 | |/ | |
35 | o baz@3.public: 3 |
|
35 | o baz@3.public: 3 | |
36 | | |
|
36 | | | |
37 | o test@2.public: 2 |
|
37 | o test@2.public: 2 | |
38 | | |
|
38 | | | |
39 | o bar@1.public: 1 |
|
39 | o bar@1.public: 1 | |
40 | | |
|
40 | | | |
41 | o test@0.public: 0 |
|
41 | o test@0.public: 0 | |
42 |
|
42 | |||
43 |
|
43 | |||
44 | Need to specify a rev: |
|
44 | Need to specify a rev: | |
45 |
|
45 | |||
46 | $ hg graft |
|
46 | $ hg graft | |
47 | abort: no revisions specified |
|
47 | abort: no revisions specified | |
48 | [255] |
|
48 | [255] | |
49 |
|
49 | |||
50 | Can't graft ancestor: |
|
50 | Can't graft ancestor: | |
51 |
|
51 | |||
52 | $ hg graft 1 2 |
|
52 | $ hg graft 1 2 | |
53 | skipping ancestor revision 1 |
|
53 | skipping ancestor revision 1 | |
54 | skipping ancestor revision 2 |
|
54 | skipping ancestor revision 2 | |
55 | [255] |
|
55 | [255] | |
56 |
|
56 | |||
57 | Specify revisions with -r: |
|
57 | Specify revisions with -r: | |
58 |
|
58 | |||
59 | $ hg graft -r 1 -r 2 |
|
59 | $ hg graft -r 1 -r 2 | |
60 | skipping ancestor revision 1 |
|
60 | skipping ancestor revision 1 | |
61 | skipping ancestor revision 2 |
|
61 | skipping ancestor revision 2 | |
62 | [255] |
|
62 | [255] | |
63 |
|
63 | |||
64 | $ hg graft -r 1 2 |
|
64 | $ hg graft -r 1 2 | |
65 | skipping ancestor revision 2 |
|
65 | skipping ancestor revision 2 | |
66 | skipping ancestor revision 1 |
|
66 | skipping ancestor revision 1 | |
67 | [255] |
|
67 | [255] | |
68 |
|
68 | |||
69 | Can't graft with dirty wd: |
|
69 | Can't graft with dirty wd: | |
70 |
|
70 | |||
71 | $ hg up -q 0 |
|
71 | $ hg up -q 0 | |
72 | $ echo foo > a |
|
72 | $ echo foo > a | |
73 | $ hg graft 1 |
|
73 | $ hg graft 1 | |
74 | abort: outstanding uncommitted changes |
|
74 | abort: outstanding uncommitted changes | |
75 | [255] |
|
75 | [255] | |
76 | $ hg revert a |
|
76 | $ hg revert a | |
77 |
|
77 | |||
78 | Graft a rename: |
|
78 | Graft a rename: | |
79 |
|
79 | |||
80 | $ hg graft 2 -u foo |
|
80 | $ hg graft 2 -u foo | |
81 | grafting revision 2 |
|
81 | grafting revision 2 | |
82 | merging a and b to b |
|
82 | merging a and b to b | |
83 | $ hg export tip --git |
|
83 | $ hg export tip --git | |
84 | # HG changeset patch |
|
84 | # HG changeset patch | |
85 | # User foo |
|
85 | # User foo | |
86 | # Date 0 0 |
|
86 | # Date 0 0 | |
87 | # Node ID ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
87 | # Node ID ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
88 | # Parent 68795b066622ca79a25816a662041d8f78f3cd9e |
|
88 | # Parent 68795b066622ca79a25816a662041d8f78f3cd9e | |
89 | 2 |
|
89 | 2 | |
90 |
|
90 | |||
91 | diff --git a/a b/b |
|
91 | diff --git a/a b/b | |
92 | rename from a |
|
92 | rename from a | |
93 | rename to b |
|
93 | rename to b | |
94 |
|
94 | |||
95 | Look for extra:source |
|
95 | Look for extra:source | |
96 |
|
96 | |||
97 | $ hg log --debug -r tip |
|
97 | $ hg log --debug -r tip | |
98 | changeset: 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
98 | changeset: 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
99 | tag: tip |
|
99 | tag: tip | |
100 | phase: draft |
|
100 | phase: draft | |
101 | parent: 0:68795b066622ca79a25816a662041d8f78f3cd9e |
|
101 | parent: 0:68795b066622ca79a25816a662041d8f78f3cd9e | |
102 | parent: -1:0000000000000000000000000000000000000000 |
|
102 | parent: -1:0000000000000000000000000000000000000000 | |
103 | manifest: 7:e59b6b228f9cbf9903d5e9abf996e083a1f533eb |
|
103 | manifest: 7:e59b6b228f9cbf9903d5e9abf996e083a1f533eb | |
104 | user: foo |
|
104 | user: foo | |
105 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
105 | date: Thu Jan 01 00:00:00 1970 +0000 | |
106 | files+: b |
|
106 | files+: b | |
107 | files-: a |
|
107 | files-: a | |
108 | extra: branch=default |
|
108 | extra: branch=default | |
109 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
109 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
110 | description: |
|
110 | description: | |
111 | 2 |
|
111 | 2 | |
112 |
|
112 | |||
113 |
|
113 | |||
114 |
|
114 | |||
115 | Graft out of order, skipping a merge and a duplicate |
|
115 | Graft out of order, skipping a merge and a duplicate | |
116 |
|
116 | |||
117 | $ hg graft 1 5 4 3 'merge()' 2 -n |
|
117 | $ hg graft 1 5 4 3 'merge()' 2 -n | |
118 | skipping ungraftable merge revision 6 |
|
118 | skipping ungraftable merge revision 6 | |
119 | skipping already grafted revision 2 |
|
119 | skipping already grafted revision 2 | |
120 | grafting revision 1 |
|
120 | grafting revision 1 | |
121 | grafting revision 5 |
|
121 | grafting revision 5 | |
122 | grafting revision 4 |
|
122 | grafting revision 4 | |
123 | grafting revision 3 |
|
123 | grafting revision 3 | |
124 |
|
124 | |||
125 | $ hg graft 1 5 4 3 'merge()' 2 --debug |
|
125 | $ hg graft 1 5 4 3 'merge()' 2 --debug | |
126 | skipping ungraftable merge revision 6 |
|
126 | skipping ungraftable merge revision 6 | |
127 | scanning for duplicate grafts |
|
127 | scanning for duplicate grafts | |
128 | skipping already grafted revision 2 |
|
128 | skipping already grafted revision 2 | |
129 | grafting revision 1 |
|
129 | grafting revision 1 | |
130 | searching for copies back to rev 1 |
|
130 | searching for copies back to rev 1 | |
131 | unmatched files in local: |
|
131 | unmatched files in local: | |
132 | b |
|
132 | b | |
133 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
133 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
134 | src: 'a' -> dst: 'b' * |
|
134 | src: 'a' -> dst: 'b' * | |
135 | checking for directory renames |
|
135 | checking for directory renames | |
136 | resolving manifests |
|
136 | resolving manifests | |
137 | overwrite: False, partial: False |
|
137 | branchmerge: True, force: True, partial: False | |
138 | ancestor: 68795b066622, local: ef0ef43d49e7+, remote: 5d205f8b35b6 |
|
138 | ancestor: 68795b066622, local: ef0ef43d49e7+, remote: 5d205f8b35b6 | |
139 | b: local copied/moved to a -> m |
|
139 | b: local copied/moved to a -> m | |
140 | preserving b for resolve of b |
|
140 | preserving b for resolve of b | |
141 | updating: b 1/1 files (100.00%) |
|
141 | updating: b 1/1 files (100.00%) | |
142 | picked tool 'internal:merge' for b (binary False symlink False) |
|
142 | picked tool 'internal:merge' for b (binary False symlink False) | |
143 | merging b and a to b |
|
143 | merging b and a to b | |
144 | my b@ef0ef43d49e7+ other a@5d205f8b35b6 ancestor a@68795b066622 |
|
144 | my b@ef0ef43d49e7+ other a@5d205f8b35b6 ancestor a@68795b066622 | |
145 | premerge successful |
|
145 | premerge successful | |
146 | b |
|
146 | b | |
147 | grafting revision 5 |
|
147 | grafting revision 5 | |
148 | searching for copies back to rev 1 |
|
148 | searching for copies back to rev 1 | |
149 | resolving manifests |
|
149 | resolving manifests | |
150 | overwrite: False, partial: False |
|
150 | branchmerge: True, force: True, partial: False | |
151 | ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746 |
|
151 | ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746 | |
152 | e: remote is newer -> g |
|
152 | e: remote is newer -> g | |
153 | updating: e 1/1 files (100.00%) |
|
153 | updating: e 1/1 files (100.00%) | |
154 | getting e |
|
154 | getting e | |
155 | e |
|
155 | e | |
156 | grafting revision 4 |
|
156 | grafting revision 4 | |
157 | searching for copies back to rev 1 |
|
157 | searching for copies back to rev 1 | |
158 | resolving manifests |
|
158 | resolving manifests | |
159 | overwrite: False, partial: False |
|
159 | branchmerge: True, force: True, partial: False | |
160 | ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d |
|
160 | ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d | |
161 | d: remote is newer -> g |
|
161 | d: remote is newer -> g | |
162 | e: versions differ -> m |
|
162 | e: versions differ -> m | |
163 | preserving e for resolve of e |
|
163 | preserving e for resolve of e | |
164 | updating: d 1/2 files (50.00%) |
|
164 | updating: d 1/2 files (50.00%) | |
165 | getting d |
|
165 | getting d | |
166 | updating: e 2/2 files (100.00%) |
|
166 | updating: e 2/2 files (100.00%) | |
167 | picked tool 'internal:merge' for e (binary False symlink False) |
|
167 | picked tool 'internal:merge' for e (binary False symlink False) | |
168 | merging e |
|
168 | merging e | |
169 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@68795b066622 |
|
169 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@68795b066622 | |
170 | warning: conflicts during merge. |
|
170 | warning: conflicts during merge. | |
171 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
171 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') | |
172 | abort: unresolved conflicts, can't continue |
|
172 | abort: unresolved conflicts, can't continue | |
173 | (use hg resolve and hg graft --continue) |
|
173 | (use hg resolve and hg graft --continue) | |
174 | [255] |
|
174 | [255] | |
175 |
|
175 | |||
176 | Continue without resolve should fail: |
|
176 | Continue without resolve should fail: | |
177 |
|
177 | |||
178 | $ hg graft -c |
|
178 | $ hg graft -c | |
179 | grafting revision 4 |
|
179 | grafting revision 4 | |
180 | abort: unresolved merge conflicts (see hg help resolve) |
|
180 | abort: unresolved merge conflicts (see hg help resolve) | |
181 | [255] |
|
181 | [255] | |
182 |
|
182 | |||
183 | Fix up: |
|
183 | Fix up: | |
184 |
|
184 | |||
185 | $ echo b > e |
|
185 | $ echo b > e | |
186 | $ hg resolve -m e |
|
186 | $ hg resolve -m e | |
187 |
|
187 | |||
188 | Continue with a revision should fail: |
|
188 | Continue with a revision should fail: | |
189 |
|
189 | |||
190 | $ hg graft -c 6 |
|
190 | $ hg graft -c 6 | |
191 | abort: can't specify --continue and revisions |
|
191 | abort: can't specify --continue and revisions | |
192 | [255] |
|
192 | [255] | |
193 |
|
193 | |||
194 | $ hg graft -c -r 6 |
|
194 | $ hg graft -c -r 6 | |
195 | abort: can't specify --continue and revisions |
|
195 | abort: can't specify --continue and revisions | |
196 | [255] |
|
196 | [255] | |
197 |
|
197 | |||
198 | Continue for real, clobber usernames |
|
198 | Continue for real, clobber usernames | |
199 |
|
199 | |||
200 | $ hg graft -c -U |
|
200 | $ hg graft -c -U | |
201 | grafting revision 4 |
|
201 | grafting revision 4 | |
202 | grafting revision 3 |
|
202 | grafting revision 3 | |
203 |
|
203 | |||
204 | Compare with original: |
|
204 | Compare with original: | |
205 |
|
205 | |||
206 | $ hg diff -r 6 |
|
206 | $ hg diff -r 6 | |
207 | $ hg status --rev 0:. -C |
|
207 | $ hg status --rev 0:. -C | |
208 | M d |
|
208 | M d | |
209 | M e |
|
209 | M e | |
210 | A b |
|
210 | A b | |
211 | a |
|
211 | a | |
212 | A c |
|
212 | A c | |
213 | a |
|
213 | a | |
214 | R a |
|
214 | R a | |
215 |
|
215 | |||
216 | View graph: |
|
216 | View graph: | |
217 |
|
217 | |||
218 | $ hg --config extensions.graphlog= log -G --template '{author}@{rev}.{phase}: {desc}\n' |
|
218 | $ hg --config extensions.graphlog= log -G --template '{author}@{rev}.{phase}: {desc}\n' | |
219 | @ test@11.draft: 3 |
|
219 | @ test@11.draft: 3 | |
220 | | |
|
220 | | | |
221 | o test@10.draft: 4 |
|
221 | o test@10.draft: 4 | |
222 | | |
|
222 | | | |
223 | o test@9.draft: 5 |
|
223 | o test@9.draft: 5 | |
224 | | |
|
224 | | | |
225 | o bar@8.draft: 1 |
|
225 | o bar@8.draft: 1 | |
226 | | |
|
226 | | | |
227 | o foo@7.draft: 2 |
|
227 | o foo@7.draft: 2 | |
228 | | |
|
228 | | | |
229 | | o test@6.secret: 6 |
|
229 | | o test@6.secret: 6 | |
230 | | |\ |
|
230 | | |\ | |
231 | | | o test@5.draft: 5 |
|
231 | | | o test@5.draft: 5 | |
232 | | | | |
|
232 | | | | | |
233 | | o | test@4.draft: 4 |
|
233 | | o | test@4.draft: 4 | |
234 | | |/ |
|
234 | | |/ | |
235 | | o baz@3.public: 3 |
|
235 | | o baz@3.public: 3 | |
236 | | | |
|
236 | | | | |
237 | | o test@2.public: 2 |
|
237 | | o test@2.public: 2 | |
238 | | | |
|
238 | | | | |
239 | | o bar@1.public: 1 |
|
239 | | o bar@1.public: 1 | |
240 | |/ |
|
240 | |/ | |
241 | o test@0.public: 0 |
|
241 | o test@0.public: 0 | |
242 |
|
242 | |||
243 | Graft again onto another branch should preserve the original source |
|
243 | Graft again onto another branch should preserve the original source | |
244 | $ hg up -q 0 |
|
244 | $ hg up -q 0 | |
245 | $ echo 'g'>g |
|
245 | $ echo 'g'>g | |
246 | $ hg add g |
|
246 | $ hg add g | |
247 | $ hg ci -m 7 |
|
247 | $ hg ci -m 7 | |
248 | created new head |
|
248 | created new head | |
249 | $ hg graft 7 |
|
249 | $ hg graft 7 | |
250 | grafting revision 7 |
|
250 | grafting revision 7 | |
251 |
|
251 | |||
252 | $ hg log -r 7 --template '{rev}:{node}\n' |
|
252 | $ hg log -r 7 --template '{rev}:{node}\n' | |
253 | 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
253 | 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
254 | $ hg log -r 2 --template '{rev}:{node}\n' |
|
254 | $ hg log -r 2 --template '{rev}:{node}\n' | |
255 | 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
255 | 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
256 |
|
256 | |||
257 | $ hg log --debug -r tip |
|
257 | $ hg log --debug -r tip | |
258 | changeset: 13:9db0f28fd3747e92c57d015f53b5593aeec53c2d |
|
258 | changeset: 13:9db0f28fd3747e92c57d015f53b5593aeec53c2d | |
259 | tag: tip |
|
259 | tag: tip | |
260 | phase: draft |
|
260 | phase: draft | |
261 | parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
|
261 | parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f | |
262 | parent: -1:0000000000000000000000000000000000000000 |
|
262 | parent: -1:0000000000000000000000000000000000000000 | |
263 | manifest: 13:dc313617b8c32457c0d589e0dbbedfe71f3cd637 |
|
263 | manifest: 13:dc313617b8c32457c0d589e0dbbedfe71f3cd637 | |
264 | user: foo |
|
264 | user: foo | |
265 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
265 | date: Thu Jan 01 00:00:00 1970 +0000 | |
266 | files+: b |
|
266 | files+: b | |
267 | files-: a |
|
267 | files-: a | |
268 | extra: branch=default |
|
268 | extra: branch=default | |
269 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
269 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
270 | description: |
|
270 | description: | |
271 | 2 |
|
271 | 2 | |
272 |
|
272 | |||
273 |
|
273 | |||
274 | Disallow grafting an already grafted cset onto its original branch |
|
274 | Disallow grafting an already grafted cset onto its original branch | |
275 | $ hg up -q 6 |
|
275 | $ hg up -q 6 | |
276 | $ hg graft 7 |
|
276 | $ hg graft 7 | |
277 | skipping already grafted revision 7 (was grafted from 2) |
|
277 | skipping already grafted revision 7 (was grafted from 2) | |
278 | [255] |
|
278 | [255] | |
279 |
|
279 | |||
280 | Disallow grafting already grafted csets with the same origin onto each other |
|
280 | Disallow grafting already grafted csets with the same origin onto each other | |
281 | $ hg up -q 13 |
|
281 | $ hg up -q 13 | |
282 | $ hg graft 2 |
|
282 | $ hg graft 2 | |
283 | skipping already grafted revision 2 |
|
283 | skipping already grafted revision 2 | |
284 | [255] |
|
284 | [255] | |
285 | $ hg graft 7 |
|
285 | $ hg graft 7 | |
286 | skipping already grafted revision 7 (same origin 2) |
|
286 | skipping already grafted revision 7 (same origin 2) | |
287 | [255] |
|
287 | [255] | |
288 |
|
288 | |||
289 | $ hg up -q 7 |
|
289 | $ hg up -q 7 | |
290 | $ hg graft 2 |
|
290 | $ hg graft 2 | |
291 | skipping already grafted revision 2 |
|
291 | skipping already grafted revision 2 | |
292 | [255] |
|
292 | [255] | |
293 | $ hg graft tip |
|
293 | $ hg graft tip | |
294 | skipping already grafted revision 13 (same origin 2) |
|
294 | skipping already grafted revision 13 (same origin 2) | |
295 | [255] |
|
295 | [255] | |
296 |
|
296 | |||
297 | Graft with --log |
|
297 | Graft with --log | |
298 |
|
298 | |||
299 | $ hg up -Cq 1 |
|
299 | $ hg up -Cq 1 | |
300 | $ hg graft 3 --log -u foo |
|
300 | $ hg graft 3 --log -u foo | |
301 | grafting revision 3 |
|
301 | grafting revision 3 | |
302 | warning: can't find ancestor for 'c' copied from 'b'! |
|
302 | warning: can't find ancestor for 'c' copied from 'b'! | |
303 | $ hg log --template '{rev} {parents} {desc}\n' -r tip |
|
303 | $ hg log --template '{rev} {parents} {desc}\n' -r tip | |
304 | 14 1:5d205f8b35b6 3 |
|
304 | 14 1:5d205f8b35b6 3 | |
305 | (grafted from 4c60f11aa304a54ae1c199feb94e7fc771e51ed8) |
|
305 | (grafted from 4c60f11aa304a54ae1c199feb94e7fc771e51ed8) | |
306 |
|
306 | |||
307 | Resolve conflicted graft |
|
307 | Resolve conflicted graft | |
308 | $ hg up -q 0 |
|
308 | $ hg up -q 0 | |
309 | $ echo b > a |
|
309 | $ echo b > a | |
310 | $ hg ci -m 8 |
|
310 | $ hg ci -m 8 | |
311 | created new head |
|
311 | created new head | |
312 | $ echo a > a |
|
312 | $ echo a > a | |
313 | $ hg ci -m 9 |
|
313 | $ hg ci -m 9 | |
314 | $ hg graft 1 --tool internal:fail |
|
314 | $ hg graft 1 --tool internal:fail | |
315 | grafting revision 1 |
|
315 | grafting revision 1 | |
316 | abort: unresolved conflicts, can't continue |
|
316 | abort: unresolved conflicts, can't continue | |
317 | (use hg resolve and hg graft --continue) |
|
317 | (use hg resolve and hg graft --continue) | |
318 | [255] |
|
318 | [255] | |
319 | $ hg resolve --all |
|
319 | $ hg resolve --all | |
320 | merging a |
|
320 | merging a | |
321 | $ hg graft -c |
|
321 | $ hg graft -c | |
322 | grafting revision 1 |
|
322 | grafting revision 1 | |
323 | $ hg export tip --git |
|
323 | $ hg export tip --git | |
324 | # HG changeset patch |
|
324 | # HG changeset patch | |
325 | # User bar |
|
325 | # User bar | |
326 | # Date 0 0 |
|
326 | # Date 0 0 | |
327 | # Node ID 64ecd9071ce83c6e62f538d8ce7709d53f32ebf7 |
|
327 | # Node ID 64ecd9071ce83c6e62f538d8ce7709d53f32ebf7 | |
328 | # Parent 4bdb9a9d0b84ffee1d30f0dfc7744cade17aa19c |
|
328 | # Parent 4bdb9a9d0b84ffee1d30f0dfc7744cade17aa19c | |
329 | 1 |
|
329 | 1 | |
330 |
|
330 | |||
331 | diff --git a/a b/a |
|
331 | diff --git a/a b/a | |
332 | --- a/a |
|
332 | --- a/a | |
333 | +++ b/a |
|
333 | +++ b/a | |
334 | @@ -1,1 +1,1 @@ |
|
334 | @@ -1,1 +1,1 @@ | |
335 | -a |
|
335 | -a | |
336 | +b |
|
336 | +b | |
337 |
|
337 | |||
338 | Resolve conflicted graft with rename |
|
338 | Resolve conflicted graft with rename | |
339 | $ echo c > a |
|
339 | $ echo c > a | |
340 | $ hg ci -m 10 |
|
340 | $ hg ci -m 10 | |
341 | $ hg graft 2 --tool internal:fail |
|
341 | $ hg graft 2 --tool internal:fail | |
342 | grafting revision 2 |
|
342 | grafting revision 2 | |
343 | abort: unresolved conflicts, can't continue |
|
343 | abort: unresolved conflicts, can't continue | |
344 | (use hg resolve and hg graft --continue) |
|
344 | (use hg resolve and hg graft --continue) | |
345 | [255] |
|
345 | [255] | |
346 | $ hg resolve --all |
|
346 | $ hg resolve --all | |
347 | merging a and b to b |
|
347 | merging a and b to b | |
348 | $ hg graft -c |
|
348 | $ hg graft -c | |
349 | grafting revision 2 |
|
349 | grafting revision 2 | |
350 | $ hg export tip --git |
|
350 | $ hg export tip --git | |
351 | # HG changeset patch |
|
351 | # HG changeset patch | |
352 | # User test |
|
352 | # User test | |
353 | # Date 0 0 |
|
353 | # Date 0 0 | |
354 | # Node ID 2e80e1351d6ed50302fe1e05f8bd1d4d412b6e11 |
|
354 | # Node ID 2e80e1351d6ed50302fe1e05f8bd1d4d412b6e11 | |
355 | # Parent e5a51ae854a8bbaaf25cc5c6a57ff46042dadbb4 |
|
355 | # Parent e5a51ae854a8bbaaf25cc5c6a57ff46042dadbb4 | |
356 | 2 |
|
356 | 2 | |
357 |
|
357 | |||
358 | diff --git a/a b/b |
|
358 | diff --git a/a b/b | |
359 | rename from a |
|
359 | rename from a | |
360 | rename to b |
|
360 | rename to b | |
361 |
|
361 | |||
362 | Test simple origin(), with and without args |
|
362 | Test simple origin(), with and without args | |
363 | $ hg log -r 'origin()' |
|
363 | $ hg log -r 'origin()' | |
364 | changeset: 1:5d205f8b35b6 |
|
364 | changeset: 1:5d205f8b35b6 | |
365 | user: bar |
|
365 | user: bar | |
366 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
366 | date: Thu Jan 01 00:00:00 1970 +0000 | |
367 | summary: 1 |
|
367 | summary: 1 | |
368 |
|
368 | |||
369 | changeset: 2:5c095ad7e90f |
|
369 | changeset: 2:5c095ad7e90f | |
370 | user: test |
|
370 | user: test | |
371 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
371 | date: Thu Jan 01 00:00:00 1970 +0000 | |
372 | summary: 2 |
|
372 | summary: 2 | |
373 |
|
373 | |||
374 | changeset: 3:4c60f11aa304 |
|
374 | changeset: 3:4c60f11aa304 | |
375 | user: baz |
|
375 | user: baz | |
376 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
376 | date: Thu Jan 01 00:00:00 1970 +0000 | |
377 | summary: 3 |
|
377 | summary: 3 | |
378 |
|
378 | |||
379 | changeset: 4:9c233e8e184d |
|
379 | changeset: 4:9c233e8e184d | |
380 | user: test |
|
380 | user: test | |
381 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
381 | date: Thu Jan 01 00:00:00 1970 +0000 | |
382 | summary: 4 |
|
382 | summary: 4 | |
383 |
|
383 | |||
384 | changeset: 5:97f8bfe72746 |
|
384 | changeset: 5:97f8bfe72746 | |
385 | branch: stable |
|
385 | branch: stable | |
386 | parent: 3:4c60f11aa304 |
|
386 | parent: 3:4c60f11aa304 | |
387 | user: test |
|
387 | user: test | |
388 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
388 | date: Thu Jan 01 00:00:00 1970 +0000 | |
389 | summary: 5 |
|
389 | summary: 5 | |
390 |
|
390 | |||
391 | $ hg log -r 'origin(7)' |
|
391 | $ hg log -r 'origin(7)' | |
392 | changeset: 2:5c095ad7e90f |
|
392 | changeset: 2:5c095ad7e90f | |
393 | user: test |
|
393 | user: test | |
394 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
394 | date: Thu Jan 01 00:00:00 1970 +0000 | |
395 | summary: 2 |
|
395 | summary: 2 | |
396 |
|
396 | |||
397 | Now transplant a graft to test following through copies |
|
397 | Now transplant a graft to test following through copies | |
398 | $ hg up -q 0 |
|
398 | $ hg up -q 0 | |
399 | $ hg branch -q dev |
|
399 | $ hg branch -q dev | |
400 | $ hg ci -qm "dev branch" |
|
400 | $ hg ci -qm "dev branch" | |
401 | $ hg --config extensions.transplant= transplant -q 7 |
|
401 | $ hg --config extensions.transplant= transplant -q 7 | |
402 | $ hg log -r 'origin(.)' |
|
402 | $ hg log -r 'origin(.)' | |
403 | changeset: 2:5c095ad7e90f |
|
403 | changeset: 2:5c095ad7e90f | |
404 | user: test |
|
404 | user: test | |
405 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
405 | date: Thu Jan 01 00:00:00 1970 +0000 | |
406 | summary: 2 |
|
406 | summary: 2 | |
407 |
|
407 | |||
408 | Test simple destination |
|
408 | Test simple destination | |
409 | $ hg log -r 'destination()' |
|
409 | $ hg log -r 'destination()' | |
410 | changeset: 7:ef0ef43d49e7 |
|
410 | changeset: 7:ef0ef43d49e7 | |
411 | parent: 0:68795b066622 |
|
411 | parent: 0:68795b066622 | |
412 | user: foo |
|
412 | user: foo | |
413 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
413 | date: Thu Jan 01 00:00:00 1970 +0000 | |
414 | summary: 2 |
|
414 | summary: 2 | |
415 |
|
415 | |||
416 | changeset: 8:6b9e5368ca4e |
|
416 | changeset: 8:6b9e5368ca4e | |
417 | user: bar |
|
417 | user: bar | |
418 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
418 | date: Thu Jan 01 00:00:00 1970 +0000 | |
419 | summary: 1 |
|
419 | summary: 1 | |
420 |
|
420 | |||
421 | changeset: 9:1905859650ec |
|
421 | changeset: 9:1905859650ec | |
422 | user: test |
|
422 | user: test | |
423 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
423 | date: Thu Jan 01 00:00:00 1970 +0000 | |
424 | summary: 5 |
|
424 | summary: 5 | |
425 |
|
425 | |||
426 | changeset: 10:52dc0b4c6907 |
|
426 | changeset: 10:52dc0b4c6907 | |
427 | user: test |
|
427 | user: test | |
428 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
428 | date: Thu Jan 01 00:00:00 1970 +0000 | |
429 | summary: 4 |
|
429 | summary: 4 | |
430 |
|
430 | |||
431 | changeset: 11:882b35362a6b |
|
431 | changeset: 11:882b35362a6b | |
432 | user: test |
|
432 | user: test | |
433 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
433 | date: Thu Jan 01 00:00:00 1970 +0000 | |
434 | summary: 3 |
|
434 | summary: 3 | |
435 |
|
435 | |||
436 | changeset: 13:9db0f28fd374 |
|
436 | changeset: 13:9db0f28fd374 | |
437 | user: foo |
|
437 | user: foo | |
438 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
438 | date: Thu Jan 01 00:00:00 1970 +0000 | |
439 | summary: 2 |
|
439 | summary: 2 | |
440 |
|
440 | |||
441 | changeset: 14:f64defefacee |
|
441 | changeset: 14:f64defefacee | |
442 | parent: 1:5d205f8b35b6 |
|
442 | parent: 1:5d205f8b35b6 | |
443 | user: foo |
|
443 | user: foo | |
444 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
444 | date: Thu Jan 01 00:00:00 1970 +0000 | |
445 | summary: 3 |
|
445 | summary: 3 | |
446 |
|
446 | |||
447 | changeset: 17:64ecd9071ce8 |
|
447 | changeset: 17:64ecd9071ce8 | |
448 | user: bar |
|
448 | user: bar | |
449 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
449 | date: Thu Jan 01 00:00:00 1970 +0000 | |
450 | summary: 1 |
|
450 | summary: 1 | |
451 |
|
451 | |||
452 | changeset: 19:2e80e1351d6e |
|
452 | changeset: 19:2e80e1351d6e | |
453 | user: test |
|
453 | user: test | |
454 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
454 | date: Thu Jan 01 00:00:00 1970 +0000 | |
455 | summary: 2 |
|
455 | summary: 2 | |
456 |
|
456 | |||
457 | changeset: 21:7e61b508e709 |
|
457 | changeset: 21:7e61b508e709 | |
458 | branch: dev |
|
458 | branch: dev | |
459 | tag: tip |
|
459 | tag: tip | |
460 | user: foo |
|
460 | user: foo | |
461 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
461 | date: Thu Jan 01 00:00:00 1970 +0000 | |
462 | summary: 2 |
|
462 | summary: 2 | |
463 |
|
463 | |||
464 | $ hg log -r 'destination(2)' |
|
464 | $ hg log -r 'destination(2)' | |
465 | changeset: 7:ef0ef43d49e7 |
|
465 | changeset: 7:ef0ef43d49e7 | |
466 | parent: 0:68795b066622 |
|
466 | parent: 0:68795b066622 | |
467 | user: foo |
|
467 | user: foo | |
468 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
468 | date: Thu Jan 01 00:00:00 1970 +0000 | |
469 | summary: 2 |
|
469 | summary: 2 | |
470 |
|
470 | |||
471 | changeset: 13:9db0f28fd374 |
|
471 | changeset: 13:9db0f28fd374 | |
472 | user: foo |
|
472 | user: foo | |
473 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
473 | date: Thu Jan 01 00:00:00 1970 +0000 | |
474 | summary: 2 |
|
474 | summary: 2 | |
475 |
|
475 | |||
476 | changeset: 19:2e80e1351d6e |
|
476 | changeset: 19:2e80e1351d6e | |
477 | user: test |
|
477 | user: test | |
478 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
478 | date: Thu Jan 01 00:00:00 1970 +0000 | |
479 | summary: 2 |
|
479 | summary: 2 | |
480 |
|
480 | |||
481 | changeset: 21:7e61b508e709 |
|
481 | changeset: 21:7e61b508e709 | |
482 | branch: dev |
|
482 | branch: dev | |
483 | tag: tip |
|
483 | tag: tip | |
484 | user: foo |
|
484 | user: foo | |
485 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
485 | date: Thu Jan 01 00:00:00 1970 +0000 | |
486 | summary: 2 |
|
486 | summary: 2 | |
487 |
|
487 | |||
488 | Transplants of grafts can find a destination... |
|
488 | Transplants of grafts can find a destination... | |
489 | $ hg log -r 'destination(7)' |
|
489 | $ hg log -r 'destination(7)' | |
490 | changeset: 21:7e61b508e709 |
|
490 | changeset: 21:7e61b508e709 | |
491 | branch: dev |
|
491 | branch: dev | |
492 | tag: tip |
|
492 | tag: tip | |
493 | user: foo |
|
493 | user: foo | |
494 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
494 | date: Thu Jan 01 00:00:00 1970 +0000 | |
495 | summary: 2 |
|
495 | summary: 2 | |
496 |
|
496 | |||
497 | ... grafts of grafts unfortunately can't |
|
497 | ... grafts of grafts unfortunately can't | |
498 | $ hg graft -q 13 |
|
498 | $ hg graft -q 13 | |
499 | $ hg log -r 'destination(13)' |
|
499 | $ hg log -r 'destination(13)' | |
500 | All copies of a cset |
|
500 | All copies of a cset | |
501 | $ hg log -r 'origin(13) or destination(origin(13))' |
|
501 | $ hg log -r 'origin(13) or destination(origin(13))' | |
502 | changeset: 2:5c095ad7e90f |
|
502 | changeset: 2:5c095ad7e90f | |
503 | user: test |
|
503 | user: test | |
504 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
504 | date: Thu Jan 01 00:00:00 1970 +0000 | |
505 | summary: 2 |
|
505 | summary: 2 | |
506 |
|
506 | |||
507 | changeset: 7:ef0ef43d49e7 |
|
507 | changeset: 7:ef0ef43d49e7 | |
508 | parent: 0:68795b066622 |
|
508 | parent: 0:68795b066622 | |
509 | user: foo |
|
509 | user: foo | |
510 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
510 | date: Thu Jan 01 00:00:00 1970 +0000 | |
511 | summary: 2 |
|
511 | summary: 2 | |
512 |
|
512 | |||
513 | changeset: 13:9db0f28fd374 |
|
513 | changeset: 13:9db0f28fd374 | |
514 | user: foo |
|
514 | user: foo | |
515 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
515 | date: Thu Jan 01 00:00:00 1970 +0000 | |
516 | summary: 2 |
|
516 | summary: 2 | |
517 |
|
517 | |||
518 | changeset: 19:2e80e1351d6e |
|
518 | changeset: 19:2e80e1351d6e | |
519 | user: test |
|
519 | user: test | |
520 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
520 | date: Thu Jan 01 00:00:00 1970 +0000 | |
521 | summary: 2 |
|
521 | summary: 2 | |
522 |
|
522 | |||
523 | changeset: 21:7e61b508e709 |
|
523 | changeset: 21:7e61b508e709 | |
524 | branch: dev |
|
524 | branch: dev | |
525 | user: foo |
|
525 | user: foo | |
526 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
526 | date: Thu Jan 01 00:00:00 1970 +0000 | |
527 | summary: 2 |
|
527 | summary: 2 | |
528 |
|
528 | |||
529 | changeset: 22:1313d0a825e2 |
|
529 | changeset: 22:1313d0a825e2 | |
530 | branch: dev |
|
530 | branch: dev | |
531 | tag: tip |
|
531 | tag: tip | |
532 | user: foo |
|
532 | user: foo | |
533 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
533 | date: Thu Jan 01 00:00:00 1970 +0000 | |
534 | summary: 2 |
|
534 | summary: 2 | |
535 |
|
535 |
@@ -1,73 +1,73 b'' | |||||
1 | $ "$TESTDIR/hghave" execbit || exit 80 |
|
1 | $ "$TESTDIR/hghave" execbit || exit 80 | |
2 |
|
2 | |||
3 | Create extension that can disable exec checks: |
|
3 | Create extension that can disable exec checks: | |
4 |
|
4 | |||
5 | $ cat > noexec.py <<EOF |
|
5 | $ cat > noexec.py <<EOF | |
6 | > from mercurial import extensions, util |
|
6 | > from mercurial import extensions, util | |
7 | > def setflags(orig, f, l, x): |
|
7 | > def setflags(orig, f, l, x): | |
8 | > pass |
|
8 | > pass | |
9 | > def checkexec(orig, path): |
|
9 | > def checkexec(orig, path): | |
10 | > return False |
|
10 | > return False | |
11 | > def extsetup(ui): |
|
11 | > def extsetup(ui): | |
12 | > extensions.wrapfunction(util, 'setflags', setflags) |
|
12 | > extensions.wrapfunction(util, 'setflags', setflags) | |
13 | > extensions.wrapfunction(util, 'checkexec', checkexec) |
|
13 | > extensions.wrapfunction(util, 'checkexec', checkexec) | |
14 | > EOF |
|
14 | > EOF | |
15 |
|
15 | |||
16 | $ hg init unix-repo |
|
16 | $ hg init unix-repo | |
17 | $ cd unix-repo |
|
17 | $ cd unix-repo | |
18 | $ touch a |
|
18 | $ touch a | |
19 | $ hg add a |
|
19 | $ hg add a | |
20 | $ hg commit -m 'unix: add a' |
|
20 | $ hg commit -m 'unix: add a' | |
21 | $ hg clone . ../win-repo |
|
21 | $ hg clone . ../win-repo | |
22 | updating to branch default |
|
22 | updating to branch default | |
23 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
23 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
24 | $ chmod +x a |
|
24 | $ chmod +x a | |
25 | $ hg commit -m 'unix: chmod a' |
|
25 | $ hg commit -m 'unix: chmod a' | |
26 | $ hg manifest -v |
|
26 | $ hg manifest -v | |
27 | 755 * a |
|
27 | 755 * a | |
28 |
|
28 | |||
29 | $ cd ../win-repo |
|
29 | $ cd ../win-repo | |
30 |
|
30 | |||
31 | $ touch b |
|
31 | $ touch b | |
32 | $ hg add b |
|
32 | $ hg add b | |
33 | $ hg commit -m 'win: add b' |
|
33 | $ hg commit -m 'win: add b' | |
34 |
|
34 | |||
35 | $ hg manifest -v |
|
35 | $ hg manifest -v | |
36 | 644 a |
|
36 | 644 a | |
37 | 644 b |
|
37 | 644 b | |
38 |
|
38 | |||
39 | $ hg pull |
|
39 | $ hg pull | |
40 | pulling from $TESTTMP/unix-repo |
|
40 | pulling from $TESTTMP/unix-repo | |
41 | searching for changes |
|
41 | searching for changes | |
42 | adding changesets |
|
42 | adding changesets | |
43 | adding manifests |
|
43 | adding manifests | |
44 | adding file changes |
|
44 | adding file changes | |
45 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
45 | added 1 changesets with 0 changes to 0 files (+1 heads) | |
46 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
46 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
47 |
|
47 | |||
48 | $ hg manifest -v -r tip |
|
48 | $ hg manifest -v -r tip | |
49 | 755 * a |
|
49 | 755 * a | |
50 |
|
50 | |||
51 | Simulate a Windows merge: |
|
51 | Simulate a Windows merge: | |
52 |
|
52 | |||
53 | $ hg --config extensions.n=$TESTTMP/noexec.py merge --debug |
|
53 | $ hg --config extensions.n=$TESTTMP/noexec.py merge --debug | |
54 | searching for copies back to rev 1 |
|
54 | searching for copies back to rev 1 | |
55 | unmatched files in local: |
|
55 | unmatched files in local: | |
56 | b |
|
56 | b | |
57 | resolving manifests |
|
57 | resolving manifests | |
58 |
|
|
58 | branchmerge: True, force: False, partial: False | |
59 | ancestor: a03b0deabf2b, local: d6fa54f68ae1+, remote: 2d8bcf2dda39 |
|
59 | ancestor: a03b0deabf2b, local: d6fa54f68ae1+, remote: 2d8bcf2dda39 | |
60 | a: update permissions -> e |
|
60 | a: update permissions -> e | |
61 | updating: a 1/1 files (100.00%) |
|
61 | updating: a 1/1 files (100.00%) | |
62 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
62 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
63 | (branch merge, don't forget to commit) |
|
63 | (branch merge, don't forget to commit) | |
64 |
|
64 | |||
65 | Simulate a Windows commit: |
|
65 | Simulate a Windows commit: | |
66 |
|
66 | |||
67 | $ hg --config extensions.n=$TESTTMP/noexec.py commit -m 'win: merge' |
|
67 | $ hg --config extensions.n=$TESTTMP/noexec.py commit -m 'win: merge' | |
68 |
|
68 | |||
69 | $ hg manifest -v |
|
69 | $ hg manifest -v | |
70 | 755 * a |
|
70 | 755 * a | |
71 | 644 b |
|
71 | 644 b | |
72 |
|
72 | |||
73 | $ cd .. |
|
73 | $ cd .. |
@@ -1,56 +1,56 b'' | |||||
1 | http://mercurial.selenic.com/bts/issue522 |
|
1 | http://mercurial.selenic.com/bts/issue522 | |
2 |
|
2 | |||
3 | In the merge below, the file "foo" has the same contents in both |
|
3 | In the merge below, the file "foo" has the same contents in both | |
4 | parents, but if we look at the file-level history, we'll notice that |
|
4 | parents, but if we look at the file-level history, we'll notice that | |
5 | the version in p1 is an ancestor of the version in p2. This test makes |
|
5 | the version in p1 is an ancestor of the version in p2. This test makes | |
6 | sure that we'll use the version from p2 in the manifest of the merge |
|
6 | sure that we'll use the version from p2 in the manifest of the merge | |
7 | revision. |
|
7 | revision. | |
8 |
|
8 | |||
9 | $ hg init |
|
9 | $ hg init | |
10 |
|
10 | |||
11 | $ echo foo > foo |
|
11 | $ echo foo > foo | |
12 | $ hg ci -qAm 'add foo' |
|
12 | $ hg ci -qAm 'add foo' | |
13 |
|
13 | |||
14 | $ echo bar >> foo |
|
14 | $ echo bar >> foo | |
15 | $ hg ci -m 'change foo' |
|
15 | $ hg ci -m 'change foo' | |
16 |
|
16 | |||
17 | $ hg backout -r tip -m 'backout changed foo' |
|
17 | $ hg backout -r tip -m 'backout changed foo' | |
18 | reverting foo |
|
18 | reverting foo | |
19 | changeset 2:4d9e78aaceee backs out changeset 1:b515023e500e |
|
19 | changeset 2:4d9e78aaceee backs out changeset 1:b515023e500e | |
20 |
|
20 | |||
21 | $ hg up -C 0 |
|
21 | $ hg up -C 0 | |
22 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
22 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
23 |
|
23 | |||
24 | $ touch bar |
|
24 | $ touch bar | |
25 | $ hg ci -qAm 'add bar' |
|
25 | $ hg ci -qAm 'add bar' | |
26 |
|
26 | |||
27 | $ hg merge --debug |
|
27 | $ hg merge --debug | |
28 | searching for copies back to rev 1 |
|
28 | searching for copies back to rev 1 | |
29 | unmatched files in local: |
|
29 | unmatched files in local: | |
30 | bar |
|
30 | bar | |
31 | resolving manifests |
|
31 | resolving manifests | |
32 |
|
|
32 | branchmerge: True, force: False, partial: False | |
33 | ancestor: bbd179dfa0a7, local: 71766447bdbb+, remote: 4d9e78aaceee |
|
33 | ancestor: bbd179dfa0a7, local: 71766447bdbb+, remote: 4d9e78aaceee | |
34 | foo: remote is newer -> g |
|
34 | foo: remote is newer -> g | |
35 | updating: foo 1/1 files (100.00%) |
|
35 | updating: foo 1/1 files (100.00%) | |
36 | getting foo |
|
36 | getting foo | |
37 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
37 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
38 | (branch merge, don't forget to commit) |
|
38 | (branch merge, don't forget to commit) | |
39 |
|
39 | |||
40 | $ hg debugstate | grep foo |
|
40 | $ hg debugstate | grep foo | |
41 | n 0 -2 unset foo |
|
41 | n 0 -2 unset foo | |
42 |
|
42 | |||
43 | $ hg st -A foo |
|
43 | $ hg st -A foo | |
44 | M foo |
|
44 | M foo | |
45 |
|
45 | |||
46 | $ hg ci -m 'merge' |
|
46 | $ hg ci -m 'merge' | |
47 |
|
47 | |||
48 | $ hg manifest --debug | grep foo |
|
48 | $ hg manifest --debug | grep foo | |
49 | c6fc755d7e68f49f880599da29f15add41f42f5a 644 foo |
|
49 | c6fc755d7e68f49f880599da29f15add41f42f5a 644 foo | |
50 |
|
50 | |||
51 | $ hg debugindex foo |
|
51 | $ hg debugindex foo | |
52 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
52 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
53 | 0 0 5 ..... 0 2ed2a3912a0b 000000000000 000000000000 (re) |
|
53 | 0 0 5 ..... 0 2ed2a3912a0b 000000000000 000000000000 (re) | |
54 | 1 5 9 ..... 1 6f4310b00b9a 2ed2a3912a0b 000000000000 (re) |
|
54 | 1 5 9 ..... 1 6f4310b00b9a 2ed2a3912a0b 000000000000 (re) | |
55 | 2 14 5 ..... 2 c6fc755d7e68 6f4310b00b9a 000000000000 (re) |
|
55 | 2 14 5 ..... 2 c6fc755d7e68 6f4310b00b9a 000000000000 (re) | |
56 |
|
56 |
@@ -1,101 +1,101 b'' | |||||
1 | http://mercurial.selenic.com/bts/issue672 |
|
1 | http://mercurial.selenic.com/bts/issue672 | |
2 |
|
2 | |||
3 | # 0-2-4 |
|
3 | # 0-2-4 | |
4 | # \ \ \ |
|
4 | # \ \ \ | |
5 | # 1-3-5 |
|
5 | # 1-3-5 | |
6 | # |
|
6 | # | |
7 | # rename in #1, content change in #4. |
|
7 | # rename in #1, content change in #4. | |
8 |
|
8 | |||
9 | $ hg init |
|
9 | $ hg init | |
10 |
|
10 | |||
11 | $ touch 1 |
|
11 | $ touch 1 | |
12 | $ touch 2 |
|
12 | $ touch 2 | |
13 | $ hg commit -Am init # 0 |
|
13 | $ hg commit -Am init # 0 | |
14 | adding 1 |
|
14 | adding 1 | |
15 | adding 2 |
|
15 | adding 2 | |
16 |
|
16 | |||
17 | $ hg rename 1 1a |
|
17 | $ hg rename 1 1a | |
18 | $ hg commit -m rename # 1 |
|
18 | $ hg commit -m rename # 1 | |
19 |
|
19 | |||
20 | $ hg co -C 0 |
|
20 | $ hg co -C 0 | |
21 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
21 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
22 |
|
22 | |||
23 | $ echo unrelated >> 2 |
|
23 | $ echo unrelated >> 2 | |
24 | $ hg ci -m unrelated1 # 2 |
|
24 | $ hg ci -m unrelated1 # 2 | |
25 | created new head |
|
25 | created new head | |
26 |
|
26 | |||
27 | $ hg merge --debug 1 |
|
27 | $ hg merge --debug 1 | |
28 | searching for copies back to rev 1 |
|
28 | searching for copies back to rev 1 | |
29 | unmatched files in other: |
|
29 | unmatched files in other: | |
30 | 1a |
|
30 | 1a | |
31 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
31 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
32 | src: '1' -> dst: '1a' |
|
32 | src: '1' -> dst: '1a' | |
33 | checking for directory renames |
|
33 | checking for directory renames | |
34 | resolving manifests |
|
34 | resolving manifests | |
35 |
|
|
35 | branchmerge: True, force: False, partial: False | |
36 | ancestor: 81f4b099af3d, local: c64f439569a9+, remote: c12dcd37c90a |
|
36 | ancestor: 81f4b099af3d, local: c64f439569a9+, remote: c12dcd37c90a | |
37 | 1: other deleted -> r |
|
37 | 1: other deleted -> r | |
38 | 1a: remote created -> g |
|
38 | 1a: remote created -> g | |
39 | updating: 1 1/2 files (50.00%) |
|
39 | updating: 1 1/2 files (50.00%) | |
40 | removing 1 |
|
40 | removing 1 | |
41 | updating: 1a 2/2 files (100.00%) |
|
41 | updating: 1a 2/2 files (100.00%) | |
42 | getting 1a |
|
42 | getting 1a | |
43 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
43 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
44 | (branch merge, don't forget to commit) |
|
44 | (branch merge, don't forget to commit) | |
45 |
|
45 | |||
46 | $ hg ci -m merge1 # 3 |
|
46 | $ hg ci -m merge1 # 3 | |
47 |
|
47 | |||
48 | $ hg co -C 2 |
|
48 | $ hg co -C 2 | |
49 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
49 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
50 |
|
50 | |||
51 | $ echo hello >> 1 |
|
51 | $ echo hello >> 1 | |
52 | $ hg ci -m unrelated2 # 4 |
|
52 | $ hg ci -m unrelated2 # 4 | |
53 | created new head |
|
53 | created new head | |
54 |
|
54 | |||
55 | $ hg co -C 3 |
|
55 | $ hg co -C 3 | |
56 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
56 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
57 |
|
57 | |||
58 | $ hg merge -y --debug 4 |
|
58 | $ hg merge -y --debug 4 | |
59 | searching for copies back to rev 1 |
|
59 | searching for copies back to rev 1 | |
60 | unmatched files in local: |
|
60 | unmatched files in local: | |
61 | 1a |
|
61 | 1a | |
62 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
62 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
63 | src: '1' -> dst: '1a' * |
|
63 | src: '1' -> dst: '1a' * | |
64 | checking for directory renames |
|
64 | checking for directory renames | |
65 | resolving manifests |
|
65 | resolving manifests | |
66 |
|
|
66 | branchmerge: True, force: False, partial: False | |
67 | ancestor: c64f439569a9, local: e327dca35ac8+, remote: 746e9549ea96 |
|
67 | ancestor: c64f439569a9, local: e327dca35ac8+, remote: 746e9549ea96 | |
68 | 1a: local copied/moved to 1 -> m |
|
68 | 1a: local copied/moved to 1 -> m | |
69 | preserving 1a for resolve of 1a |
|
69 | preserving 1a for resolve of 1a | |
70 | updating: 1a 1/1 files (100.00%) |
|
70 | updating: 1a 1/1 files (100.00%) | |
71 | picked tool 'internal:merge' for 1a (binary False symlink False) |
|
71 | picked tool 'internal:merge' for 1a (binary False symlink False) | |
72 | merging 1a and 1 to 1a |
|
72 | merging 1a and 1 to 1a | |
73 | my 1a@e327dca35ac8+ other 1@746e9549ea96 ancestor 1@81f4b099af3d |
|
73 | my 1a@e327dca35ac8+ other 1@746e9549ea96 ancestor 1@81f4b099af3d | |
74 | premerge successful |
|
74 | premerge successful | |
75 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
75 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
76 | (branch merge, don't forget to commit) |
|
76 | (branch merge, don't forget to commit) | |
77 |
|
77 | |||
78 | $ hg co -C 4 |
|
78 | $ hg co -C 4 | |
79 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
79 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
80 |
|
80 | |||
81 | $ hg merge -y --debug 3 |
|
81 | $ hg merge -y --debug 3 | |
82 | searching for copies back to rev 1 |
|
82 | searching for copies back to rev 1 | |
83 | unmatched files in other: |
|
83 | unmatched files in other: | |
84 | 1a |
|
84 | 1a | |
85 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
85 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
86 | src: '1' -> dst: '1a' * |
|
86 | src: '1' -> dst: '1a' * | |
87 | checking for directory renames |
|
87 | checking for directory renames | |
88 | resolving manifests |
|
88 | resolving manifests | |
89 |
|
|
89 | branchmerge: True, force: False, partial: False | |
90 | ancestor: c64f439569a9, local: 746e9549ea96+, remote: e327dca35ac8 |
|
90 | ancestor: c64f439569a9, local: 746e9549ea96+, remote: e327dca35ac8 | |
91 | 1: remote moved to 1a -> m |
|
91 | 1: remote moved to 1a -> m | |
92 | preserving 1 for resolve of 1a |
|
92 | preserving 1 for resolve of 1a | |
93 | removing 1 |
|
93 | removing 1 | |
94 | updating: 1 1/1 files (100.00%) |
|
94 | updating: 1 1/1 files (100.00%) | |
95 | picked tool 'internal:merge' for 1a (binary False symlink False) |
|
95 | picked tool 'internal:merge' for 1a (binary False symlink False) | |
96 | merging 1 and 1a to 1a |
|
96 | merging 1 and 1a to 1a | |
97 | my 1a@746e9549ea96+ other 1a@e327dca35ac8 ancestor 1@81f4b099af3d |
|
97 | my 1a@746e9549ea96+ other 1a@e327dca35ac8 ancestor 1@81f4b099af3d | |
98 | premerge successful |
|
98 | premerge successful | |
99 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
99 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
100 | (branch merge, don't forget to commit) |
|
100 | (branch merge, don't forget to commit) | |
101 |
|
101 |
@@ -1,2089 +1,2089 b'' | |||||
1 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE |
|
1 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE | |
2 | $ mkdir "${USERCACHE}" |
|
2 | $ mkdir "${USERCACHE}" | |
3 | $ cat >> $HGRCPATH <<EOF |
|
3 | $ cat >> $HGRCPATH <<EOF | |
4 | > [extensions] |
|
4 | > [extensions] | |
5 | > largefiles= |
|
5 | > largefiles= | |
6 | > purge= |
|
6 | > purge= | |
7 | > rebase= |
|
7 | > rebase= | |
8 | > transplant= |
|
8 | > transplant= | |
9 | > [phases] |
|
9 | > [phases] | |
10 | > publish=False |
|
10 | > publish=False | |
11 | > [largefiles] |
|
11 | > [largefiles] | |
12 | > minsize=2 |
|
12 | > minsize=2 | |
13 | > patterns=glob:**.dat |
|
13 | > patterns=glob:**.dat | |
14 | > usercache=${USERCACHE} |
|
14 | > usercache=${USERCACHE} | |
15 | > [hooks] |
|
15 | > [hooks] | |
16 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" |
|
16 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" | |
17 | > EOF |
|
17 | > EOF | |
18 |
|
18 | |||
19 | Create the repo with a couple of revisions of both large and normal |
|
19 | Create the repo with a couple of revisions of both large and normal | |
20 | files. |
|
20 | files. | |
21 | Test status and dirstate of largefiles and that summary output is correct. |
|
21 | Test status and dirstate of largefiles and that summary output is correct. | |
22 |
|
22 | |||
23 | $ hg init a |
|
23 | $ hg init a | |
24 | $ cd a |
|
24 | $ cd a | |
25 | $ mkdir sub |
|
25 | $ mkdir sub | |
26 | $ echo normal1 > normal1 |
|
26 | $ echo normal1 > normal1 | |
27 | $ echo normal2 > sub/normal2 |
|
27 | $ echo normal2 > sub/normal2 | |
28 | $ echo large1 > large1 |
|
28 | $ echo large1 > large1 | |
29 | $ echo large2 > sub/large2 |
|
29 | $ echo large2 > sub/large2 | |
30 | $ hg add normal1 sub/normal2 |
|
30 | $ hg add normal1 sub/normal2 | |
31 | $ hg add --large large1 sub/large2 |
|
31 | $ hg add --large large1 sub/large2 | |
32 | $ hg commit -m "add files" |
|
32 | $ hg commit -m "add files" | |
33 | Invoking status precommit hook |
|
33 | Invoking status precommit hook | |
34 | A large1 |
|
34 | A large1 | |
35 | A normal1 |
|
35 | A normal1 | |
36 | A sub/large2 |
|
36 | A sub/large2 | |
37 | A sub/normal2 |
|
37 | A sub/normal2 | |
38 | $ touch large1 sub/large2 |
|
38 | $ touch large1 sub/large2 | |
39 | $ sleep 1 |
|
39 | $ sleep 1 | |
40 | $ hg st |
|
40 | $ hg st | |
41 | $ hg debugstate --nodates |
|
41 | $ hg debugstate --nodates | |
42 | n 644 41 .hglf/large1 |
|
42 | n 644 41 .hglf/large1 | |
43 | n 644 41 .hglf/sub/large2 |
|
43 | n 644 41 .hglf/sub/large2 | |
44 | n 644 8 normal1 |
|
44 | n 644 8 normal1 | |
45 | n 644 8 sub/normal2 |
|
45 | n 644 8 sub/normal2 | |
46 | $ hg debugstate --large |
|
46 | $ hg debugstate --large | |
47 | n 644 7 large1 |
|
47 | n 644 7 large1 | |
48 | n 644 7 sub/large2 |
|
48 | n 644 7 sub/large2 | |
49 | $ echo normal11 > normal1 |
|
49 | $ echo normal11 > normal1 | |
50 | $ echo normal22 > sub/normal2 |
|
50 | $ echo normal22 > sub/normal2 | |
51 | $ echo large11 > large1 |
|
51 | $ echo large11 > large1 | |
52 | $ echo large22 > sub/large2 |
|
52 | $ echo large22 > sub/large2 | |
53 | $ hg commit -m "edit files" |
|
53 | $ hg commit -m "edit files" | |
54 | Invoking status precommit hook |
|
54 | Invoking status precommit hook | |
55 | M large1 |
|
55 | M large1 | |
56 | M normal1 |
|
56 | M normal1 | |
57 | M sub/large2 |
|
57 | M sub/large2 | |
58 | M sub/normal2 |
|
58 | M sub/normal2 | |
59 | $ hg sum --large |
|
59 | $ hg sum --large | |
60 | parent: 1:ce8896473775 tip |
|
60 | parent: 1:ce8896473775 tip | |
61 | edit files |
|
61 | edit files | |
62 | branch: default |
|
62 | branch: default | |
63 | commit: (clean) |
|
63 | commit: (clean) | |
64 | update: (current) |
|
64 | update: (current) | |
65 | largefiles: (no remote repo) |
|
65 | largefiles: (no remote repo) | |
66 |
|
66 | |||
67 | Commit preserved largefile contents. |
|
67 | Commit preserved largefile contents. | |
68 |
|
68 | |||
69 | $ cat normal1 |
|
69 | $ cat normal1 | |
70 | normal11 |
|
70 | normal11 | |
71 | $ cat large1 |
|
71 | $ cat large1 | |
72 | large11 |
|
72 | large11 | |
73 | $ cat sub/normal2 |
|
73 | $ cat sub/normal2 | |
74 | normal22 |
|
74 | normal22 | |
75 | $ cat sub/large2 |
|
75 | $ cat sub/large2 | |
76 | large22 |
|
76 | large22 | |
77 |
|
77 | |||
78 | Test status, subdir and unknown files |
|
78 | Test status, subdir and unknown files | |
79 |
|
79 | |||
80 | $ echo unknown > sub/unknown |
|
80 | $ echo unknown > sub/unknown | |
81 | $ hg st --all |
|
81 | $ hg st --all | |
82 | ? sub/unknown |
|
82 | ? sub/unknown | |
83 | C large1 |
|
83 | C large1 | |
84 | C normal1 |
|
84 | C normal1 | |
85 | C sub/large2 |
|
85 | C sub/large2 | |
86 | C sub/normal2 |
|
86 | C sub/normal2 | |
87 | $ hg st --all sub |
|
87 | $ hg st --all sub | |
88 | ? sub/unknown |
|
88 | ? sub/unknown | |
89 | C sub/large2 |
|
89 | C sub/large2 | |
90 | C sub/normal2 |
|
90 | C sub/normal2 | |
91 | $ rm sub/unknown |
|
91 | $ rm sub/unknown | |
92 |
|
92 | |||
93 | Test messages and exit codes for remove warning cases |
|
93 | Test messages and exit codes for remove warning cases | |
94 |
|
94 | |||
95 | $ hg remove -A large1 |
|
95 | $ hg remove -A large1 | |
96 | not removing large1: file still exists |
|
96 | not removing large1: file still exists | |
97 | [1] |
|
97 | [1] | |
98 | $ echo 'modified' > large1 |
|
98 | $ echo 'modified' > large1 | |
99 | $ hg remove large1 |
|
99 | $ hg remove large1 | |
100 | not removing large1: file is modified (use -f to force removal) |
|
100 | not removing large1: file is modified (use -f to force removal) | |
101 | [1] |
|
101 | [1] | |
102 | $ echo 'new' > normalnew |
|
102 | $ echo 'new' > normalnew | |
103 | $ hg add normalnew |
|
103 | $ hg add normalnew | |
104 | $ echo 'new' > largenew |
|
104 | $ echo 'new' > largenew | |
105 | $ hg add --large normalnew |
|
105 | $ hg add --large normalnew | |
106 | normalnew already tracked! |
|
106 | normalnew already tracked! | |
107 | $ hg remove normalnew largenew |
|
107 | $ hg remove normalnew largenew | |
108 | not removing largenew: file is untracked |
|
108 | not removing largenew: file is untracked | |
109 | not removing normalnew: file has been marked for add (use forget to undo) |
|
109 | not removing normalnew: file has been marked for add (use forget to undo) | |
110 | [1] |
|
110 | [1] | |
111 | $ rm normalnew largenew |
|
111 | $ rm normalnew largenew | |
112 | $ hg up -Cq |
|
112 | $ hg up -Cq | |
113 |
|
113 | |||
114 | Remove both largefiles and normal files. |
|
114 | Remove both largefiles and normal files. | |
115 |
|
115 | |||
116 | $ hg remove normal1 large1 |
|
116 | $ hg remove normal1 large1 | |
117 | $ hg status large1 |
|
117 | $ hg status large1 | |
118 | R large1 |
|
118 | R large1 | |
119 | $ hg commit -m "remove files" |
|
119 | $ hg commit -m "remove files" | |
120 | Invoking status precommit hook |
|
120 | Invoking status precommit hook | |
121 | R large1 |
|
121 | R large1 | |
122 | R normal1 |
|
122 | R normal1 | |
123 | $ ls |
|
123 | $ ls | |
124 | sub |
|
124 | sub | |
125 | $ echo "testlargefile" > large1-test |
|
125 | $ echo "testlargefile" > large1-test | |
126 | $ hg add --large large1-test |
|
126 | $ hg add --large large1-test | |
127 | $ hg st |
|
127 | $ hg st | |
128 | A large1-test |
|
128 | A large1-test | |
129 | $ hg rm large1-test |
|
129 | $ hg rm large1-test | |
130 | not removing large1-test: file has been marked for add (use forget to undo) |
|
130 | not removing large1-test: file has been marked for add (use forget to undo) | |
131 | [1] |
|
131 | [1] | |
132 | $ hg st |
|
132 | $ hg st | |
133 | A large1-test |
|
133 | A large1-test | |
134 | $ hg forget large1-test |
|
134 | $ hg forget large1-test | |
135 | $ hg st |
|
135 | $ hg st | |
136 | ? large1-test |
|
136 | ? large1-test | |
137 | $ hg remove large1-test |
|
137 | $ hg remove large1-test | |
138 | not removing large1-test: file is untracked |
|
138 | not removing large1-test: file is untracked | |
139 | [1] |
|
139 | [1] | |
140 | $ hg forget large1-test |
|
140 | $ hg forget large1-test | |
141 | not removing large1-test: file is already untracked |
|
141 | not removing large1-test: file is already untracked | |
142 | [1] |
|
142 | [1] | |
143 | $ rm large1-test |
|
143 | $ rm large1-test | |
144 |
|
144 | |||
145 | Copy both largefiles and normal files (testing that status output is correct). |
|
145 | Copy both largefiles and normal files (testing that status output is correct). | |
146 |
|
146 | |||
147 | $ hg cp sub/normal2 normal1 |
|
147 | $ hg cp sub/normal2 normal1 | |
148 | $ hg cp sub/large2 large1 |
|
148 | $ hg cp sub/large2 large1 | |
149 | $ hg commit -m "copy files" |
|
149 | $ hg commit -m "copy files" | |
150 | Invoking status precommit hook |
|
150 | Invoking status precommit hook | |
151 | A large1 |
|
151 | A large1 | |
152 | A normal1 |
|
152 | A normal1 | |
153 | $ cat normal1 |
|
153 | $ cat normal1 | |
154 | normal22 |
|
154 | normal22 | |
155 | $ cat large1 |
|
155 | $ cat large1 | |
156 | large22 |
|
156 | large22 | |
157 |
|
157 | |||
158 | Test moving largefiles and verify that normal files are also unaffected. |
|
158 | Test moving largefiles and verify that normal files are also unaffected. | |
159 |
|
159 | |||
160 | $ hg mv normal1 normal3 |
|
160 | $ hg mv normal1 normal3 | |
161 | $ hg mv large1 large3 |
|
161 | $ hg mv large1 large3 | |
162 | $ hg mv sub/normal2 sub/normal4 |
|
162 | $ hg mv sub/normal2 sub/normal4 | |
163 | $ hg mv sub/large2 sub/large4 |
|
163 | $ hg mv sub/large2 sub/large4 | |
164 | $ hg commit -m "move files" |
|
164 | $ hg commit -m "move files" | |
165 | Invoking status precommit hook |
|
165 | Invoking status precommit hook | |
166 | A large3 |
|
166 | A large3 | |
167 | A normal3 |
|
167 | A normal3 | |
168 | A sub/large4 |
|
168 | A sub/large4 | |
169 | A sub/normal4 |
|
169 | A sub/normal4 | |
170 | R large1 |
|
170 | R large1 | |
171 | R normal1 |
|
171 | R normal1 | |
172 | R sub/large2 |
|
172 | R sub/large2 | |
173 | R sub/normal2 |
|
173 | R sub/normal2 | |
174 | $ cat normal3 |
|
174 | $ cat normal3 | |
175 | normal22 |
|
175 | normal22 | |
176 | $ cat large3 |
|
176 | $ cat large3 | |
177 | large22 |
|
177 | large22 | |
178 | $ cat sub/normal4 |
|
178 | $ cat sub/normal4 | |
179 | normal22 |
|
179 | normal22 | |
180 | $ cat sub/large4 |
|
180 | $ cat sub/large4 | |
181 | large22 |
|
181 | large22 | |
182 |
|
182 | |||
183 | Test copies and moves from a directory other than root (issue3516) |
|
183 | Test copies and moves from a directory other than root (issue3516) | |
184 |
|
184 | |||
185 | $ cd .. |
|
185 | $ cd .. | |
186 | $ hg init lf_cpmv |
|
186 | $ hg init lf_cpmv | |
187 | $ cd lf_cpmv |
|
187 | $ cd lf_cpmv | |
188 | $ mkdir dira |
|
188 | $ mkdir dira | |
189 | $ mkdir dira/dirb |
|
189 | $ mkdir dira/dirb | |
190 | $ touch dira/dirb/largefile |
|
190 | $ touch dira/dirb/largefile | |
191 | $ hg add --large dira/dirb/largefile |
|
191 | $ hg add --large dira/dirb/largefile | |
192 | $ hg commit -m "added" |
|
192 | $ hg commit -m "added" | |
193 | Invoking status precommit hook |
|
193 | Invoking status precommit hook | |
194 | A dira/dirb/largefile |
|
194 | A dira/dirb/largefile | |
195 | $ cd dira |
|
195 | $ cd dira | |
196 | $ hg cp dirb/largefile foo/largefile |
|
196 | $ hg cp dirb/largefile foo/largefile | |
197 | $ hg ci -m "deep copy" |
|
197 | $ hg ci -m "deep copy" | |
198 | Invoking status precommit hook |
|
198 | Invoking status precommit hook | |
199 | A dira/foo/largefile |
|
199 | A dira/foo/largefile | |
200 | $ find . | sort |
|
200 | $ find . | sort | |
201 | . |
|
201 | . | |
202 | ./dirb |
|
202 | ./dirb | |
203 | ./dirb/largefile |
|
203 | ./dirb/largefile | |
204 | ./foo |
|
204 | ./foo | |
205 | ./foo/largefile |
|
205 | ./foo/largefile | |
206 | $ hg mv foo/largefile baz/largefile |
|
206 | $ hg mv foo/largefile baz/largefile | |
207 | $ hg ci -m "moved" |
|
207 | $ hg ci -m "moved" | |
208 | Invoking status precommit hook |
|
208 | Invoking status precommit hook | |
209 | A dira/baz/largefile |
|
209 | A dira/baz/largefile | |
210 | R dira/foo/largefile |
|
210 | R dira/foo/largefile | |
211 | $ find . | sort |
|
211 | $ find . | sort | |
212 | . |
|
212 | . | |
213 | ./baz |
|
213 | ./baz | |
214 | ./baz/largefile |
|
214 | ./baz/largefile | |
215 | ./dirb |
|
215 | ./dirb | |
216 | ./dirb/largefile |
|
216 | ./dirb/largefile | |
217 | ./foo |
|
217 | ./foo | |
218 | $ cd ../../a |
|
218 | $ cd ../../a | |
219 |
|
219 | |||
220 | #if serve |
|
220 | #if serve | |
221 | Test display of largefiles in hgweb |
|
221 | Test display of largefiles in hgweb | |
222 |
|
222 | |||
223 | $ hg serve -d -p $HGPORT --pid-file ../hg.pid |
|
223 | $ hg serve -d -p $HGPORT --pid-file ../hg.pid | |
224 | $ cat ../hg.pid >> $DAEMON_PIDS |
|
224 | $ cat ../hg.pid >> $DAEMON_PIDS | |
225 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/?style=raw' |
|
225 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/?style=raw' | |
226 | 200 Script output follows |
|
226 | 200 Script output follows | |
227 |
|
227 | |||
228 |
|
228 | |||
229 | drwxr-xr-x sub |
|
229 | drwxr-xr-x sub | |
230 | -rw-r--r-- 41 large3 |
|
230 | -rw-r--r-- 41 large3 | |
231 | -rw-r--r-- 9 normal3 |
|
231 | -rw-r--r-- 9 normal3 | |
232 |
|
232 | |||
233 |
|
233 | |||
234 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/sub/?style=raw' |
|
234 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/sub/?style=raw' | |
235 | 200 Script output follows |
|
235 | 200 Script output follows | |
236 |
|
236 | |||
237 |
|
237 | |||
238 | -rw-r--r-- 41 large4 |
|
238 | -rw-r--r-- 41 large4 | |
239 | -rw-r--r-- 9 normal4 |
|
239 | -rw-r--r-- 9 normal4 | |
240 |
|
240 | |||
241 |
|
241 | |||
242 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
242 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |
243 | #endif |
|
243 | #endif | |
244 |
|
244 | |||
245 | Test archiving the various revisions. These hit corner cases known with |
|
245 | Test archiving the various revisions. These hit corner cases known with | |
246 | archiving. |
|
246 | archiving. | |
247 |
|
247 | |||
248 | $ hg archive -r 0 ../archive0 |
|
248 | $ hg archive -r 0 ../archive0 | |
249 | $ hg archive -r 1 ../archive1 |
|
249 | $ hg archive -r 1 ../archive1 | |
250 | $ hg archive -r 2 ../archive2 |
|
250 | $ hg archive -r 2 ../archive2 | |
251 | $ hg archive -r 3 ../archive3 |
|
251 | $ hg archive -r 3 ../archive3 | |
252 | $ hg archive -r 4 ../archive4 |
|
252 | $ hg archive -r 4 ../archive4 | |
253 | $ cd ../archive0 |
|
253 | $ cd ../archive0 | |
254 | $ cat normal1 |
|
254 | $ cat normal1 | |
255 | normal1 |
|
255 | normal1 | |
256 | $ cat large1 |
|
256 | $ cat large1 | |
257 | large1 |
|
257 | large1 | |
258 | $ cat sub/normal2 |
|
258 | $ cat sub/normal2 | |
259 | normal2 |
|
259 | normal2 | |
260 | $ cat sub/large2 |
|
260 | $ cat sub/large2 | |
261 | large2 |
|
261 | large2 | |
262 | $ cd ../archive1 |
|
262 | $ cd ../archive1 | |
263 | $ cat normal1 |
|
263 | $ cat normal1 | |
264 | normal11 |
|
264 | normal11 | |
265 | $ cat large1 |
|
265 | $ cat large1 | |
266 | large11 |
|
266 | large11 | |
267 | $ cat sub/normal2 |
|
267 | $ cat sub/normal2 | |
268 | normal22 |
|
268 | normal22 | |
269 | $ cat sub/large2 |
|
269 | $ cat sub/large2 | |
270 | large22 |
|
270 | large22 | |
271 | $ cd ../archive2 |
|
271 | $ cd ../archive2 | |
272 | $ ls |
|
272 | $ ls | |
273 | sub |
|
273 | sub | |
274 | $ cat sub/normal2 |
|
274 | $ cat sub/normal2 | |
275 | normal22 |
|
275 | normal22 | |
276 | $ cat sub/large2 |
|
276 | $ cat sub/large2 | |
277 | large22 |
|
277 | large22 | |
278 | $ cd ../archive3 |
|
278 | $ cd ../archive3 | |
279 | $ cat normal1 |
|
279 | $ cat normal1 | |
280 | normal22 |
|
280 | normal22 | |
281 | $ cat large1 |
|
281 | $ cat large1 | |
282 | large22 |
|
282 | large22 | |
283 | $ cat sub/normal2 |
|
283 | $ cat sub/normal2 | |
284 | normal22 |
|
284 | normal22 | |
285 | $ cat sub/large2 |
|
285 | $ cat sub/large2 | |
286 | large22 |
|
286 | large22 | |
287 | $ cd ../archive4 |
|
287 | $ cd ../archive4 | |
288 | $ cat normal3 |
|
288 | $ cat normal3 | |
289 | normal22 |
|
289 | normal22 | |
290 | $ cat large3 |
|
290 | $ cat large3 | |
291 | large22 |
|
291 | large22 | |
292 | $ cat sub/normal4 |
|
292 | $ cat sub/normal4 | |
293 | normal22 |
|
293 | normal22 | |
294 | $ cat sub/large4 |
|
294 | $ cat sub/large4 | |
295 | large22 |
|
295 | large22 | |
296 |
|
296 | |||
297 | Commit corner case: specify files to commit. |
|
297 | Commit corner case: specify files to commit. | |
298 |
|
298 | |||
299 | $ cd ../a |
|
299 | $ cd ../a | |
300 | $ echo normal3 > normal3 |
|
300 | $ echo normal3 > normal3 | |
301 | $ echo large3 > large3 |
|
301 | $ echo large3 > large3 | |
302 | $ echo normal4 > sub/normal4 |
|
302 | $ echo normal4 > sub/normal4 | |
303 | $ echo large4 > sub/large4 |
|
303 | $ echo large4 > sub/large4 | |
304 | $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again" |
|
304 | $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again" | |
305 | Invoking status precommit hook |
|
305 | Invoking status precommit hook | |
306 | M large3 |
|
306 | M large3 | |
307 | M normal3 |
|
307 | M normal3 | |
308 | M sub/large4 |
|
308 | M sub/large4 | |
309 | M sub/normal4 |
|
309 | M sub/normal4 | |
310 | $ cat normal3 |
|
310 | $ cat normal3 | |
311 | normal3 |
|
311 | normal3 | |
312 | $ cat large3 |
|
312 | $ cat large3 | |
313 | large3 |
|
313 | large3 | |
314 | $ cat sub/normal4 |
|
314 | $ cat sub/normal4 | |
315 | normal4 |
|
315 | normal4 | |
316 | $ cat sub/large4 |
|
316 | $ cat sub/large4 | |
317 | large4 |
|
317 | large4 | |
318 |
|
318 | |||
319 | One more commit corner case: commit from a subdirectory. |
|
319 | One more commit corner case: commit from a subdirectory. | |
320 |
|
320 | |||
321 | $ cd ../a |
|
321 | $ cd ../a | |
322 | $ echo normal33 > normal3 |
|
322 | $ echo normal33 > normal3 | |
323 | $ echo large33 > large3 |
|
323 | $ echo large33 > large3 | |
324 | $ echo normal44 > sub/normal4 |
|
324 | $ echo normal44 > sub/normal4 | |
325 | $ echo large44 > sub/large4 |
|
325 | $ echo large44 > sub/large4 | |
326 | $ cd sub |
|
326 | $ cd sub | |
327 | $ hg commit -m "edit files yet again" |
|
327 | $ hg commit -m "edit files yet again" | |
328 | Invoking status precommit hook |
|
328 | Invoking status precommit hook | |
329 | M large3 |
|
329 | M large3 | |
330 | M normal3 |
|
330 | M normal3 | |
331 | M sub/large4 |
|
331 | M sub/large4 | |
332 | M sub/normal4 |
|
332 | M sub/normal4 | |
333 | $ cat ../normal3 |
|
333 | $ cat ../normal3 | |
334 | normal33 |
|
334 | normal33 | |
335 | $ cat ../large3 |
|
335 | $ cat ../large3 | |
336 | large33 |
|
336 | large33 | |
337 | $ cat normal4 |
|
337 | $ cat normal4 | |
338 | normal44 |
|
338 | normal44 | |
339 | $ cat large4 |
|
339 | $ cat large4 | |
340 | large44 |
|
340 | large44 | |
341 |
|
341 | |||
342 | Committing standins is not allowed. |
|
342 | Committing standins is not allowed. | |
343 |
|
343 | |||
344 | $ cd .. |
|
344 | $ cd .. | |
345 | $ echo large3 > large3 |
|
345 | $ echo large3 > large3 | |
346 | $ hg commit .hglf/large3 -m "try to commit standin" |
|
346 | $ hg commit .hglf/large3 -m "try to commit standin" | |
347 | abort: file ".hglf/large3" is a largefile standin |
|
347 | abort: file ".hglf/large3" is a largefile standin | |
348 | (commit the largefile itself instead) |
|
348 | (commit the largefile itself instead) | |
349 | [255] |
|
349 | [255] | |
350 |
|
350 | |||
351 | Corner cases for adding largefiles. |
|
351 | Corner cases for adding largefiles. | |
352 |
|
352 | |||
353 | $ echo large5 > large5 |
|
353 | $ echo large5 > large5 | |
354 | $ hg add --large large5 |
|
354 | $ hg add --large large5 | |
355 | $ hg add --large large5 |
|
355 | $ hg add --large large5 | |
356 | large5 already a largefile |
|
356 | large5 already a largefile | |
357 | $ mkdir sub2 |
|
357 | $ mkdir sub2 | |
358 | $ echo large6 > sub2/large6 |
|
358 | $ echo large6 > sub2/large6 | |
359 | $ echo large7 > sub2/large7 |
|
359 | $ echo large7 > sub2/large7 | |
360 | $ hg add --large sub2 |
|
360 | $ hg add --large sub2 | |
361 | adding sub2/large6 as a largefile (glob) |
|
361 | adding sub2/large6 as a largefile (glob) | |
362 | adding sub2/large7 as a largefile (glob) |
|
362 | adding sub2/large7 as a largefile (glob) | |
363 | $ hg st |
|
363 | $ hg st | |
364 | M large3 |
|
364 | M large3 | |
365 | A large5 |
|
365 | A large5 | |
366 | A sub2/large6 |
|
366 | A sub2/large6 | |
367 | A sub2/large7 |
|
367 | A sub2/large7 | |
368 |
|
368 | |||
369 | Committing directories containing only largefiles. |
|
369 | Committing directories containing only largefiles. | |
370 |
|
370 | |||
371 | $ mkdir -p z/y/x/m |
|
371 | $ mkdir -p z/y/x/m | |
372 | $ touch z/y/x/m/large1 |
|
372 | $ touch z/y/x/m/large1 | |
373 | $ touch z/y/x/large2 |
|
373 | $ touch z/y/x/large2 | |
374 | $ hg add --large z/y/x/m/large1 z/y/x/large2 |
|
374 | $ hg add --large z/y/x/m/large1 z/y/x/large2 | |
375 | $ hg commit -m "Subdir with directory only containing largefiles" z |
|
375 | $ hg commit -m "Subdir with directory only containing largefiles" z | |
376 | Invoking status precommit hook |
|
376 | Invoking status precommit hook | |
377 | M large3 |
|
377 | M large3 | |
378 | A large5 |
|
378 | A large5 | |
379 | A sub2/large6 |
|
379 | A sub2/large6 | |
380 | A sub2/large7 |
|
380 | A sub2/large7 | |
381 | A z/y/x/large2 |
|
381 | A z/y/x/large2 | |
382 | A z/y/x/m/large1 |
|
382 | A z/y/x/m/large1 | |
383 | $ hg rollback --quiet |
|
383 | $ hg rollback --quiet | |
384 | $ touch z/y/x/m/normal |
|
384 | $ touch z/y/x/m/normal | |
385 | $ hg add z/y/x/m/normal |
|
385 | $ hg add z/y/x/m/normal | |
386 | $ hg commit -m "Subdir with mixed contents" z |
|
386 | $ hg commit -m "Subdir with mixed contents" z | |
387 | Invoking status precommit hook |
|
387 | Invoking status precommit hook | |
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 | A z/y/x/large2 |
|
392 | A z/y/x/large2 | |
393 | A z/y/x/m/large1 |
|
393 | A z/y/x/m/large1 | |
394 | A z/y/x/m/normal |
|
394 | A z/y/x/m/normal | |
395 | $ hg st |
|
395 | $ hg st | |
396 | M large3 |
|
396 | M large3 | |
397 | A large5 |
|
397 | A large5 | |
398 | A sub2/large6 |
|
398 | A sub2/large6 | |
399 | A sub2/large7 |
|
399 | A sub2/large7 | |
400 | $ hg rollback --quiet |
|
400 | $ hg rollback --quiet | |
401 | $ hg revert z/y/x/large2 z/y/x/m/large1 |
|
401 | $ hg revert z/y/x/large2 z/y/x/m/large1 | |
402 | $ rm z/y/x/large2 z/y/x/m/large1 |
|
402 | $ rm z/y/x/large2 z/y/x/m/large1 | |
403 | $ hg commit -m "Subdir with normal contents" z |
|
403 | $ hg commit -m "Subdir with normal contents" z | |
404 | Invoking status precommit hook |
|
404 | Invoking status precommit hook | |
405 | M large3 |
|
405 | M large3 | |
406 | A large5 |
|
406 | A large5 | |
407 | A sub2/large6 |
|
407 | A sub2/large6 | |
408 | A sub2/large7 |
|
408 | A sub2/large7 | |
409 | A z/y/x/m/normal |
|
409 | A z/y/x/m/normal | |
410 | $ hg st |
|
410 | $ hg st | |
411 | M large3 |
|
411 | M large3 | |
412 | A large5 |
|
412 | A large5 | |
413 | A sub2/large6 |
|
413 | A sub2/large6 | |
414 | A sub2/large7 |
|
414 | A sub2/large7 | |
415 | $ hg rollback --quiet |
|
415 | $ hg rollback --quiet | |
416 | $ hg revert --quiet z |
|
416 | $ hg revert --quiet z | |
417 | $ hg commit -m "Empty subdir" z |
|
417 | $ hg commit -m "Empty subdir" z | |
418 | abort: z: no match under directory! |
|
418 | abort: z: no match under directory! | |
419 | [255] |
|
419 | [255] | |
420 | $ rm -rf z |
|
420 | $ rm -rf z | |
421 | $ hg ci -m "standin" .hglf |
|
421 | $ hg ci -m "standin" .hglf | |
422 | abort: file ".hglf" is a largefile standin |
|
422 | abort: file ".hglf" is a largefile standin | |
423 | (commit the largefile itself instead) |
|
423 | (commit the largefile itself instead) | |
424 | [255] |
|
424 | [255] | |
425 |
|
425 | |||
426 | Test "hg status" with combination of 'file pattern' and 'directory |
|
426 | Test "hg status" with combination of 'file pattern' and 'directory | |
427 | pattern' for largefiles: |
|
427 | pattern' for largefiles: | |
428 |
|
428 | |||
429 | $ hg status sub2/large6 sub2 |
|
429 | $ hg status sub2/large6 sub2 | |
430 | A sub2/large6 |
|
430 | A sub2/large6 | |
431 | A sub2/large7 |
|
431 | A sub2/large7 | |
432 |
|
432 | |||
433 | Config settings (pattern **.dat, minsize 2 MB) are respected. |
|
433 | Config settings (pattern **.dat, minsize 2 MB) are respected. | |
434 |
|
434 | |||
435 | $ echo testdata > test.dat |
|
435 | $ echo testdata > test.dat | |
436 | $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null |
|
436 | $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null | |
437 | $ hg add |
|
437 | $ hg add | |
438 | adding reallylarge as a largefile |
|
438 | adding reallylarge as a largefile | |
439 | adding test.dat as a largefile |
|
439 | adding test.dat as a largefile | |
440 |
|
440 | |||
441 | Test that minsize and --lfsize handle float values; |
|
441 | Test that minsize and --lfsize handle float values; | |
442 | also tests that --lfsize overrides largefiles.minsize. |
|
442 | also tests that --lfsize overrides largefiles.minsize. | |
443 | (0.250 MB = 256 kB = 262144 B) |
|
443 | (0.250 MB = 256 kB = 262144 B) | |
444 |
|
444 | |||
445 | $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null |
|
445 | $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null | |
446 | $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null |
|
446 | $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null | |
447 | $ hg --config largefiles.minsize=.25 add |
|
447 | $ hg --config largefiles.minsize=.25 add | |
448 | adding ratherlarge as a largefile |
|
448 | adding ratherlarge as a largefile | |
449 | adding medium |
|
449 | adding medium | |
450 | $ hg forget medium |
|
450 | $ hg forget medium | |
451 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 |
|
451 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 | |
452 | adding medium as a largefile |
|
452 | adding medium as a largefile | |
453 | $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null |
|
453 | $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null | |
454 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 |
|
454 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 | |
455 | adding notlarge |
|
455 | adding notlarge | |
456 | $ hg forget notlarge |
|
456 | $ hg forget notlarge | |
457 |
|
457 | |||
458 | Test forget on largefiles. |
|
458 | Test forget on largefiles. | |
459 |
|
459 | |||
460 | $ hg forget large3 large5 test.dat reallylarge ratherlarge medium |
|
460 | $ hg forget large3 large5 test.dat reallylarge ratherlarge medium | |
461 | $ hg commit -m "add/edit more largefiles" |
|
461 | $ hg commit -m "add/edit more largefiles" | |
462 | Invoking status precommit hook |
|
462 | Invoking status precommit hook | |
463 | A sub2/large6 |
|
463 | A sub2/large6 | |
464 | A sub2/large7 |
|
464 | A sub2/large7 | |
465 | R large3 |
|
465 | R large3 | |
466 | ? large5 |
|
466 | ? large5 | |
467 | ? medium |
|
467 | ? medium | |
468 | ? notlarge |
|
468 | ? notlarge | |
469 | ? ratherlarge |
|
469 | ? ratherlarge | |
470 | ? reallylarge |
|
470 | ? reallylarge | |
471 | ? test.dat |
|
471 | ? test.dat | |
472 | $ hg st |
|
472 | $ hg st | |
473 | ? large3 |
|
473 | ? large3 | |
474 | ? large5 |
|
474 | ? large5 | |
475 | ? medium |
|
475 | ? medium | |
476 | ? notlarge |
|
476 | ? notlarge | |
477 | ? ratherlarge |
|
477 | ? ratherlarge | |
478 | ? reallylarge |
|
478 | ? reallylarge | |
479 | ? test.dat |
|
479 | ? test.dat | |
480 |
|
480 | |||
481 | Purge with largefiles: verify that largefiles are still in the working |
|
481 | Purge with largefiles: verify that largefiles are still in the working | |
482 | dir after a purge. |
|
482 | dir after a purge. | |
483 |
|
483 | |||
484 | $ hg purge --all |
|
484 | $ hg purge --all | |
485 | $ cat sub/large4 |
|
485 | $ cat sub/large4 | |
486 | large44 |
|
486 | large44 | |
487 | $ cat sub2/large6 |
|
487 | $ cat sub2/large6 | |
488 | large6 |
|
488 | large6 | |
489 | $ cat sub2/large7 |
|
489 | $ cat sub2/large7 | |
490 | large7 |
|
490 | large7 | |
491 |
|
491 | |||
492 | Test addremove: verify that files that should be added as largfiles are added as |
|
492 | Test addremove: verify that files that should be added as largfiles are added as | |
493 | such and that already-existing largfiles are not added as normal files by |
|
493 | such and that already-existing largfiles are not added as normal files by | |
494 | accident. |
|
494 | accident. | |
495 |
|
495 | |||
496 | $ rm normal3 |
|
496 | $ rm normal3 | |
497 | $ rm sub/large4 |
|
497 | $ rm sub/large4 | |
498 | $ echo "testing addremove with patterns" > testaddremove.dat |
|
498 | $ echo "testing addremove with patterns" > testaddremove.dat | |
499 | $ echo "normaladdremove" > normaladdremove |
|
499 | $ echo "normaladdremove" > normaladdremove | |
500 | $ hg addremove |
|
500 | $ hg addremove | |
501 | removing sub/large4 |
|
501 | removing sub/large4 | |
502 | adding testaddremove.dat as a largefile |
|
502 | adding testaddremove.dat as a largefile | |
503 | removing normal3 |
|
503 | removing normal3 | |
504 | adding normaladdremove |
|
504 | adding normaladdremove | |
505 |
|
505 | |||
506 | Test addremove with -R |
|
506 | Test addremove with -R | |
507 |
|
507 | |||
508 | $ hg up -C |
|
508 | $ hg up -C | |
509 | getting changed largefiles |
|
509 | getting changed largefiles | |
510 | 1 largefiles updated, 0 removed |
|
510 | 1 largefiles updated, 0 removed | |
511 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
511 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
512 | $ rm normal3 |
|
512 | $ rm normal3 | |
513 | $ rm sub/large4 |
|
513 | $ rm sub/large4 | |
514 | $ echo "testing addremove with patterns" > testaddremove.dat |
|
514 | $ echo "testing addremove with patterns" > testaddremove.dat | |
515 | $ echo "normaladdremove" > normaladdremove |
|
515 | $ echo "normaladdremove" > normaladdremove | |
516 | $ cd .. |
|
516 | $ cd .. | |
517 | $ hg -R a addremove |
|
517 | $ hg -R a addremove | |
518 | removing sub/large4 |
|
518 | removing sub/large4 | |
519 | adding a/testaddremove.dat as a largefile (glob) |
|
519 | adding a/testaddremove.dat as a largefile (glob) | |
520 | removing normal3 |
|
520 | removing normal3 | |
521 | adding normaladdremove |
|
521 | adding normaladdremove | |
522 | $ cd a |
|
522 | $ cd a | |
523 |
|
523 | |||
524 | Test 3364 |
|
524 | Test 3364 | |
525 | $ hg clone . ../addrm |
|
525 | $ hg clone . ../addrm | |
526 | updating to branch default |
|
526 | updating to branch default | |
527 | getting changed largefiles |
|
527 | getting changed largefiles | |
528 | 3 largefiles updated, 0 removed |
|
528 | 3 largefiles updated, 0 removed | |
529 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
529 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
530 | $ cd ../addrm |
|
530 | $ cd ../addrm | |
531 | $ cat >> .hg/hgrc <<EOF |
|
531 | $ cat >> .hg/hgrc <<EOF | |
532 | > [hooks] |
|
532 | > [hooks] | |
533 | > post-commit.stat=sh -c "echo \\"Invoking status postcommit hook\\"; hg status -A" |
|
533 | > post-commit.stat=sh -c "echo \\"Invoking status postcommit hook\\"; hg status -A" | |
534 | > EOF |
|
534 | > EOF | |
535 | $ touch foo |
|
535 | $ touch foo | |
536 | $ hg add --large foo |
|
536 | $ hg add --large foo | |
537 | $ hg ci -m "add foo" |
|
537 | $ hg ci -m "add foo" | |
538 | Invoking status precommit hook |
|
538 | Invoking status precommit hook | |
539 | A foo |
|
539 | A foo | |
540 | Invoking status postcommit hook |
|
540 | Invoking status postcommit hook | |
541 | C foo |
|
541 | C foo | |
542 | C normal3 |
|
542 | C normal3 | |
543 | C sub/large4 |
|
543 | C sub/large4 | |
544 | C sub/normal4 |
|
544 | C sub/normal4 | |
545 | C sub2/large6 |
|
545 | C sub2/large6 | |
546 | C sub2/large7 |
|
546 | C sub2/large7 | |
547 | $ rm foo |
|
547 | $ rm foo | |
548 | $ hg st |
|
548 | $ hg st | |
549 | ! foo |
|
549 | ! foo | |
550 | hmm.. no precommit invoked, but there is a postcommit?? |
|
550 | hmm.. no precommit invoked, but there is a postcommit?? | |
551 | $ hg ci -m "will not checkin" |
|
551 | $ hg ci -m "will not checkin" | |
552 | nothing changed |
|
552 | nothing changed | |
553 | Invoking status postcommit hook |
|
553 | Invoking status postcommit hook | |
554 | ! foo |
|
554 | ! foo | |
555 | C normal3 |
|
555 | C normal3 | |
556 | C sub/large4 |
|
556 | C sub/large4 | |
557 | C sub/normal4 |
|
557 | C sub/normal4 | |
558 | C sub2/large6 |
|
558 | C sub2/large6 | |
559 | C sub2/large7 |
|
559 | C sub2/large7 | |
560 | [1] |
|
560 | [1] | |
561 | $ hg addremove |
|
561 | $ hg addremove | |
562 | removing foo |
|
562 | removing foo | |
563 | $ hg st |
|
563 | $ hg st | |
564 | R foo |
|
564 | R foo | |
565 | $ hg ci -m "used to say nothing changed" |
|
565 | $ hg ci -m "used to say nothing changed" | |
566 | Invoking status precommit hook |
|
566 | Invoking status precommit hook | |
567 | R foo |
|
567 | R foo | |
568 | Invoking status postcommit hook |
|
568 | Invoking status postcommit hook | |
569 | C normal3 |
|
569 | C normal3 | |
570 | C sub/large4 |
|
570 | C sub/large4 | |
571 | C sub/normal4 |
|
571 | C sub/normal4 | |
572 | C sub2/large6 |
|
572 | C sub2/large6 | |
573 | C sub2/large7 |
|
573 | C sub2/large7 | |
574 | $ hg st |
|
574 | $ hg st | |
575 |
|
575 | |||
576 | Test 3507 (both normal files and largefiles were a problem) |
|
576 | Test 3507 (both normal files and largefiles were a problem) | |
577 |
|
577 | |||
578 | $ touch normal |
|
578 | $ touch normal | |
579 | $ touch large |
|
579 | $ touch large | |
580 | $ hg add normal |
|
580 | $ hg add normal | |
581 | $ hg add --large large |
|
581 | $ hg add --large large | |
582 | $ hg ci -m "added" |
|
582 | $ hg ci -m "added" | |
583 | Invoking status precommit hook |
|
583 | Invoking status precommit hook | |
584 | A large |
|
584 | A large | |
585 | A normal |
|
585 | A normal | |
586 | Invoking status postcommit hook |
|
586 | Invoking status postcommit hook | |
587 | C large |
|
587 | C large | |
588 | C normal |
|
588 | C normal | |
589 | C normal3 |
|
589 | C normal3 | |
590 | C sub/large4 |
|
590 | C sub/large4 | |
591 | C sub/normal4 |
|
591 | C sub/normal4 | |
592 | C sub2/large6 |
|
592 | C sub2/large6 | |
593 | C sub2/large7 |
|
593 | C sub2/large7 | |
594 | $ hg remove normal |
|
594 | $ hg remove normal | |
595 | $ hg addremove --traceback |
|
595 | $ hg addremove --traceback | |
596 | $ hg ci -m "addremoved normal" |
|
596 | $ hg ci -m "addremoved normal" | |
597 | Invoking status precommit hook |
|
597 | Invoking status precommit hook | |
598 | R normal |
|
598 | R normal | |
599 | Invoking status postcommit hook |
|
599 | Invoking status postcommit hook | |
600 | C large |
|
600 | C large | |
601 | C normal3 |
|
601 | C normal3 | |
602 | C sub/large4 |
|
602 | C sub/large4 | |
603 | C sub/normal4 |
|
603 | C sub/normal4 | |
604 | C sub2/large6 |
|
604 | C sub2/large6 | |
605 | C sub2/large7 |
|
605 | C sub2/large7 | |
606 | $ hg up -C '.^' |
|
606 | $ hg up -C '.^' | |
607 | getting changed largefiles |
|
607 | getting changed largefiles | |
608 | 0 largefiles updated, 0 removed |
|
608 | 0 largefiles updated, 0 removed | |
609 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
609 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
610 | $ hg remove large |
|
610 | $ hg remove large | |
611 | $ hg addremove --traceback |
|
611 | $ hg addremove --traceback | |
612 | $ hg ci -m "removed large" |
|
612 | $ hg ci -m "removed large" | |
613 | Invoking status precommit hook |
|
613 | Invoking status precommit hook | |
614 | R large |
|
614 | R large | |
615 | created new head |
|
615 | created new head | |
616 | Invoking status postcommit hook |
|
616 | Invoking status postcommit hook | |
617 | C normal |
|
617 | C normal | |
618 | C normal3 |
|
618 | C normal3 | |
619 | C sub/large4 |
|
619 | C sub/large4 | |
620 | C sub/normal4 |
|
620 | C sub/normal4 | |
621 | C sub2/large6 |
|
621 | C sub2/large6 | |
622 | C sub2/large7 |
|
622 | C sub2/large7 | |
623 |
|
623 | |||
624 | Test commit -A (issue 3542) |
|
624 | Test commit -A (issue 3542) | |
625 | $ echo large8 > large8 |
|
625 | $ echo large8 > large8 | |
626 | $ hg add --large large8 |
|
626 | $ hg add --large large8 | |
627 | $ hg ci -Am 'this used to add large8 as normal and commit both' |
|
627 | $ hg ci -Am 'this used to add large8 as normal and commit both' | |
628 | Invoking status precommit hook |
|
628 | Invoking status precommit hook | |
629 | A large8 |
|
629 | A large8 | |
630 | Invoking status postcommit hook |
|
630 | Invoking status postcommit hook | |
631 | C large8 |
|
631 | C large8 | |
632 | C normal |
|
632 | C normal | |
633 | C normal3 |
|
633 | C normal3 | |
634 | C sub/large4 |
|
634 | C sub/large4 | |
635 | C sub/normal4 |
|
635 | C sub/normal4 | |
636 | C sub2/large6 |
|
636 | C sub2/large6 | |
637 | C sub2/large7 |
|
637 | C sub2/large7 | |
638 | $ rm large8 |
|
638 | $ rm large8 | |
639 | $ hg ci -Am 'this used to not notice the rm' |
|
639 | $ hg ci -Am 'this used to not notice the rm' | |
640 | removing large8 |
|
640 | removing large8 | |
641 | Invoking status precommit hook |
|
641 | Invoking status precommit hook | |
642 | R large8 |
|
642 | R large8 | |
643 | Invoking status postcommit hook |
|
643 | Invoking status postcommit hook | |
644 | C normal |
|
644 | C normal | |
645 | C normal3 |
|
645 | C normal3 | |
646 | C sub/large4 |
|
646 | C sub/large4 | |
647 | C sub/normal4 |
|
647 | C sub/normal4 | |
648 | C sub2/large6 |
|
648 | C sub2/large6 | |
649 | C sub2/large7 |
|
649 | C sub2/large7 | |
650 |
|
650 | |||
651 | Test that a standin can't be added as a large file |
|
651 | Test that a standin can't be added as a large file | |
652 |
|
652 | |||
653 | $ touch large |
|
653 | $ touch large | |
654 | $ hg add --large large |
|
654 | $ hg add --large large | |
655 | $ hg ci -m "add" |
|
655 | $ hg ci -m "add" | |
656 | Invoking status precommit hook |
|
656 | Invoking status precommit hook | |
657 | A large |
|
657 | A large | |
658 | Invoking status postcommit hook |
|
658 | Invoking status postcommit hook | |
659 | C large |
|
659 | C large | |
660 | C normal |
|
660 | C normal | |
661 | C normal3 |
|
661 | C normal3 | |
662 | C sub/large4 |
|
662 | C sub/large4 | |
663 | C sub/normal4 |
|
663 | C sub/normal4 | |
664 | C sub2/large6 |
|
664 | C sub2/large6 | |
665 | C sub2/large7 |
|
665 | C sub2/large7 | |
666 | $ hg remove large |
|
666 | $ hg remove large | |
667 | $ touch large |
|
667 | $ touch large | |
668 | $ hg addremove --config largefiles.patterns=**large --traceback |
|
668 | $ hg addremove --config largefiles.patterns=**large --traceback | |
669 | adding large as a largefile |
|
669 | adding large as a largefile | |
670 |
|
670 | |||
671 | Test that outgoing --large works (with revsets too) |
|
671 | Test that outgoing --large works (with revsets too) | |
672 | $ hg outgoing --rev '.^' --large |
|
672 | $ hg outgoing --rev '.^' --large | |
673 | comparing with $TESTTMP/a (glob) |
|
673 | comparing with $TESTTMP/a (glob) | |
674 | searching for changes |
|
674 | searching for changes | |
675 | changeset: 8:c02fd3b77ec4 |
|
675 | changeset: 8:c02fd3b77ec4 | |
676 | user: test |
|
676 | user: test | |
677 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
677 | date: Thu Jan 01 00:00:00 1970 +0000 | |
678 | summary: add foo |
|
678 | summary: add foo | |
679 |
|
679 | |||
680 | changeset: 9:289dd08c9bbb |
|
680 | changeset: 9:289dd08c9bbb | |
681 | user: test |
|
681 | user: test | |
682 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
682 | date: Thu Jan 01 00:00:00 1970 +0000 | |
683 | summary: used to say nothing changed |
|
683 | summary: used to say nothing changed | |
684 |
|
684 | |||
685 | changeset: 10:34f23ac6ac12 |
|
685 | changeset: 10:34f23ac6ac12 | |
686 | user: test |
|
686 | user: test | |
687 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
687 | date: Thu Jan 01 00:00:00 1970 +0000 | |
688 | summary: added |
|
688 | summary: added | |
689 |
|
689 | |||
690 | changeset: 12:710c1b2f523c |
|
690 | changeset: 12:710c1b2f523c | |
691 | parent: 10:34f23ac6ac12 |
|
691 | parent: 10:34f23ac6ac12 | |
692 | user: test |
|
692 | user: test | |
693 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
693 | date: Thu Jan 01 00:00:00 1970 +0000 | |
694 | summary: removed large |
|
694 | summary: removed large | |
695 |
|
695 | |||
696 | changeset: 13:0a3e75774479 |
|
696 | changeset: 13:0a3e75774479 | |
697 | user: test |
|
697 | user: test | |
698 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
698 | date: Thu Jan 01 00:00:00 1970 +0000 | |
699 | summary: this used to add large8 as normal and commit both |
|
699 | summary: this used to add large8 as normal and commit both | |
700 |
|
700 | |||
701 | changeset: 14:84f3d378175c |
|
701 | changeset: 14:84f3d378175c | |
702 | user: test |
|
702 | user: test | |
703 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
703 | date: Thu Jan 01 00:00:00 1970 +0000 | |
704 | summary: this used to not notice the rm |
|
704 | summary: this used to not notice the rm | |
705 |
|
705 | |||
706 | searching for changes |
|
706 | searching for changes | |
707 | largefiles to upload: |
|
707 | largefiles to upload: | |
708 | foo |
|
708 | foo | |
709 | large |
|
709 | large | |
710 | large8 |
|
710 | large8 | |
711 |
|
711 | |||
712 | $ cd ../a |
|
712 | $ cd ../a | |
713 |
|
713 | |||
714 | Clone a largefiles repo. |
|
714 | Clone a largefiles repo. | |
715 |
|
715 | |||
716 | $ hg clone . ../b |
|
716 | $ hg clone . ../b | |
717 | updating to branch default |
|
717 | updating to branch default | |
718 | getting changed largefiles |
|
718 | getting changed largefiles | |
719 | 3 largefiles updated, 0 removed |
|
719 | 3 largefiles updated, 0 removed | |
720 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
720 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
721 | $ cd ../b |
|
721 | $ cd ../b | |
722 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
722 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
723 | 7:daea875e9014 add/edit more largefiles |
|
723 | 7:daea875e9014 add/edit more largefiles | |
724 | 6:4355d653f84f edit files yet again |
|
724 | 6:4355d653f84f edit files yet again | |
725 | 5:9d5af5072dbd edit files again |
|
725 | 5:9d5af5072dbd edit files again | |
726 | 4:74c02385b94c move files |
|
726 | 4:74c02385b94c move files | |
727 | 3:9e8fbc4bce62 copy files |
|
727 | 3:9e8fbc4bce62 copy files | |
728 | 2:51a0ae4d5864 remove files |
|
728 | 2:51a0ae4d5864 remove files | |
729 | 1:ce8896473775 edit files |
|
729 | 1:ce8896473775 edit files | |
730 | 0:30d30fe6a5be add files |
|
730 | 0:30d30fe6a5be add files | |
731 | $ cat normal3 |
|
731 | $ cat normal3 | |
732 | normal33 |
|
732 | normal33 | |
733 | $ cat sub/normal4 |
|
733 | $ cat sub/normal4 | |
734 | normal44 |
|
734 | normal44 | |
735 | $ cat sub/large4 |
|
735 | $ cat sub/large4 | |
736 | large44 |
|
736 | large44 | |
737 | $ cat sub2/large6 |
|
737 | $ cat sub2/large6 | |
738 | large6 |
|
738 | large6 | |
739 | $ cat sub2/large7 |
|
739 | $ cat sub2/large7 | |
740 | large7 |
|
740 | large7 | |
741 | $ cd .. |
|
741 | $ cd .. | |
742 | $ hg clone a -r 3 c |
|
742 | $ hg clone a -r 3 c | |
743 | adding changesets |
|
743 | adding changesets | |
744 | adding manifests |
|
744 | adding manifests | |
745 | adding file changes |
|
745 | adding file changes | |
746 | added 4 changesets with 10 changes to 4 files |
|
746 | added 4 changesets with 10 changes to 4 files | |
747 | updating to branch default |
|
747 | updating to branch default | |
748 | getting changed largefiles |
|
748 | getting changed largefiles | |
749 | 2 largefiles updated, 0 removed |
|
749 | 2 largefiles updated, 0 removed | |
750 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
750 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
751 | $ cd c |
|
751 | $ cd c | |
752 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
752 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
753 | 3:9e8fbc4bce62 copy files |
|
753 | 3:9e8fbc4bce62 copy files | |
754 | 2:51a0ae4d5864 remove files |
|
754 | 2:51a0ae4d5864 remove files | |
755 | 1:ce8896473775 edit files |
|
755 | 1:ce8896473775 edit files | |
756 | 0:30d30fe6a5be add files |
|
756 | 0:30d30fe6a5be add files | |
757 | $ cat normal1 |
|
757 | $ cat normal1 | |
758 | normal22 |
|
758 | normal22 | |
759 | $ cat large1 |
|
759 | $ cat large1 | |
760 | large22 |
|
760 | large22 | |
761 | $ cat sub/normal2 |
|
761 | $ cat sub/normal2 | |
762 | normal22 |
|
762 | normal22 | |
763 | $ cat sub/large2 |
|
763 | $ cat sub/large2 | |
764 | large22 |
|
764 | large22 | |
765 |
|
765 | |||
766 | Old revisions of a clone have correct largefiles content (this also |
|
766 | Old revisions of a clone have correct largefiles content (this also | |
767 | tests update). |
|
767 | tests update). | |
768 |
|
768 | |||
769 | $ hg update -r 1 |
|
769 | $ hg update -r 1 | |
770 | getting changed largefiles |
|
770 | getting changed largefiles | |
771 | 1 largefiles updated, 0 removed |
|
771 | 1 largefiles updated, 0 removed | |
772 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
772 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
773 | $ cat large1 |
|
773 | $ cat large1 | |
774 | large11 |
|
774 | large11 | |
775 | $ cat sub/large2 |
|
775 | $ cat sub/large2 | |
776 | large22 |
|
776 | large22 | |
777 | $ cd .. |
|
777 | $ cd .. | |
778 |
|
778 | |||
779 | Test cloning with --all-largefiles flag |
|
779 | Test cloning with --all-largefiles flag | |
780 |
|
780 | |||
781 | $ rm "${USERCACHE}"/* |
|
781 | $ rm "${USERCACHE}"/* | |
782 | $ hg clone --all-largefiles a a-backup |
|
782 | $ hg clone --all-largefiles a a-backup | |
783 | updating to branch default |
|
783 | updating to branch default | |
784 | getting changed largefiles |
|
784 | getting changed largefiles | |
785 | 3 largefiles updated, 0 removed |
|
785 | 3 largefiles updated, 0 removed | |
786 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
786 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
787 | 8 additional largefiles cached |
|
787 | 8 additional largefiles cached | |
788 |
|
788 | |||
789 | $ rm "${USERCACHE}"/* |
|
789 | $ rm "${USERCACHE}"/* | |
790 | $ hg clone --all-largefiles -u 0 a a-clone0 |
|
790 | $ hg clone --all-largefiles -u 0 a a-clone0 | |
791 | updating to branch default |
|
791 | updating to branch default | |
792 | getting changed largefiles |
|
792 | getting changed largefiles | |
793 | 2 largefiles updated, 0 removed |
|
793 | 2 largefiles updated, 0 removed | |
794 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
794 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
795 | 9 additional largefiles cached |
|
795 | 9 additional largefiles cached | |
796 | $ hg -R a-clone0 sum |
|
796 | $ hg -R a-clone0 sum | |
797 | parent: 0:30d30fe6a5be |
|
797 | parent: 0:30d30fe6a5be | |
798 | add files |
|
798 | add files | |
799 | branch: default |
|
799 | branch: default | |
800 | commit: (clean) |
|
800 | commit: (clean) | |
801 | update: 7 new changesets (update) |
|
801 | update: 7 new changesets (update) | |
802 |
|
802 | |||
803 | $ rm "${USERCACHE}"/* |
|
803 | $ rm "${USERCACHE}"/* | |
804 | $ hg clone --all-largefiles -u 1 a a-clone1 |
|
804 | $ hg clone --all-largefiles -u 1 a a-clone1 | |
805 | updating to branch default |
|
805 | updating to branch default | |
806 | getting changed largefiles |
|
806 | getting changed largefiles | |
807 | 2 largefiles updated, 0 removed |
|
807 | 2 largefiles updated, 0 removed | |
808 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
808 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
809 | 8 additional largefiles cached |
|
809 | 8 additional largefiles cached | |
810 | $ hg -R a-clone1 verify --large --lfa --lfc |
|
810 | $ hg -R a-clone1 verify --large --lfa --lfc | |
811 | checking changesets |
|
811 | checking changesets | |
812 | checking manifests |
|
812 | checking manifests | |
813 | crosschecking files in changesets and manifests |
|
813 | crosschecking files in changesets and manifests | |
814 | checking files |
|
814 | checking files | |
815 | 10 files, 8 changesets, 24 total revisions |
|
815 | 10 files, 8 changesets, 24 total revisions | |
816 | searching 8 changesets for largefiles |
|
816 | searching 8 changesets for largefiles | |
817 | verified contents of 13 revisions of 6 largefiles |
|
817 | verified contents of 13 revisions of 6 largefiles | |
818 | $ hg -R a-clone1 sum |
|
818 | $ hg -R a-clone1 sum | |
819 | parent: 1:ce8896473775 |
|
819 | parent: 1:ce8896473775 | |
820 | edit files |
|
820 | edit files | |
821 | branch: default |
|
821 | branch: default | |
822 | commit: (clean) |
|
822 | commit: (clean) | |
823 | update: 6 new changesets (update) |
|
823 | update: 6 new changesets (update) | |
824 |
|
824 | |||
825 | $ rm "${USERCACHE}"/* |
|
825 | $ rm "${USERCACHE}"/* | |
826 | $ hg clone --all-largefiles -U a a-clone-u |
|
826 | $ hg clone --all-largefiles -U a a-clone-u | |
827 | 11 additional largefiles cached |
|
827 | 11 additional largefiles cached | |
828 | $ hg -R a-clone-u sum |
|
828 | $ hg -R a-clone-u sum | |
829 | parent: -1:000000000000 (no revision checked out) |
|
829 | parent: -1:000000000000 (no revision checked out) | |
830 | branch: default |
|
830 | branch: default | |
831 | commit: (clean) |
|
831 | commit: (clean) | |
832 | update: 8 new changesets (update) |
|
832 | update: 8 new changesets (update) | |
833 |
|
833 | |||
834 | Show computed destination directory: |
|
834 | Show computed destination directory: | |
835 |
|
835 | |||
836 | $ mkdir xyz |
|
836 | $ mkdir xyz | |
837 | $ cd xyz |
|
837 | $ cd xyz | |
838 | $ hg clone ../a |
|
838 | $ hg clone ../a | |
839 | destination directory: a |
|
839 | destination directory: a | |
840 | updating to branch default |
|
840 | updating to branch default | |
841 | getting changed largefiles |
|
841 | getting changed largefiles | |
842 | 3 largefiles updated, 0 removed |
|
842 | 3 largefiles updated, 0 removed | |
843 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
843 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
844 | $ cd .. |
|
844 | $ cd .. | |
845 |
|
845 | |||
846 | Clone URL without path: |
|
846 | Clone URL without path: | |
847 |
|
847 | |||
848 | $ hg clone file:// |
|
848 | $ hg clone file:// | |
849 | abort: repository / not found! |
|
849 | abort: repository / not found! | |
850 | [255] |
|
850 | [255] | |
851 |
|
851 | |||
852 | Ensure base clone command argument validation |
|
852 | Ensure base clone command argument validation | |
853 |
|
853 | |||
854 | $ hg clone -U -u 0 a a-clone-failure |
|
854 | $ hg clone -U -u 0 a a-clone-failure | |
855 | abort: cannot specify both --noupdate and --updaterev |
|
855 | abort: cannot specify both --noupdate and --updaterev | |
856 | [255] |
|
856 | [255] | |
857 |
|
857 | |||
858 | $ hg clone --all-largefiles a ssh://localhost/a |
|
858 | $ hg clone --all-largefiles a ssh://localhost/a | |
859 | abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a |
|
859 | abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a | |
860 | [255] |
|
860 | [255] | |
861 |
|
861 | |||
862 | Test pulling with --all-largefiles flag. Also test that the largefiles are |
|
862 | Test pulling with --all-largefiles flag. Also test that the largefiles are | |
863 | downloaded from 'default' instead of 'default-push' when no source is specified |
|
863 | downloaded from 'default' instead of 'default-push' when no source is specified | |
864 | (issue3584) |
|
864 | (issue3584) | |
865 |
|
865 | |||
866 | $ rm -Rf a-backup |
|
866 | $ rm -Rf a-backup | |
867 | $ hg clone -r 1 a a-backup |
|
867 | $ hg clone -r 1 a a-backup | |
868 | adding changesets |
|
868 | adding changesets | |
869 | adding manifests |
|
869 | adding manifests | |
870 | adding file changes |
|
870 | adding file changes | |
871 | added 2 changesets with 8 changes to 4 files |
|
871 | added 2 changesets with 8 changes to 4 files | |
872 | updating to branch default |
|
872 | updating to branch default | |
873 | getting changed largefiles |
|
873 | getting changed largefiles | |
874 | 2 largefiles updated, 0 removed |
|
874 | 2 largefiles updated, 0 removed | |
875 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
875 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
876 | $ rm "${USERCACHE}"/* |
|
876 | $ rm "${USERCACHE}"/* | |
877 | $ cd a-backup |
|
877 | $ cd a-backup | |
878 | $ hg pull --all-largefiles --config paths.default-push=bogus/path |
|
878 | $ hg pull --all-largefiles --config paths.default-push=bogus/path | |
879 | pulling from $TESTTMP/a (glob) |
|
879 | pulling from $TESTTMP/a (glob) | |
880 | searching for changes |
|
880 | searching for changes | |
881 | adding changesets |
|
881 | adding changesets | |
882 | adding manifests |
|
882 | adding manifests | |
883 | adding file changes |
|
883 | adding file changes | |
884 | added 6 changesets with 16 changes to 8 files |
|
884 | added 6 changesets with 16 changes to 8 files | |
885 | (run 'hg update' to get a working copy) |
|
885 | (run 'hg update' to get a working copy) | |
886 | caching largefiles for 1 heads |
|
886 | caching largefiles for 1 heads | |
887 | 3 largefiles cached |
|
887 | 3 largefiles cached | |
888 | 3 additional largefiles cached |
|
888 | 3 additional largefiles cached | |
889 | $ cd .. |
|
889 | $ cd .. | |
890 |
|
890 | |||
891 | Rebasing between two repositories does not revert largefiles to old |
|
891 | Rebasing between two repositories does not revert largefiles to old | |
892 | revisions (this was a very bad bug that took a lot of work to fix). |
|
892 | revisions (this was a very bad bug that took a lot of work to fix). | |
893 |
|
893 | |||
894 | $ hg clone a d |
|
894 | $ hg clone a d | |
895 | updating to branch default |
|
895 | updating to branch default | |
896 | getting changed largefiles |
|
896 | getting changed largefiles | |
897 | 3 largefiles updated, 0 removed |
|
897 | 3 largefiles updated, 0 removed | |
898 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
898 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
899 | $ cd b |
|
899 | $ cd b | |
900 | $ echo large4-modified > sub/large4 |
|
900 | $ echo large4-modified > sub/large4 | |
901 | $ echo normal3-modified > normal3 |
|
901 | $ echo normal3-modified > normal3 | |
902 | $ hg commit -m "modify normal file and largefile in repo b" |
|
902 | $ hg commit -m "modify normal file and largefile in repo b" | |
903 | Invoking status precommit hook |
|
903 | Invoking status precommit hook | |
904 | M normal3 |
|
904 | M normal3 | |
905 | M sub/large4 |
|
905 | M sub/large4 | |
906 | $ cd ../d |
|
906 | $ cd ../d | |
907 | $ echo large6-modified > sub2/large6 |
|
907 | $ echo large6-modified > sub2/large6 | |
908 | $ echo normal4-modified > sub/normal4 |
|
908 | $ echo normal4-modified > sub/normal4 | |
909 | $ hg commit -m "modify normal file largefile in repo d" |
|
909 | $ hg commit -m "modify normal file largefile in repo d" | |
910 | Invoking status precommit hook |
|
910 | Invoking status precommit hook | |
911 | M sub/normal4 |
|
911 | M sub/normal4 | |
912 | M sub2/large6 |
|
912 | M sub2/large6 | |
913 | $ cd .. |
|
913 | $ cd .. | |
914 | $ hg clone d e |
|
914 | $ hg clone d e | |
915 | updating to branch default |
|
915 | updating to branch default | |
916 | getting changed largefiles |
|
916 | getting changed largefiles | |
917 | 3 largefiles updated, 0 removed |
|
917 | 3 largefiles updated, 0 removed | |
918 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
918 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
919 | $ cd d |
|
919 | $ cd d | |
920 |
|
920 | |||
921 | More rebase testing, but also test that the largefiles are downloaded from |
|
921 | More rebase testing, but also test that the largefiles are downloaded from | |
922 | 'default' instead of 'default-push' when no source is specified (issue3584). |
|
922 | 'default' instead of 'default-push' when no source is specified (issue3584). | |
923 | The error messages go away if repo 'b' is created with --all-largefiles. |
|
923 | The error messages go away if repo 'b' is created with --all-largefiles. | |
924 | $ hg pull --rebase --all-largefiles --config paths.default-push=bogus/path --config paths.default=../b |
|
924 | $ hg pull --rebase --all-largefiles --config paths.default-push=bogus/path --config paths.default=../b | |
925 | pulling from $TESTTMP/b (glob) |
|
925 | pulling from $TESTTMP/b (glob) | |
926 | searching for changes |
|
926 | searching for changes | |
927 | adding changesets |
|
927 | adding changesets | |
928 | adding manifests |
|
928 | adding manifests | |
929 | adding file changes |
|
929 | adding file changes | |
930 | added 1 changesets with 2 changes to 2 files (+1 heads) |
|
930 | added 1 changesets with 2 changes to 2 files (+1 heads) | |
931 | Invoking status precommit hook |
|
931 | Invoking status precommit hook | |
932 | M sub/normal4 |
|
932 | M sub/normal4 | |
933 | M sub2/large6 |
|
933 | M sub2/large6 | |
934 | saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob) |
|
934 | saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob) | |
935 | error getting id eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from url file:$TESTTMP/b for file large3: can't get file locally (glob) |
|
935 | error getting id eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from url file:$TESTTMP/b for file large3: can't get file locally (glob) | |
936 | error getting id eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from url file:$TESTTMP/b for file sub/large4: can't get file locally (glob) |
|
936 | error getting id eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from url file:$TESTTMP/b for file sub/large4: can't get file locally (glob) | |
937 | error getting id eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from url file:$TESTTMP/b for file large1: can't get file locally (glob) |
|
937 | error getting id eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from url file:$TESTTMP/b for file large1: can't get file locally (glob) | |
938 | error getting id eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from url file:$TESTTMP/b for file sub/large2: can't get file locally (glob) |
|
938 | error getting id eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from url file:$TESTTMP/b for file sub/large2: can't get file locally (glob) | |
939 | error getting id eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from url file:$TESTTMP/b for file sub/large2: can't get file locally (glob) |
|
939 | error getting id eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from url file:$TESTTMP/b for file sub/large2: can't get file locally (glob) | |
940 | error getting id 5f78770c0e77ba4287ad6ef3071c9bf9c379742f from url file:$TESTTMP/b for file large1: can't get file locally (glob) |
|
940 | error getting id 5f78770c0e77ba4287ad6ef3071c9bf9c379742f from url file:$TESTTMP/b for file large1: can't get file locally (glob) | |
941 | error getting id eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from url file:$TESTTMP/b for file sub/large2: can't get file locally (glob) |
|
941 | error getting id eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from url file:$TESTTMP/b for file sub/large2: can't get file locally (glob) | |
942 | error getting id 4669e532d5b2c093a78eca010077e708a071bb64 from url file:$TESTTMP/b for file large1: can't get file locally (glob) |
|
942 | error getting id 4669e532d5b2c093a78eca010077e708a071bb64 from url file:$TESTTMP/b for file large1: can't get file locally (glob) | |
943 | error getting id 1deebade43c8c498a3c8daddac0244dc55d1331d from url file:$TESTTMP/b for file sub/large2: can't get file locally (glob) |
|
943 | error getting id 1deebade43c8c498a3c8daddac0244dc55d1331d from url file:$TESTTMP/b for file sub/large2: can't get file locally (glob) | |
944 | 0 additional largefiles cached |
|
944 | 0 additional largefiles cached | |
945 | 9 largefiles failed to download |
|
945 | 9 largefiles failed to download | |
946 | nothing to rebase |
|
946 | nothing to rebase | |
947 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
947 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
948 | 9:598410d3eb9a modify normal file largefile in repo d |
|
948 | 9:598410d3eb9a modify normal file largefile in repo d | |
949 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
949 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
950 | 7:daea875e9014 add/edit more largefiles |
|
950 | 7:daea875e9014 add/edit more largefiles | |
951 | 6:4355d653f84f edit files yet again |
|
951 | 6:4355d653f84f edit files yet again | |
952 | 5:9d5af5072dbd edit files again |
|
952 | 5:9d5af5072dbd edit files again | |
953 | 4:74c02385b94c move files |
|
953 | 4:74c02385b94c move files | |
954 | 3:9e8fbc4bce62 copy files |
|
954 | 3:9e8fbc4bce62 copy files | |
955 | 2:51a0ae4d5864 remove files |
|
955 | 2:51a0ae4d5864 remove files | |
956 | 1:ce8896473775 edit files |
|
956 | 1:ce8896473775 edit files | |
957 | 0:30d30fe6a5be add files |
|
957 | 0:30d30fe6a5be add files | |
958 | $ cat normal3 |
|
958 | $ cat normal3 | |
959 | normal3-modified |
|
959 | normal3-modified | |
960 | $ cat sub/normal4 |
|
960 | $ cat sub/normal4 | |
961 | normal4-modified |
|
961 | normal4-modified | |
962 | $ cat sub/large4 |
|
962 | $ cat sub/large4 | |
963 | large4-modified |
|
963 | large4-modified | |
964 | $ cat sub2/large6 |
|
964 | $ cat sub2/large6 | |
965 | large6-modified |
|
965 | large6-modified | |
966 | $ cat sub2/large7 |
|
966 | $ cat sub2/large7 | |
967 | large7 |
|
967 | large7 | |
968 | $ cd ../e |
|
968 | $ cd ../e | |
969 | $ hg pull ../b |
|
969 | $ hg pull ../b | |
970 | pulling from ../b |
|
970 | pulling from ../b | |
971 | searching for changes |
|
971 | searching for changes | |
972 | adding changesets |
|
972 | adding changesets | |
973 | adding manifests |
|
973 | adding manifests | |
974 | adding file changes |
|
974 | adding file changes | |
975 | added 1 changesets with 2 changes to 2 files (+1 heads) |
|
975 | added 1 changesets with 2 changes to 2 files (+1 heads) | |
976 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
976 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
977 | caching largefiles for 1 heads |
|
977 | caching largefiles for 1 heads | |
978 | 0 largefiles cached |
|
978 | 0 largefiles cached | |
979 | $ hg rebase |
|
979 | $ hg rebase | |
980 | Invoking status precommit hook |
|
980 | Invoking status precommit hook | |
981 | M sub/normal4 |
|
981 | M sub/normal4 | |
982 | M sub2/large6 |
|
982 | M sub2/large6 | |
983 | saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob) |
|
983 | saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob) | |
984 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
984 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
985 | 9:598410d3eb9a modify normal file largefile in repo d |
|
985 | 9:598410d3eb9a modify normal file largefile in repo d | |
986 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
986 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
987 | 7:daea875e9014 add/edit more largefiles |
|
987 | 7:daea875e9014 add/edit more largefiles | |
988 | 6:4355d653f84f edit files yet again |
|
988 | 6:4355d653f84f edit files yet again | |
989 | 5:9d5af5072dbd edit files again |
|
989 | 5:9d5af5072dbd edit files again | |
990 | 4:74c02385b94c move files |
|
990 | 4:74c02385b94c move files | |
991 | 3:9e8fbc4bce62 copy files |
|
991 | 3:9e8fbc4bce62 copy files | |
992 | 2:51a0ae4d5864 remove files |
|
992 | 2:51a0ae4d5864 remove files | |
993 | 1:ce8896473775 edit files |
|
993 | 1:ce8896473775 edit files | |
994 | 0:30d30fe6a5be add files |
|
994 | 0:30d30fe6a5be add files | |
995 | $ cat normal3 |
|
995 | $ cat normal3 | |
996 | normal3-modified |
|
996 | normal3-modified | |
997 | $ cat sub/normal4 |
|
997 | $ cat sub/normal4 | |
998 | normal4-modified |
|
998 | normal4-modified | |
999 | $ cat sub/large4 |
|
999 | $ cat sub/large4 | |
1000 | large4-modified |
|
1000 | large4-modified | |
1001 | $ cat sub2/large6 |
|
1001 | $ cat sub2/large6 | |
1002 | large6-modified |
|
1002 | large6-modified | |
1003 | $ cat sub2/large7 |
|
1003 | $ cat sub2/large7 | |
1004 | large7 |
|
1004 | large7 | |
1005 |
|
1005 | |||
1006 | Log on largefiles |
|
1006 | Log on largefiles | |
1007 |
|
1007 | |||
1008 | - same output |
|
1008 | - same output | |
1009 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 |
|
1009 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 | |
1010 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1010 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1011 | 6:4355d653f84f edit files yet again |
|
1011 | 6:4355d653f84f edit files yet again | |
1012 | 5:9d5af5072dbd edit files again |
|
1012 | 5:9d5af5072dbd edit files again | |
1013 | 4:74c02385b94c move files |
|
1013 | 4:74c02385b94c move files | |
1014 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub/large4 |
|
1014 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub/large4 | |
1015 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1015 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1016 | 6:4355d653f84f edit files yet again |
|
1016 | 6:4355d653f84f edit files yet again | |
1017 | 5:9d5af5072dbd edit files again |
|
1017 | 5:9d5af5072dbd edit files again | |
1018 | 4:74c02385b94c move files |
|
1018 | 4:74c02385b94c move files | |
1019 |
|
1019 | |||
1020 | - .hglf only matches largefiles, without .hglf it matches 9 bco sub/normal |
|
1020 | - .hglf only matches largefiles, without .hglf it matches 9 bco sub/normal | |
1021 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub |
|
1021 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub | |
1022 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1022 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1023 | 6:4355d653f84f edit files yet again |
|
1023 | 6:4355d653f84f edit files yet again | |
1024 | 5:9d5af5072dbd edit files again |
|
1024 | 5:9d5af5072dbd edit files again | |
1025 | 4:74c02385b94c move files |
|
1025 | 4:74c02385b94c move files | |
1026 | 1:ce8896473775 edit files |
|
1026 | 1:ce8896473775 edit files | |
1027 | 0:30d30fe6a5be add files |
|
1027 | 0:30d30fe6a5be add files | |
1028 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub |
|
1028 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub | |
1029 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1029 | 9:598410d3eb9a modify normal file largefile in repo d | |
1030 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1030 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1031 | 6:4355d653f84f edit files yet again |
|
1031 | 6:4355d653f84f edit files yet again | |
1032 | 5:9d5af5072dbd edit files again |
|
1032 | 5:9d5af5072dbd edit files again | |
1033 | 4:74c02385b94c move files |
|
1033 | 4:74c02385b94c move files | |
1034 | 1:ce8896473775 edit files |
|
1034 | 1:ce8896473775 edit files | |
1035 | 0:30d30fe6a5be add files |
|
1035 | 0:30d30fe6a5be add files | |
1036 |
|
1036 | |||
1037 | - globbing gives same result |
|
1037 | - globbing gives same result | |
1038 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' 'glob:sub/*' |
|
1038 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' 'glob:sub/*' | |
1039 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1039 | 9:598410d3eb9a modify normal file largefile in repo d | |
1040 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1040 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1041 | 6:4355d653f84f edit files yet again |
|
1041 | 6:4355d653f84f edit files yet again | |
1042 | 5:9d5af5072dbd edit files again |
|
1042 | 5:9d5af5072dbd edit files again | |
1043 | 4:74c02385b94c move files |
|
1043 | 4:74c02385b94c move files | |
1044 | 1:ce8896473775 edit files |
|
1044 | 1:ce8896473775 edit files | |
1045 | 0:30d30fe6a5be add files |
|
1045 | 0:30d30fe6a5be add files | |
1046 |
|
1046 | |||
1047 | Rollback on largefiles. |
|
1047 | Rollback on largefiles. | |
1048 |
|
1048 | |||
1049 | $ echo large4-modified-again > sub/large4 |
|
1049 | $ echo large4-modified-again > sub/large4 | |
1050 | $ hg commit -m "Modify large4 again" |
|
1050 | $ hg commit -m "Modify large4 again" | |
1051 | Invoking status precommit hook |
|
1051 | Invoking status precommit hook | |
1052 | M sub/large4 |
|
1052 | M sub/large4 | |
1053 | $ hg rollback |
|
1053 | $ hg rollback | |
1054 | repository tip rolled back to revision 9 (undo commit) |
|
1054 | repository tip rolled back to revision 9 (undo commit) | |
1055 | working directory now based on revision 9 |
|
1055 | working directory now based on revision 9 | |
1056 | $ hg st |
|
1056 | $ hg st | |
1057 | M sub/large4 |
|
1057 | M sub/large4 | |
1058 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
1058 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
1059 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1059 | 9:598410d3eb9a modify normal file largefile in repo d | |
1060 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1060 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1061 | 7:daea875e9014 add/edit more largefiles |
|
1061 | 7:daea875e9014 add/edit more largefiles | |
1062 | 6:4355d653f84f edit files yet again |
|
1062 | 6:4355d653f84f edit files yet again | |
1063 | 5:9d5af5072dbd edit files again |
|
1063 | 5:9d5af5072dbd edit files again | |
1064 | 4:74c02385b94c move files |
|
1064 | 4:74c02385b94c move files | |
1065 | 3:9e8fbc4bce62 copy files |
|
1065 | 3:9e8fbc4bce62 copy files | |
1066 | 2:51a0ae4d5864 remove files |
|
1066 | 2:51a0ae4d5864 remove files | |
1067 | 1:ce8896473775 edit files |
|
1067 | 1:ce8896473775 edit files | |
1068 | 0:30d30fe6a5be add files |
|
1068 | 0:30d30fe6a5be add files | |
1069 | $ cat sub/large4 |
|
1069 | $ cat sub/large4 | |
1070 | large4-modified-again |
|
1070 | large4-modified-again | |
1071 |
|
1071 | |||
1072 | "update --check" refuses to update with uncommitted changes. |
|
1072 | "update --check" refuses to update with uncommitted changes. | |
1073 | $ hg update --check 8 |
|
1073 | $ hg update --check 8 | |
1074 | abort: uncommitted local changes |
|
1074 | abort: uncommitted local changes | |
1075 | [255] |
|
1075 | [255] | |
1076 |
|
1076 | |||
1077 | "update --clean" leaves correct largefiles in working copy, even when there is |
|
1077 | "update --clean" leaves correct largefiles in working copy, even when there is | |
1078 | .orig files from revert in .hglf. |
|
1078 | .orig files from revert in .hglf. | |
1079 |
|
1079 | |||
1080 | $ echo mistake > sub2/large7 |
|
1080 | $ echo mistake > sub2/large7 | |
1081 | $ hg revert sub2/large7 |
|
1081 | $ hg revert sub2/large7 | |
1082 | $ hg -q update --clean -r null |
|
1082 | $ hg -q update --clean -r null | |
1083 | $ hg update --clean |
|
1083 | $ hg update --clean | |
1084 | getting changed largefiles |
|
1084 | getting changed largefiles | |
1085 | 3 largefiles updated, 0 removed |
|
1085 | 3 largefiles updated, 0 removed | |
1086 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1086 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1087 | $ cat normal3 |
|
1087 | $ cat normal3 | |
1088 | normal3-modified |
|
1088 | normal3-modified | |
1089 | $ cat sub/normal4 |
|
1089 | $ cat sub/normal4 | |
1090 | normal4-modified |
|
1090 | normal4-modified | |
1091 | $ cat sub/large4 |
|
1091 | $ cat sub/large4 | |
1092 | large4-modified |
|
1092 | large4-modified | |
1093 | $ cat sub2/large6 |
|
1093 | $ cat sub2/large6 | |
1094 | large6-modified |
|
1094 | large6-modified | |
1095 | $ cat sub2/large7 |
|
1095 | $ cat sub2/large7 | |
1096 | large7 |
|
1096 | large7 | |
1097 | $ cat sub2/large7.orig |
|
1097 | $ cat sub2/large7.orig | |
1098 | mistake |
|
1098 | mistake | |
1099 | $ cat .hglf/sub2/large7.orig |
|
1099 | $ cat .hglf/sub2/large7.orig | |
1100 | 9dbfb2c79b1c40981b258c3efa1b10b03f18ad31 |
|
1100 | 9dbfb2c79b1c40981b258c3efa1b10b03f18ad31 | |
1101 |
|
1101 | |||
1102 | demonstrate misfeature: .orig file is overwritten on every update -C, |
|
1102 | demonstrate misfeature: .orig file is overwritten on every update -C, | |
1103 | also when clean: |
|
1103 | also when clean: | |
1104 | $ hg update --clean |
|
1104 | $ hg update --clean | |
1105 | getting changed largefiles |
|
1105 | getting changed largefiles | |
1106 | 0 largefiles updated, 0 removed |
|
1106 | 0 largefiles updated, 0 removed | |
1107 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1107 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1108 | $ cat sub2/large7.orig |
|
1108 | $ cat sub2/large7.orig | |
1109 | large7 |
|
1109 | large7 | |
1110 | $ rm sub2/large7.orig .hglf/sub2/large7.orig |
|
1110 | $ rm sub2/large7.orig .hglf/sub2/large7.orig | |
1111 |
|
1111 | |||
1112 | Now "update check" is happy. |
|
1112 | Now "update check" is happy. | |
1113 | $ hg update --check 8 |
|
1113 | $ hg update --check 8 | |
1114 | getting changed largefiles |
|
1114 | getting changed largefiles | |
1115 | 1 largefiles updated, 0 removed |
|
1115 | 1 largefiles updated, 0 removed | |
1116 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1116 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1117 | $ hg update --check |
|
1117 | $ hg update --check | |
1118 | getting changed largefiles |
|
1118 | getting changed largefiles | |
1119 | 1 largefiles updated, 0 removed |
|
1119 | 1 largefiles updated, 0 removed | |
1120 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1120 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1121 |
|
1121 | |||
1122 | Test removing empty largefiles directories on update |
|
1122 | Test removing empty largefiles directories on update | |
1123 | $ test -d sub2 && echo "sub2 exists" |
|
1123 | $ test -d sub2 && echo "sub2 exists" | |
1124 | sub2 exists |
|
1124 | sub2 exists | |
1125 | $ hg update -q null |
|
1125 | $ hg update -q null | |
1126 | $ test -d sub2 && echo "error: sub2 should not exist anymore" |
|
1126 | $ test -d sub2 && echo "error: sub2 should not exist anymore" | |
1127 | [1] |
|
1127 | [1] | |
1128 | $ hg update -q |
|
1128 | $ hg update -q | |
1129 |
|
1129 | |||
1130 | Test hg remove removes empty largefiles directories |
|
1130 | Test hg remove removes empty largefiles directories | |
1131 | $ test -d sub2 && echo "sub2 exists" |
|
1131 | $ test -d sub2 && echo "sub2 exists" | |
1132 | sub2 exists |
|
1132 | sub2 exists | |
1133 | $ hg remove sub2/* |
|
1133 | $ hg remove sub2/* | |
1134 | $ test -d sub2 && echo "error: sub2 should not exist anymore" |
|
1134 | $ test -d sub2 && echo "error: sub2 should not exist anymore" | |
1135 | [1] |
|
1135 | [1] | |
1136 | $ hg revert sub2/large6 sub2/large7 |
|
1136 | $ hg revert sub2/large6 sub2/large7 | |
1137 |
|
1137 | |||
1138 | "revert" works on largefiles (and normal files too). |
|
1138 | "revert" works on largefiles (and normal files too). | |
1139 | $ echo hack3 >> normal3 |
|
1139 | $ echo hack3 >> normal3 | |
1140 | $ echo hack4 >> sub/normal4 |
|
1140 | $ echo hack4 >> sub/normal4 | |
1141 | $ echo hack4 >> sub/large4 |
|
1141 | $ echo hack4 >> sub/large4 | |
1142 | $ rm sub2/large6 |
|
1142 | $ rm sub2/large6 | |
1143 | $ hg revert sub2/large6 |
|
1143 | $ hg revert sub2/large6 | |
1144 | $ hg rm sub2/large6 |
|
1144 | $ hg rm sub2/large6 | |
1145 | $ echo new >> sub2/large8 |
|
1145 | $ echo new >> sub2/large8 | |
1146 | $ hg add --large sub2/large8 |
|
1146 | $ hg add --large sub2/large8 | |
1147 | # XXX we don't really want to report that we're reverting the standin; |
|
1147 | # XXX we don't really want to report that we're reverting the standin; | |
1148 | # that's just an implementation detail. But I don't see an obvious fix. ;-( |
|
1148 | # that's just an implementation detail. But I don't see an obvious fix. ;-( | |
1149 | $ hg revert sub |
|
1149 | $ hg revert sub | |
1150 | reverting .hglf/sub/large4 (glob) |
|
1150 | reverting .hglf/sub/large4 (glob) | |
1151 | reverting sub/normal4 (glob) |
|
1151 | reverting sub/normal4 (glob) | |
1152 | $ hg status |
|
1152 | $ hg status | |
1153 | M normal3 |
|
1153 | M normal3 | |
1154 | A sub2/large8 |
|
1154 | A sub2/large8 | |
1155 | R sub2/large6 |
|
1155 | R sub2/large6 | |
1156 | ? sub/large4.orig |
|
1156 | ? sub/large4.orig | |
1157 | ? sub/normal4.orig |
|
1157 | ? sub/normal4.orig | |
1158 | $ cat sub/normal4 |
|
1158 | $ cat sub/normal4 | |
1159 | normal4-modified |
|
1159 | normal4-modified | |
1160 | $ cat sub/large4 |
|
1160 | $ cat sub/large4 | |
1161 | large4-modified |
|
1161 | large4-modified | |
1162 | $ hg revert -a --no-backup |
|
1162 | $ hg revert -a --no-backup | |
1163 | undeleting .hglf/sub2/large6 (glob) |
|
1163 | undeleting .hglf/sub2/large6 (glob) | |
1164 | forgetting .hglf/sub2/large8 (glob) |
|
1164 | forgetting .hglf/sub2/large8 (glob) | |
1165 | reverting normal3 |
|
1165 | reverting normal3 | |
1166 | $ hg status |
|
1166 | $ hg status | |
1167 | ? sub/large4.orig |
|
1167 | ? sub/large4.orig | |
1168 | ? sub/normal4.orig |
|
1168 | ? sub/normal4.orig | |
1169 | ? sub2/large8 |
|
1169 | ? sub2/large8 | |
1170 | $ cat normal3 |
|
1170 | $ cat normal3 | |
1171 | normal3-modified |
|
1171 | normal3-modified | |
1172 | $ cat sub2/large6 |
|
1172 | $ cat sub2/large6 | |
1173 | large6-modified |
|
1173 | large6-modified | |
1174 | $ rm sub/*.orig sub2/large8 |
|
1174 | $ rm sub/*.orig sub2/large8 | |
1175 |
|
1175 | |||
1176 | revert some files to an older revision |
|
1176 | revert some files to an older revision | |
1177 | $ hg revert --no-backup -r 8 sub2 |
|
1177 | $ hg revert --no-backup -r 8 sub2 | |
1178 | reverting .hglf/sub2/large6 (glob) |
|
1178 | reverting .hglf/sub2/large6 (glob) | |
1179 | $ cat sub2/large6 |
|
1179 | $ cat sub2/large6 | |
1180 | large6 |
|
1180 | large6 | |
1181 | $ hg revert --no-backup -C -r '.^' sub2 |
|
1181 | $ hg revert --no-backup -C -r '.^' sub2 | |
1182 | reverting .hglf/sub2/large6 (glob) |
|
1182 | reverting .hglf/sub2/large6 (glob) | |
1183 | $ hg revert --no-backup sub2 |
|
1183 | $ hg revert --no-backup sub2 | |
1184 | reverting .hglf/sub2/large6 (glob) |
|
1184 | reverting .hglf/sub2/large6 (glob) | |
1185 | $ hg status |
|
1185 | $ hg status | |
1186 |
|
1186 | |||
1187 | "verify --large" actually verifies largefiles |
|
1187 | "verify --large" actually verifies largefiles | |
1188 |
|
1188 | |||
1189 | - Where Do We Come From? What Are We? Where Are We Going? |
|
1189 | - Where Do We Come From? What Are We? Where Are We Going? | |
1190 | $ pwd |
|
1190 | $ pwd | |
1191 | $TESTTMP/e |
|
1191 | $TESTTMP/e | |
1192 | $ hg paths |
|
1192 | $ hg paths | |
1193 | default = $TESTTMP/d (glob) |
|
1193 | default = $TESTTMP/d (glob) | |
1194 |
|
1194 | |||
1195 | $ hg verify --large |
|
1195 | $ hg verify --large | |
1196 | checking changesets |
|
1196 | checking changesets | |
1197 | checking manifests |
|
1197 | checking manifests | |
1198 | crosschecking files in changesets and manifests |
|
1198 | crosschecking files in changesets and manifests | |
1199 | checking files |
|
1199 | checking files | |
1200 | 10 files, 10 changesets, 28 total revisions |
|
1200 | 10 files, 10 changesets, 28 total revisions | |
1201 | searching 1 changesets for largefiles |
|
1201 | searching 1 changesets for largefiles | |
1202 | verified existence of 3 revisions of 3 largefiles |
|
1202 | verified existence of 3 revisions of 3 largefiles | |
1203 |
|
1203 | |||
1204 | - introduce missing blob in local store repo and make sure that this is caught: |
|
1204 | - introduce missing blob in local store repo and make sure that this is caught: | |
1205 | $ mv $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 . |
|
1205 | $ mv $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 . | |
1206 | $ hg verify --large |
|
1206 | $ hg verify --large | |
1207 | checking changesets |
|
1207 | checking changesets | |
1208 | checking manifests |
|
1208 | checking manifests | |
1209 | crosschecking files in changesets and manifests |
|
1209 | crosschecking files in changesets and manifests | |
1210 | checking files |
|
1210 | checking files | |
1211 | 10 files, 10 changesets, 28 total revisions |
|
1211 | 10 files, 10 changesets, 28 total revisions | |
1212 | searching 1 changesets for largefiles |
|
1212 | searching 1 changesets for largefiles | |
1213 | changeset 9:598410d3eb9a: sub/large4 references missing $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 (glob) |
|
1213 | changeset 9:598410d3eb9a: sub/large4 references missing $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 (glob) | |
1214 | verified existence of 3 revisions of 3 largefiles |
|
1214 | verified existence of 3 revisions of 3 largefiles | |
1215 | [1] |
|
1215 | [1] | |
1216 |
|
1216 | |||
1217 | - introduce corruption and make sure that it is caught when checking content: |
|
1217 | - introduce corruption and make sure that it is caught when checking content: | |
1218 | $ echo '5 cents' > $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 |
|
1218 | $ echo '5 cents' > $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 | |
1219 | $ hg verify -q --large --lfc |
|
1219 | $ hg verify -q --large --lfc | |
1220 | changeset 9:598410d3eb9a: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 (glob) |
|
1220 | changeset 9:598410d3eb9a: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 (glob) | |
1221 | [1] |
|
1221 | [1] | |
1222 |
|
1222 | |||
1223 | - cleanup |
|
1223 | - cleanup | |
1224 | $ mv e166e74c7303192238d60af5a9c4ce9bef0b7928 $TESTTMP/d/.hg/largefiles/ |
|
1224 | $ mv e166e74c7303192238d60af5a9c4ce9bef0b7928 $TESTTMP/d/.hg/largefiles/ | |
1225 |
|
1225 | |||
1226 | - verifying all revisions will fail because we didn't clone all largefiles to d: |
|
1226 | - verifying all revisions will fail because we didn't clone all largefiles to d: | |
1227 | $ echo 'T-shirt' > $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
|
1227 | $ echo 'T-shirt' > $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 | |
1228 | $ hg verify -q --lfa --lfc |
|
1228 | $ hg verify -q --lfa --lfc | |
1229 | changeset 0:30d30fe6a5be: large1 references missing $TESTTMP/d/.hg/largefiles/4669e532d5b2c093a78eca010077e708a071bb64 (glob) |
|
1229 | changeset 0:30d30fe6a5be: large1 references missing $TESTTMP/d/.hg/largefiles/4669e532d5b2c093a78eca010077e708a071bb64 (glob) | |
1230 | changeset 0:30d30fe6a5be: sub/large2 references missing $TESTTMP/d/.hg/largefiles/1deebade43c8c498a3c8daddac0244dc55d1331d (glob) |
|
1230 | changeset 0:30d30fe6a5be: sub/large2 references missing $TESTTMP/d/.hg/largefiles/1deebade43c8c498a3c8daddac0244dc55d1331d (glob) | |
1231 | changeset 1:ce8896473775: large1 references missing $TESTTMP/d/.hg/largefiles/5f78770c0e77ba4287ad6ef3071c9bf9c379742f (glob) |
|
1231 | changeset 1:ce8896473775: large1 references missing $TESTTMP/d/.hg/largefiles/5f78770c0e77ba4287ad6ef3071c9bf9c379742f (glob) | |
1232 | changeset 1:ce8896473775: sub/large2 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) |
|
1232 | changeset 1:ce8896473775: sub/large2 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) | |
1233 | changeset 3:9e8fbc4bce62: large1 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) |
|
1233 | changeset 3:9e8fbc4bce62: large1 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) | |
1234 | changeset 4:74c02385b94c: large3 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) |
|
1234 | changeset 4:74c02385b94c: large3 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) | |
1235 | changeset 4:74c02385b94c: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) |
|
1235 | changeset 4:74c02385b94c: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) | |
1236 | [1] |
|
1236 | [1] | |
1237 |
|
1237 | |||
1238 | - cleanup |
|
1238 | - cleanup | |
1239 | $ rm $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
|
1239 | $ rm $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 | |
1240 |
|
1240 | |||
1241 | Merging does not revert to old versions of largefiles and also check |
|
1241 | Merging does not revert to old versions of largefiles and also check | |
1242 | that merging after having pulled from a non-default remote works |
|
1242 | that merging after having pulled from a non-default remote works | |
1243 | correctly. |
|
1243 | correctly. | |
1244 |
|
1244 | |||
1245 | $ cd .. |
|
1245 | $ cd .. | |
1246 | $ hg clone -r 7 e temp |
|
1246 | $ hg clone -r 7 e temp | |
1247 | adding changesets |
|
1247 | adding changesets | |
1248 | adding manifests |
|
1248 | adding manifests | |
1249 | adding file changes |
|
1249 | adding file changes | |
1250 | added 8 changesets with 24 changes to 10 files |
|
1250 | added 8 changesets with 24 changes to 10 files | |
1251 | updating to branch default |
|
1251 | updating to branch default | |
1252 | getting changed largefiles |
|
1252 | getting changed largefiles | |
1253 | 3 largefiles updated, 0 removed |
|
1253 | 3 largefiles updated, 0 removed | |
1254 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1254 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1255 | $ hg clone temp f |
|
1255 | $ hg clone temp f | |
1256 | updating to branch default |
|
1256 | updating to branch default | |
1257 | getting changed largefiles |
|
1257 | getting changed largefiles | |
1258 | 3 largefiles updated, 0 removed |
|
1258 | 3 largefiles updated, 0 removed | |
1259 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1259 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1260 | # Delete the largefiles in the largefiles system cache so that we have an |
|
1260 | # Delete the largefiles in the largefiles system cache so that we have an | |
1261 | # opportunity to test that caching after a pull works. |
|
1261 | # opportunity to test that caching after a pull works. | |
1262 | $ rm "${USERCACHE}"/* |
|
1262 | $ rm "${USERCACHE}"/* | |
1263 | $ cd f |
|
1263 | $ cd f | |
1264 | $ echo "large4-merge-test" > sub/large4 |
|
1264 | $ echo "large4-merge-test" > sub/large4 | |
1265 | $ hg commit -m "Modify large4 to test merge" |
|
1265 | $ hg commit -m "Modify large4 to test merge" | |
1266 | Invoking status precommit hook |
|
1266 | Invoking status precommit hook | |
1267 | M sub/large4 |
|
1267 | M sub/large4 | |
1268 | $ hg pull ../e |
|
1268 | $ hg pull ../e | |
1269 | pulling from ../e |
|
1269 | pulling from ../e | |
1270 | searching for changes |
|
1270 | searching for changes | |
1271 | adding changesets |
|
1271 | adding changesets | |
1272 | adding manifests |
|
1272 | adding manifests | |
1273 | adding file changes |
|
1273 | adding file changes | |
1274 | added 2 changesets with 4 changes to 4 files (+1 heads) |
|
1274 | added 2 changesets with 4 changes to 4 files (+1 heads) | |
1275 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
1275 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
1276 | caching largefiles for 1 heads |
|
1276 | caching largefiles for 1 heads | |
1277 | 2 largefiles cached |
|
1277 | 2 largefiles cached | |
1278 | $ hg merge |
|
1278 | $ hg merge | |
1279 | merging sub/large4 |
|
1279 | merging sub/large4 | |
1280 | largefile sub/large4 has a merge conflict |
|
1280 | largefile sub/large4 has a merge conflict | |
1281 | keep (l)ocal or take (o)ther? l |
|
1281 | keep (l)ocal or take (o)ther? l | |
1282 | 3 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
1282 | 3 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
1283 | (branch merge, don't forget to commit) |
|
1283 | (branch merge, don't forget to commit) | |
1284 | getting changed largefiles |
|
1284 | getting changed largefiles | |
1285 | 1 largefiles updated, 0 removed |
|
1285 | 1 largefiles updated, 0 removed | |
1286 | $ hg commit -m "Merge repos e and f" |
|
1286 | $ hg commit -m "Merge repos e and f" | |
1287 | Invoking status precommit hook |
|
1287 | Invoking status precommit hook | |
1288 | M normal3 |
|
1288 | M normal3 | |
1289 | M sub/normal4 |
|
1289 | M sub/normal4 | |
1290 | M sub2/large6 |
|
1290 | M sub2/large6 | |
1291 | $ cat normal3 |
|
1291 | $ cat normal3 | |
1292 | normal3-modified |
|
1292 | normal3-modified | |
1293 | $ cat sub/normal4 |
|
1293 | $ cat sub/normal4 | |
1294 | normal4-modified |
|
1294 | normal4-modified | |
1295 | $ cat sub/large4 |
|
1295 | $ cat sub/large4 | |
1296 | large4-merge-test |
|
1296 | large4-merge-test | |
1297 | $ cat sub2/large6 |
|
1297 | $ cat sub2/large6 | |
1298 | large6-modified |
|
1298 | large6-modified | |
1299 | $ cat sub2/large7 |
|
1299 | $ cat sub2/large7 | |
1300 | large7 |
|
1300 | large7 | |
1301 |
|
1301 | |||
1302 | Test status after merging with a branch that introduces a new largefile: |
|
1302 | Test status after merging with a branch that introduces a new largefile: | |
1303 |
|
1303 | |||
1304 | $ echo large > large |
|
1304 | $ echo large > large | |
1305 | $ hg add --large large |
|
1305 | $ hg add --large large | |
1306 | $ hg commit -m 'add largefile' |
|
1306 | $ hg commit -m 'add largefile' | |
1307 | Invoking status precommit hook |
|
1307 | Invoking status precommit hook | |
1308 | A large |
|
1308 | A large | |
1309 | $ hg update -q ".^" |
|
1309 | $ hg update -q ".^" | |
1310 | $ echo change >> normal3 |
|
1310 | $ echo change >> normal3 | |
1311 | $ hg commit -m 'some change' |
|
1311 | $ hg commit -m 'some change' | |
1312 | Invoking status precommit hook |
|
1312 | Invoking status precommit hook | |
1313 | M normal3 |
|
1313 | M normal3 | |
1314 | created new head |
|
1314 | created new head | |
1315 | $ hg merge |
|
1315 | $ hg merge | |
1316 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1316 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1317 | (branch merge, don't forget to commit) |
|
1317 | (branch merge, don't forget to commit) | |
1318 | getting changed largefiles |
|
1318 | getting changed largefiles | |
1319 | 1 largefiles updated, 0 removed |
|
1319 | 1 largefiles updated, 0 removed | |
1320 | $ hg status |
|
1320 | $ hg status | |
1321 | M large |
|
1321 | M large | |
1322 |
|
1322 | |||
1323 | - make sure update of merge with removed largefiles fails as expected |
|
1323 | - make sure update of merge with removed largefiles fails as expected | |
1324 | $ hg rm sub2/large6 |
|
1324 | $ hg rm sub2/large6 | |
1325 | $ hg up -r. |
|
1325 | $ hg up -r. | |
1326 | abort: outstanding uncommitted merges |
|
1326 | abort: outstanding uncommitted merges | |
1327 | [255] |
|
1327 | [255] | |
1328 |
|
1328 | |||
1329 | - revert should be able to revert files introduced in a pending merge |
|
1329 | - revert should be able to revert files introduced in a pending merge | |
1330 | $ hg revert --all -r . |
|
1330 | $ hg revert --all -r . | |
1331 | removing .hglf/large (glob) |
|
1331 | removing .hglf/large (glob) | |
1332 | undeleting .hglf/sub2/large6 (glob) |
|
1332 | undeleting .hglf/sub2/large6 (glob) | |
1333 |
|
1333 | |||
1334 | Test that a normal file and a largefile with the same name and path cannot |
|
1334 | Test that a normal file and a largefile with the same name and path cannot | |
1335 | coexist. |
|
1335 | coexist. | |
1336 |
|
1336 | |||
1337 | $ rm sub2/large7 |
|
1337 | $ rm sub2/large7 | |
1338 | $ echo "largeasnormal" > sub2/large7 |
|
1338 | $ echo "largeasnormal" > sub2/large7 | |
1339 | $ hg add sub2/large7 |
|
1339 | $ hg add sub2/large7 | |
1340 | sub2/large7 already a largefile |
|
1340 | sub2/large7 already a largefile | |
1341 |
|
1341 | |||
1342 | Test that transplanting a largefile change works correctly. |
|
1342 | Test that transplanting a largefile change works correctly. | |
1343 |
|
1343 | |||
1344 | $ cd .. |
|
1344 | $ cd .. | |
1345 | $ hg clone -r 8 d g |
|
1345 | $ hg clone -r 8 d g | |
1346 | adding changesets |
|
1346 | adding changesets | |
1347 | adding manifests |
|
1347 | adding manifests | |
1348 | adding file changes |
|
1348 | adding file changes | |
1349 | added 9 changesets with 26 changes to 10 files |
|
1349 | added 9 changesets with 26 changes to 10 files | |
1350 | updating to branch default |
|
1350 | updating to branch default | |
1351 | getting changed largefiles |
|
1351 | getting changed largefiles | |
1352 | 3 largefiles updated, 0 removed |
|
1352 | 3 largefiles updated, 0 removed | |
1353 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1353 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1354 | $ cd g |
|
1354 | $ cd g | |
1355 | $ hg transplant -s ../d 598410d3eb9a |
|
1355 | $ hg transplant -s ../d 598410d3eb9a | |
1356 | searching for changes |
|
1356 | searching for changes | |
1357 | searching for changes |
|
1357 | searching for changes | |
1358 | adding changesets |
|
1358 | adding changesets | |
1359 | adding manifests |
|
1359 | adding manifests | |
1360 | adding file changes |
|
1360 | adding file changes | |
1361 | added 1 changesets with 2 changes to 2 files |
|
1361 | added 1 changesets with 2 changes to 2 files | |
1362 | getting changed largefiles |
|
1362 | getting changed largefiles | |
1363 | 1 largefiles updated, 0 removed |
|
1363 | 1 largefiles updated, 0 removed | |
1364 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
1364 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
1365 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1365 | 9:598410d3eb9a modify normal file largefile in repo d | |
1366 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1366 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1367 | 7:daea875e9014 add/edit more largefiles |
|
1367 | 7:daea875e9014 add/edit more largefiles | |
1368 | 6:4355d653f84f edit files yet again |
|
1368 | 6:4355d653f84f edit files yet again | |
1369 | 5:9d5af5072dbd edit files again |
|
1369 | 5:9d5af5072dbd edit files again | |
1370 | 4:74c02385b94c move files |
|
1370 | 4:74c02385b94c move files | |
1371 | 3:9e8fbc4bce62 copy files |
|
1371 | 3:9e8fbc4bce62 copy files | |
1372 | 2:51a0ae4d5864 remove files |
|
1372 | 2:51a0ae4d5864 remove files | |
1373 | 1:ce8896473775 edit files |
|
1373 | 1:ce8896473775 edit files | |
1374 | 0:30d30fe6a5be add files |
|
1374 | 0:30d30fe6a5be add files | |
1375 | $ cat normal3 |
|
1375 | $ cat normal3 | |
1376 | normal3-modified |
|
1376 | normal3-modified | |
1377 | $ cat sub/normal4 |
|
1377 | $ cat sub/normal4 | |
1378 | normal4-modified |
|
1378 | normal4-modified | |
1379 | $ cat sub/large4 |
|
1379 | $ cat sub/large4 | |
1380 | large4-modified |
|
1380 | large4-modified | |
1381 | $ cat sub2/large6 |
|
1381 | $ cat sub2/large6 | |
1382 | large6-modified |
|
1382 | large6-modified | |
1383 | $ cat sub2/large7 |
|
1383 | $ cat sub2/large7 | |
1384 | large7 |
|
1384 | large7 | |
1385 |
|
1385 | |||
1386 | Cat a largefile |
|
1386 | Cat a largefile | |
1387 | $ hg cat normal3 |
|
1387 | $ hg cat normal3 | |
1388 | normal3-modified |
|
1388 | normal3-modified | |
1389 | $ hg cat sub/large4 |
|
1389 | $ hg cat sub/large4 | |
1390 | large4-modified |
|
1390 | large4-modified | |
1391 | $ rm "${USERCACHE}"/* |
|
1391 | $ rm "${USERCACHE}"/* | |
1392 | $ hg cat -r a381d2c8c80e -o cat.out sub/large4 |
|
1392 | $ hg cat -r a381d2c8c80e -o cat.out sub/large4 | |
1393 | $ cat cat.out |
|
1393 | $ cat cat.out | |
1394 | large4-modified |
|
1394 | large4-modified | |
1395 | $ rm cat.out |
|
1395 | $ rm cat.out | |
1396 | $ hg cat -r a381d2c8c80e normal3 |
|
1396 | $ hg cat -r a381d2c8c80e normal3 | |
1397 | normal3-modified |
|
1397 | normal3-modified | |
1398 | $ hg cat -r '.^' normal3 |
|
1398 | $ hg cat -r '.^' normal3 | |
1399 | normal3-modified |
|
1399 | normal3-modified | |
1400 | $ hg cat -r '.^' sub/large4 doesntexist |
|
1400 | $ hg cat -r '.^' sub/large4 doesntexist | |
1401 | large4-modified |
|
1401 | large4-modified | |
1402 | doesntexist: no such file in rev a381d2c8c80e |
|
1402 | doesntexist: no such file in rev a381d2c8c80e | |
1403 | [1] |
|
1403 | [1] | |
1404 |
|
1404 | |||
1405 | Test that renaming a largefile results in correct output for status |
|
1405 | Test that renaming a largefile results in correct output for status | |
1406 |
|
1406 | |||
1407 | $ hg rename sub/large4 large4-renamed |
|
1407 | $ hg rename sub/large4 large4-renamed | |
1408 | $ hg commit -m "test rename output" |
|
1408 | $ hg commit -m "test rename output" | |
1409 | Invoking status precommit hook |
|
1409 | Invoking status precommit hook | |
1410 | A large4-renamed |
|
1410 | A large4-renamed | |
1411 | R sub/large4 |
|
1411 | R sub/large4 | |
1412 | $ cat large4-renamed |
|
1412 | $ cat large4-renamed | |
1413 | large4-modified |
|
1413 | large4-modified | |
1414 | $ cd sub2 |
|
1414 | $ cd sub2 | |
1415 | $ hg rename large6 large6-renamed |
|
1415 | $ hg rename large6 large6-renamed | |
1416 | $ hg st |
|
1416 | $ hg st | |
1417 | A sub2/large6-renamed |
|
1417 | A sub2/large6-renamed | |
1418 | R sub2/large6 |
|
1418 | R sub2/large6 | |
1419 | $ cd .. |
|
1419 | $ cd .. | |
1420 |
|
1420 | |||
1421 | Test --normal flag |
|
1421 | Test --normal flag | |
1422 |
|
1422 | |||
1423 | $ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null |
|
1423 | $ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null | |
1424 | $ hg add --normal --large new-largefile |
|
1424 | $ hg add --normal --large new-largefile | |
1425 | abort: --normal cannot be used with --large |
|
1425 | abort: --normal cannot be used with --large | |
1426 | [255] |
|
1426 | [255] | |
1427 | $ hg add --normal new-largefile |
|
1427 | $ hg add --normal new-largefile | |
1428 | new-largefile: up to 69 MB of RAM may be required to manage this file |
|
1428 | new-largefile: up to 69 MB of RAM may be required to manage this file | |
1429 | (use 'hg revert new-largefile' to cancel the pending addition) |
|
1429 | (use 'hg revert new-largefile' to cancel the pending addition) | |
1430 | $ cd .. |
|
1430 | $ cd .. | |
1431 |
|
1431 | |||
1432 | #if serve |
|
1432 | #if serve | |
1433 | vanilla clients not locked out from largefiles servers on vanilla repos |
|
1433 | vanilla clients not locked out from largefiles servers on vanilla repos | |
1434 | $ mkdir r1 |
|
1434 | $ mkdir r1 | |
1435 | $ cd r1 |
|
1435 | $ cd r1 | |
1436 | $ hg init |
|
1436 | $ hg init | |
1437 | $ echo c1 > f1 |
|
1437 | $ echo c1 > f1 | |
1438 | $ hg add f1 |
|
1438 | $ hg add f1 | |
1439 | $ hg commit -m "m1" |
|
1439 | $ hg commit -m "m1" | |
1440 | Invoking status precommit hook |
|
1440 | Invoking status precommit hook | |
1441 | A f1 |
|
1441 | A f1 | |
1442 | $ cd .. |
|
1442 | $ cd .. | |
1443 | $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid |
|
1443 | $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid | |
1444 | $ cat hg.pid >> $DAEMON_PIDS |
|
1444 | $ cat hg.pid >> $DAEMON_PIDS | |
1445 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2 |
|
1445 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2 | |
1446 | requesting all changes |
|
1446 | requesting all changes | |
1447 | adding changesets |
|
1447 | adding changesets | |
1448 | adding manifests |
|
1448 | adding manifests | |
1449 | adding file changes |
|
1449 | adding file changes | |
1450 | added 1 changesets with 1 changes to 1 files |
|
1450 | added 1 changesets with 1 changes to 1 files | |
1451 | updating to branch default |
|
1451 | updating to branch default | |
1452 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1452 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1453 |
|
1453 | |||
1454 | largefiles clients still work with vanilla servers |
|
1454 | largefiles clients still work with vanilla servers | |
1455 | $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid |
|
1455 | $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid | |
1456 | $ cat hg.pid >> $DAEMON_PIDS |
|
1456 | $ cat hg.pid >> $DAEMON_PIDS | |
1457 | $ hg clone http://localhost:$HGPORT1 r3 |
|
1457 | $ hg clone http://localhost:$HGPORT1 r3 | |
1458 | requesting all changes |
|
1458 | requesting all changes | |
1459 | adding changesets |
|
1459 | adding changesets | |
1460 | adding manifests |
|
1460 | adding manifests | |
1461 | adding file changes |
|
1461 | adding file changes | |
1462 | added 1 changesets with 1 changes to 1 files |
|
1462 | added 1 changesets with 1 changes to 1 files | |
1463 | updating to branch default |
|
1463 | updating to branch default | |
1464 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1464 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1465 | #endif |
|
1465 | #endif | |
1466 |
|
1466 | |||
1467 |
|
1467 | |||
1468 | vanilla clients locked out from largefiles http repos |
|
1468 | vanilla clients locked out from largefiles http repos | |
1469 | $ mkdir r4 |
|
1469 | $ mkdir r4 | |
1470 | $ cd r4 |
|
1470 | $ cd r4 | |
1471 | $ hg init |
|
1471 | $ hg init | |
1472 | $ echo c1 > f1 |
|
1472 | $ echo c1 > f1 | |
1473 | $ hg add --large f1 |
|
1473 | $ hg add --large f1 | |
1474 | $ hg commit -m "m1" |
|
1474 | $ hg commit -m "m1" | |
1475 | Invoking status precommit hook |
|
1475 | Invoking status precommit hook | |
1476 | A f1 |
|
1476 | A f1 | |
1477 | $ cd .. |
|
1477 | $ cd .. | |
1478 |
|
1478 | |||
1479 | largefiles can be pushed locally (issue3583) |
|
1479 | largefiles can be pushed locally (issue3583) | |
1480 | $ hg init dest |
|
1480 | $ hg init dest | |
1481 | $ cd r4 |
|
1481 | $ cd r4 | |
1482 | $ hg outgoing ../dest |
|
1482 | $ hg outgoing ../dest | |
1483 | comparing with ../dest |
|
1483 | comparing with ../dest | |
1484 | searching for changes |
|
1484 | searching for changes | |
1485 | changeset: 0:639881c12b4c |
|
1485 | changeset: 0:639881c12b4c | |
1486 | tag: tip |
|
1486 | tag: tip | |
1487 | user: test |
|
1487 | user: test | |
1488 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1488 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1489 | summary: m1 |
|
1489 | summary: m1 | |
1490 |
|
1490 | |||
1491 | $ hg push ../dest |
|
1491 | $ hg push ../dest | |
1492 | pushing to ../dest |
|
1492 | pushing to ../dest | |
1493 | searching for changes |
|
1493 | searching for changes | |
1494 | searching for changes |
|
1494 | searching for changes | |
1495 | adding changesets |
|
1495 | adding changesets | |
1496 | adding manifests |
|
1496 | adding manifests | |
1497 | adding file changes |
|
1497 | adding file changes | |
1498 | added 1 changesets with 1 changes to 1 files |
|
1498 | added 1 changesets with 1 changes to 1 files | |
1499 |
|
1499 | |||
1500 | exit code with nothing outgoing (issue3611) |
|
1500 | exit code with nothing outgoing (issue3611) | |
1501 | $ hg outgoing ../dest |
|
1501 | $ hg outgoing ../dest | |
1502 | comparing with ../dest |
|
1502 | comparing with ../dest | |
1503 | searching for changes |
|
1503 | searching for changes | |
1504 | no changes found |
|
1504 | no changes found | |
1505 | [1] |
|
1505 | [1] | |
1506 | $ cd .. |
|
1506 | $ cd .. | |
1507 |
|
1507 | |||
1508 | #if serve |
|
1508 | #if serve | |
1509 | $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid |
|
1509 | $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid | |
1510 | $ cat hg.pid >> $DAEMON_PIDS |
|
1510 | $ cat hg.pid >> $DAEMON_PIDS | |
1511 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5 |
|
1511 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5 | |
1512 | abort: remote error: |
|
1512 | abort: remote error: | |
1513 |
|
1513 | |||
1514 | This repository uses the largefiles extension. |
|
1514 | This repository uses the largefiles extension. | |
1515 |
|
1515 | |||
1516 | Please enable it in your Mercurial config file. |
|
1516 | Please enable it in your Mercurial config file. | |
1517 | [255] |
|
1517 | [255] | |
1518 |
|
1518 | |||
1519 | used all HGPORTs, kill all daemons |
|
1519 | used all HGPORTs, kill all daemons | |
1520 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
1520 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |
1521 | #endif |
|
1521 | #endif | |
1522 |
|
1522 | |||
1523 | vanilla clients locked out from largefiles ssh repos |
|
1523 | vanilla clients locked out from largefiles ssh repos | |
1524 | $ hg --config extensions.largefiles=! clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5 |
|
1524 | $ hg --config extensions.largefiles=! clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5 | |
1525 | abort: remote error: |
|
1525 | abort: remote error: | |
1526 |
|
1526 | |||
1527 | This repository uses the largefiles extension. |
|
1527 | This repository uses the largefiles extension. | |
1528 |
|
1528 | |||
1529 | Please enable it in your Mercurial config file. |
|
1529 | Please enable it in your Mercurial config file. | |
1530 | [255] |
|
1530 | [255] | |
1531 |
|
1531 | |||
1532 | #if serve |
|
1532 | #if serve | |
1533 |
|
1533 | |||
1534 | largefiles clients refuse to push largefiles repos to vanilla servers |
|
1534 | largefiles clients refuse to push largefiles repos to vanilla servers | |
1535 | $ mkdir r6 |
|
1535 | $ mkdir r6 | |
1536 | $ cd r6 |
|
1536 | $ cd r6 | |
1537 | $ hg init |
|
1537 | $ hg init | |
1538 | $ echo c1 > f1 |
|
1538 | $ echo c1 > f1 | |
1539 | $ hg add f1 |
|
1539 | $ hg add f1 | |
1540 | $ hg commit -m "m1" |
|
1540 | $ hg commit -m "m1" | |
1541 | Invoking status precommit hook |
|
1541 | Invoking status precommit hook | |
1542 | A f1 |
|
1542 | A f1 | |
1543 | $ cat >> .hg/hgrc <<! |
|
1543 | $ cat >> .hg/hgrc <<! | |
1544 | > [web] |
|
1544 | > [web] | |
1545 | > push_ssl = false |
|
1545 | > push_ssl = false | |
1546 | > allow_push = * |
|
1546 | > allow_push = * | |
1547 | > ! |
|
1547 | > ! | |
1548 | $ cd .. |
|
1548 | $ cd .. | |
1549 | $ hg clone r6 r7 |
|
1549 | $ hg clone r6 r7 | |
1550 | updating to branch default |
|
1550 | updating to branch default | |
1551 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1551 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1552 | $ cd r7 |
|
1552 | $ cd r7 | |
1553 | $ echo c2 > f2 |
|
1553 | $ echo c2 > f2 | |
1554 | $ hg add --large f2 |
|
1554 | $ hg add --large f2 | |
1555 | $ hg commit -m "m2" |
|
1555 | $ hg commit -m "m2" | |
1556 | Invoking status precommit hook |
|
1556 | Invoking status precommit hook | |
1557 | A f2 |
|
1557 | A f2 | |
1558 | $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid |
|
1558 | $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid | |
1559 | $ cat ../hg.pid >> $DAEMON_PIDS |
|
1559 | $ cat ../hg.pid >> $DAEMON_PIDS | |
1560 | $ hg push http://localhost:$HGPORT |
|
1560 | $ hg push http://localhost:$HGPORT | |
1561 | pushing to http://localhost:$HGPORT/ |
|
1561 | pushing to http://localhost:$HGPORT/ | |
1562 | searching for changes |
|
1562 | searching for changes | |
1563 | abort: http://localhost:$HGPORT/ does not appear to be a largefile store |
|
1563 | abort: http://localhost:$HGPORT/ does not appear to be a largefile store | |
1564 | [255] |
|
1564 | [255] | |
1565 | $ cd .. |
|
1565 | $ cd .. | |
1566 |
|
1566 | |||
1567 | putlfile errors are shown (issue3123) |
|
1567 | putlfile errors are shown (issue3123) | |
1568 | Corrupt the cached largefile in r7 and move it out of the servers usercache |
|
1568 | Corrupt the cached largefile in r7 and move it out of the servers usercache | |
1569 | $ mv r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 . |
|
1569 | $ mv r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 . | |
1570 | $ echo 'client side corruption' > r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
1570 | $ echo 'client side corruption' > r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
1571 | $ rm "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8" |
|
1571 | $ rm "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8" | |
1572 | $ hg init empty |
|
1572 | $ hg init empty | |
1573 | $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \ |
|
1573 | $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \ | |
1574 | > --config 'web.allow_push=*' --config web.push_ssl=False |
|
1574 | > --config 'web.allow_push=*' --config web.push_ssl=False | |
1575 | $ cat hg.pid >> $DAEMON_PIDS |
|
1575 | $ cat hg.pid >> $DAEMON_PIDS | |
1576 | $ hg push -R r7 http://localhost:$HGPORT1 |
|
1576 | $ hg push -R r7 http://localhost:$HGPORT1 | |
1577 | pushing to http://localhost:$HGPORT1/ |
|
1577 | pushing to http://localhost:$HGPORT1/ | |
1578 | searching for changes |
|
1578 | searching for changes | |
1579 | remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash |
|
1579 | remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash | |
1580 | abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob) |
|
1580 | abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob) | |
1581 | [255] |
|
1581 | [255] | |
1582 | $ mv 4cdac4d8b084d0b599525cf732437fb337d422a8 r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
1582 | $ mv 4cdac4d8b084d0b599525cf732437fb337d422a8 r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
1583 | Push of file that exists on server but is corrupted - magic healing would be nice ... but too magic |
|
1583 | Push of file that exists on server but is corrupted - magic healing would be nice ... but too magic | |
1584 | $ echo "server side corruption" > empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
1584 | $ echo "server side corruption" > empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
1585 | $ hg push -R r7 http://localhost:$HGPORT1 |
|
1585 | $ hg push -R r7 http://localhost:$HGPORT1 | |
1586 | pushing to http://localhost:$HGPORT1/ |
|
1586 | pushing to http://localhost:$HGPORT1/ | |
1587 | searching for changes |
|
1587 | searching for changes | |
1588 | searching for changes |
|
1588 | searching for changes | |
1589 | remote: adding changesets |
|
1589 | remote: adding changesets | |
1590 | remote: adding manifests |
|
1590 | remote: adding manifests | |
1591 | remote: adding file changes |
|
1591 | remote: adding file changes | |
1592 | remote: added 2 changesets with 2 changes to 2 files |
|
1592 | remote: added 2 changesets with 2 changes to 2 files | |
1593 | $ cat empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
1593 | $ cat empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
1594 | server side corruption |
|
1594 | server side corruption | |
1595 | $ rm -rf empty |
|
1595 | $ rm -rf empty | |
1596 |
|
1596 | |||
1597 | Push a largefiles repository to a served empty repository |
|
1597 | Push a largefiles repository to a served empty repository | |
1598 | $ hg init r8 |
|
1598 | $ hg init r8 | |
1599 | $ echo c3 > r8/f1 |
|
1599 | $ echo c3 > r8/f1 | |
1600 | $ hg add --large r8/f1 -R r8 |
|
1600 | $ hg add --large r8/f1 -R r8 | |
1601 | $ hg commit -m "m1" -R r8 |
|
1601 | $ hg commit -m "m1" -R r8 | |
1602 | Invoking status precommit hook |
|
1602 | Invoking status precommit hook | |
1603 | A f1 |
|
1603 | A f1 | |
1604 | $ hg init empty |
|
1604 | $ hg init empty | |
1605 | $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \ |
|
1605 | $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \ | |
1606 | > --config 'web.allow_push=*' --config web.push_ssl=False |
|
1606 | > --config 'web.allow_push=*' --config web.push_ssl=False | |
1607 | $ cat hg.pid >> $DAEMON_PIDS |
|
1607 | $ cat hg.pid >> $DAEMON_PIDS | |
1608 | $ rm "${USERCACHE}"/* |
|
1608 | $ rm "${USERCACHE}"/* | |
1609 | $ hg push -R r8 http://localhost:$HGPORT2/#default |
|
1609 | $ hg push -R r8 http://localhost:$HGPORT2/#default | |
1610 | pushing to http://localhost:$HGPORT2/ |
|
1610 | pushing to http://localhost:$HGPORT2/ | |
1611 | searching for changes |
|
1611 | searching for changes | |
1612 | searching for changes |
|
1612 | searching for changes | |
1613 | remote: adding changesets |
|
1613 | remote: adding changesets | |
1614 | remote: adding manifests |
|
1614 | remote: adding manifests | |
1615 | remote: adding file changes |
|
1615 | remote: adding file changes | |
1616 | remote: added 1 changesets with 1 changes to 1 files |
|
1616 | remote: added 1 changesets with 1 changes to 1 files | |
1617 | $ [ -f "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] |
|
1617 | $ [ -f "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] | |
1618 | $ [ -f empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] |
|
1618 | $ [ -f empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] | |
1619 |
|
1619 | |||
1620 | Clone over http, no largefiles pulled on clone. |
|
1620 | Clone over http, no largefiles pulled on clone. | |
1621 |
|
1621 | |||
1622 | $ hg clone http://localhost:$HGPORT2/#default http-clone -U |
|
1622 | $ hg clone http://localhost:$HGPORT2/#default http-clone -U | |
1623 | adding changesets |
|
1623 | adding changesets | |
1624 | adding manifests |
|
1624 | adding manifests | |
1625 | adding file changes |
|
1625 | adding file changes | |
1626 | added 1 changesets with 1 changes to 1 files |
|
1626 | added 1 changesets with 1 changes to 1 files | |
1627 |
|
1627 | |||
1628 | test 'verify' with remotestore: |
|
1628 | test 'verify' with remotestore: | |
1629 |
|
1629 | |||
1630 | $ rm "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
1630 | $ rm "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
1631 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . |
|
1631 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . | |
1632 | $ hg -R http-clone verify --large --lfa |
|
1632 | $ hg -R http-clone verify --large --lfa | |
1633 | checking changesets |
|
1633 | checking changesets | |
1634 | checking manifests |
|
1634 | checking manifests | |
1635 | crosschecking files in changesets and manifests |
|
1635 | crosschecking files in changesets and manifests | |
1636 | checking files |
|
1636 | checking files | |
1637 | 1 files, 1 changesets, 1 total revisions |
|
1637 | 1 files, 1 changesets, 1 total revisions | |
1638 | searching 1 changesets for largefiles |
|
1638 | searching 1 changesets for largefiles | |
1639 | changeset 0:cf03e5bb9936: f1 missing |
|
1639 | changeset 0:cf03e5bb9936: f1 missing | |
1640 | verified existence of 1 revisions of 1 largefiles |
|
1640 | verified existence of 1 revisions of 1 largefiles | |
1641 | [1] |
|
1641 | [1] | |
1642 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ |
|
1642 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ | |
1643 | $ hg -R http-clone -q verify --large --lfa |
|
1643 | $ hg -R http-clone -q verify --large --lfa | |
1644 |
|
1644 | |||
1645 | largefiles pulled on update - a largefile missing on the server: |
|
1645 | largefiles pulled on update - a largefile missing on the server: | |
1646 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . |
|
1646 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . | |
1647 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache |
|
1647 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache | |
1648 | getting changed largefiles |
|
1648 | getting changed largefiles | |
1649 | abort: remotestore: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 is missing |
|
1649 | abort: remotestore: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 is missing | |
1650 | [255] |
|
1650 | [255] | |
1651 | $ hg -R http-clone up -Cqr null |
|
1651 | $ hg -R http-clone up -Cqr null | |
1652 |
|
1652 | |||
1653 | largefiles pulled on update - a largefile corrupted on the server: |
|
1653 | largefiles pulled on update - a largefile corrupted on the server: | |
1654 | $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
1654 | $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
1655 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache |
|
1655 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache | |
1656 | getting changed largefiles |
|
1656 | getting changed largefiles | |
1657 | f1: data corruption (expected 02a439e5c31c526465ab1a0ca1f431f76b827b90, got 6a7bb2556144babe3899b25e5428123735bb1e27) |
|
1657 | f1: data corruption (expected 02a439e5c31c526465ab1a0ca1f431f76b827b90, got 6a7bb2556144babe3899b25e5428123735bb1e27) | |
1658 | 0 largefiles updated, 0 removed |
|
1658 | 0 largefiles updated, 0 removed | |
1659 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1659 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1660 | $ hg -R http-clone st |
|
1660 | $ hg -R http-clone st | |
1661 | ! f1 |
|
1661 | ! f1 | |
1662 | $ [ ! -f http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] |
|
1662 | $ [ ! -f http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] | |
1663 | $ [ ! -f http-clone/f1 ] |
|
1663 | $ [ ! -f http-clone/f1 ] | |
1664 | $ [ ! -f http-clone-usercache ] |
|
1664 | $ [ ! -f http-clone-usercache ] | |
1665 | $ hg -R http-clone verify --large --lfc |
|
1665 | $ hg -R http-clone verify --large --lfc | |
1666 | checking changesets |
|
1666 | checking changesets | |
1667 | checking manifests |
|
1667 | checking manifests | |
1668 | crosschecking files in changesets and manifests |
|
1668 | crosschecking files in changesets and manifests | |
1669 | checking files |
|
1669 | checking files | |
1670 | 1 files, 1 changesets, 1 total revisions |
|
1670 | 1 files, 1 changesets, 1 total revisions | |
1671 | searching 1 changesets for largefiles |
|
1671 | searching 1 changesets for largefiles | |
1672 | verified contents of 1 revisions of 1 largefiles |
|
1672 | verified contents of 1 revisions of 1 largefiles | |
1673 | $ hg -R http-clone up -Cqr null |
|
1673 | $ hg -R http-clone up -Cqr null | |
1674 |
|
1674 | |||
1675 | largefiles pulled on update - no server side problems: |
|
1675 | largefiles pulled on update - no server side problems: | |
1676 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ |
|
1676 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ | |
1677 | $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache |
|
1677 | $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache | |
1678 | resolving manifests |
|
1678 | resolving manifests | |
1679 |
|
|
1679 | branchmerge: False, force: False, partial: False | |
1680 | ancestor: 000000000000, local: 000000000000+, remote: cf03e5bb9936 |
|
1680 | ancestor: 000000000000, local: 000000000000+, remote: cf03e5bb9936 | |
1681 | .hglf/f1: remote created -> g |
|
1681 | .hglf/f1: remote created -> g | |
1682 | updating: .hglf/f1 1/1 files (100.00%) |
|
1682 | updating: .hglf/f1 1/1 files (100.00%) | |
1683 | getting .hglf/f1 |
|
1683 | getting .hglf/f1 | |
1684 | getting changed largefiles |
|
1684 | getting changed largefiles | |
1685 | using http://localhost:$HGPORT2/ |
|
1685 | using http://localhost:$HGPORT2/ | |
1686 | sending capabilities command |
|
1686 | sending capabilities command | |
1687 | getting largefiles: 0/1 lfile (0.00%) |
|
1687 | getting largefiles: 0/1 lfile (0.00%) | |
1688 | getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
1688 | getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
1689 | sending batch command |
|
1689 | sending batch command | |
1690 | sending getlfile command |
|
1690 | sending getlfile command | |
1691 | found 02a439e5c31c526465ab1a0ca1f431f76b827b90 in store |
|
1691 | found 02a439e5c31c526465ab1a0ca1f431f76b827b90 in store | |
1692 | 1 largefiles updated, 0 removed |
|
1692 | 1 largefiles updated, 0 removed | |
1693 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1693 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1694 |
|
1694 | |||
1695 | $ ls http-clone-usercache/* |
|
1695 | $ ls http-clone-usercache/* | |
1696 | http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
1696 | http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
1697 |
|
1697 | |||
1698 | $ rm -rf empty http-clone* |
|
1698 | $ rm -rf empty http-clone* | |
1699 |
|
1699 | |||
1700 | used all HGPORTs, kill all daemons |
|
1700 | used all HGPORTs, kill all daemons | |
1701 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
1701 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |
1702 |
|
1702 | |||
1703 | #endif |
|
1703 | #endif | |
1704 |
|
1704 | |||
1705 |
|
1705 | |||
1706 | #if unix-permissions |
|
1706 | #if unix-permissions | |
1707 |
|
1707 | |||
1708 | Clone a local repository owned by another user |
|
1708 | Clone a local repository owned by another user | |
1709 | We have to simulate that here by setting $HOME and removing write permissions |
|
1709 | We have to simulate that here by setting $HOME and removing write permissions | |
1710 | $ ORIGHOME="$HOME" |
|
1710 | $ ORIGHOME="$HOME" | |
1711 | $ mkdir alice |
|
1711 | $ mkdir alice | |
1712 | $ HOME="`pwd`/alice" |
|
1712 | $ HOME="`pwd`/alice" | |
1713 | $ cd alice |
|
1713 | $ cd alice | |
1714 | $ hg init pubrepo |
|
1714 | $ hg init pubrepo | |
1715 | $ cd pubrepo |
|
1715 | $ cd pubrepo | |
1716 | $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null |
|
1716 | $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null | |
1717 | $ hg add --large a-large-file |
|
1717 | $ hg add --large a-large-file | |
1718 | $ hg commit -m "Add a large file" |
|
1718 | $ hg commit -m "Add a large file" | |
1719 | Invoking status precommit hook |
|
1719 | Invoking status precommit hook | |
1720 | A a-large-file |
|
1720 | A a-large-file | |
1721 | $ cd .. |
|
1721 | $ cd .. | |
1722 | $ chmod -R a-w pubrepo |
|
1722 | $ chmod -R a-w pubrepo | |
1723 | $ cd .. |
|
1723 | $ cd .. | |
1724 | $ mkdir bob |
|
1724 | $ mkdir bob | |
1725 | $ HOME="`pwd`/bob" |
|
1725 | $ HOME="`pwd`/bob" | |
1726 | $ cd bob |
|
1726 | $ cd bob | |
1727 | $ hg clone --pull ../alice/pubrepo pubrepo |
|
1727 | $ hg clone --pull ../alice/pubrepo pubrepo | |
1728 | requesting all changes |
|
1728 | requesting all changes | |
1729 | adding changesets |
|
1729 | adding changesets | |
1730 | adding manifests |
|
1730 | adding manifests | |
1731 | adding file changes |
|
1731 | adding file changes | |
1732 | added 1 changesets with 1 changes to 1 files |
|
1732 | added 1 changesets with 1 changes to 1 files | |
1733 | updating to branch default |
|
1733 | updating to branch default | |
1734 | getting changed largefiles |
|
1734 | getting changed largefiles | |
1735 | 1 largefiles updated, 0 removed |
|
1735 | 1 largefiles updated, 0 removed | |
1736 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1736 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1737 | $ cd .. |
|
1737 | $ cd .. | |
1738 | $ chmod -R u+w alice/pubrepo |
|
1738 | $ chmod -R u+w alice/pubrepo | |
1739 | $ HOME="$ORIGHOME" |
|
1739 | $ HOME="$ORIGHOME" | |
1740 |
|
1740 | |||
1741 | #endif |
|
1741 | #endif | |
1742 |
|
1742 | |||
1743 | #if symlink |
|
1743 | #if symlink | |
1744 |
|
1744 | |||
1745 | Symlink to a large largefile should behave the same as a symlink to a normal file |
|
1745 | Symlink to a large largefile should behave the same as a symlink to a normal file | |
1746 | $ hg init largesymlink |
|
1746 | $ hg init largesymlink | |
1747 | $ cd largesymlink |
|
1747 | $ cd largesymlink | |
1748 | $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null |
|
1748 | $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null | |
1749 | $ hg add --large largefile |
|
1749 | $ hg add --large largefile | |
1750 | $ hg commit -m "commit a large file" |
|
1750 | $ hg commit -m "commit a large file" | |
1751 | Invoking status precommit hook |
|
1751 | Invoking status precommit hook | |
1752 | A largefile |
|
1752 | A largefile | |
1753 | $ ln -s largefile largelink |
|
1753 | $ ln -s largefile largelink | |
1754 | $ hg add largelink |
|
1754 | $ hg add largelink | |
1755 | $ hg commit -m "commit a large symlink" |
|
1755 | $ hg commit -m "commit a large symlink" | |
1756 | Invoking status precommit hook |
|
1756 | Invoking status precommit hook | |
1757 | A largelink |
|
1757 | A largelink | |
1758 | $ rm -f largelink |
|
1758 | $ rm -f largelink | |
1759 | $ hg up >/dev/null |
|
1759 | $ hg up >/dev/null | |
1760 | $ test -f largelink |
|
1760 | $ test -f largelink | |
1761 | [1] |
|
1761 | [1] | |
1762 | $ test -L largelink |
|
1762 | $ test -L largelink | |
1763 | [1] |
|
1763 | [1] | |
1764 | $ rm -f largelink # make next part of the test independent of the previous |
|
1764 | $ rm -f largelink # make next part of the test independent of the previous | |
1765 | $ hg up -C >/dev/null |
|
1765 | $ hg up -C >/dev/null | |
1766 | $ test -f largelink |
|
1766 | $ test -f largelink | |
1767 | $ test -L largelink |
|
1767 | $ test -L largelink | |
1768 | $ cd .. |
|
1768 | $ cd .. | |
1769 |
|
1769 | |||
1770 | #endif |
|
1770 | #endif | |
1771 |
|
1771 | |||
1772 | test for pattern matching on 'hg status': |
|
1772 | test for pattern matching on 'hg status': | |
1773 | to boost performance, largefiles checks whether specified patterns are |
|
1773 | to boost performance, largefiles checks whether specified patterns are | |
1774 | related to largefiles in working directory (NOT to STANDIN) or not. |
|
1774 | related to largefiles in working directory (NOT to STANDIN) or not. | |
1775 |
|
1775 | |||
1776 | $ hg init statusmatch |
|
1776 | $ hg init statusmatch | |
1777 | $ cd statusmatch |
|
1777 | $ cd statusmatch | |
1778 |
|
1778 | |||
1779 | $ mkdir -p a/b/c/d |
|
1779 | $ mkdir -p a/b/c/d | |
1780 | $ echo normal > a/b/c/d/e.normal.txt |
|
1780 | $ echo normal > a/b/c/d/e.normal.txt | |
1781 | $ hg add a/b/c/d/e.normal.txt |
|
1781 | $ hg add a/b/c/d/e.normal.txt | |
1782 | $ echo large > a/b/c/d/e.large.txt |
|
1782 | $ echo large > a/b/c/d/e.large.txt | |
1783 | $ hg add --large a/b/c/d/e.large.txt |
|
1783 | $ hg add --large a/b/c/d/e.large.txt | |
1784 | $ mkdir -p a/b/c/x |
|
1784 | $ mkdir -p a/b/c/x | |
1785 | $ echo normal > a/b/c/x/y.normal.txt |
|
1785 | $ echo normal > a/b/c/x/y.normal.txt | |
1786 | $ hg add a/b/c/x/y.normal.txt |
|
1786 | $ hg add a/b/c/x/y.normal.txt | |
1787 | $ hg commit -m 'add files' |
|
1787 | $ hg commit -m 'add files' | |
1788 | Invoking status precommit hook |
|
1788 | Invoking status precommit hook | |
1789 | A a/b/c/d/e.large.txt |
|
1789 | A a/b/c/d/e.large.txt | |
1790 | A a/b/c/d/e.normal.txt |
|
1790 | A a/b/c/d/e.normal.txt | |
1791 | A a/b/c/x/y.normal.txt |
|
1791 | A a/b/c/x/y.normal.txt | |
1792 |
|
1792 | |||
1793 | (1) no pattern: no performance boost |
|
1793 | (1) no pattern: no performance boost | |
1794 | $ hg status -A |
|
1794 | $ hg status -A | |
1795 | C a/b/c/d/e.large.txt |
|
1795 | C a/b/c/d/e.large.txt | |
1796 | C a/b/c/d/e.normal.txt |
|
1796 | C a/b/c/d/e.normal.txt | |
1797 | C a/b/c/x/y.normal.txt |
|
1797 | C a/b/c/x/y.normal.txt | |
1798 |
|
1798 | |||
1799 | (2) pattern not related to largefiles: performance boost |
|
1799 | (2) pattern not related to largefiles: performance boost | |
1800 | $ hg status -A a/b/c/x |
|
1800 | $ hg status -A a/b/c/x | |
1801 | C a/b/c/x/y.normal.txt |
|
1801 | C a/b/c/x/y.normal.txt | |
1802 |
|
1802 | |||
1803 | (3) pattern related to largefiles: no performance boost |
|
1803 | (3) pattern related to largefiles: no performance boost | |
1804 | $ hg status -A a/b/c/d |
|
1804 | $ hg status -A a/b/c/d | |
1805 | C a/b/c/d/e.large.txt |
|
1805 | C a/b/c/d/e.large.txt | |
1806 | C a/b/c/d/e.normal.txt |
|
1806 | C a/b/c/d/e.normal.txt | |
1807 |
|
1807 | |||
1808 | (4) pattern related to STANDIN (not to largefiles): performance boost |
|
1808 | (4) pattern related to STANDIN (not to largefiles): performance boost | |
1809 | $ hg status -A .hglf/a |
|
1809 | $ hg status -A .hglf/a | |
1810 | C .hglf/a/b/c/d/e.large.txt |
|
1810 | C .hglf/a/b/c/d/e.large.txt | |
1811 |
|
1811 | |||
1812 | (5) mixed case: no performance boost |
|
1812 | (5) mixed case: no performance boost | |
1813 | $ hg status -A a/b/c/x a/b/c/d |
|
1813 | $ hg status -A a/b/c/x a/b/c/d | |
1814 | C a/b/c/d/e.large.txt |
|
1814 | C a/b/c/d/e.large.txt | |
1815 | C a/b/c/d/e.normal.txt |
|
1815 | C a/b/c/d/e.normal.txt | |
1816 | C a/b/c/x/y.normal.txt |
|
1816 | C a/b/c/x/y.normal.txt | |
1817 |
|
1817 | |||
1818 | verify that largefiles doesn't break filesets |
|
1818 | verify that largefiles doesn't break filesets | |
1819 |
|
1819 | |||
1820 | $ hg log --rev . --exclude "set:binary()" |
|
1820 | $ hg log --rev . --exclude "set:binary()" | |
1821 | changeset: 0:41bd42f10efa |
|
1821 | changeset: 0:41bd42f10efa | |
1822 | tag: tip |
|
1822 | tag: tip | |
1823 | user: test |
|
1823 | user: test | |
1824 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1824 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1825 | summary: add files |
|
1825 | summary: add files | |
1826 |
|
1826 | |||
1827 | verify that large files in subrepos handled properly |
|
1827 | verify that large files in subrepos handled properly | |
1828 | $ hg init subrepo |
|
1828 | $ hg init subrepo | |
1829 | $ echo "subrepo = subrepo" > .hgsub |
|
1829 | $ echo "subrepo = subrepo" > .hgsub | |
1830 | $ hg add .hgsub |
|
1830 | $ hg add .hgsub | |
1831 | $ hg ci -m "add subrepo" |
|
1831 | $ hg ci -m "add subrepo" | |
1832 | Invoking status precommit hook |
|
1832 | Invoking status precommit hook | |
1833 | A .hgsub |
|
1833 | A .hgsub | |
1834 | ? .hgsubstate |
|
1834 | ? .hgsubstate | |
1835 | $ echo "rev 1" > subrepo/large.txt |
|
1835 | $ echo "rev 1" > subrepo/large.txt | |
1836 | $ hg -R subrepo add --large subrepo/large.txt |
|
1836 | $ hg -R subrepo add --large subrepo/large.txt | |
1837 | $ hg sum |
|
1837 | $ hg sum | |
1838 | parent: 1:8ee150ea2e9c tip |
|
1838 | parent: 1:8ee150ea2e9c tip | |
1839 | add subrepo |
|
1839 | add subrepo | |
1840 | branch: default |
|
1840 | branch: default | |
1841 | commit: 1 subrepos |
|
1841 | commit: 1 subrepos | |
1842 | update: (current) |
|
1842 | update: (current) | |
1843 | $ hg st |
|
1843 | $ hg st | |
1844 | $ hg st -S |
|
1844 | $ hg st -S | |
1845 | A subrepo/large.txt |
|
1845 | A subrepo/large.txt | |
1846 | $ hg ci -S -m "commit top repo" |
|
1846 | $ hg ci -S -m "commit top repo" | |
1847 | committing subrepository subrepo |
|
1847 | committing subrepository subrepo | |
1848 | Invoking status precommit hook |
|
1848 | Invoking status precommit hook | |
1849 | A large.txt |
|
1849 | A large.txt | |
1850 | Invoking status precommit hook |
|
1850 | Invoking status precommit hook | |
1851 | M .hgsubstate |
|
1851 | M .hgsubstate | |
1852 | # No differences |
|
1852 | # No differences | |
1853 | $ hg st -S |
|
1853 | $ hg st -S | |
1854 | $ hg sum |
|
1854 | $ hg sum | |
1855 | parent: 2:ce4cd0c527a6 tip |
|
1855 | parent: 2:ce4cd0c527a6 tip | |
1856 | commit top repo |
|
1856 | commit top repo | |
1857 | branch: default |
|
1857 | branch: default | |
1858 | commit: (clean) |
|
1858 | commit: (clean) | |
1859 | update: (current) |
|
1859 | update: (current) | |
1860 | $ echo "rev 2" > subrepo/large.txt |
|
1860 | $ echo "rev 2" > subrepo/large.txt | |
1861 | $ hg st -S |
|
1861 | $ hg st -S | |
1862 | M subrepo/large.txt |
|
1862 | M subrepo/large.txt | |
1863 | $ hg sum |
|
1863 | $ hg sum | |
1864 | parent: 2:ce4cd0c527a6 tip |
|
1864 | parent: 2:ce4cd0c527a6 tip | |
1865 | commit top repo |
|
1865 | commit top repo | |
1866 | branch: default |
|
1866 | branch: default | |
1867 | commit: 1 subrepos |
|
1867 | commit: 1 subrepos | |
1868 | update: (current) |
|
1868 | update: (current) | |
1869 | $ hg ci -m "this commit should fail without -S" |
|
1869 | $ hg ci -m "this commit should fail without -S" | |
1870 | abort: uncommitted changes in subrepo subrepo |
|
1870 | abort: uncommitted changes in subrepo subrepo | |
1871 | (use --subrepos for recursive commit) |
|
1871 | (use --subrepos for recursive commit) | |
1872 | [255] |
|
1872 | [255] | |
1873 |
|
1873 | |||
1874 | Add a normal file to the subrepo, then test archiving |
|
1874 | Add a normal file to the subrepo, then test archiving | |
1875 |
|
1875 | |||
1876 | $ echo 'normal file' > subrepo/normal.txt |
|
1876 | $ echo 'normal file' > subrepo/normal.txt | |
1877 | $ hg -R subrepo add subrepo/normal.txt |
|
1877 | $ hg -R subrepo add subrepo/normal.txt | |
1878 |
|
1878 | |||
1879 | Lock in subrepo, otherwise the change isn't archived |
|
1879 | Lock in subrepo, otherwise the change isn't archived | |
1880 |
|
1880 | |||
1881 | $ hg ci -S -m "add normal file to top level" |
|
1881 | $ hg ci -S -m "add normal file to top level" | |
1882 | committing subrepository subrepo |
|
1882 | committing subrepository subrepo | |
1883 | Invoking status precommit hook |
|
1883 | Invoking status precommit hook | |
1884 | M large.txt |
|
1884 | M large.txt | |
1885 | A normal.txt |
|
1885 | A normal.txt | |
1886 | Invoking status precommit hook |
|
1886 | Invoking status precommit hook | |
1887 | M .hgsubstate |
|
1887 | M .hgsubstate | |
1888 | $ hg archive -S ../lf_subrepo_archive |
|
1888 | $ hg archive -S ../lf_subrepo_archive | |
1889 | $ find ../lf_subrepo_archive | sort |
|
1889 | $ find ../lf_subrepo_archive | sort | |
1890 | ../lf_subrepo_archive |
|
1890 | ../lf_subrepo_archive | |
1891 | ../lf_subrepo_archive/.hg_archival.txt |
|
1891 | ../lf_subrepo_archive/.hg_archival.txt | |
1892 | ../lf_subrepo_archive/.hgsub |
|
1892 | ../lf_subrepo_archive/.hgsub | |
1893 | ../lf_subrepo_archive/.hgsubstate |
|
1893 | ../lf_subrepo_archive/.hgsubstate | |
1894 | ../lf_subrepo_archive/a |
|
1894 | ../lf_subrepo_archive/a | |
1895 | ../lf_subrepo_archive/a/b |
|
1895 | ../lf_subrepo_archive/a/b | |
1896 | ../lf_subrepo_archive/a/b/c |
|
1896 | ../lf_subrepo_archive/a/b/c | |
1897 | ../lf_subrepo_archive/a/b/c/d |
|
1897 | ../lf_subrepo_archive/a/b/c/d | |
1898 | ../lf_subrepo_archive/a/b/c/d/e.large.txt |
|
1898 | ../lf_subrepo_archive/a/b/c/d/e.large.txt | |
1899 | ../lf_subrepo_archive/a/b/c/d/e.normal.txt |
|
1899 | ../lf_subrepo_archive/a/b/c/d/e.normal.txt | |
1900 | ../lf_subrepo_archive/a/b/c/x |
|
1900 | ../lf_subrepo_archive/a/b/c/x | |
1901 | ../lf_subrepo_archive/a/b/c/x/y.normal.txt |
|
1901 | ../lf_subrepo_archive/a/b/c/x/y.normal.txt | |
1902 | ../lf_subrepo_archive/subrepo |
|
1902 | ../lf_subrepo_archive/subrepo | |
1903 | ../lf_subrepo_archive/subrepo/large.txt |
|
1903 | ../lf_subrepo_archive/subrepo/large.txt | |
1904 | ../lf_subrepo_archive/subrepo/normal.txt |
|
1904 | ../lf_subrepo_archive/subrepo/normal.txt | |
1905 |
|
1905 | |||
1906 | Test update with subrepos. |
|
1906 | Test update with subrepos. | |
1907 |
|
1907 | |||
1908 | $ hg update 0 |
|
1908 | $ hg update 0 | |
1909 | getting changed largefiles |
|
1909 | getting changed largefiles | |
1910 | 0 largefiles updated, 1 removed |
|
1910 | 0 largefiles updated, 1 removed | |
1911 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1911 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1912 | $ hg status -S |
|
1912 | $ hg status -S | |
1913 | $ hg update tip |
|
1913 | $ hg update tip | |
1914 | getting changed largefiles |
|
1914 | getting changed largefiles | |
1915 | 1 largefiles updated, 0 removed |
|
1915 | 1 largefiles updated, 0 removed | |
1916 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1916 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1917 | $ hg status -S |
|
1917 | $ hg status -S | |
1918 | # modify a large file |
|
1918 | # modify a large file | |
1919 | $ echo "modified" > subrepo/large.txt |
|
1919 | $ echo "modified" > subrepo/large.txt | |
1920 | $ hg st -S |
|
1920 | $ hg st -S | |
1921 | M subrepo/large.txt |
|
1921 | M subrepo/large.txt | |
1922 | # update -C should revert the change. |
|
1922 | # update -C should revert the change. | |
1923 | $ hg update -C |
|
1923 | $ hg update -C | |
1924 | getting changed largefiles |
|
1924 | getting changed largefiles | |
1925 | 1 largefiles updated, 0 removed |
|
1925 | 1 largefiles updated, 0 removed | |
1926 | getting changed largefiles |
|
1926 | getting changed largefiles | |
1927 | 0 largefiles updated, 0 removed |
|
1927 | 0 largefiles updated, 0 removed | |
1928 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1928 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1929 | $ hg status -S |
|
1929 | $ hg status -S | |
1930 |
|
1930 | |||
1931 | Test archiving a revision that references a subrepo that is not yet |
|
1931 | Test archiving a revision that references a subrepo that is not yet | |
1932 | cloned (see test-subrepo-recursion.t): |
|
1932 | cloned (see test-subrepo-recursion.t): | |
1933 |
|
1933 | |||
1934 | $ hg clone -U . ../empty |
|
1934 | $ hg clone -U . ../empty | |
1935 | $ cd ../empty |
|
1935 | $ cd ../empty | |
1936 | $ hg archive --subrepos -r tip ../archive.tar.gz |
|
1936 | $ hg archive --subrepos -r tip ../archive.tar.gz | |
1937 | cloning subrepo subrepo from $TESTTMP/statusmatch/subrepo |
|
1937 | cloning subrepo subrepo from $TESTTMP/statusmatch/subrepo | |
1938 | $ cd .. |
|
1938 | $ cd .. | |
1939 |
|
1939 | |||
1940 | Test that addremove picks up largefiles prior to the initial commit (issue3541) |
|
1940 | Test that addremove picks up largefiles prior to the initial commit (issue3541) | |
1941 |
|
1941 | |||
1942 | $ hg init addrm2 |
|
1942 | $ hg init addrm2 | |
1943 | $ cd addrm2 |
|
1943 | $ cd addrm2 | |
1944 | $ touch large.dat |
|
1944 | $ touch large.dat | |
1945 | $ touch large2.dat |
|
1945 | $ touch large2.dat | |
1946 | $ touch normal |
|
1946 | $ touch normal | |
1947 | $ hg add --large large.dat |
|
1947 | $ hg add --large large.dat | |
1948 | $ hg addremove -v |
|
1948 | $ hg addremove -v | |
1949 | adding large2.dat as a largefile |
|
1949 | adding large2.dat as a largefile | |
1950 | adding normal |
|
1950 | adding normal | |
1951 |
|
1951 | |||
1952 | Test that forgetting all largefiles reverts to islfilesrepo() == False |
|
1952 | Test that forgetting all largefiles reverts to islfilesrepo() == False | |
1953 | (addremove will add *.dat as normal files now) |
|
1953 | (addremove will add *.dat as normal files now) | |
1954 | $ hg forget large.dat |
|
1954 | $ hg forget large.dat | |
1955 | $ hg forget large2.dat |
|
1955 | $ hg forget large2.dat | |
1956 | $ hg addremove -v |
|
1956 | $ hg addremove -v | |
1957 | adding large.dat |
|
1957 | adding large.dat | |
1958 | adding large2.dat |
|
1958 | adding large2.dat | |
1959 |
|
1959 | |||
1960 | Test commit's addremove option prior to the first commit |
|
1960 | Test commit's addremove option prior to the first commit | |
1961 | $ hg forget large.dat |
|
1961 | $ hg forget large.dat | |
1962 | $ hg forget large2.dat |
|
1962 | $ hg forget large2.dat | |
1963 | $ hg add --large large.dat |
|
1963 | $ hg add --large large.dat | |
1964 | $ hg ci -Am "commit" |
|
1964 | $ hg ci -Am "commit" | |
1965 | adding large2.dat as a largefile |
|
1965 | adding large2.dat as a largefile | |
1966 | Invoking status precommit hook |
|
1966 | Invoking status precommit hook | |
1967 | A large.dat |
|
1967 | A large.dat | |
1968 | A large2.dat |
|
1968 | A large2.dat | |
1969 | A normal |
|
1969 | A normal | |
1970 | $ find .hglf | sort |
|
1970 | $ find .hglf | sort | |
1971 | .hglf |
|
1971 | .hglf | |
1972 | .hglf/large.dat |
|
1972 | .hglf/large.dat | |
1973 | .hglf/large2.dat |
|
1973 | .hglf/large2.dat | |
1974 |
|
1974 | |||
1975 | Test actions on largefiles using relative paths from subdir |
|
1975 | Test actions on largefiles using relative paths from subdir | |
1976 |
|
1976 | |||
1977 | $ mkdir sub |
|
1977 | $ mkdir sub | |
1978 | $ cd sub |
|
1978 | $ cd sub | |
1979 | $ echo anotherlarge > anotherlarge |
|
1979 | $ echo anotherlarge > anotherlarge | |
1980 | $ hg add --large anotherlarge |
|
1980 | $ hg add --large anotherlarge | |
1981 | $ hg st |
|
1981 | $ hg st | |
1982 | A sub/anotherlarge |
|
1982 | A sub/anotherlarge | |
1983 | $ hg st anotherlarge |
|
1983 | $ hg st anotherlarge | |
1984 | A anotherlarge |
|
1984 | A anotherlarge | |
1985 | $ hg commit -m anotherlarge anotherlarge |
|
1985 | $ hg commit -m anotherlarge anotherlarge | |
1986 | Invoking status precommit hook |
|
1986 | Invoking status precommit hook | |
1987 | A sub/anotherlarge |
|
1987 | A sub/anotherlarge | |
1988 | $ hg log anotherlarge |
|
1988 | $ hg log anotherlarge | |
1989 | changeset: 1:9627a577c5e9 |
|
1989 | changeset: 1:9627a577c5e9 | |
1990 | tag: tip |
|
1990 | tag: tip | |
1991 | user: test |
|
1991 | user: test | |
1992 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1992 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1993 | summary: anotherlarge |
|
1993 | summary: anotherlarge | |
1994 |
|
1994 | |||
1995 | $ echo more >> anotherlarge |
|
1995 | $ echo more >> anotherlarge | |
1996 | $ hg st . |
|
1996 | $ hg st . | |
1997 | M anotherlarge |
|
1997 | M anotherlarge | |
1998 | $ hg cat anotherlarge |
|
1998 | $ hg cat anotherlarge | |
1999 | anotherlarge |
|
1999 | anotherlarge | |
2000 | $ hg revert anotherlarge |
|
2000 | $ hg revert anotherlarge | |
2001 | $ hg st |
|
2001 | $ hg st | |
2002 | ? sub/anotherlarge.orig |
|
2002 | ? sub/anotherlarge.orig | |
2003 | $ cd .. |
|
2003 | $ cd .. | |
2004 |
|
2004 | |||
2005 | $ cd .. |
|
2005 | $ cd .. | |
2006 |
|
2006 | |||
2007 | issue3651: summary/outgoing with largefiles shows "no remote repo" |
|
2007 | issue3651: summary/outgoing with largefiles shows "no remote repo" | |
2008 | unexpectedly |
|
2008 | unexpectedly | |
2009 |
|
2009 | |||
2010 | $ mkdir issue3651 |
|
2010 | $ mkdir issue3651 | |
2011 | $ cd issue3651 |
|
2011 | $ cd issue3651 | |
2012 |
|
2012 | |||
2013 | $ hg init src |
|
2013 | $ hg init src | |
2014 | $ echo a > src/a |
|
2014 | $ echo a > src/a | |
2015 | $ hg -R src add --large src/a |
|
2015 | $ hg -R src add --large src/a | |
2016 | $ hg -R src commit -m '#0' |
|
2016 | $ hg -R src commit -m '#0' | |
2017 | Invoking status precommit hook |
|
2017 | Invoking status precommit hook | |
2018 | A a |
|
2018 | A a | |
2019 |
|
2019 | |||
2020 | check messages when no remote repository is specified: |
|
2020 | check messages when no remote repository is specified: | |
2021 | "no remote repo" route for "hg outgoing --large" is not tested here, |
|
2021 | "no remote repo" route for "hg outgoing --large" is not tested here, | |
2022 | because it can't be reproduced easily. |
|
2022 | because it can't be reproduced easily. | |
2023 |
|
2023 | |||
2024 | $ hg init clone1 |
|
2024 | $ hg init clone1 | |
2025 | $ hg -R clone1 -q pull src |
|
2025 | $ hg -R clone1 -q pull src | |
2026 | $ hg -R clone1 -q update |
|
2026 | $ hg -R clone1 -q update | |
2027 | $ hg -R clone1 paths | grep default |
|
2027 | $ hg -R clone1 paths | grep default | |
2028 | [1] |
|
2028 | [1] | |
2029 |
|
2029 | |||
2030 | $ hg -R clone1 summary --large |
|
2030 | $ hg -R clone1 summary --large | |
2031 | parent: 0:fc0bd45326d3 tip |
|
2031 | parent: 0:fc0bd45326d3 tip | |
2032 | #0 |
|
2032 | #0 | |
2033 | branch: default |
|
2033 | branch: default | |
2034 | commit: (clean) |
|
2034 | commit: (clean) | |
2035 | update: (current) |
|
2035 | update: (current) | |
2036 | largefiles: (no remote repo) |
|
2036 | largefiles: (no remote repo) | |
2037 |
|
2037 | |||
2038 | check messages when there is no files to upload: |
|
2038 | check messages when there is no files to upload: | |
2039 |
|
2039 | |||
2040 | $ hg -q clone src clone2 |
|
2040 | $ hg -q clone src clone2 | |
2041 | $ hg -R clone2 paths | grep default |
|
2041 | $ hg -R clone2 paths | grep default | |
2042 | default = $TESTTMP/issue3651/src (glob) |
|
2042 | default = $TESTTMP/issue3651/src (glob) | |
2043 |
|
2043 | |||
2044 | $ hg -R clone2 summary --large |
|
2044 | $ hg -R clone2 summary --large | |
2045 | parent: 0:fc0bd45326d3 tip |
|
2045 | parent: 0:fc0bd45326d3 tip | |
2046 | #0 |
|
2046 | #0 | |
2047 | branch: default |
|
2047 | branch: default | |
2048 | commit: (clean) |
|
2048 | commit: (clean) | |
2049 | update: (current) |
|
2049 | update: (current) | |
2050 | searching for changes |
|
2050 | searching for changes | |
2051 | largefiles: (no files to upload) |
|
2051 | largefiles: (no files to upload) | |
2052 | $ hg -R clone2 outgoing --large |
|
2052 | $ hg -R clone2 outgoing --large | |
2053 | comparing with $TESTTMP/issue3651/src (glob) |
|
2053 | comparing with $TESTTMP/issue3651/src (glob) | |
2054 | searching for changes |
|
2054 | searching for changes | |
2055 | no changes found |
|
2055 | no changes found | |
2056 | searching for changes |
|
2056 | searching for changes | |
2057 | largefiles: no files to upload |
|
2057 | largefiles: no files to upload | |
2058 | [1] |
|
2058 | [1] | |
2059 |
|
2059 | |||
2060 | check messages when there are files to upload: |
|
2060 | check messages when there are files to upload: | |
2061 |
|
2061 | |||
2062 | $ echo b > clone2/b |
|
2062 | $ echo b > clone2/b | |
2063 | $ hg -R clone2 add --large clone2/b |
|
2063 | $ hg -R clone2 add --large clone2/b | |
2064 | $ hg -R clone2 commit -m '#1' |
|
2064 | $ hg -R clone2 commit -m '#1' | |
2065 | Invoking status precommit hook |
|
2065 | Invoking status precommit hook | |
2066 | A b |
|
2066 | A b | |
2067 | $ hg -R clone2 summary --large |
|
2067 | $ hg -R clone2 summary --large | |
2068 | parent: 1:1acbe71ce432 tip |
|
2068 | parent: 1:1acbe71ce432 tip | |
2069 | #1 |
|
2069 | #1 | |
2070 | branch: default |
|
2070 | branch: default | |
2071 | commit: (clean) |
|
2071 | commit: (clean) | |
2072 | update: (current) |
|
2072 | update: (current) | |
2073 | searching for changes |
|
2073 | searching for changes | |
2074 | largefiles: 1 to upload |
|
2074 | largefiles: 1 to upload | |
2075 | $ hg -R clone2 outgoing --large |
|
2075 | $ hg -R clone2 outgoing --large | |
2076 | comparing with $TESTTMP/issue3651/src (glob) |
|
2076 | comparing with $TESTTMP/issue3651/src (glob) | |
2077 | searching for changes |
|
2077 | searching for changes | |
2078 | changeset: 1:1acbe71ce432 |
|
2078 | changeset: 1:1acbe71ce432 | |
2079 | tag: tip |
|
2079 | tag: tip | |
2080 | user: test |
|
2080 | user: test | |
2081 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2081 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2082 | summary: #1 |
|
2082 | summary: #1 | |
2083 |
|
2083 | |||
2084 | searching for changes |
|
2084 | searching for changes | |
2085 | largefiles to upload: |
|
2085 | largefiles to upload: | |
2086 | b |
|
2086 | b | |
2087 |
|
2087 | |||
2088 |
|
2088 | |||
2089 | $ cd .. |
|
2089 | $ cd .. |
@@ -1,184 +1,184 b'' | |||||
1 | Check that renames are correctly saved by a commit after a merge |
|
1 | Check that renames are correctly saved by a commit after a merge | |
2 |
|
2 | |||
3 | Test with the merge on 3 having the rename on the local parent |
|
3 | Test with the merge on 3 having the rename on the local parent | |
4 |
|
4 | |||
5 | $ hg init a |
|
5 | $ hg init a | |
6 | $ cd a |
|
6 | $ cd a | |
7 |
|
7 | |||
8 | $ echo line1 > foo |
|
8 | $ echo line1 > foo | |
9 | $ hg add foo |
|
9 | $ hg add foo | |
10 | $ hg ci -m '0: add foo' |
|
10 | $ hg ci -m '0: add foo' | |
11 |
|
11 | |||
12 | $ echo line2 >> foo |
|
12 | $ echo line2 >> foo | |
13 | $ hg ci -m '1: change foo' |
|
13 | $ hg ci -m '1: change foo' | |
14 |
|
14 | |||
15 | $ hg up -C 0 |
|
15 | $ hg up -C 0 | |
16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
17 |
|
17 | |||
18 | $ hg mv foo bar |
|
18 | $ hg mv foo bar | |
19 | $ rm bar |
|
19 | $ rm bar | |
20 | $ echo line0 > bar |
|
20 | $ echo line0 > bar | |
21 | $ echo line1 >> bar |
|
21 | $ echo line1 >> bar | |
22 | $ hg ci -m '2: mv foo bar; change bar' |
|
22 | $ hg ci -m '2: mv foo bar; change bar' | |
23 | created new head |
|
23 | created new head | |
24 |
|
24 | |||
25 | $ hg merge 1 |
|
25 | $ hg merge 1 | |
26 | merging bar and foo to bar |
|
26 | merging bar and foo to bar | |
27 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
27 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
28 | (branch merge, don't forget to commit) |
|
28 | (branch merge, don't forget to commit) | |
29 |
|
29 | |||
30 | $ cat bar |
|
30 | $ cat bar | |
31 | line0 |
|
31 | line0 | |
32 | line1 |
|
32 | line1 | |
33 | line2 |
|
33 | line2 | |
34 |
|
34 | |||
35 | $ hg ci -m '3: merge with local rename' |
|
35 | $ hg ci -m '3: merge with local rename' | |
36 |
|
36 | |||
37 | $ hg debugindex bar |
|
37 | $ hg debugindex bar | |
38 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
38 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
39 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) |
|
39 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) | |
40 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) |
|
40 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) | |
41 |
|
41 | |||
42 | $ hg debugrename bar |
|
42 | $ hg debugrename bar | |
43 | bar renamed from foo:9e25c27b87571a1edee5ae4dddee5687746cc8e2 |
|
43 | bar renamed from foo:9e25c27b87571a1edee5ae4dddee5687746cc8e2 | |
44 |
|
44 | |||
45 | $ hg debugindex foo |
|
45 | $ hg debugindex foo | |
46 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
46 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
47 | 0 0 7 ..... 0 690b295714ae 000000000000 000000000000 (re) |
|
47 | 0 0 7 ..... 0 690b295714ae 000000000000 000000000000 (re) | |
48 | 1 7 13 ..... 1 9e25c27b8757 690b295714ae 000000000000 (re) |
|
48 | 1 7 13 ..... 1 9e25c27b8757 690b295714ae 000000000000 (re) | |
49 |
|
49 | |||
50 |
|
50 | |||
51 | Revert the content change from rev 2: |
|
51 | Revert the content change from rev 2: | |
52 |
|
52 | |||
53 | $ hg up -C 2 |
|
53 | $ hg up -C 2 | |
54 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
54 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
55 | $ rm bar |
|
55 | $ rm bar | |
56 | $ echo line1 > bar |
|
56 | $ echo line1 > bar | |
57 | $ hg ci -m '4: revert content change from rev 2' |
|
57 | $ hg ci -m '4: revert content change from rev 2' | |
58 | created new head |
|
58 | created new head | |
59 |
|
59 | |||
60 | $ hg log --template '{rev}:{node|short} {parents}\n' |
|
60 | $ hg log --template '{rev}:{node|short} {parents}\n' | |
61 | 4:2263c1be0967 2:0f2ff26688b9 |
|
61 | 4:2263c1be0967 2:0f2ff26688b9 | |
62 | 3:0555950ead28 2:0f2ff26688b9 1:5cd961e4045d |
|
62 | 3:0555950ead28 2:0f2ff26688b9 1:5cd961e4045d | |
63 | 2:0f2ff26688b9 0:2665aaee66e9 |
|
63 | 2:0f2ff26688b9 0:2665aaee66e9 | |
64 | 1:5cd961e4045d |
|
64 | 1:5cd961e4045d | |
65 | 0:2665aaee66e9 |
|
65 | 0:2665aaee66e9 | |
66 |
|
66 | |||
67 | This should use bar@rev2 as the ancestor: |
|
67 | This should use bar@rev2 as the ancestor: | |
68 |
|
68 | |||
69 | $ hg --debug merge 3 |
|
69 | $ hg --debug merge 3 | |
70 | searching for copies back to rev 1 |
|
70 | searching for copies back to rev 1 | |
71 | resolving manifests |
|
71 | resolving manifests | |
72 |
|
|
72 | branchmerge: True, force: False, partial: False | |
73 | ancestor: 0f2ff26688b9, local: 2263c1be0967+, remote: 0555950ead28 |
|
73 | ancestor: 0f2ff26688b9, local: 2263c1be0967+, remote: 0555950ead28 | |
74 | bar: versions differ -> m |
|
74 | bar: versions differ -> m | |
75 | preserving bar for resolve of bar |
|
75 | preserving bar for resolve of bar | |
76 | updating: bar 1/1 files (100.00%) |
|
76 | updating: bar 1/1 files (100.00%) | |
77 | picked tool 'internal:merge' for bar (binary False symlink False) |
|
77 | picked tool 'internal:merge' for bar (binary False symlink False) | |
78 | merging bar |
|
78 | merging bar | |
79 | my bar@2263c1be0967+ other bar@0555950ead28 ancestor bar@0f2ff26688b9 |
|
79 | my bar@2263c1be0967+ other bar@0555950ead28 ancestor bar@0f2ff26688b9 | |
80 | premerge successful |
|
80 | premerge successful | |
81 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
81 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
82 | (branch merge, don't forget to commit) |
|
82 | (branch merge, don't forget to commit) | |
83 |
|
83 | |||
84 | $ cat bar |
|
84 | $ cat bar | |
85 | line1 |
|
85 | line1 | |
86 | line2 |
|
86 | line2 | |
87 |
|
87 | |||
88 | $ hg ci -m '5: merge' |
|
88 | $ hg ci -m '5: merge' | |
89 |
|
89 | |||
90 | $ hg debugindex bar |
|
90 | $ hg debugindex bar | |
91 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
91 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
92 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) |
|
92 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) | |
93 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) |
|
93 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) | |
94 | 2 153 7 ..... 4 ff4b45017382 d35118874825 000000000000 (re) |
|
94 | 2 153 7 ..... 4 ff4b45017382 d35118874825 000000000000 (re) | |
95 | 3 160 13 ..... 5 3701b4893544 ff4b45017382 5345f5ab8abd (re) |
|
95 | 3 160 13 ..... 5 3701b4893544 ff4b45017382 5345f5ab8abd (re) | |
96 |
|
96 | |||
97 |
|
97 | |||
98 | Same thing, but with the merge on 3 having the rename |
|
98 | Same thing, but with the merge on 3 having the rename | |
99 | on the remote parent: |
|
99 | on the remote parent: | |
100 |
|
100 | |||
101 | $ cd .. |
|
101 | $ cd .. | |
102 | $ hg clone -U -r 1 -r 2 a b |
|
102 | $ hg clone -U -r 1 -r 2 a b | |
103 | adding changesets |
|
103 | adding changesets | |
104 | adding manifests |
|
104 | adding manifests | |
105 | adding file changes |
|
105 | adding file changes | |
106 | added 3 changesets with 3 changes to 2 files (+1 heads) |
|
106 | added 3 changesets with 3 changes to 2 files (+1 heads) | |
107 | $ cd b |
|
107 | $ cd b | |
108 |
|
108 | |||
109 | $ hg up -C 1 |
|
109 | $ hg up -C 1 | |
110 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
110 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
111 |
|
111 | |||
112 | $ hg merge 2 |
|
112 | $ hg merge 2 | |
113 | merging foo and bar to bar |
|
113 | merging foo and bar to bar | |
114 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
114 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
115 | (branch merge, don't forget to commit) |
|
115 | (branch merge, don't forget to commit) | |
116 |
|
116 | |||
117 | $ cat bar |
|
117 | $ cat bar | |
118 | line0 |
|
118 | line0 | |
119 | line1 |
|
119 | line1 | |
120 | line2 |
|
120 | line2 | |
121 |
|
121 | |||
122 | $ hg ci -m '3: merge with remote rename' |
|
122 | $ hg ci -m '3: merge with remote rename' | |
123 |
|
123 | |||
124 | $ hg debugindex bar |
|
124 | $ hg debugindex bar | |
125 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
125 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
126 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) |
|
126 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) | |
127 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) |
|
127 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) | |
128 |
|
128 | |||
129 | $ hg debugrename bar |
|
129 | $ hg debugrename bar | |
130 | bar renamed from foo:9e25c27b87571a1edee5ae4dddee5687746cc8e2 |
|
130 | bar renamed from foo:9e25c27b87571a1edee5ae4dddee5687746cc8e2 | |
131 |
|
131 | |||
132 | $ hg debugindex foo |
|
132 | $ hg debugindex foo | |
133 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
133 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
134 | 0 0 7 ..... 0 690b295714ae 000000000000 000000000000 (re) |
|
134 | 0 0 7 ..... 0 690b295714ae 000000000000 000000000000 (re) | |
135 | 1 7 13 ..... 1 9e25c27b8757 690b295714ae 000000000000 (re) |
|
135 | 1 7 13 ..... 1 9e25c27b8757 690b295714ae 000000000000 (re) | |
136 |
|
136 | |||
137 |
|
137 | |||
138 | Revert the content change from rev 2: |
|
138 | Revert the content change from rev 2: | |
139 |
|
139 | |||
140 | $ hg up -C 2 |
|
140 | $ hg up -C 2 | |
141 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
141 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
142 | $ rm bar |
|
142 | $ rm bar | |
143 | $ echo line1 > bar |
|
143 | $ echo line1 > bar | |
144 | $ hg ci -m '4: revert content change from rev 2' |
|
144 | $ hg ci -m '4: revert content change from rev 2' | |
145 | created new head |
|
145 | created new head | |
146 |
|
146 | |||
147 | $ hg log --template '{rev}:{node|short} {parents}\n' |
|
147 | $ hg log --template '{rev}:{node|short} {parents}\n' | |
148 | 4:2263c1be0967 2:0f2ff26688b9 |
|
148 | 4:2263c1be0967 2:0f2ff26688b9 | |
149 | 3:3ffa6b9e35f0 1:5cd961e4045d 2:0f2ff26688b9 |
|
149 | 3:3ffa6b9e35f0 1:5cd961e4045d 2:0f2ff26688b9 | |
150 | 2:0f2ff26688b9 0:2665aaee66e9 |
|
150 | 2:0f2ff26688b9 0:2665aaee66e9 | |
151 | 1:5cd961e4045d |
|
151 | 1:5cd961e4045d | |
152 | 0:2665aaee66e9 |
|
152 | 0:2665aaee66e9 | |
153 |
|
153 | |||
154 | This should use bar@rev2 as the ancestor: |
|
154 | This should use bar@rev2 as the ancestor: | |
155 |
|
155 | |||
156 | $ hg --debug merge 3 |
|
156 | $ hg --debug merge 3 | |
157 | searching for copies back to rev 1 |
|
157 | searching for copies back to rev 1 | |
158 | resolving manifests |
|
158 | resolving manifests | |
159 |
|
|
159 | branchmerge: True, force: False, partial: False | |
160 | ancestor: 0f2ff26688b9, local: 2263c1be0967+, remote: 3ffa6b9e35f0 |
|
160 | ancestor: 0f2ff26688b9, local: 2263c1be0967+, remote: 3ffa6b9e35f0 | |
161 | bar: versions differ -> m |
|
161 | bar: versions differ -> m | |
162 | preserving bar for resolve of bar |
|
162 | preserving bar for resolve of bar | |
163 | updating: bar 1/1 files (100.00%) |
|
163 | updating: bar 1/1 files (100.00%) | |
164 | picked tool 'internal:merge' for bar (binary False symlink False) |
|
164 | picked tool 'internal:merge' for bar (binary False symlink False) | |
165 | merging bar |
|
165 | merging bar | |
166 | my bar@2263c1be0967+ other bar@3ffa6b9e35f0 ancestor bar@0f2ff26688b9 |
|
166 | my bar@2263c1be0967+ other bar@3ffa6b9e35f0 ancestor bar@0f2ff26688b9 | |
167 | premerge successful |
|
167 | premerge successful | |
168 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
168 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
169 | (branch merge, don't forget to commit) |
|
169 | (branch merge, don't forget to commit) | |
170 |
|
170 | |||
171 | $ cat bar |
|
171 | $ cat bar | |
172 | line1 |
|
172 | line1 | |
173 | line2 |
|
173 | line2 | |
174 |
|
174 | |||
175 | $ hg ci -m '5: merge' |
|
175 | $ hg ci -m '5: merge' | |
176 |
|
176 | |||
177 | $ hg debugindex bar |
|
177 | $ hg debugindex bar | |
178 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
178 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
179 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) |
|
179 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) | |
180 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) |
|
180 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) | |
181 | 2 153 7 ..... 4 ff4b45017382 d35118874825 000000000000 (re) |
|
181 | 2 153 7 ..... 4 ff4b45017382 d35118874825 000000000000 (re) | |
182 | 3 160 13 ..... 5 3701b4893544 ff4b45017382 5345f5ab8abd (re) |
|
182 | 3 160 13 ..... 5 3701b4893544 ff4b45017382 5345f5ab8abd (re) | |
183 |
|
183 | |||
184 | $ cd .. |
|
184 | $ cd .. |
@@ -1,376 +1,376 b'' | |||||
1 | $ "$TESTDIR/hghave" symlink execbit || exit 80 |
|
1 | $ "$TESTDIR/hghave" symlink execbit || exit 80 | |
2 |
|
2 | |||
3 | $ tellmeabout() { |
|
3 | $ tellmeabout() { | |
4 | > if [ -h $1 ]; then |
|
4 | > if [ -h $1 ]; then | |
5 | > echo $1 is a symlink: |
|
5 | > echo $1 is a symlink: | |
6 | > $TESTDIR/readlink.py $1 |
|
6 | > $TESTDIR/readlink.py $1 | |
7 | > elif [ -x $1 ]; then |
|
7 | > elif [ -x $1 ]; then | |
8 | > echo $1 is an executable file with content: |
|
8 | > echo $1 is an executable file with content: | |
9 | > cat $1 |
|
9 | > cat $1 | |
10 | > else |
|
10 | > else | |
11 | > echo $1 is a plain file with content: |
|
11 | > echo $1 is a plain file with content: | |
12 | > cat $1 |
|
12 | > cat $1 | |
13 | > fi |
|
13 | > fi | |
14 | > } |
|
14 | > } | |
15 |
|
15 | |||
16 | $ hg init test1 |
|
16 | $ hg init test1 | |
17 | $ cd test1 |
|
17 | $ cd test1 | |
18 |
|
18 | |||
19 | $ echo a > a |
|
19 | $ echo a > a | |
20 | $ hg ci -Aqmadd |
|
20 | $ hg ci -Aqmadd | |
21 | $ chmod +x a |
|
21 | $ chmod +x a | |
22 | $ hg ci -mexecutable |
|
22 | $ hg ci -mexecutable | |
23 |
|
23 | |||
24 | $ hg up -q 0 |
|
24 | $ hg up -q 0 | |
25 | $ rm a |
|
25 | $ rm a | |
26 | $ ln -s symlink a |
|
26 | $ ln -s symlink a | |
27 | $ hg ci -msymlink |
|
27 | $ hg ci -msymlink | |
28 | created new head |
|
28 | created new head | |
29 |
|
29 | |||
30 | Symlink is local parent, executable is other: |
|
30 | Symlink is local parent, executable is other: | |
31 |
|
31 | |||
32 | $ hg merge --debug |
|
32 | $ hg merge --debug | |
33 | searching for copies back to rev 1 |
|
33 | searching for copies back to rev 1 | |
34 | resolving manifests |
|
34 | resolving manifests | |
35 |
|
|
35 | branchmerge: True, force: False, partial: False | |
36 | ancestor: c334dc3be0da, local: 521a1e40188f+, remote: 3574f3e69b1c |
|
36 | ancestor: c334dc3be0da, local: 521a1e40188f+, remote: 3574f3e69b1c | |
37 | a: versions differ -> m |
|
37 | a: versions differ -> m | |
38 | preserving a for resolve of a |
|
38 | preserving a for resolve of a | |
39 | updating: a 1/1 files (100.00%) |
|
39 | updating: a 1/1 files (100.00%) | |
40 | picked tool 'internal:merge' for a (binary False symlink True) |
|
40 | picked tool 'internal:merge' for a (binary False symlink True) | |
41 | merging a |
|
41 | merging a | |
42 | my a@521a1e40188f+ other a@3574f3e69b1c ancestor a@c334dc3be0da |
|
42 | my a@521a1e40188f+ other a@3574f3e69b1c ancestor a@c334dc3be0da | |
43 | warning: internal:merge cannot merge symlinks for a |
|
43 | warning: internal:merge cannot merge symlinks for a | |
44 | merging a incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
44 | merging a incomplete! (edit conflicts, then use 'hg resolve --mark') | |
45 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
45 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
46 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
46 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
47 | [1] |
|
47 | [1] | |
48 |
|
48 | |||
49 | $ tellmeabout a |
|
49 | $ tellmeabout a | |
50 | a is a symlink: |
|
50 | a is a symlink: | |
51 | a -> symlink |
|
51 | a -> symlink | |
52 | $ hg resolve a --tool internal:other |
|
52 | $ hg resolve a --tool internal:other | |
53 | $ tellmeabout a |
|
53 | $ tellmeabout a | |
54 | a is an executable file with content: |
|
54 | a is an executable file with content: | |
55 | a |
|
55 | a | |
56 | $ hg st |
|
56 | $ hg st | |
57 | M a |
|
57 | M a | |
58 | ? a.orig |
|
58 | ? a.orig | |
59 |
|
59 | |||
60 | Symlink is other parent, executable is local: |
|
60 | Symlink is other parent, executable is local: | |
61 |
|
61 | |||
62 | $ hg update -C 1 |
|
62 | $ hg update -C 1 | |
63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
64 |
|
64 | |||
65 | $ hg merge --debug |
|
65 | $ hg merge --debug | |
66 | searching for copies back to rev 1 |
|
66 | searching for copies back to rev 1 | |
67 | resolving manifests |
|
67 | resolving manifests | |
68 |
|
|
68 | branchmerge: True, force: False, partial: False | |
69 | ancestor: c334dc3be0da, local: 3574f3e69b1c+, remote: 521a1e40188f |
|
69 | ancestor: c334dc3be0da, local: 3574f3e69b1c+, remote: 521a1e40188f | |
70 | a: versions differ -> m |
|
70 | a: versions differ -> m | |
71 | preserving a for resolve of a |
|
71 | preserving a for resolve of a | |
72 | updating: a 1/1 files (100.00%) |
|
72 | updating: a 1/1 files (100.00%) | |
73 | picked tool 'internal:merge' for a (binary False symlink True) |
|
73 | picked tool 'internal:merge' for a (binary False symlink True) | |
74 | merging a |
|
74 | merging a | |
75 | my a@3574f3e69b1c+ other a@521a1e40188f ancestor a@c334dc3be0da |
|
75 | my a@3574f3e69b1c+ other a@521a1e40188f ancestor a@c334dc3be0da | |
76 | warning: internal:merge cannot merge symlinks for a |
|
76 | warning: internal:merge cannot merge symlinks for a | |
77 | merging a incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
77 | merging a incomplete! (edit conflicts, then use 'hg resolve --mark') | |
78 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
78 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
79 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
79 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
80 | [1] |
|
80 | [1] | |
81 |
|
81 | |||
82 | $ tellmeabout a |
|
82 | $ tellmeabout a | |
83 | a is an executable file with content: |
|
83 | a is an executable file with content: | |
84 | a |
|
84 | a | |
85 |
|
85 | |||
86 | Update to link without local change should get us a symlink (issue3316): |
|
86 | Update to link without local change should get us a symlink (issue3316): | |
87 |
|
87 | |||
88 | $ hg up -C 0 |
|
88 | $ hg up -C 0 | |
89 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
89 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
90 | $ hg up |
|
90 | $ hg up | |
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 | $ hg st |
|
92 | $ hg st | |
93 | ? a.orig |
|
93 | ? a.orig | |
94 |
|
94 | |||
95 | Update to link with local change should cause a merge prompt (issue3200): |
|
95 | Update to link with local change should cause a merge prompt (issue3200): | |
96 |
|
96 | |||
97 | $ hg up -Cq 0 |
|
97 | $ hg up -Cq 0 | |
98 | $ echo data > a |
|
98 | $ echo data > a | |
99 | $ HGMERGE= hg up -y --debug |
|
99 | $ HGMERGE= hg up -y --debug | |
100 | searching for copies back to rev 2 |
|
100 | searching for copies back to rev 2 | |
101 | resolving manifests |
|
101 | resolving manifests | |
102 |
|
|
102 | branchmerge: False, force: False, partial: False | |
103 | ancestor: c334dc3be0da, local: c334dc3be0da+, remote: 521a1e40188f |
|
103 | ancestor: c334dc3be0da, local: c334dc3be0da+, remote: 521a1e40188f | |
104 | a: versions differ -> m |
|
104 | a: versions differ -> m | |
105 | preserving a for resolve of a |
|
105 | preserving a for resolve of a | |
106 | updating: a 1/1 files (100.00%) |
|
106 | updating: a 1/1 files (100.00%) | |
107 | (couldn't find merge tool hgmerge|tool hgmerge can't handle symlinks) (re) |
|
107 | (couldn't find merge tool hgmerge|tool hgmerge can't handle symlinks) (re) | |
108 | picked tool 'internal:prompt' for a (binary False symlink True) |
|
108 | picked tool 'internal:prompt' for a (binary False symlink True) | |
109 | no tool found to merge a |
|
109 | no tool found to merge a | |
110 | keep (l)ocal or take (o)ther? l |
|
110 | keep (l)ocal or take (o)ther? l | |
111 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
111 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
112 | $ hg diff --git |
|
112 | $ hg diff --git | |
113 | diff --git a/a b/a |
|
113 | diff --git a/a b/a | |
114 | old mode 120000 |
|
114 | old mode 120000 | |
115 | new mode 100644 |
|
115 | new mode 100644 | |
116 | --- a/a |
|
116 | --- a/a | |
117 | +++ b/a |
|
117 | +++ b/a | |
118 | @@ -1,1 +1,1 @@ |
|
118 | @@ -1,1 +1,1 @@ | |
119 | -symlink |
|
119 | -symlink | |
120 | \ No newline at end of file |
|
120 | \ No newline at end of file | |
121 | +data |
|
121 | +data | |
122 |
|
122 | |||
123 |
|
123 | |||
124 | Test only 'l' change - happens rarely, except when recovering from situations |
|
124 | Test only 'l' change - happens rarely, except when recovering from situations | |
125 | where that was what happened. |
|
125 | where that was what happened. | |
126 |
|
126 | |||
127 | $ hg init test2 |
|
127 | $ hg init test2 | |
128 | $ cd test2 |
|
128 | $ cd test2 | |
129 | $ printf base > f |
|
129 | $ printf base > f | |
130 | $ hg ci -Aqm0 |
|
130 | $ hg ci -Aqm0 | |
131 | $ echo file > f |
|
131 | $ echo file > f | |
132 | $ echo content >> f |
|
132 | $ echo content >> f | |
133 | $ hg ci -qm1 |
|
133 | $ hg ci -qm1 | |
134 | $ hg up -qr0 |
|
134 | $ hg up -qr0 | |
135 | $ rm f |
|
135 | $ rm f | |
136 | $ ln -s base f |
|
136 | $ ln -s base f | |
137 | $ hg ci -qm2 |
|
137 | $ hg ci -qm2 | |
138 | $ hg merge |
|
138 | $ hg merge | |
139 | merging f |
|
139 | merging f | |
140 | warning: internal:merge cannot merge symlinks for f |
|
140 | warning: internal:merge cannot merge symlinks for f | |
141 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
141 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') | |
142 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
142 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
143 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
143 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
144 | [1] |
|
144 | [1] | |
145 | $ tellmeabout f |
|
145 | $ tellmeabout f | |
146 | f is a symlink: |
|
146 | f is a symlink: | |
147 | f -> base |
|
147 | f -> base | |
148 |
|
148 | |||
149 | $ hg up -Cqr1 |
|
149 | $ hg up -Cqr1 | |
150 | $ hg merge |
|
150 | $ hg merge | |
151 | merging f |
|
151 | merging f | |
152 | warning: internal:merge cannot merge symlinks for f |
|
152 | warning: internal:merge cannot merge symlinks for f | |
153 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
153 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') | |
154 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
154 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
155 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
155 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
156 | [1] |
|
156 | [1] | |
157 | $ tellmeabout f |
|
157 | $ tellmeabout f | |
158 | f is a plain file with content: |
|
158 | f is a plain file with content: | |
159 | file |
|
159 | file | |
160 | content |
|
160 | content | |
161 |
|
161 | |||
162 | $ cd .. |
|
162 | $ cd .. | |
163 |
|
163 | |||
164 | Test removed 'x' flag merged with change to symlink |
|
164 | Test removed 'x' flag merged with change to symlink | |
165 |
|
165 | |||
166 | $ hg init test3 |
|
166 | $ hg init test3 | |
167 | $ cd test3 |
|
167 | $ cd test3 | |
168 | $ echo f > f |
|
168 | $ echo f > f | |
169 | $ chmod +x f |
|
169 | $ chmod +x f | |
170 | $ hg ci -Aqm0 |
|
170 | $ hg ci -Aqm0 | |
171 | $ chmod -x f |
|
171 | $ chmod -x f | |
172 | $ hg ci -qm1 |
|
172 | $ hg ci -qm1 | |
173 | $ hg up -qr0 |
|
173 | $ hg up -qr0 | |
174 | $ rm f |
|
174 | $ rm f | |
175 | $ ln -s dangling f |
|
175 | $ ln -s dangling f | |
176 | $ hg ci -qm2 |
|
176 | $ hg ci -qm2 | |
177 | $ hg merge |
|
177 | $ hg merge | |
178 | merging f |
|
178 | merging f | |
179 | warning: internal:merge cannot merge symlinks for f |
|
179 | warning: internal:merge cannot merge symlinks for f | |
180 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
180 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') | |
181 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
181 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
182 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
182 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
183 | [1] |
|
183 | [1] | |
184 | $ tellmeabout f |
|
184 | $ tellmeabout f | |
185 | f is a symlink: |
|
185 | f is a symlink: | |
186 | f -> dangling |
|
186 | f -> dangling | |
187 |
|
187 | |||
188 | $ hg up -Cqr1 |
|
188 | $ hg up -Cqr1 | |
189 | $ hg merge |
|
189 | $ hg merge | |
190 | merging f |
|
190 | merging f | |
191 | warning: internal:merge cannot merge symlinks for f |
|
191 | warning: internal:merge cannot merge symlinks for f | |
192 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
192 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') | |
193 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
193 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
194 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
194 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
195 | [1] |
|
195 | [1] | |
196 | $ tellmeabout f |
|
196 | $ tellmeabout f | |
197 | f is a plain file with content: |
|
197 | f is a plain file with content: | |
198 | f |
|
198 | f | |
199 |
|
199 | |||
200 | Test removed 'x' flag merged with content change - both ways |
|
200 | Test removed 'x' flag merged with content change - both ways | |
201 |
|
201 | |||
202 | $ hg up -Cqr0 |
|
202 | $ hg up -Cqr0 | |
203 | $ echo change > f |
|
203 | $ echo change > f | |
204 | $ hg ci -qm3 |
|
204 | $ hg ci -qm3 | |
205 | $ hg merge -r1 |
|
205 | $ hg merge -r1 | |
206 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
206 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
207 | (branch merge, don't forget to commit) |
|
207 | (branch merge, don't forget to commit) | |
208 | $ tellmeabout f |
|
208 | $ tellmeabout f | |
209 | f is a plain file with content: |
|
209 | f is a plain file with content: | |
210 | change |
|
210 | change | |
211 |
|
211 | |||
212 | $ hg up -qCr1 |
|
212 | $ hg up -qCr1 | |
213 | $ hg merge -r3 |
|
213 | $ hg merge -r3 | |
214 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
214 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
215 | (branch merge, don't forget to commit) |
|
215 | (branch merge, don't forget to commit) | |
216 | $ tellmeabout f |
|
216 | $ tellmeabout f | |
217 | f is a plain file with content: |
|
217 | f is a plain file with content: | |
218 | change |
|
218 | change | |
219 |
|
219 | |||
220 | $ cd .. |
|
220 | $ cd .. | |
221 |
|
221 | |||
222 | Test merge with no common ancestor: |
|
222 | Test merge with no common ancestor: | |
223 | a: just different |
|
223 | a: just different | |
224 | b: x vs -, different (cannot calculate x, cannot ask merge tool) |
|
224 | b: x vs -, different (cannot calculate x, cannot ask merge tool) | |
225 | c: x vs -, same (cannot calculate x, merge tool is no good) |
|
225 | c: x vs -, same (cannot calculate x, merge tool is no good) | |
226 | d: x vs l, different |
|
226 | d: x vs l, different | |
227 | e: x vs l, same |
|
227 | e: x vs l, same | |
228 | f: - vs l, different |
|
228 | f: - vs l, different | |
229 | g: - vs l, same |
|
229 | g: - vs l, same | |
230 | h: l vs l, different |
|
230 | h: l vs l, different | |
231 | (where same means the filelog entry is shared and there thus is an ancestor!) |
|
231 | (where same means the filelog entry is shared and there thus is an ancestor!) | |
232 |
|
232 | |||
233 | $ hg init test4 |
|
233 | $ hg init test4 | |
234 | $ cd test4 |
|
234 | $ cd test4 | |
235 | $ echo 0 > 0 |
|
235 | $ echo 0 > 0 | |
236 | $ hg ci -Aqm0 |
|
236 | $ hg ci -Aqm0 | |
237 |
|
237 | |||
238 | $ echo 1 > a |
|
238 | $ echo 1 > a | |
239 | $ echo 1 > b |
|
239 | $ echo 1 > b | |
240 | $ chmod +x b |
|
240 | $ chmod +x b | |
241 | $ echo x > c |
|
241 | $ echo x > c | |
242 | $ chmod +x c |
|
242 | $ chmod +x c | |
243 | $ echo 1 > d |
|
243 | $ echo 1 > d | |
244 | $ chmod +x d |
|
244 | $ chmod +x d | |
245 | $ printf x > e |
|
245 | $ printf x > e | |
246 | $ chmod +x e |
|
246 | $ chmod +x e | |
247 | $ echo 1 > f |
|
247 | $ echo 1 > f | |
248 | $ printf x > g |
|
248 | $ printf x > g | |
249 | $ ln -s 1 h |
|
249 | $ ln -s 1 h | |
250 | $ hg ci -qAm1 |
|
250 | $ hg ci -qAm1 | |
251 |
|
251 | |||
252 | $ hg up -qr0 |
|
252 | $ hg up -qr0 | |
253 | $ echo 2 > a |
|
253 | $ echo 2 > a | |
254 | $ echo 2 > b |
|
254 | $ echo 2 > b | |
255 | $ echo x > c |
|
255 | $ echo x > c | |
256 | $ ln -s 2 d |
|
256 | $ ln -s 2 d | |
257 | $ ln -s x e |
|
257 | $ ln -s x e | |
258 | $ ln -s 2 f |
|
258 | $ ln -s 2 f | |
259 | $ ln -s x g |
|
259 | $ ln -s x g | |
260 | $ ln -s 2 h |
|
260 | $ ln -s 2 h | |
261 | $ hg ci -Aqm2 |
|
261 | $ hg ci -Aqm2 | |
262 |
|
262 | |||
263 | $ hg merge |
|
263 | $ hg merge | |
264 | merging a |
|
264 | merging a | |
265 | warning: conflicts during merge. |
|
265 | warning: conflicts during merge. | |
266 | merging a incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
266 | merging a incomplete! (edit conflicts, then use 'hg resolve --mark') | |
267 | warning: cannot merge flags for b |
|
267 | warning: cannot merge flags for b | |
268 | merging b |
|
268 | merging b | |
269 | warning: conflicts during merge. |
|
269 | warning: conflicts during merge. | |
270 | merging b incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
270 | merging b incomplete! (edit conflicts, then use 'hg resolve --mark') | |
271 | merging d |
|
271 | merging d | |
272 | warning: internal:merge cannot merge symlinks for d |
|
272 | warning: internal:merge cannot merge symlinks for d | |
273 | merging d incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
273 | merging d incomplete! (edit conflicts, then use 'hg resolve --mark') | |
274 | merging f |
|
274 | merging f | |
275 | warning: internal:merge cannot merge symlinks for f |
|
275 | warning: internal:merge cannot merge symlinks for f | |
276 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
276 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') | |
277 | merging h |
|
277 | merging h | |
278 | warning: internal:merge cannot merge symlinks for h |
|
278 | warning: internal:merge cannot merge symlinks for h | |
279 | merging h incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
279 | merging h incomplete! (edit conflicts, then use 'hg resolve --mark') | |
280 | 3 files updated, 0 files merged, 0 files removed, 5 files unresolved |
|
280 | 3 files updated, 0 files merged, 0 files removed, 5 files unresolved | |
281 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
281 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
282 | [1] |
|
282 | [1] | |
283 | $ hg resolve -l |
|
283 | $ hg resolve -l | |
284 | U a |
|
284 | U a | |
285 | U b |
|
285 | U b | |
286 | U d |
|
286 | U d | |
287 | U f |
|
287 | U f | |
288 | U h |
|
288 | U h | |
289 | $ tellmeabout a |
|
289 | $ tellmeabout a | |
290 | a is a plain file with content: |
|
290 | a is a plain file with content: | |
291 | <<<<<<< local |
|
291 | <<<<<<< local | |
292 | 2 |
|
292 | 2 | |
293 | ======= |
|
293 | ======= | |
294 | 1 |
|
294 | 1 | |
295 | >>>>>>> other |
|
295 | >>>>>>> other | |
296 | $ tellmeabout b |
|
296 | $ tellmeabout b | |
297 | b is a plain file with content: |
|
297 | b is a plain file with content: | |
298 | <<<<<<< local |
|
298 | <<<<<<< local | |
299 | 2 |
|
299 | 2 | |
300 | ======= |
|
300 | ======= | |
301 | 1 |
|
301 | 1 | |
302 | >>>>>>> other |
|
302 | >>>>>>> other | |
303 | $ tellmeabout c |
|
303 | $ tellmeabout c | |
304 | c is a plain file with content: |
|
304 | c is a plain file with content: | |
305 | x |
|
305 | x | |
306 | $ tellmeabout d |
|
306 | $ tellmeabout d | |
307 | d is a symlink: |
|
307 | d is a symlink: | |
308 | d -> 2 |
|
308 | d -> 2 | |
309 | $ tellmeabout e |
|
309 | $ tellmeabout e | |
310 | e is a symlink: |
|
310 | e is a symlink: | |
311 | e -> x |
|
311 | e -> x | |
312 | $ tellmeabout f |
|
312 | $ tellmeabout f | |
313 | f is a symlink: |
|
313 | f is a symlink: | |
314 | f -> 2 |
|
314 | f -> 2 | |
315 | $ tellmeabout g |
|
315 | $ tellmeabout g | |
316 | g is a symlink: |
|
316 | g is a symlink: | |
317 | g -> x |
|
317 | g -> x | |
318 | $ tellmeabout h |
|
318 | $ tellmeabout h | |
319 | h is a symlink: |
|
319 | h is a symlink: | |
320 | h -> 2 |
|
320 | h -> 2 | |
321 |
|
321 | |||
322 | $ hg up -Cqr1 |
|
322 | $ hg up -Cqr1 | |
323 | $ hg merge |
|
323 | $ hg merge | |
324 | merging a |
|
324 | merging a | |
325 | warning: conflicts during merge. |
|
325 | warning: conflicts during merge. | |
326 | merging a incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
326 | merging a incomplete! (edit conflicts, then use 'hg resolve --mark') | |
327 | warning: cannot merge flags for b |
|
327 | warning: cannot merge flags for b | |
328 | merging b |
|
328 | merging b | |
329 | warning: conflicts during merge. |
|
329 | warning: conflicts during merge. | |
330 | merging b incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
330 | merging b incomplete! (edit conflicts, then use 'hg resolve --mark') | |
331 | merging d |
|
331 | merging d | |
332 | warning: internal:merge cannot merge symlinks for d |
|
332 | warning: internal:merge cannot merge symlinks for d | |
333 | merging d incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
333 | merging d incomplete! (edit conflicts, then use 'hg resolve --mark') | |
334 | merging f |
|
334 | merging f | |
335 | warning: internal:merge cannot merge symlinks for f |
|
335 | warning: internal:merge cannot merge symlinks for f | |
336 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
336 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') | |
337 | merging h |
|
337 | merging h | |
338 | warning: internal:merge cannot merge symlinks for h |
|
338 | warning: internal:merge cannot merge symlinks for h | |
339 | merging h incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
339 | merging h incomplete! (edit conflicts, then use 'hg resolve --mark') | |
340 | 3 files updated, 0 files merged, 0 files removed, 5 files unresolved |
|
340 | 3 files updated, 0 files merged, 0 files removed, 5 files unresolved | |
341 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
341 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
342 | [1] |
|
342 | [1] | |
343 | $ tellmeabout a |
|
343 | $ tellmeabout a | |
344 | a is a plain file with content: |
|
344 | a is a plain file with content: | |
345 | <<<<<<< local |
|
345 | <<<<<<< local | |
346 | 1 |
|
346 | 1 | |
347 | ======= |
|
347 | ======= | |
348 | 2 |
|
348 | 2 | |
349 | >>>>>>> other |
|
349 | >>>>>>> other | |
350 | $ tellmeabout b |
|
350 | $ tellmeabout b | |
351 | b is an executable file with content: |
|
351 | b is an executable file with content: | |
352 | <<<<<<< local |
|
352 | <<<<<<< local | |
353 | 1 |
|
353 | 1 | |
354 | ======= |
|
354 | ======= | |
355 | 2 |
|
355 | 2 | |
356 | >>>>>>> other |
|
356 | >>>>>>> other | |
357 | $ tellmeabout c |
|
357 | $ tellmeabout c | |
358 | c is a plain file with content: |
|
358 | c is a plain file with content: | |
359 | x |
|
359 | x | |
360 | $ tellmeabout d |
|
360 | $ tellmeabout d | |
361 | d is an executable file with content: |
|
361 | d is an executable file with content: | |
362 | 1 |
|
362 | 1 | |
363 | $ tellmeabout e |
|
363 | $ tellmeabout e | |
364 | e is an executable file with content: |
|
364 | e is an executable file with content: | |
365 | x (no-eol) |
|
365 | x (no-eol) | |
366 | $ tellmeabout f |
|
366 | $ tellmeabout f | |
367 | f is a plain file with content: |
|
367 | f is a plain file with content: | |
368 | 1 |
|
368 | 1 | |
369 | $ tellmeabout g |
|
369 | $ tellmeabout g | |
370 | g is a plain file with content: |
|
370 | g is a plain file with content: | |
371 | x (no-eol) |
|
371 | x (no-eol) | |
372 | $ tellmeabout h |
|
372 | $ tellmeabout h | |
373 | h is a symlink: |
|
373 | h is a symlink: | |
374 | h -> 1 |
|
374 | h -> 1 | |
375 |
|
375 | |||
376 | $ cd .. |
|
376 | $ cd .. |
@@ -1,147 +1,147 b'' | |||||
1 | initial |
|
1 | initial | |
2 | $ hg init test-a |
|
2 | $ hg init test-a | |
3 | $ cd test-a |
|
3 | $ cd test-a | |
4 | $ cat >test.txt <<"EOF" |
|
4 | $ cat >test.txt <<"EOF" | |
5 | > 1 |
|
5 | > 1 | |
6 | > 2 |
|
6 | > 2 | |
7 | > 3 |
|
7 | > 3 | |
8 | > EOF |
|
8 | > EOF | |
9 | $ hg add test.txt |
|
9 | $ hg add test.txt | |
10 | $ hg commit -m "Initial" |
|
10 | $ hg commit -m "Initial" | |
11 |
|
11 | |||
12 | clone |
|
12 | clone | |
13 | $ cd .. |
|
13 | $ cd .. | |
14 | $ hg clone test-a test-b |
|
14 | $ hg clone test-a test-b | |
15 | updating to branch default |
|
15 | updating to branch default | |
16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
17 |
|
17 | |||
18 | change test-a |
|
18 | change test-a | |
19 | $ cd test-a |
|
19 | $ cd test-a | |
20 | $ cat >test.txt <<"EOF" |
|
20 | $ cat >test.txt <<"EOF" | |
21 | > one |
|
21 | > one | |
22 | > two |
|
22 | > two | |
23 | > three |
|
23 | > three | |
24 | > EOF |
|
24 | > EOF | |
25 | $ hg commit -m "Numbers as words" |
|
25 | $ hg commit -m "Numbers as words" | |
26 |
|
26 | |||
27 | change test-b |
|
27 | change test-b | |
28 | $ cd ../test-b |
|
28 | $ cd ../test-b | |
29 | $ cat >test.txt <<"EOF" |
|
29 | $ cat >test.txt <<"EOF" | |
30 | > 1 |
|
30 | > 1 | |
31 | > 2.5 |
|
31 | > 2.5 | |
32 | > 3 |
|
32 | > 3 | |
33 | > EOF |
|
33 | > EOF | |
34 | $ hg commit -m "2 -> 2.5" |
|
34 | $ hg commit -m "2 -> 2.5" | |
35 |
|
35 | |||
36 | now pull and merge from test-a |
|
36 | now pull and merge from test-a | |
37 | $ hg pull ../test-a |
|
37 | $ hg pull ../test-a | |
38 | pulling from ../test-a |
|
38 | pulling from ../test-a | |
39 | searching for changes |
|
39 | searching for changes | |
40 | adding changesets |
|
40 | adding changesets | |
41 | adding manifests |
|
41 | adding manifests | |
42 | adding file changes |
|
42 | adding file changes | |
43 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
43 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
44 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
44 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
45 | $ hg merge |
|
45 | $ hg merge | |
46 | merging test.txt |
|
46 | merging test.txt | |
47 | warning: conflicts during merge. |
|
47 | warning: conflicts during merge. | |
48 | merging test.txt incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
48 | merging test.txt incomplete! (edit conflicts, then use 'hg resolve --mark') | |
49 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
49 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
50 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
50 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
51 | [1] |
|
51 | [1] | |
52 | resolve conflict |
|
52 | resolve conflict | |
53 | $ cat >test.txt <<"EOF" |
|
53 | $ cat >test.txt <<"EOF" | |
54 | > one |
|
54 | > one | |
55 | > two-point-five |
|
55 | > two-point-five | |
56 | > three |
|
56 | > three | |
57 | > EOF |
|
57 | > EOF | |
58 | $ rm -f *.orig |
|
58 | $ rm -f *.orig | |
59 | $ hg resolve -m test.txt |
|
59 | $ hg resolve -m test.txt | |
60 | $ hg commit -m "Merge 1" |
|
60 | $ hg commit -m "Merge 1" | |
61 |
|
61 | |||
62 | change test-a again |
|
62 | change test-a again | |
63 | $ cd ../test-a |
|
63 | $ cd ../test-a | |
64 | $ cat >test.txt <<"EOF" |
|
64 | $ cat >test.txt <<"EOF" | |
65 | > one |
|
65 | > one | |
66 | > two-point-one |
|
66 | > two-point-one | |
67 | > three |
|
67 | > three | |
68 | > EOF |
|
68 | > EOF | |
69 | $ hg commit -m "two -> two-point-one" |
|
69 | $ hg commit -m "two -> two-point-one" | |
70 |
|
70 | |||
71 | pull and merge from test-a again |
|
71 | pull and merge from test-a again | |
72 | $ cd ../test-b |
|
72 | $ cd ../test-b | |
73 | $ hg pull ../test-a |
|
73 | $ hg pull ../test-a | |
74 | pulling from ../test-a |
|
74 | pulling from ../test-a | |
75 | searching for changes |
|
75 | searching for changes | |
76 | adding changesets |
|
76 | adding changesets | |
77 | adding manifests |
|
77 | adding manifests | |
78 | adding file changes |
|
78 | adding file changes | |
79 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
79 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
80 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
80 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
81 | $ hg merge --debug |
|
81 | $ hg merge --debug | |
82 | searching for copies back to rev 1 |
|
82 | searching for copies back to rev 1 | |
83 | resolving manifests |
|
83 | resolving manifests | |
84 |
|
|
84 | branchmerge: True, force: False, partial: False | |
85 | ancestor: 96b70246a118, local: 50c3a7e29886+, remote: 40d11a4173a8 |
|
85 | ancestor: 96b70246a118, local: 50c3a7e29886+, remote: 40d11a4173a8 | |
86 | test.txt: versions differ -> m |
|
86 | test.txt: versions differ -> m | |
87 | preserving test.txt for resolve of test.txt |
|
87 | preserving test.txt for resolve of test.txt | |
88 | updating: test.txt 1/1 files (100.00%) |
|
88 | updating: test.txt 1/1 files (100.00%) | |
89 | picked tool 'internal:merge' for test.txt (binary False symlink False) |
|
89 | picked tool 'internal:merge' for test.txt (binary False symlink False) | |
90 | merging test.txt |
|
90 | merging test.txt | |
91 | my test.txt@50c3a7e29886+ other test.txt@40d11a4173a8 ancestor test.txt@96b70246a118 |
|
91 | my test.txt@50c3a7e29886+ other test.txt@40d11a4173a8 ancestor test.txt@96b70246a118 | |
92 | warning: conflicts during merge. |
|
92 | warning: conflicts during merge. | |
93 | merging test.txt incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
93 | merging test.txt incomplete! (edit conflicts, then use 'hg resolve --mark') | |
94 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
94 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
95 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
95 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
96 | [1] |
|
96 | [1] | |
97 |
|
97 | |||
98 | $ cat test.txt |
|
98 | $ cat test.txt | |
99 | one |
|
99 | one | |
100 | <<<<<<< local |
|
100 | <<<<<<< local | |
101 | two-point-five |
|
101 | two-point-five | |
102 | ======= |
|
102 | ======= | |
103 | two-point-one |
|
103 | two-point-one | |
104 | >>>>>>> other |
|
104 | >>>>>>> other | |
105 | three |
|
105 | three | |
106 |
|
106 | |||
107 | $ hg debugindex test.txt |
|
107 | $ hg debugindex test.txt | |
108 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
108 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
109 | 0 0 7 ..... 0 01365c4cca56 000000000000 000000000000 (re) |
|
109 | 0 0 7 ..... 0 01365c4cca56 000000000000 000000000000 (re) | |
110 | 1 7 9 ..... 1 7b013192566a 01365c4cca56 000000000000 (re) |
|
110 | 1 7 9 ..... 1 7b013192566a 01365c4cca56 000000000000 (re) | |
111 | 2 16 15 ..... 2 8fe46a3eb557 01365c4cca56 000000000000 (re) |
|
111 | 2 16 15 ..... 2 8fe46a3eb557 01365c4cca56 000000000000 (re) | |
112 | 3 31 2. ..... 3 fc3148072371 7b013192566a 8fe46a3eb557 (re) |
|
112 | 3 31 2. ..... 3 fc3148072371 7b013192566a 8fe46a3eb557 (re) | |
113 | 4 5. 25 ..... 4 d40249267ae3 8fe46a3eb557 000000000000 (re) |
|
113 | 4 5. 25 ..... 4 d40249267ae3 8fe46a3eb557 000000000000 (re) | |
114 |
|
114 | |||
115 | $ hg log |
|
115 | $ hg log | |
116 | changeset: 4:40d11a4173a8 |
|
116 | changeset: 4:40d11a4173a8 | |
117 | tag: tip |
|
117 | tag: tip | |
118 | parent: 2:96b70246a118 |
|
118 | parent: 2:96b70246a118 | |
119 | user: test |
|
119 | user: test | |
120 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
120 | date: Thu Jan 01 00:00:00 1970 +0000 | |
121 | summary: two -> two-point-one |
|
121 | summary: two -> two-point-one | |
122 |
|
122 | |||
123 | changeset: 3:50c3a7e29886 |
|
123 | changeset: 3:50c3a7e29886 | |
124 | parent: 1:d1e159716d41 |
|
124 | parent: 1:d1e159716d41 | |
125 | parent: 2:96b70246a118 |
|
125 | parent: 2:96b70246a118 | |
126 | user: test |
|
126 | user: test | |
127 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
127 | date: Thu Jan 01 00:00:00 1970 +0000 | |
128 | summary: Merge 1 |
|
128 | summary: Merge 1 | |
129 |
|
129 | |||
130 | changeset: 2:96b70246a118 |
|
130 | changeset: 2:96b70246a118 | |
131 | parent: 0:b1832b9d912a |
|
131 | parent: 0:b1832b9d912a | |
132 | user: test |
|
132 | user: test | |
133 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
133 | date: Thu Jan 01 00:00:00 1970 +0000 | |
134 | summary: Numbers as words |
|
134 | summary: Numbers as words | |
135 |
|
135 | |||
136 | changeset: 1:d1e159716d41 |
|
136 | changeset: 1:d1e159716d41 | |
137 | user: test |
|
137 | user: test | |
138 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
138 | date: Thu Jan 01 00:00:00 1970 +0000 | |
139 | summary: 2 -> 2.5 |
|
139 | summary: 2 -> 2.5 | |
140 |
|
140 | |||
141 | changeset: 0:b1832b9d912a |
|
141 | changeset: 0:b1832b9d912a | |
142 | user: test |
|
142 | user: test | |
143 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
143 | date: Thu Jan 01 00:00:00 1970 +0000 | |
144 | summary: Initial |
|
144 | summary: Initial | |
145 |
|
145 | |||
146 |
|
146 | |||
147 | $ cd .. |
|
147 | $ cd .. |
@@ -1,159 +1,159 b'' | |||||
1 | $ hg init t |
|
1 | $ hg init t | |
2 | $ cd t |
|
2 | $ cd t | |
3 |
|
3 | |||
4 | $ mkdir a |
|
4 | $ mkdir a | |
5 | $ echo foo > a/a |
|
5 | $ echo foo > a/a | |
6 | $ echo bar > a/b |
|
6 | $ echo bar > a/b | |
7 | $ hg ci -Am "0" |
|
7 | $ hg ci -Am "0" | |
8 | adding a/a |
|
8 | adding a/a | |
9 | adding a/b |
|
9 | adding a/b | |
10 |
|
10 | |||
11 | $ hg co -C 0 |
|
11 | $ hg co -C 0 | |
12 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
12 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
13 | $ hg mv a b |
|
13 | $ hg mv a b | |
14 | moving a/a to b/a (glob) |
|
14 | moving a/a to b/a (glob) | |
15 | moving a/b to b/b (glob) |
|
15 | moving a/b to b/b (glob) | |
16 | $ hg ci -m "1 mv a/ b/" |
|
16 | $ hg ci -m "1 mv a/ b/" | |
17 |
|
17 | |||
18 | $ hg co -C 0 |
|
18 | $ hg co -C 0 | |
19 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
19 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
20 | $ echo baz > a/c |
|
20 | $ echo baz > a/c | |
21 | $ echo quux > a/d |
|
21 | $ echo quux > a/d | |
22 | $ hg add a/c |
|
22 | $ hg add a/c | |
23 | $ hg ci -m "2 add a/c" |
|
23 | $ hg ci -m "2 add a/c" | |
24 | created new head |
|
24 | created new head | |
25 |
|
25 | |||
26 | $ hg merge --debug 1 |
|
26 | $ hg merge --debug 1 | |
27 | searching for copies back to rev 1 |
|
27 | searching for copies back to rev 1 | |
28 | unmatched files in local: |
|
28 | unmatched files in local: | |
29 | a/c |
|
29 | a/c | |
30 | unmatched files in other: |
|
30 | unmatched files in other: | |
31 | b/a |
|
31 | b/a | |
32 | b/b |
|
32 | b/b | |
33 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
33 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
34 | src: 'a/a' -> dst: 'b/a' |
|
34 | src: 'a/a' -> dst: 'b/a' | |
35 | src: 'a/b' -> dst: 'b/b' |
|
35 | src: 'a/b' -> dst: 'b/b' | |
36 | checking for directory renames |
|
36 | checking for directory renames | |
37 | discovered dir src: 'a/' -> dst: 'b/' |
|
37 | discovered dir src: 'a/' -> dst: 'b/' | |
38 | pending file src: 'a/c' -> dst: 'b/c' |
|
38 | pending file src: 'a/c' -> dst: 'b/c' | |
39 | resolving manifests |
|
39 | resolving manifests | |
40 |
|
|
40 | branchmerge: True, force: False, partial: False | |
41 | ancestor: f9b20c0d4c51, local: ce36d17b18fb+, remote: 397f8b00a740 |
|
41 | ancestor: f9b20c0d4c51, local: ce36d17b18fb+, remote: 397f8b00a740 | |
42 | a/a: other deleted -> r |
|
42 | a/a: other deleted -> r | |
43 | a/b: other deleted -> r |
|
43 | a/b: other deleted -> r | |
44 | a/c: remote renamed directory to b/c -> d |
|
44 | a/c: remote renamed directory to b/c -> d | |
45 | b/a: remote created -> g |
|
45 | b/a: remote created -> g | |
46 | b/b: remote created -> g |
|
46 | b/b: remote created -> g | |
47 | updating: a/a 1/5 files (20.00%) |
|
47 | updating: a/a 1/5 files (20.00%) | |
48 | removing a/a |
|
48 | removing a/a | |
49 | updating: a/b 2/5 files (40.00%) |
|
49 | updating: a/b 2/5 files (40.00%) | |
50 | removing a/b |
|
50 | removing a/b | |
51 | updating: a/c 3/5 files (60.00%) |
|
51 | updating: a/c 3/5 files (60.00%) | |
52 | moving a/c to b/c |
|
52 | moving a/c to b/c | |
53 | updating: b/a 4/5 files (80.00%) |
|
53 | updating: b/a 4/5 files (80.00%) | |
54 | getting b/a |
|
54 | getting b/a | |
55 | updating: b/b 5/5 files (100.00%) |
|
55 | updating: b/b 5/5 files (100.00%) | |
56 | getting b/b |
|
56 | getting b/b | |
57 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
57 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
58 | (branch merge, don't forget to commit) |
|
58 | (branch merge, don't forget to commit) | |
59 |
|
59 | |||
60 | $ echo a/* b/* |
|
60 | $ echo a/* b/* | |
61 | a/d b/a b/b b/c |
|
61 | a/d b/a b/b b/c | |
62 | $ hg st -C |
|
62 | $ hg st -C | |
63 | M b/a |
|
63 | M b/a | |
64 | M b/b |
|
64 | M b/b | |
65 | A b/c |
|
65 | A b/c | |
66 | a/c |
|
66 | a/c | |
67 | R a/a |
|
67 | R a/a | |
68 | R a/b |
|
68 | R a/b | |
69 | R a/c |
|
69 | R a/c | |
70 | ? a/d |
|
70 | ? a/d | |
71 | $ hg ci -m "3 merge 2+1" |
|
71 | $ hg ci -m "3 merge 2+1" | |
72 | $ hg debugrename b/c |
|
72 | $ hg debugrename b/c | |
73 | b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88 (glob) |
|
73 | b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88 (glob) | |
74 |
|
74 | |||
75 | $ hg co -C 1 |
|
75 | $ hg co -C 1 | |
76 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
76 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
77 | $ hg merge --debug 2 |
|
77 | $ hg merge --debug 2 | |
78 | searching for copies back to rev 1 |
|
78 | searching for copies back to rev 1 | |
79 | unmatched files in local: |
|
79 | unmatched files in local: | |
80 | b/a |
|
80 | b/a | |
81 | b/b |
|
81 | b/b | |
82 | unmatched files in other: |
|
82 | unmatched files in other: | |
83 | a/c |
|
83 | a/c | |
84 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
84 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
85 | src: 'a/a' -> dst: 'b/a' |
|
85 | src: 'a/a' -> dst: 'b/a' | |
86 | src: 'a/b' -> dst: 'b/b' |
|
86 | src: 'a/b' -> dst: 'b/b' | |
87 | checking for directory renames |
|
87 | checking for directory renames | |
88 | discovered dir src: 'a/' -> dst: 'b/' |
|
88 | discovered dir src: 'a/' -> dst: 'b/' | |
89 | pending file src: 'a/c' -> dst: 'b/c' |
|
89 | pending file src: 'a/c' -> dst: 'b/c' | |
90 | resolving manifests |
|
90 | resolving manifests | |
91 |
|
|
91 | branchmerge: True, force: False, partial: False | |
92 | ancestor: f9b20c0d4c51, local: 397f8b00a740+, remote: ce36d17b18fb |
|
92 | ancestor: f9b20c0d4c51, local: 397f8b00a740+, remote: ce36d17b18fb | |
93 | None: local renamed directory to b/c -> d |
|
93 | None: local renamed directory to b/c -> d | |
94 | updating:None 1/1 files (100.00%) |
|
94 | updating:None 1/1 files (100.00%) | |
95 | getting a/c to b/c |
|
95 | getting a/c to b/c | |
96 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
96 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
97 | (branch merge, don't forget to commit) |
|
97 | (branch merge, don't forget to commit) | |
98 |
|
98 | |||
99 | $ echo a/* b/* |
|
99 | $ echo a/* b/* | |
100 | a/d b/a b/b b/c |
|
100 | a/d b/a b/b b/c | |
101 | $ hg st -C |
|
101 | $ hg st -C | |
102 | A b/c |
|
102 | A b/c | |
103 | a/c |
|
103 | a/c | |
104 | ? a/d |
|
104 | ? a/d | |
105 | $ hg ci -m "4 merge 1+2" |
|
105 | $ hg ci -m "4 merge 1+2" | |
106 | created new head |
|
106 | created new head | |
107 | $ hg debugrename b/c |
|
107 | $ hg debugrename b/c | |
108 | b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88 (glob) |
|
108 | b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88 (glob) | |
109 |
|
109 | |||
110 |
|
110 | |||
111 | Second scenario with two repos: |
|
111 | Second scenario with two repos: | |
112 |
|
112 | |||
113 | $ cd .. |
|
113 | $ cd .. | |
114 | $ hg init r1 |
|
114 | $ hg init r1 | |
115 | $ cd r1 |
|
115 | $ cd r1 | |
116 | $ mkdir a |
|
116 | $ mkdir a | |
117 | $ echo foo > a/f |
|
117 | $ echo foo > a/f | |
118 | $ hg add a |
|
118 | $ hg add a | |
119 | adding a/f (glob) |
|
119 | adding a/f (glob) | |
120 | $ hg ci -m "a/f == foo" |
|
120 | $ hg ci -m "a/f == foo" | |
121 | $ cd .. |
|
121 | $ cd .. | |
122 |
|
122 | |||
123 | $ hg clone r1 r2 |
|
123 | $ hg clone r1 r2 | |
124 | updating to branch default |
|
124 | updating to branch default | |
125 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
125 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
126 | $ cd r2 |
|
126 | $ cd r2 | |
127 | $ hg mv a b |
|
127 | $ hg mv a b | |
128 | moving a/f to b/f (glob) |
|
128 | moving a/f to b/f (glob) | |
129 | $ echo foo1 > b/f |
|
129 | $ echo foo1 > b/f | |
130 | $ hg ci -m" a -> b, b/f == foo1" |
|
130 | $ hg ci -m" a -> b, b/f == foo1" | |
131 | $ cd .. |
|
131 | $ cd .. | |
132 |
|
132 | |||
133 | $ cd r1 |
|
133 | $ cd r1 | |
134 | $ mkdir a/aa |
|
134 | $ mkdir a/aa | |
135 | $ echo bar > a/aa/g |
|
135 | $ echo bar > a/aa/g | |
136 | $ hg add a/aa |
|
136 | $ hg add a/aa | |
137 | adding a/aa/g (glob) |
|
137 | adding a/aa/g (glob) | |
138 | $ hg ci -m "a/aa/g" |
|
138 | $ hg ci -m "a/aa/g" | |
139 | $ hg pull ../r2 |
|
139 | $ hg pull ../r2 | |
140 | pulling from ../r2 |
|
140 | pulling from ../r2 | |
141 | searching for changes |
|
141 | searching for changes | |
142 | adding changesets |
|
142 | adding changesets | |
143 | adding manifests |
|
143 | adding manifests | |
144 | adding file changes |
|
144 | adding file changes | |
145 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
145 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
146 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
146 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
147 |
|
147 | |||
148 | $ hg merge |
|
148 | $ hg merge | |
149 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
149 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
150 | (branch merge, don't forget to commit) |
|
150 | (branch merge, don't forget to commit) | |
151 |
|
151 | |||
152 | $ hg st -C |
|
152 | $ hg st -C | |
153 | M b/f |
|
153 | M b/f | |
154 | A b/aa/g |
|
154 | A b/aa/g | |
155 | a/aa/g |
|
155 | a/aa/g | |
156 | R a/aa/g |
|
156 | R a/aa/g | |
157 | R a/f |
|
157 | R a/f | |
158 |
|
158 | |||
159 | $ cd .. |
|
159 | $ cd .. |
@@ -1,195 +1,195 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 |
|
2 | |||
3 | $ echo "[merge]" >> .hg/hgrc |
|
3 | $ echo "[merge]" >> .hg/hgrc | |
4 | $ echo "followcopies = 1" >> .hg/hgrc |
|
4 | $ echo "followcopies = 1" >> .hg/hgrc | |
5 |
|
5 | |||
6 | $ echo foo > a |
|
6 | $ echo foo > a | |
7 | $ echo foo > a2 |
|
7 | $ echo foo > a2 | |
8 | $ hg add a a2 |
|
8 | $ hg add a a2 | |
9 | $ hg ci -m "start" |
|
9 | $ hg ci -m "start" | |
10 |
|
10 | |||
11 | $ hg mv a b |
|
11 | $ hg mv a b | |
12 | $ hg mv a2 b2 |
|
12 | $ hg mv a2 b2 | |
13 | $ hg ci -m "rename" |
|
13 | $ hg ci -m "rename" | |
14 |
|
14 | |||
15 | $ hg co 0 |
|
15 | $ hg co 0 | |
16 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
16 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
17 |
|
17 | |||
18 | $ echo blahblah > a |
|
18 | $ echo blahblah > a | |
19 | $ echo blahblah > a2 |
|
19 | $ echo blahblah > a2 | |
20 | $ hg mv a2 c2 |
|
20 | $ hg mv a2 c2 | |
21 | $ hg ci -m "modify" |
|
21 | $ hg ci -m "modify" | |
22 | created new head |
|
22 | created new head | |
23 |
|
23 | |||
24 | $ hg merge -y --debug |
|
24 | $ hg merge -y --debug | |
25 | searching for copies back to rev 1 |
|
25 | searching for copies back to rev 1 | |
26 | unmatched files in local: |
|
26 | unmatched files in local: | |
27 | c2 |
|
27 | c2 | |
28 | unmatched files in other: |
|
28 | unmatched files in other: | |
29 | b |
|
29 | b | |
30 | b2 |
|
30 | b2 | |
31 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
31 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
32 | src: 'a' -> dst: 'b' * |
|
32 | src: 'a' -> dst: 'b' * | |
33 | src: 'a2' -> dst: 'b2' ! |
|
33 | src: 'a2' -> dst: 'b2' ! | |
34 | src: 'a2' -> dst: 'c2' ! |
|
34 | src: 'a2' -> dst: 'c2' ! | |
35 | checking for directory renames |
|
35 | checking for directory renames | |
36 | resolving manifests |
|
36 | resolving manifests | |
37 |
|
|
37 | branchmerge: True, force: False, partial: False | |
38 | ancestor: af1939970a1c, local: 044f8520aeeb+, remote: 85c198ef2f6c |
|
38 | ancestor: af1939970a1c, local: 044f8520aeeb+, remote: 85c198ef2f6c | |
39 | a: remote moved to b -> m |
|
39 | a: remote moved to b -> m | |
40 | preserving a for resolve of b |
|
40 | preserving a for resolve of b | |
41 | a2: divergent renames -> dr |
|
41 | a2: divergent renames -> dr | |
42 | b2: remote created -> g |
|
42 | b2: remote created -> g | |
43 | removing a |
|
43 | removing a | |
44 | updating: a 1/3 files (33.33%) |
|
44 | updating: a 1/3 files (33.33%) | |
45 | picked tool 'internal:merge' for b (binary False symlink False) |
|
45 | picked tool 'internal:merge' for b (binary False symlink False) | |
46 | merging a and b to b |
|
46 | merging a and b to b | |
47 | my b@044f8520aeeb+ other b@85c198ef2f6c ancestor a@af1939970a1c |
|
47 | my b@044f8520aeeb+ other b@85c198ef2f6c ancestor a@af1939970a1c | |
48 | premerge successful |
|
48 | premerge successful | |
49 | updating: a2 2/3 files (66.67%) |
|
49 | updating: a2 2/3 files (66.67%) | |
50 | note: possible conflict - a2 was renamed multiple times to: |
|
50 | note: possible conflict - a2 was renamed multiple times to: | |
51 | c2 |
|
51 | c2 | |
52 | b2 |
|
52 | b2 | |
53 | updating: b2 3/3 files (100.00%) |
|
53 | updating: b2 3/3 files (100.00%) | |
54 | getting b2 |
|
54 | getting b2 | |
55 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
55 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
56 | (branch merge, don't forget to commit) |
|
56 | (branch merge, don't forget to commit) | |
57 |
|
57 | |||
58 | $ hg status -AC |
|
58 | $ hg status -AC | |
59 | M b |
|
59 | M b | |
60 | a |
|
60 | a | |
61 | M b2 |
|
61 | M b2 | |
62 | R a |
|
62 | R a | |
63 | C c2 |
|
63 | C c2 | |
64 |
|
64 | |||
65 | $ cat b |
|
65 | $ cat b | |
66 | blahblah |
|
66 | blahblah | |
67 |
|
67 | |||
68 | $ hg ci -m "merge" |
|
68 | $ hg ci -m "merge" | |
69 |
|
69 | |||
70 | $ hg debugindex b |
|
70 | $ hg debugindex b | |
71 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
71 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
72 | 0 0 67 ..... 1 57eacc201a7f 000000000000 000000000000 (re) |
|
72 | 0 0 67 ..... 1 57eacc201a7f 000000000000 000000000000 (re) | |
73 | 1 67 72 ..... 3 4727ba907962 000000000000 57eacc201a7f (re) |
|
73 | 1 67 72 ..... 3 4727ba907962 000000000000 57eacc201a7f (re) | |
74 |
|
74 | |||
75 | $ hg debugrename b |
|
75 | $ hg debugrename b | |
76 | b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66 |
|
76 | b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66 | |
77 |
|
77 | |||
78 | This used to trigger a "divergent renames" warning, despite no renames |
|
78 | This used to trigger a "divergent renames" warning, despite no renames | |
79 |
|
79 | |||
80 | $ hg cp b b3 |
|
80 | $ hg cp b b3 | |
81 | $ hg cp b b4 |
|
81 | $ hg cp b b4 | |
82 | $ hg ci -A -m 'copy b twice' |
|
82 | $ hg ci -A -m 'copy b twice' | |
83 | $ hg up eb92d88a9712 |
|
83 | $ hg up eb92d88a9712 | |
84 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
84 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
85 | $ hg up |
|
85 | $ hg up | |
86 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
86 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
87 | $ hg rm b3 b4 |
|
87 | $ hg rm b3 b4 | |
88 | $ hg ci -m 'clean up a bit of our mess' |
|
88 | $ hg ci -m 'clean up a bit of our mess' | |
89 |
|
89 | |||
90 | We'd rather not warn on divergent renames done in the same changeset (issue2113) |
|
90 | We'd rather not warn on divergent renames done in the same changeset (issue2113) | |
91 |
|
91 | |||
92 | $ hg cp b b3 |
|
92 | $ hg cp b b3 | |
93 | $ hg mv b b4 |
|
93 | $ hg mv b b4 | |
94 | $ hg ci -A -m 'divergent renames in same changeset' |
|
94 | $ hg ci -A -m 'divergent renames in same changeset' | |
95 | $ hg up c761c6948de0 |
|
95 | $ hg up c761c6948de0 | |
96 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
96 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
97 | $ hg up |
|
97 | $ hg up | |
98 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
98 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
99 |
|
99 | |||
100 | Check for issue2642 |
|
100 | Check for issue2642 | |
101 |
|
101 | |||
102 | $ hg init t |
|
102 | $ hg init t | |
103 | $ cd t |
|
103 | $ cd t | |
104 |
|
104 | |||
105 | $ echo c0 > f1 |
|
105 | $ echo c0 > f1 | |
106 | $ hg ci -Aqm0 |
|
106 | $ hg ci -Aqm0 | |
107 |
|
107 | |||
108 | $ hg up null -q |
|
108 | $ hg up null -q | |
109 | $ echo c1 > f1 # backport |
|
109 | $ echo c1 > f1 # backport | |
110 | $ hg ci -Aqm1 |
|
110 | $ hg ci -Aqm1 | |
111 | $ hg mv f1 f2 |
|
111 | $ hg mv f1 f2 | |
112 | $ hg ci -qm2 |
|
112 | $ hg ci -qm2 | |
113 |
|
113 | |||
114 | $ hg up 0 -q |
|
114 | $ hg up 0 -q | |
115 | $ hg merge 1 -q --tool internal:local |
|
115 | $ hg merge 1 -q --tool internal:local | |
116 | $ hg ci -qm3 |
|
116 | $ hg ci -qm3 | |
117 |
|
117 | |||
118 | $ hg merge 2 |
|
118 | $ hg merge 2 | |
119 | merging f1 and f2 to f2 |
|
119 | merging f1 and f2 to f2 | |
120 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
120 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
121 | (branch merge, don't forget to commit) |
|
121 | (branch merge, don't forget to commit) | |
122 |
|
122 | |||
123 | $ cat f2 |
|
123 | $ cat f2 | |
124 | c0 |
|
124 | c0 | |
125 |
|
125 | |||
126 | $ cd .. |
|
126 | $ cd .. | |
127 |
|
127 | |||
128 | Check for issue2089 |
|
128 | Check for issue2089 | |
129 |
|
129 | |||
130 | $ hg init repo2089 |
|
130 | $ hg init repo2089 | |
131 | $ cd repo2089 |
|
131 | $ cd repo2089 | |
132 |
|
132 | |||
133 | $ echo c0 > f1 |
|
133 | $ echo c0 > f1 | |
134 | $ hg ci -Aqm0 |
|
134 | $ hg ci -Aqm0 | |
135 |
|
135 | |||
136 | $ hg up null -q |
|
136 | $ hg up null -q | |
137 | $ echo c1 > f1 |
|
137 | $ echo c1 > f1 | |
138 | $ hg ci -Aqm1 |
|
138 | $ hg ci -Aqm1 | |
139 |
|
139 | |||
140 | $ hg up 0 -q |
|
140 | $ hg up 0 -q | |
141 | $ hg merge 1 -q --tool internal:local |
|
141 | $ hg merge 1 -q --tool internal:local | |
142 | $ echo c2 > f1 |
|
142 | $ echo c2 > f1 | |
143 | $ hg ci -qm2 |
|
143 | $ hg ci -qm2 | |
144 |
|
144 | |||
145 | $ hg up 1 -q |
|
145 | $ hg up 1 -q | |
146 | $ hg mv f1 f2 |
|
146 | $ hg mv f1 f2 | |
147 | $ hg ci -Aqm3 |
|
147 | $ hg ci -Aqm3 | |
148 |
|
148 | |||
149 | $ hg up 2 -q |
|
149 | $ hg up 2 -q | |
150 | $ hg merge 3 |
|
150 | $ hg merge 3 | |
151 | merging f1 and f2 to f2 |
|
151 | merging f1 and f2 to f2 | |
152 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
152 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
153 | (branch merge, don't forget to commit) |
|
153 | (branch merge, don't forget to commit) | |
154 |
|
154 | |||
155 | $ cat f2 |
|
155 | $ cat f2 | |
156 | c2 |
|
156 | c2 | |
157 |
|
157 | |||
158 | $ cd .. |
|
158 | $ cd .. | |
159 |
|
159 | |||
160 | Check for issue3074 |
|
160 | Check for issue3074 | |
161 |
|
161 | |||
162 | $ hg init repo3074 |
|
162 | $ hg init repo3074 | |
163 | $ cd repo3074 |
|
163 | $ cd repo3074 | |
164 | $ echo foo > file |
|
164 | $ echo foo > file | |
165 | $ hg add file |
|
165 | $ hg add file | |
166 | $ hg commit -m "added file" |
|
166 | $ hg commit -m "added file" | |
167 | $ hg mv file newfile |
|
167 | $ hg mv file newfile | |
168 | $ hg commit -m "renamed file" |
|
168 | $ hg commit -m "renamed file" | |
169 | $ hg update 0 |
|
169 | $ hg update 0 | |
170 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
170 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
171 | $ hg rm file |
|
171 | $ hg rm file | |
172 | $ hg commit -m "deleted file" |
|
172 | $ hg commit -m "deleted file" | |
173 | created new head |
|
173 | created new head | |
174 | $ hg merge --debug |
|
174 | $ hg merge --debug | |
175 | searching for copies back to rev 1 |
|
175 | searching for copies back to rev 1 | |
176 | unmatched files in other: |
|
176 | unmatched files in other: | |
177 | newfile |
|
177 | newfile | |
178 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
178 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
179 | src: 'file' -> dst: 'newfile' % |
|
179 | src: 'file' -> dst: 'newfile' % | |
180 | checking for directory renames |
|
180 | checking for directory renames | |
181 | resolving manifests |
|
181 | resolving manifests | |
182 |
|
|
182 | branchmerge: True, force: False, partial: False | |
183 | ancestor: 19d7f95df299, local: 0084274f6b67+, remote: 5d32493049f0 |
|
183 | ancestor: 19d7f95df299, local: 0084274f6b67+, remote: 5d32493049f0 | |
184 | file: rename and delete -> rd |
|
184 | file: rename and delete -> rd | |
185 | newfile: remote created -> g |
|
185 | newfile: remote created -> g | |
186 | updating: file 1/2 files (50.00%) |
|
186 | updating: file 1/2 files (50.00%) | |
187 | note: possible conflict - file was deleted and renamed to: |
|
187 | note: possible conflict - file was deleted and renamed to: | |
188 | newfile |
|
188 | newfile | |
189 | updating: newfile 2/2 files (100.00%) |
|
189 | updating: newfile 2/2 files (100.00%) | |
190 | getting newfile |
|
190 | getting newfile | |
191 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
191 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
192 | (branch merge, don't forget to commit) |
|
192 | (branch merge, don't forget to commit) | |
193 | $ hg status |
|
193 | $ hg status | |
194 | M newfile |
|
194 | M newfile | |
195 | $ cd .. |
|
195 | $ cd .. |
@@ -1,754 +1,754 b'' | |||||
1 |
|
1 | |||
2 | $ mkdir -p t |
|
2 | $ mkdir -p t | |
3 | $ cd t |
|
3 | $ cd t | |
4 | $ cat <<EOF > merge |
|
4 | $ cat <<EOF > merge | |
5 | > import sys, os |
|
5 | > import sys, os | |
6 | > f = open(sys.argv[1], "wb") |
|
6 | > f = open(sys.argv[1], "wb") | |
7 | > f.write("merge %s %s %s" % (sys.argv[1], sys.argv[2], sys.argv[3])) |
|
7 | > f.write("merge %s %s %s" % (sys.argv[1], sys.argv[2], sys.argv[3])) | |
8 | > f.close() |
|
8 | > f.close() | |
9 | > EOF |
|
9 | > EOF | |
10 |
|
10 | |||
11 | perform a test merge with possible renaming |
|
11 | perform a test merge with possible renaming | |
12 | args: |
|
12 | args: | |
13 | $1 = action in local branch |
|
13 | $1 = action in local branch | |
14 | $2 = action in remote branch |
|
14 | $2 = action in remote branch | |
15 | $3 = action in working dir |
|
15 | $3 = action in working dir | |
16 | $4 = expected result |
|
16 | $4 = expected result | |
17 |
|
17 | |||
18 | $ tm() |
|
18 | $ tm() | |
19 | > { |
|
19 | > { | |
20 | > hg init t |
|
20 | > hg init t | |
21 | > cd t |
|
21 | > cd t | |
22 | > echo "[merge]" >> .hg/hgrc |
|
22 | > echo "[merge]" >> .hg/hgrc | |
23 | > echo "followcopies = 1" >> .hg/hgrc |
|
23 | > echo "followcopies = 1" >> .hg/hgrc | |
24 | > |
|
24 | > | |
25 | > # base |
|
25 | > # base | |
26 | > echo base > a |
|
26 | > echo base > a | |
27 | > echo base > rev # used to force commits |
|
27 | > echo base > rev # used to force commits | |
28 | > hg add a rev |
|
28 | > hg add a rev | |
29 | > hg ci -m "base" |
|
29 | > hg ci -m "base" | |
30 | > |
|
30 | > | |
31 | > # remote |
|
31 | > # remote | |
32 | > echo remote > rev |
|
32 | > echo remote > rev | |
33 | > if [ "$2" != "" ] ; then $2 ; fi |
|
33 | > if [ "$2" != "" ] ; then $2 ; fi | |
34 | > hg ci -m "remote" |
|
34 | > hg ci -m "remote" | |
35 | > |
|
35 | > | |
36 | > # local |
|
36 | > # local | |
37 | > hg co -q 0 |
|
37 | > hg co -q 0 | |
38 | > echo local > rev |
|
38 | > echo local > rev | |
39 | > if [ "$1" != "" ] ; then $1 ; fi |
|
39 | > if [ "$1" != "" ] ; then $1 ; fi | |
40 | > hg ci -m "local" |
|
40 | > hg ci -m "local" | |
41 | > |
|
41 | > | |
42 | > # working dir |
|
42 | > # working dir | |
43 | > echo local > rev |
|
43 | > echo local > rev | |
44 | > if [ "$3" != "" ] ; then $3 ; fi |
|
44 | > if [ "$3" != "" ] ; then $3 ; fi | |
45 | > |
|
45 | > | |
46 | > # merge |
|
46 | > # merge | |
47 | > echo "--------------" |
|
47 | > echo "--------------" | |
48 | > echo "test L:$1 R:$2 W:$3 - $4" |
|
48 | > echo "test L:$1 R:$2 W:$3 - $4" | |
49 | > echo "--------------" |
|
49 | > echo "--------------" | |
50 | > hg merge -y --debug --traceback --tool="python ../merge" |
|
50 | > hg merge -y --debug --traceback --tool="python ../merge" | |
51 | > |
|
51 | > | |
52 | > echo "--------------" |
|
52 | > echo "--------------" | |
53 | > hg status -camC -X rev |
|
53 | > hg status -camC -X rev | |
54 | > |
|
54 | > | |
55 | > hg ci -m "merge" |
|
55 | > hg ci -m "merge" | |
56 | > |
|
56 | > | |
57 | > echo "--------------" |
|
57 | > echo "--------------" | |
58 | > echo |
|
58 | > echo | |
59 | > |
|
59 | > | |
60 | > cd .. |
|
60 | > cd .. | |
61 | > rm -r t |
|
61 | > rm -r t | |
62 | > } |
|
62 | > } | |
63 | $ up() { |
|
63 | $ up() { | |
64 | > cp rev $1 |
|
64 | > cp rev $1 | |
65 | > hg add $1 2> /dev/null |
|
65 | > hg add $1 2> /dev/null | |
66 | > if [ "$2" != "" ] ; then |
|
66 | > if [ "$2" != "" ] ; then | |
67 | > cp rev $2 |
|
67 | > cp rev $2 | |
68 | > hg add $2 2> /dev/null |
|
68 | > hg add $2 2> /dev/null | |
69 | > fi |
|
69 | > fi | |
70 | > } |
|
70 | > } | |
71 | $ uc() { up $1; hg cp $1 $2; } # update + copy |
|
71 | $ uc() { up $1; hg cp $1 $2; } # update + copy | |
72 | $ um() { up $1; hg mv $1 $2; } |
|
72 | $ um() { up $1; hg mv $1 $2; } | |
73 | $ nc() { hg cp $1 $2; } # just copy |
|
73 | $ nc() { hg cp $1 $2; } # just copy | |
74 | $ nm() { hg mv $1 $2; } # just move |
|
74 | $ nm() { hg mv $1 $2; } # just move | |
75 | $ tm "up a " "nc a b" " " "1 get local a to b" |
|
75 | $ tm "up a " "nc a b" " " "1 get local a to b" | |
76 | created new head |
|
76 | created new head | |
77 | -------------- |
|
77 | -------------- | |
78 | test L:up a R:nc a b W: - 1 get local a to b |
|
78 | test L:up a R:nc a b W: - 1 get local a to b | |
79 | -------------- |
|
79 | -------------- | |
80 | searching for copies back to rev 1 |
|
80 | searching for copies back to rev 1 | |
81 | unmatched files in other: |
|
81 | unmatched files in other: | |
82 | b |
|
82 | b | |
83 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
83 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
84 | src: 'a' -> dst: 'b' * |
|
84 | src: 'a' -> dst: 'b' * | |
85 | checking for directory renames |
|
85 | checking for directory renames | |
86 | resolving manifests |
|
86 | resolving manifests | |
87 |
|
|
87 | branchmerge: True, force: False, partial: False | |
88 | ancestor: 924404dff337, local: e300d1c794ec+, remote: 4ce40f5aca24 |
|
88 | ancestor: 924404dff337, local: e300d1c794ec+, remote: 4ce40f5aca24 | |
89 | a: remote copied to b -> m |
|
89 | a: remote copied to b -> m | |
90 | preserving a for resolve of b |
|
90 | preserving a for resolve of b | |
91 | rev: versions differ -> m |
|
91 | rev: versions differ -> m | |
92 | preserving rev for resolve of rev |
|
92 | preserving rev for resolve of rev | |
93 | updating: a 1/2 files (50.00%) |
|
93 | updating: a 1/2 files (50.00%) | |
94 | picked tool 'python ../merge' for b (binary False symlink False) |
|
94 | picked tool 'python ../merge' for b (binary False symlink False) | |
95 | merging a and b to b |
|
95 | merging a and b to b | |
96 | my b@e300d1c794ec+ other b@4ce40f5aca24 ancestor a@924404dff337 |
|
96 | my b@e300d1c794ec+ other b@4ce40f5aca24 ancestor a@924404dff337 | |
97 | premerge successful |
|
97 | premerge successful | |
98 | updating: rev 2/2 files (100.00%) |
|
98 | updating: rev 2/2 files (100.00%) | |
99 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
99 | picked tool 'python ../merge' for rev (binary False symlink False) | |
100 | merging rev |
|
100 | merging rev | |
101 | my rev@e300d1c794ec+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
101 | my rev@e300d1c794ec+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
102 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
102 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
103 | (branch merge, don't forget to commit) |
|
103 | (branch merge, don't forget to commit) | |
104 | -------------- |
|
104 | -------------- | |
105 | M b |
|
105 | M b | |
106 | a |
|
106 | a | |
107 | C a |
|
107 | C a | |
108 | -------------- |
|
108 | -------------- | |
109 |
|
109 | |||
110 | $ tm "nc a b" "up a " " " "2 get rem change to a and b" |
|
110 | $ tm "nc a b" "up a " " " "2 get rem change to a and b" | |
111 | created new head |
|
111 | created new head | |
112 | -------------- |
|
112 | -------------- | |
113 | test L:nc a b R:up a W: - 2 get rem change to a and b |
|
113 | test L:nc a b R:up a W: - 2 get rem change to a and b | |
114 | -------------- |
|
114 | -------------- | |
115 | searching for copies back to rev 1 |
|
115 | searching for copies back to rev 1 | |
116 | unmatched files in local: |
|
116 | unmatched files in local: | |
117 | b |
|
117 | b | |
118 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
118 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
119 | src: 'a' -> dst: 'b' * |
|
119 | src: 'a' -> dst: 'b' * | |
120 | checking for directory renames |
|
120 | checking for directory renames | |
121 | resolving manifests |
|
121 | resolving manifests | |
122 |
|
|
122 | branchmerge: True, force: False, partial: False | |
123 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: f4db7e329e71 |
|
123 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: f4db7e329e71 | |
124 | a: remote is newer -> g |
|
124 | a: remote is newer -> g | |
125 | b: local copied/moved to a -> m |
|
125 | b: local copied/moved to a -> m | |
126 | preserving b for resolve of b |
|
126 | preserving b for resolve of b | |
127 | rev: versions differ -> m |
|
127 | rev: versions differ -> m | |
128 | preserving rev for resolve of rev |
|
128 | preserving rev for resolve of rev | |
129 | updating: a 1/3 files (33.33%) |
|
129 | updating: a 1/3 files (33.33%) | |
130 | getting a |
|
130 | getting a | |
131 | updating: b 2/3 files (66.67%) |
|
131 | updating: b 2/3 files (66.67%) | |
132 | picked tool 'python ../merge' for b (binary False symlink False) |
|
132 | picked tool 'python ../merge' for b (binary False symlink False) | |
133 | merging b and a to b |
|
133 | merging b and a to b | |
134 | my b@86a2aa42fc76+ other a@f4db7e329e71 ancestor a@924404dff337 |
|
134 | my b@86a2aa42fc76+ other a@f4db7e329e71 ancestor a@924404dff337 | |
135 | premerge successful |
|
135 | premerge successful | |
136 | updating: rev 3/3 files (100.00%) |
|
136 | updating: rev 3/3 files (100.00%) | |
137 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
137 | picked tool 'python ../merge' for rev (binary False symlink False) | |
138 | merging rev |
|
138 | merging rev | |
139 | my rev@86a2aa42fc76+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
139 | my rev@86a2aa42fc76+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
140 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
140 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
141 | (branch merge, don't forget to commit) |
|
141 | (branch merge, don't forget to commit) | |
142 | -------------- |
|
142 | -------------- | |
143 | M a |
|
143 | M a | |
144 | M b |
|
144 | M b | |
145 | a |
|
145 | a | |
146 | -------------- |
|
146 | -------------- | |
147 |
|
147 | |||
148 | $ tm "up a " "nm a b" " " "3 get local a change to b, remove a" |
|
148 | $ tm "up a " "nm a b" " " "3 get local a change to b, remove a" | |
149 | created new head |
|
149 | created new head | |
150 | -------------- |
|
150 | -------------- | |
151 | test L:up a R:nm a b W: - 3 get local a change to b, remove a |
|
151 | test L:up a R:nm a b W: - 3 get local a change to b, remove a | |
152 | -------------- |
|
152 | -------------- | |
153 | searching for copies back to rev 1 |
|
153 | searching for copies back to rev 1 | |
154 | unmatched files in other: |
|
154 | unmatched files in other: | |
155 | b |
|
155 | b | |
156 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
156 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
157 | src: 'a' -> dst: 'b' * |
|
157 | src: 'a' -> dst: 'b' * | |
158 | checking for directory renames |
|
158 | checking for directory renames | |
159 | resolving manifests |
|
159 | resolving manifests | |
160 |
|
|
160 | branchmerge: True, force: False, partial: False | |
161 | ancestor: 924404dff337, local: e300d1c794ec+, remote: bdb19105162a |
|
161 | ancestor: 924404dff337, local: e300d1c794ec+, remote: bdb19105162a | |
162 | a: remote moved to b -> m |
|
162 | a: remote moved to b -> m | |
163 | preserving a for resolve of b |
|
163 | preserving a for resolve of b | |
164 | rev: versions differ -> m |
|
164 | rev: versions differ -> m | |
165 | preserving rev for resolve of rev |
|
165 | preserving rev for resolve of rev | |
166 | removing a |
|
166 | removing a | |
167 | updating: a 1/2 files (50.00%) |
|
167 | updating: a 1/2 files (50.00%) | |
168 | picked tool 'python ../merge' for b (binary False symlink False) |
|
168 | picked tool 'python ../merge' for b (binary False symlink False) | |
169 | merging a and b to b |
|
169 | merging a and b to b | |
170 | my b@e300d1c794ec+ other b@bdb19105162a ancestor a@924404dff337 |
|
170 | my b@e300d1c794ec+ other b@bdb19105162a ancestor a@924404dff337 | |
171 | premerge successful |
|
171 | premerge successful | |
172 | updating: rev 2/2 files (100.00%) |
|
172 | updating: rev 2/2 files (100.00%) | |
173 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
173 | picked tool 'python ../merge' for rev (binary False symlink False) | |
174 | merging rev |
|
174 | merging rev | |
175 | my rev@e300d1c794ec+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
175 | my rev@e300d1c794ec+ other rev@bdb19105162a ancestor rev@924404dff337 | |
176 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
176 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
177 | (branch merge, don't forget to commit) |
|
177 | (branch merge, don't forget to commit) | |
178 | -------------- |
|
178 | -------------- | |
179 | M b |
|
179 | M b | |
180 | a |
|
180 | a | |
181 | -------------- |
|
181 | -------------- | |
182 |
|
182 | |||
183 | $ tm "nm a b" "up a " " " "4 get remote change to b" |
|
183 | $ tm "nm a b" "up a " " " "4 get remote change to b" | |
184 | created new head |
|
184 | created new head | |
185 | -------------- |
|
185 | -------------- | |
186 | test L:nm a b R:up a W: - 4 get remote change to b |
|
186 | test L:nm a b R:up a W: - 4 get remote change to b | |
187 | -------------- |
|
187 | -------------- | |
188 | searching for copies back to rev 1 |
|
188 | searching for copies back to rev 1 | |
189 | unmatched files in local: |
|
189 | unmatched files in local: | |
190 | b |
|
190 | b | |
191 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
191 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
192 | src: 'a' -> dst: 'b' * |
|
192 | src: 'a' -> dst: 'b' * | |
193 | checking for directory renames |
|
193 | checking for directory renames | |
194 | resolving manifests |
|
194 | resolving manifests | |
195 |
|
|
195 | branchmerge: True, force: False, partial: False | |
196 | ancestor: 924404dff337, local: 02963e448370+, remote: f4db7e329e71 |
|
196 | ancestor: 924404dff337, local: 02963e448370+, remote: f4db7e329e71 | |
197 | b: local copied/moved to a -> m |
|
197 | b: local copied/moved to a -> m | |
198 | preserving b for resolve of b |
|
198 | preserving b for resolve of b | |
199 | rev: versions differ -> m |
|
199 | rev: versions differ -> m | |
200 | preserving rev for resolve of rev |
|
200 | preserving rev for resolve of rev | |
201 | updating: b 1/2 files (50.00%) |
|
201 | updating: b 1/2 files (50.00%) | |
202 | picked tool 'python ../merge' for b (binary False symlink False) |
|
202 | picked tool 'python ../merge' for b (binary False symlink False) | |
203 | merging b and a to b |
|
203 | merging b and a to b | |
204 | my b@02963e448370+ other a@f4db7e329e71 ancestor a@924404dff337 |
|
204 | my b@02963e448370+ other a@f4db7e329e71 ancestor a@924404dff337 | |
205 | premerge successful |
|
205 | premerge successful | |
206 | updating: rev 2/2 files (100.00%) |
|
206 | updating: rev 2/2 files (100.00%) | |
207 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
207 | picked tool 'python ../merge' for rev (binary False symlink False) | |
208 | merging rev |
|
208 | merging rev | |
209 | my rev@02963e448370+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
209 | my rev@02963e448370+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
210 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
210 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
211 | (branch merge, don't forget to commit) |
|
211 | (branch merge, don't forget to commit) | |
212 | -------------- |
|
212 | -------------- | |
213 | M b |
|
213 | M b | |
214 | a |
|
214 | a | |
215 | -------------- |
|
215 | -------------- | |
216 |
|
216 | |||
217 | $ tm " " "nc a b" " " "5 get b" |
|
217 | $ tm " " "nc a b" " " "5 get b" | |
218 | created new head |
|
218 | created new head | |
219 | -------------- |
|
219 | -------------- | |
220 | test L: R:nc a b W: - 5 get b |
|
220 | test L: R:nc a b W: - 5 get b | |
221 | -------------- |
|
221 | -------------- | |
222 | searching for copies back to rev 1 |
|
222 | searching for copies back to rev 1 | |
223 | unmatched files in other: |
|
223 | unmatched files in other: | |
224 | b |
|
224 | b | |
225 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
225 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
226 | src: 'a' -> dst: 'b' |
|
226 | src: 'a' -> dst: 'b' | |
227 | checking for directory renames |
|
227 | checking for directory renames | |
228 | resolving manifests |
|
228 | resolving manifests | |
229 |
|
|
229 | branchmerge: True, force: False, partial: False | |
230 | ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: 4ce40f5aca24 |
|
230 | ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: 4ce40f5aca24 | |
231 | b: remote created -> g |
|
231 | b: remote created -> g | |
232 | rev: versions differ -> m |
|
232 | rev: versions differ -> m | |
233 | preserving rev for resolve of rev |
|
233 | preserving rev for resolve of rev | |
234 | updating: b 1/2 files (50.00%) |
|
234 | updating: b 1/2 files (50.00%) | |
235 | getting b |
|
235 | getting b | |
236 | updating: rev 2/2 files (100.00%) |
|
236 | updating: rev 2/2 files (100.00%) | |
237 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
237 | picked tool 'python ../merge' for rev (binary False symlink False) | |
238 | merging rev |
|
238 | merging rev | |
239 | my rev@94b33a1b7f2d+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
239 | my rev@94b33a1b7f2d+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
240 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
240 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
241 | (branch merge, don't forget to commit) |
|
241 | (branch merge, don't forget to commit) | |
242 | -------------- |
|
242 | -------------- | |
243 | M b |
|
243 | M b | |
244 | C a |
|
244 | C a | |
245 | -------------- |
|
245 | -------------- | |
246 |
|
246 | |||
247 | $ tm "nc a b" " " " " "6 nothing" |
|
247 | $ tm "nc a b" " " " " "6 nothing" | |
248 | created new head |
|
248 | created new head | |
249 | -------------- |
|
249 | -------------- | |
250 | test L:nc a b R: W: - 6 nothing |
|
250 | test L:nc a b R: W: - 6 nothing | |
251 | -------------- |
|
251 | -------------- | |
252 | searching for copies back to rev 1 |
|
252 | searching for copies back to rev 1 | |
253 | unmatched files in local: |
|
253 | unmatched files in local: | |
254 | b |
|
254 | b | |
255 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
255 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
256 | src: 'a' -> dst: 'b' |
|
256 | src: 'a' -> dst: 'b' | |
257 | checking for directory renames |
|
257 | checking for directory renames | |
258 | resolving manifests |
|
258 | resolving manifests | |
259 |
|
|
259 | branchmerge: True, force: False, partial: False | |
260 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 97c705ade336 |
|
260 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 97c705ade336 | |
261 | rev: versions differ -> m |
|
261 | rev: versions differ -> m | |
262 | preserving rev for resolve of rev |
|
262 | preserving rev for resolve of rev | |
263 | updating: rev 1/1 files (100.00%) |
|
263 | updating: rev 1/1 files (100.00%) | |
264 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
264 | picked tool 'python ../merge' for rev (binary False symlink False) | |
265 | merging rev |
|
265 | merging rev | |
266 | my rev@86a2aa42fc76+ other rev@97c705ade336 ancestor rev@924404dff337 |
|
266 | my rev@86a2aa42fc76+ other rev@97c705ade336 ancestor rev@924404dff337 | |
267 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
267 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
268 | (branch merge, don't forget to commit) |
|
268 | (branch merge, don't forget to commit) | |
269 | -------------- |
|
269 | -------------- | |
270 | C a |
|
270 | C a | |
271 | C b |
|
271 | C b | |
272 | -------------- |
|
272 | -------------- | |
273 |
|
273 | |||
274 | $ tm " " "nm a b" " " "7 get b" |
|
274 | $ tm " " "nm a b" " " "7 get b" | |
275 | created new head |
|
275 | created new head | |
276 | -------------- |
|
276 | -------------- | |
277 | test L: R:nm a b W: - 7 get b |
|
277 | test L: R:nm a b W: - 7 get b | |
278 | -------------- |
|
278 | -------------- | |
279 | searching for copies back to rev 1 |
|
279 | searching for copies back to rev 1 | |
280 | unmatched files in other: |
|
280 | unmatched files in other: | |
281 | b |
|
281 | b | |
282 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
282 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
283 | src: 'a' -> dst: 'b' |
|
283 | src: 'a' -> dst: 'b' | |
284 | checking for directory renames |
|
284 | checking for directory renames | |
285 | resolving manifests |
|
285 | resolving manifests | |
286 |
|
|
286 | branchmerge: True, force: False, partial: False | |
287 | ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: bdb19105162a |
|
287 | ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: bdb19105162a | |
288 | a: other deleted -> r |
|
288 | a: other deleted -> r | |
289 | b: remote created -> g |
|
289 | b: remote created -> g | |
290 | rev: versions differ -> m |
|
290 | rev: versions differ -> m | |
291 | preserving rev for resolve of rev |
|
291 | preserving rev for resolve of rev | |
292 | updating: a 1/3 files (33.33%) |
|
292 | updating: a 1/3 files (33.33%) | |
293 | removing a |
|
293 | removing a | |
294 | updating: b 2/3 files (66.67%) |
|
294 | updating: b 2/3 files (66.67%) | |
295 | getting b |
|
295 | getting b | |
296 | updating: rev 3/3 files (100.00%) |
|
296 | updating: rev 3/3 files (100.00%) | |
297 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
297 | picked tool 'python ../merge' for rev (binary False symlink False) | |
298 | merging rev |
|
298 | merging rev | |
299 | my rev@94b33a1b7f2d+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
299 | my rev@94b33a1b7f2d+ other rev@bdb19105162a ancestor rev@924404dff337 | |
300 | 1 files updated, 1 files merged, 1 files removed, 0 files unresolved |
|
300 | 1 files updated, 1 files merged, 1 files removed, 0 files unresolved | |
301 | (branch merge, don't forget to commit) |
|
301 | (branch merge, don't forget to commit) | |
302 | -------------- |
|
302 | -------------- | |
303 | M b |
|
303 | M b | |
304 | -------------- |
|
304 | -------------- | |
305 |
|
305 | |||
306 | $ tm "nm a b" " " " " "8 nothing" |
|
306 | $ tm "nm a b" " " " " "8 nothing" | |
307 | created new head |
|
307 | created new head | |
308 | -------------- |
|
308 | -------------- | |
309 | test L:nm a b R: W: - 8 nothing |
|
309 | test L:nm a b R: W: - 8 nothing | |
310 | -------------- |
|
310 | -------------- | |
311 | searching for copies back to rev 1 |
|
311 | searching for copies back to rev 1 | |
312 | unmatched files in local: |
|
312 | unmatched files in local: | |
313 | b |
|
313 | b | |
314 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
314 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
315 | src: 'a' -> dst: 'b' |
|
315 | src: 'a' -> dst: 'b' | |
316 | checking for directory renames |
|
316 | checking for directory renames | |
317 | resolving manifests |
|
317 | resolving manifests | |
318 |
|
|
318 | branchmerge: True, force: False, partial: False | |
319 | ancestor: 924404dff337, local: 02963e448370+, remote: 97c705ade336 |
|
319 | ancestor: 924404dff337, local: 02963e448370+, remote: 97c705ade336 | |
320 | rev: versions differ -> m |
|
320 | rev: versions differ -> m | |
321 | preserving rev for resolve of rev |
|
321 | preserving rev for resolve of rev | |
322 | updating: rev 1/1 files (100.00%) |
|
322 | updating: rev 1/1 files (100.00%) | |
323 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
323 | picked tool 'python ../merge' for rev (binary False symlink False) | |
324 | merging rev |
|
324 | merging rev | |
325 | my rev@02963e448370+ other rev@97c705ade336 ancestor rev@924404dff337 |
|
325 | my rev@02963e448370+ other rev@97c705ade336 ancestor rev@924404dff337 | |
326 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
326 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
327 | (branch merge, don't forget to commit) |
|
327 | (branch merge, don't forget to commit) | |
328 | -------------- |
|
328 | -------------- | |
329 | C b |
|
329 | C b | |
330 | -------------- |
|
330 | -------------- | |
331 |
|
331 | |||
332 | $ tm "um a b" "um a b" " " "9 do merge with ancestor in a" |
|
332 | $ tm "um a b" "um a b" " " "9 do merge with ancestor in a" | |
333 | created new head |
|
333 | created new head | |
334 | -------------- |
|
334 | -------------- | |
335 | test L:um a b R:um a b W: - 9 do merge with ancestor in a |
|
335 | test L:um a b R:um a b W: - 9 do merge with ancestor in a | |
336 | -------------- |
|
336 | -------------- | |
337 | searching for copies back to rev 1 |
|
337 | searching for copies back to rev 1 | |
338 | resolving manifests |
|
338 | resolving manifests | |
339 |
|
|
339 | branchmerge: True, force: False, partial: False | |
340 | ancestor: 924404dff337, local: 62e7bf090eba+, remote: 49b6d8032493 |
|
340 | ancestor: 924404dff337, local: 62e7bf090eba+, remote: 49b6d8032493 | |
341 | b: versions differ -> m |
|
341 | b: versions differ -> m | |
342 | preserving b for resolve of b |
|
342 | preserving b for resolve of b | |
343 | rev: versions differ -> m |
|
343 | rev: versions differ -> m | |
344 | preserving rev for resolve of rev |
|
344 | preserving rev for resolve of rev | |
345 | updating: b 1/2 files (50.00%) |
|
345 | updating: b 1/2 files (50.00%) | |
346 | picked tool 'python ../merge' for b (binary False symlink False) |
|
346 | picked tool 'python ../merge' for b (binary False symlink False) | |
347 | merging b |
|
347 | merging b | |
348 | my b@62e7bf090eba+ other b@49b6d8032493 ancestor a@924404dff337 |
|
348 | my b@62e7bf090eba+ other b@49b6d8032493 ancestor a@924404dff337 | |
349 | updating: rev 2/2 files (100.00%) |
|
349 | updating: rev 2/2 files (100.00%) | |
350 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
350 | picked tool 'python ../merge' for rev (binary False symlink False) | |
351 | merging rev |
|
351 | merging rev | |
352 | my rev@62e7bf090eba+ other rev@49b6d8032493 ancestor rev@924404dff337 |
|
352 | my rev@62e7bf090eba+ other rev@49b6d8032493 ancestor rev@924404dff337 | |
353 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
353 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
354 | (branch merge, don't forget to commit) |
|
354 | (branch merge, don't forget to commit) | |
355 | -------------- |
|
355 | -------------- | |
356 | M b |
|
356 | M b | |
357 | -------------- |
|
357 | -------------- | |
358 |
|
358 | |||
359 |
|
359 | |||
360 | m "um a c" "um x c" " " "10 do merge with no ancestor" |
|
360 | m "um a c" "um x c" " " "10 do merge with no ancestor" | |
361 |
|
361 | |||
362 | $ tm "nm a b" "nm a c" " " "11 get c, keep b" |
|
362 | $ tm "nm a b" "nm a c" " " "11 get c, keep b" | |
363 | created new head |
|
363 | created new head | |
364 | -------------- |
|
364 | -------------- | |
365 | test L:nm a b R:nm a c W: - 11 get c, keep b |
|
365 | test L:nm a b R:nm a c W: - 11 get c, keep b | |
366 | -------------- |
|
366 | -------------- | |
367 | searching for copies back to rev 1 |
|
367 | searching for copies back to rev 1 | |
368 | unmatched files in local: |
|
368 | unmatched files in local: | |
369 | b |
|
369 | b | |
370 | unmatched files in other: |
|
370 | unmatched files in other: | |
371 | c |
|
371 | c | |
372 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
372 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
373 | src: 'a' -> dst: 'b' ! |
|
373 | src: 'a' -> dst: 'b' ! | |
374 | src: 'a' -> dst: 'c' ! |
|
374 | src: 'a' -> dst: 'c' ! | |
375 | checking for directory renames |
|
375 | checking for directory renames | |
376 | resolving manifests |
|
376 | resolving manifests | |
377 |
|
|
377 | branchmerge: True, force: False, partial: False | |
378 | ancestor: 924404dff337, local: 02963e448370+, remote: fe905ef2c33e |
|
378 | ancestor: 924404dff337, local: 02963e448370+, remote: fe905ef2c33e | |
379 | a: divergent renames -> dr |
|
379 | a: divergent renames -> dr | |
380 | c: remote created -> g |
|
380 | c: remote created -> g | |
381 | rev: versions differ -> m |
|
381 | rev: versions differ -> m | |
382 | preserving rev for resolve of rev |
|
382 | preserving rev for resolve of rev | |
383 | updating: a 1/3 files (33.33%) |
|
383 | updating: a 1/3 files (33.33%) | |
384 | note: possible conflict - a was renamed multiple times to: |
|
384 | note: possible conflict - a was renamed multiple times to: | |
385 | b |
|
385 | b | |
386 | c |
|
386 | c | |
387 | updating: c 2/3 files (66.67%) |
|
387 | updating: c 2/3 files (66.67%) | |
388 | getting c |
|
388 | getting c | |
389 | updating: rev 3/3 files (100.00%) |
|
389 | updating: rev 3/3 files (100.00%) | |
390 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
390 | picked tool 'python ../merge' for rev (binary False symlink False) | |
391 | merging rev |
|
391 | merging rev | |
392 | my rev@02963e448370+ other rev@fe905ef2c33e ancestor rev@924404dff337 |
|
392 | my rev@02963e448370+ other rev@fe905ef2c33e ancestor rev@924404dff337 | |
393 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
393 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
394 | (branch merge, don't forget to commit) |
|
394 | (branch merge, don't forget to commit) | |
395 | -------------- |
|
395 | -------------- | |
396 | M c |
|
396 | M c | |
397 | C b |
|
397 | C b | |
398 | -------------- |
|
398 | -------------- | |
399 |
|
399 | |||
400 | $ tm "nc a b" "up b " " " "12 merge b no ancestor" |
|
400 | $ tm "nc a b" "up b " " " "12 merge b no ancestor" | |
401 | created new head |
|
401 | created new head | |
402 | -------------- |
|
402 | -------------- | |
403 | test L:nc a b R:up b W: - 12 merge b no ancestor |
|
403 | test L:nc a b R:up b W: - 12 merge b no ancestor | |
404 | -------------- |
|
404 | -------------- | |
405 | searching for copies back to rev 1 |
|
405 | searching for copies back to rev 1 | |
406 | resolving manifests |
|
406 | resolving manifests | |
407 |
|
|
407 | branchmerge: True, force: False, partial: False | |
408 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: af30c7647fc7 |
|
408 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: af30c7647fc7 | |
409 | b: versions differ -> m |
|
409 | b: versions differ -> m | |
410 | preserving b for resolve of b |
|
410 | preserving b for resolve of b | |
411 | rev: versions differ -> m |
|
411 | rev: versions differ -> m | |
412 | preserving rev for resolve of rev |
|
412 | preserving rev for resolve of rev | |
413 | updating: b 1/2 files (50.00%) |
|
413 | updating: b 1/2 files (50.00%) | |
414 | picked tool 'python ../merge' for b (binary False symlink False) |
|
414 | picked tool 'python ../merge' for b (binary False symlink False) | |
415 | merging b |
|
415 | merging b | |
416 | my b@86a2aa42fc76+ other b@af30c7647fc7 ancestor b@000000000000 |
|
416 | my b@86a2aa42fc76+ other b@af30c7647fc7 ancestor b@000000000000 | |
417 | updating: rev 2/2 files (100.00%) |
|
417 | updating: rev 2/2 files (100.00%) | |
418 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
418 | picked tool 'python ../merge' for rev (binary False symlink False) | |
419 | merging rev |
|
419 | merging rev | |
420 | my rev@86a2aa42fc76+ other rev@af30c7647fc7 ancestor rev@924404dff337 |
|
420 | my rev@86a2aa42fc76+ other rev@af30c7647fc7 ancestor rev@924404dff337 | |
421 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
421 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
422 | (branch merge, don't forget to commit) |
|
422 | (branch merge, don't forget to commit) | |
423 | -------------- |
|
423 | -------------- | |
424 | M b |
|
424 | M b | |
425 | C a |
|
425 | C a | |
426 | -------------- |
|
426 | -------------- | |
427 |
|
427 | |||
428 | $ tm "up b " "nm a b" " " "13 merge b no ancestor" |
|
428 | $ tm "up b " "nm a b" " " "13 merge b no ancestor" | |
429 | created new head |
|
429 | created new head | |
430 | -------------- |
|
430 | -------------- | |
431 | test L:up b R:nm a b W: - 13 merge b no ancestor |
|
431 | test L:up b R:nm a b W: - 13 merge b no ancestor | |
432 | -------------- |
|
432 | -------------- | |
433 | searching for copies back to rev 1 |
|
433 | searching for copies back to rev 1 | |
434 | resolving manifests |
|
434 | resolving manifests | |
435 |
|
|
435 | branchmerge: True, force: False, partial: False | |
436 | ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a |
|
436 | ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a | |
437 | a: other deleted -> r |
|
437 | a: other deleted -> r | |
438 | b: versions differ -> m |
|
438 | b: versions differ -> m | |
439 | preserving b for resolve of b |
|
439 | preserving b for resolve of b | |
440 | rev: versions differ -> m |
|
440 | rev: versions differ -> m | |
441 | preserving rev for resolve of rev |
|
441 | preserving rev for resolve of rev | |
442 | updating: a 1/3 files (33.33%) |
|
442 | updating: a 1/3 files (33.33%) | |
443 | removing a |
|
443 | removing a | |
444 | updating: b 2/3 files (66.67%) |
|
444 | updating: b 2/3 files (66.67%) | |
445 | picked tool 'python ../merge' for b (binary False symlink False) |
|
445 | picked tool 'python ../merge' for b (binary False symlink False) | |
446 | merging b |
|
446 | merging b | |
447 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 |
|
447 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 | |
448 | updating: rev 3/3 files (100.00%) |
|
448 | updating: rev 3/3 files (100.00%) | |
449 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
449 | picked tool 'python ../merge' for rev (binary False symlink False) | |
450 | merging rev |
|
450 | merging rev | |
451 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
451 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 | |
452 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved |
|
452 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved | |
453 | (branch merge, don't forget to commit) |
|
453 | (branch merge, don't forget to commit) | |
454 | -------------- |
|
454 | -------------- | |
455 | M b |
|
455 | M b | |
456 | -------------- |
|
456 | -------------- | |
457 |
|
457 | |||
458 | $ tm "nc a b" "up a b" " " "14 merge b no ancestor" |
|
458 | $ tm "nc a b" "up a b" " " "14 merge b no ancestor" | |
459 | created new head |
|
459 | created new head | |
460 | -------------- |
|
460 | -------------- | |
461 | test L:nc a b R:up a b W: - 14 merge b no ancestor |
|
461 | test L:nc a b R:up a b W: - 14 merge b no ancestor | |
462 | -------------- |
|
462 | -------------- | |
463 | searching for copies back to rev 1 |
|
463 | searching for copies back to rev 1 | |
464 | resolving manifests |
|
464 | resolving manifests | |
465 |
|
|
465 | branchmerge: True, force: False, partial: False | |
466 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a |
|
466 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a | |
467 | a: remote is newer -> g |
|
467 | a: remote is newer -> g | |
468 | b: versions differ -> m |
|
468 | b: versions differ -> m | |
469 | preserving b for resolve of b |
|
469 | preserving b for resolve of b | |
470 | rev: versions differ -> m |
|
470 | rev: versions differ -> m | |
471 | preserving rev for resolve of rev |
|
471 | preserving rev for resolve of rev | |
472 | updating: a 1/3 files (33.33%) |
|
472 | updating: a 1/3 files (33.33%) | |
473 | getting a |
|
473 | getting a | |
474 | updating: b 2/3 files (66.67%) |
|
474 | updating: b 2/3 files (66.67%) | |
475 | picked tool 'python ../merge' for b (binary False symlink False) |
|
475 | picked tool 'python ../merge' for b (binary False symlink False) | |
476 | merging b |
|
476 | merging b | |
477 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 |
|
477 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 | |
478 | updating: rev 3/3 files (100.00%) |
|
478 | updating: rev 3/3 files (100.00%) | |
479 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
479 | picked tool 'python ../merge' for rev (binary False symlink False) | |
480 | merging rev |
|
480 | merging rev | |
481 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
481 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 | |
482 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
482 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
483 | (branch merge, don't forget to commit) |
|
483 | (branch merge, don't forget to commit) | |
484 | -------------- |
|
484 | -------------- | |
485 | M a |
|
485 | M a | |
486 | M b |
|
486 | M b | |
487 | -------------- |
|
487 | -------------- | |
488 |
|
488 | |||
489 | $ tm "up b " "nm a b" " " "15 merge b no ancestor, remove a" |
|
489 | $ tm "up b " "nm a b" " " "15 merge b no ancestor, remove a" | |
490 | created new head |
|
490 | created new head | |
491 | -------------- |
|
491 | -------------- | |
492 | test L:up b R:nm a b W: - 15 merge b no ancestor, remove a |
|
492 | test L:up b R:nm a b W: - 15 merge b no ancestor, remove a | |
493 | -------------- |
|
493 | -------------- | |
494 | searching for copies back to rev 1 |
|
494 | searching for copies back to rev 1 | |
495 | resolving manifests |
|
495 | resolving manifests | |
496 |
|
|
496 | branchmerge: True, force: False, partial: False | |
497 | ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a |
|
497 | ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a | |
498 | a: other deleted -> r |
|
498 | a: other deleted -> r | |
499 | b: versions differ -> m |
|
499 | b: versions differ -> m | |
500 | preserving b for resolve of b |
|
500 | preserving b for resolve of b | |
501 | rev: versions differ -> m |
|
501 | rev: versions differ -> m | |
502 | preserving rev for resolve of rev |
|
502 | preserving rev for resolve of rev | |
503 | updating: a 1/3 files (33.33%) |
|
503 | updating: a 1/3 files (33.33%) | |
504 | removing a |
|
504 | removing a | |
505 | updating: b 2/3 files (66.67%) |
|
505 | updating: b 2/3 files (66.67%) | |
506 | picked tool 'python ../merge' for b (binary False symlink False) |
|
506 | picked tool 'python ../merge' for b (binary False symlink False) | |
507 | merging b |
|
507 | merging b | |
508 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 |
|
508 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 | |
509 | updating: rev 3/3 files (100.00%) |
|
509 | updating: rev 3/3 files (100.00%) | |
510 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
510 | picked tool 'python ../merge' for rev (binary False symlink False) | |
511 | merging rev |
|
511 | merging rev | |
512 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
512 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 | |
513 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved |
|
513 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved | |
514 | (branch merge, don't forget to commit) |
|
514 | (branch merge, don't forget to commit) | |
515 | -------------- |
|
515 | -------------- | |
516 | M b |
|
516 | M b | |
517 | -------------- |
|
517 | -------------- | |
518 |
|
518 | |||
519 | $ tm "nc a b" "up a b" " " "16 get a, merge b no ancestor" |
|
519 | $ tm "nc a b" "up a b" " " "16 get a, merge b no ancestor" | |
520 | created new head |
|
520 | created new head | |
521 | -------------- |
|
521 | -------------- | |
522 | test L:nc a b R:up a b W: - 16 get a, merge b no ancestor |
|
522 | test L:nc a b R:up a b W: - 16 get a, merge b no ancestor | |
523 | -------------- |
|
523 | -------------- | |
524 | searching for copies back to rev 1 |
|
524 | searching for copies back to rev 1 | |
525 | resolving manifests |
|
525 | resolving manifests | |
526 |
|
|
526 | branchmerge: True, force: False, partial: False | |
527 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a |
|
527 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a | |
528 | a: remote is newer -> g |
|
528 | a: remote is newer -> g | |
529 | b: versions differ -> m |
|
529 | b: versions differ -> m | |
530 | preserving b for resolve of b |
|
530 | preserving b for resolve of b | |
531 | rev: versions differ -> m |
|
531 | rev: versions differ -> m | |
532 | preserving rev for resolve of rev |
|
532 | preserving rev for resolve of rev | |
533 | updating: a 1/3 files (33.33%) |
|
533 | updating: a 1/3 files (33.33%) | |
534 | getting a |
|
534 | getting a | |
535 | updating: b 2/3 files (66.67%) |
|
535 | updating: b 2/3 files (66.67%) | |
536 | picked tool 'python ../merge' for b (binary False symlink False) |
|
536 | picked tool 'python ../merge' for b (binary False symlink False) | |
537 | merging b |
|
537 | merging b | |
538 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 |
|
538 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 | |
539 | updating: rev 3/3 files (100.00%) |
|
539 | updating: rev 3/3 files (100.00%) | |
540 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
540 | picked tool 'python ../merge' for rev (binary False symlink False) | |
541 | merging rev |
|
541 | merging rev | |
542 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
542 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 | |
543 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
543 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
544 | (branch merge, don't forget to commit) |
|
544 | (branch merge, don't forget to commit) | |
545 | -------------- |
|
545 | -------------- | |
546 | M a |
|
546 | M a | |
547 | M b |
|
547 | M b | |
548 | -------------- |
|
548 | -------------- | |
549 |
|
549 | |||
550 | $ tm "up a b" "nc a b" " " "17 keep a, merge b no ancestor" |
|
550 | $ tm "up a b" "nc a b" " " "17 keep a, merge b no ancestor" | |
551 | created new head |
|
551 | created new head | |
552 | -------------- |
|
552 | -------------- | |
553 | test L:up a b R:nc a b W: - 17 keep a, merge b no ancestor |
|
553 | test L:up a b R:nc a b W: - 17 keep a, merge b no ancestor | |
554 | -------------- |
|
554 | -------------- | |
555 | searching for copies back to rev 1 |
|
555 | searching for copies back to rev 1 | |
556 | resolving manifests |
|
556 | resolving manifests | |
557 |
|
|
557 | branchmerge: True, force: False, partial: False | |
558 | ancestor: 924404dff337, local: 0b76e65c8289+, remote: 4ce40f5aca24 |
|
558 | ancestor: 924404dff337, local: 0b76e65c8289+, remote: 4ce40f5aca24 | |
559 | b: versions differ -> m |
|
559 | b: versions differ -> m | |
560 | preserving b for resolve of b |
|
560 | preserving b for resolve of b | |
561 | rev: versions differ -> m |
|
561 | rev: versions differ -> m | |
562 | preserving rev for resolve of rev |
|
562 | preserving rev for resolve of rev | |
563 | updating: b 1/2 files (50.00%) |
|
563 | updating: b 1/2 files (50.00%) | |
564 | picked tool 'python ../merge' for b (binary False symlink False) |
|
564 | picked tool 'python ../merge' for b (binary False symlink False) | |
565 | merging b |
|
565 | merging b | |
566 | my b@0b76e65c8289+ other b@4ce40f5aca24 ancestor b@000000000000 |
|
566 | my b@0b76e65c8289+ other b@4ce40f5aca24 ancestor b@000000000000 | |
567 | updating: rev 2/2 files (100.00%) |
|
567 | updating: rev 2/2 files (100.00%) | |
568 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
568 | picked tool 'python ../merge' for rev (binary False symlink False) | |
569 | merging rev |
|
569 | merging rev | |
570 | my rev@0b76e65c8289+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
570 | my rev@0b76e65c8289+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
571 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
571 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
572 | (branch merge, don't forget to commit) |
|
572 | (branch merge, don't forget to commit) | |
573 | -------------- |
|
573 | -------------- | |
574 | M b |
|
574 | M b | |
575 | C a |
|
575 | C a | |
576 | -------------- |
|
576 | -------------- | |
577 |
|
577 | |||
578 | $ tm "nm a b" "up a b" " " "18 merge b no ancestor" |
|
578 | $ tm "nm a b" "up a b" " " "18 merge b no ancestor" | |
579 | created new head |
|
579 | created new head | |
580 | -------------- |
|
580 | -------------- | |
581 | test L:nm a b R:up a b W: - 18 merge b no ancestor |
|
581 | test L:nm a b R:up a b W: - 18 merge b no ancestor | |
582 | -------------- |
|
582 | -------------- | |
583 | searching for copies back to rev 1 |
|
583 | searching for copies back to rev 1 | |
584 | resolving manifests |
|
584 | resolving manifests | |
585 |
|
|
585 | branchmerge: True, force: False, partial: False | |
586 | ancestor: 924404dff337, local: 02963e448370+, remote: 8dbce441892a |
|
586 | ancestor: 924404dff337, local: 02963e448370+, remote: 8dbce441892a | |
587 | remote changed a which local deleted |
|
587 | remote changed a which local deleted | |
588 | use (c)hanged version or leave (d)eleted? c |
|
588 | use (c)hanged version or leave (d)eleted? c | |
589 | a: prompt recreating -> g |
|
589 | a: prompt recreating -> g | |
590 | b: versions differ -> m |
|
590 | b: versions differ -> m | |
591 | preserving b for resolve of b |
|
591 | preserving b for resolve of b | |
592 | rev: versions differ -> m |
|
592 | rev: versions differ -> m | |
593 | preserving rev for resolve of rev |
|
593 | preserving rev for resolve of rev | |
594 | updating: a 1/3 files (33.33%) |
|
594 | updating: a 1/3 files (33.33%) | |
595 | getting a |
|
595 | getting a | |
596 | updating: b 2/3 files (66.67%) |
|
596 | updating: b 2/3 files (66.67%) | |
597 | picked tool 'python ../merge' for b (binary False symlink False) |
|
597 | picked tool 'python ../merge' for b (binary False symlink False) | |
598 | merging b |
|
598 | merging b | |
599 | my b@02963e448370+ other b@8dbce441892a ancestor b@000000000000 |
|
599 | my b@02963e448370+ other b@8dbce441892a ancestor b@000000000000 | |
600 | updating: rev 3/3 files (100.00%) |
|
600 | updating: rev 3/3 files (100.00%) | |
601 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
601 | picked tool 'python ../merge' for rev (binary False symlink False) | |
602 | merging rev |
|
602 | merging rev | |
603 | my rev@02963e448370+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
603 | my rev@02963e448370+ other rev@8dbce441892a ancestor rev@924404dff337 | |
604 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
604 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
605 | (branch merge, don't forget to commit) |
|
605 | (branch merge, don't forget to commit) | |
606 | -------------- |
|
606 | -------------- | |
607 | M a |
|
607 | M a | |
608 | M b |
|
608 | M b | |
609 | -------------- |
|
609 | -------------- | |
610 |
|
610 | |||
611 | $ tm "up a b" "nm a b" " " "19 merge b no ancestor, prompt remove a" |
|
611 | $ tm "up a b" "nm a b" " " "19 merge b no ancestor, prompt remove a" | |
612 | created new head |
|
612 | created new head | |
613 | -------------- |
|
613 | -------------- | |
614 | test L:up a b R:nm a b W: - 19 merge b no ancestor, prompt remove a |
|
614 | test L:up a b R:nm a b W: - 19 merge b no ancestor, prompt remove a | |
615 | -------------- |
|
615 | -------------- | |
616 | searching for copies back to rev 1 |
|
616 | searching for copies back to rev 1 | |
617 | resolving manifests |
|
617 | resolving manifests | |
618 |
|
|
618 | branchmerge: True, force: False, partial: False | |
619 | ancestor: 924404dff337, local: 0b76e65c8289+, remote: bdb19105162a |
|
619 | ancestor: 924404dff337, local: 0b76e65c8289+, remote: bdb19105162a | |
620 | local changed a which remote deleted |
|
620 | local changed a which remote deleted | |
621 | use (c)hanged version or (d)elete? c |
|
621 | use (c)hanged version or (d)elete? c | |
622 | a: prompt keep -> a |
|
622 | a: prompt keep -> a | |
623 | b: versions differ -> m |
|
623 | b: versions differ -> m | |
624 | preserving b for resolve of b |
|
624 | preserving b for resolve of b | |
625 | rev: versions differ -> m |
|
625 | rev: versions differ -> m | |
626 | preserving rev for resolve of rev |
|
626 | preserving rev for resolve of rev | |
627 | updating: a 1/3 files (33.33%) |
|
627 | updating: a 1/3 files (33.33%) | |
628 | updating: b 2/3 files (66.67%) |
|
628 | updating: b 2/3 files (66.67%) | |
629 | picked tool 'python ../merge' for b (binary False symlink False) |
|
629 | picked tool 'python ../merge' for b (binary False symlink False) | |
630 | merging b |
|
630 | merging b | |
631 | my b@0b76e65c8289+ other b@bdb19105162a ancestor b@000000000000 |
|
631 | my b@0b76e65c8289+ other b@bdb19105162a ancestor b@000000000000 | |
632 | updating: rev 3/3 files (100.00%) |
|
632 | updating: rev 3/3 files (100.00%) | |
633 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
633 | picked tool 'python ../merge' for rev (binary False symlink False) | |
634 | merging rev |
|
634 | merging rev | |
635 | my rev@0b76e65c8289+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
635 | my rev@0b76e65c8289+ other rev@bdb19105162a ancestor rev@924404dff337 | |
636 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
636 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
637 | (branch merge, don't forget to commit) |
|
637 | (branch merge, don't forget to commit) | |
638 | -------------- |
|
638 | -------------- | |
639 | M b |
|
639 | M b | |
640 | C a |
|
640 | C a | |
641 | -------------- |
|
641 | -------------- | |
642 |
|
642 | |||
643 | $ tm "up a " "um a b" " " "20 merge a and b to b, remove a" |
|
643 | $ tm "up a " "um a b" " " "20 merge a and b to b, remove a" | |
644 | created new head |
|
644 | created new head | |
645 | -------------- |
|
645 | -------------- | |
646 | test L:up a R:um a b W: - 20 merge a and b to b, remove a |
|
646 | test L:up a R:um a b W: - 20 merge a and b to b, remove a | |
647 | -------------- |
|
647 | -------------- | |
648 | searching for copies back to rev 1 |
|
648 | searching for copies back to rev 1 | |
649 | unmatched files in other: |
|
649 | unmatched files in other: | |
650 | b |
|
650 | b | |
651 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
651 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
652 | src: 'a' -> dst: 'b' * |
|
652 | src: 'a' -> dst: 'b' * | |
653 | checking for directory renames |
|
653 | checking for directory renames | |
654 | resolving manifests |
|
654 | resolving manifests | |
655 |
|
|
655 | branchmerge: True, force: False, partial: False | |
656 | ancestor: 924404dff337, local: e300d1c794ec+, remote: 49b6d8032493 |
|
656 | ancestor: 924404dff337, local: e300d1c794ec+, remote: 49b6d8032493 | |
657 | a: remote moved to b -> m |
|
657 | a: remote moved to b -> m | |
658 | preserving a for resolve of b |
|
658 | preserving a for resolve of b | |
659 | rev: versions differ -> m |
|
659 | rev: versions differ -> m | |
660 | preserving rev for resolve of rev |
|
660 | preserving rev for resolve of rev | |
661 | removing a |
|
661 | removing a | |
662 | updating: a 1/2 files (50.00%) |
|
662 | updating: a 1/2 files (50.00%) | |
663 | picked tool 'python ../merge' for b (binary False symlink False) |
|
663 | picked tool 'python ../merge' for b (binary False symlink False) | |
664 | merging a and b to b |
|
664 | merging a and b to b | |
665 | my b@e300d1c794ec+ other b@49b6d8032493 ancestor a@924404dff337 |
|
665 | my b@e300d1c794ec+ other b@49b6d8032493 ancestor a@924404dff337 | |
666 | updating: rev 2/2 files (100.00%) |
|
666 | updating: rev 2/2 files (100.00%) | |
667 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
667 | picked tool 'python ../merge' for rev (binary False symlink False) | |
668 | merging rev |
|
668 | merging rev | |
669 | my rev@e300d1c794ec+ other rev@49b6d8032493 ancestor rev@924404dff337 |
|
669 | my rev@e300d1c794ec+ other rev@49b6d8032493 ancestor rev@924404dff337 | |
670 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
670 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
671 | (branch merge, don't forget to commit) |
|
671 | (branch merge, don't forget to commit) | |
672 | -------------- |
|
672 | -------------- | |
673 | M b |
|
673 | M b | |
674 | a |
|
674 | a | |
675 | -------------- |
|
675 | -------------- | |
676 |
|
676 | |||
677 | $ tm "um a b" "up a " " " "21 merge a and b to b" |
|
677 | $ tm "um a b" "up a " " " "21 merge a and b to b" | |
678 | created new head |
|
678 | created new head | |
679 | -------------- |
|
679 | -------------- | |
680 | test L:um a b R:up a W: - 21 merge a and b to b |
|
680 | test L:um a b R:up a W: - 21 merge a and b to b | |
681 | -------------- |
|
681 | -------------- | |
682 | searching for copies back to rev 1 |
|
682 | searching for copies back to rev 1 | |
683 | unmatched files in local: |
|
683 | unmatched files in local: | |
684 | b |
|
684 | b | |
685 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
685 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
686 | src: 'a' -> dst: 'b' * |
|
686 | src: 'a' -> dst: 'b' * | |
687 | checking for directory renames |
|
687 | checking for directory renames | |
688 | resolving manifests |
|
688 | resolving manifests | |
689 |
|
|
689 | branchmerge: True, force: False, partial: False | |
690 | ancestor: 924404dff337, local: 62e7bf090eba+, remote: f4db7e329e71 |
|
690 | ancestor: 924404dff337, local: 62e7bf090eba+, remote: f4db7e329e71 | |
691 | b: local copied/moved to a -> m |
|
691 | b: local copied/moved to a -> m | |
692 | preserving b for resolve of b |
|
692 | preserving b for resolve of b | |
693 | rev: versions differ -> m |
|
693 | rev: versions differ -> m | |
694 | preserving rev for resolve of rev |
|
694 | preserving rev for resolve of rev | |
695 | updating: b 1/2 files (50.00%) |
|
695 | updating: b 1/2 files (50.00%) | |
696 | picked tool 'python ../merge' for b (binary False symlink False) |
|
696 | picked tool 'python ../merge' for b (binary False symlink False) | |
697 | merging b and a to b |
|
697 | merging b and a to b | |
698 | my b@62e7bf090eba+ other a@f4db7e329e71 ancestor a@924404dff337 |
|
698 | my b@62e7bf090eba+ other a@f4db7e329e71 ancestor a@924404dff337 | |
699 | updating: rev 2/2 files (100.00%) |
|
699 | updating: rev 2/2 files (100.00%) | |
700 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
700 | picked tool 'python ../merge' for rev (binary False symlink False) | |
701 | merging rev |
|
701 | merging rev | |
702 | my rev@62e7bf090eba+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
702 | my rev@62e7bf090eba+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
703 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
703 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
704 | (branch merge, don't forget to commit) |
|
704 | (branch merge, don't forget to commit) | |
705 | -------------- |
|
705 | -------------- | |
706 | M b |
|
706 | M b | |
707 | a |
|
707 | a | |
708 | -------------- |
|
708 | -------------- | |
709 |
|
709 | |||
710 |
|
710 | |||
711 | m "nm a b" "um x a" " " "22 get a, keep b" |
|
711 | m "nm a b" "um x a" " " "22 get a, keep b" | |
712 |
|
712 | |||
713 | $ tm "nm a b" "up a c" " " "23 get c, keep b" |
|
713 | $ tm "nm a b" "up a c" " " "23 get c, keep b" | |
714 | created new head |
|
714 | created new head | |
715 | -------------- |
|
715 | -------------- | |
716 | test L:nm a b R:up a c W: - 23 get c, keep b |
|
716 | test L:nm a b R:up a c W: - 23 get c, keep b | |
717 | -------------- |
|
717 | -------------- | |
718 | searching for copies back to rev 1 |
|
718 | searching for copies back to rev 1 | |
719 | unmatched files in local: |
|
719 | unmatched files in local: | |
720 | b |
|
720 | b | |
721 | unmatched files in other: |
|
721 | unmatched files in other: | |
722 | c |
|
722 | c | |
723 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
723 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
724 | src: 'a' -> dst: 'b' * |
|
724 | src: 'a' -> dst: 'b' * | |
725 | checking for directory renames |
|
725 | checking for directory renames | |
726 | resolving manifests |
|
726 | resolving manifests | |
727 |
|
|
727 | branchmerge: True, force: False, partial: False | |
728 | ancestor: 924404dff337, local: 02963e448370+, remote: 2b958612230f |
|
728 | ancestor: 924404dff337, local: 02963e448370+, remote: 2b958612230f | |
729 | b: local copied/moved to a -> m |
|
729 | b: local copied/moved to a -> m | |
730 | preserving b for resolve of b |
|
730 | preserving b for resolve of b | |
731 | c: remote created -> g |
|
731 | c: remote created -> g | |
732 | rev: versions differ -> m |
|
732 | rev: versions differ -> m | |
733 | preserving rev for resolve of rev |
|
733 | preserving rev for resolve of rev | |
734 | updating: b 1/3 files (33.33%) |
|
734 | updating: b 1/3 files (33.33%) | |
735 | picked tool 'python ../merge' for b (binary False symlink False) |
|
735 | picked tool 'python ../merge' for b (binary False symlink False) | |
736 | merging b and a to b |
|
736 | merging b and a to b | |
737 | my b@02963e448370+ other a@2b958612230f ancestor a@924404dff337 |
|
737 | my b@02963e448370+ other a@2b958612230f ancestor a@924404dff337 | |
738 | premerge successful |
|
738 | premerge successful | |
739 | updating: c 2/3 files (66.67%) |
|
739 | updating: c 2/3 files (66.67%) | |
740 | getting c |
|
740 | getting c | |
741 | updating: rev 3/3 files (100.00%) |
|
741 | updating: rev 3/3 files (100.00%) | |
742 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
742 | picked tool 'python ../merge' for rev (binary False symlink False) | |
743 | merging rev |
|
743 | merging rev | |
744 | my rev@02963e448370+ other rev@2b958612230f ancestor rev@924404dff337 |
|
744 | my rev@02963e448370+ other rev@2b958612230f ancestor rev@924404dff337 | |
745 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
745 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
746 | (branch merge, don't forget to commit) |
|
746 | (branch merge, don't forget to commit) | |
747 | -------------- |
|
747 | -------------- | |
748 | M b |
|
748 | M b | |
749 | a |
|
749 | a | |
750 | M c |
|
750 | M c | |
751 | -------------- |
|
751 | -------------- | |
752 |
|
752 | |||
753 |
|
753 | |||
754 | $ cd .. |
|
754 | $ cd .. |
@@ -1,1088 +1,1088 b'' | |||||
1 | Let commit recurse into subrepos by default to match pre-2.0 behavior: |
|
1 | Let commit recurse into subrepos by default to match pre-2.0 behavior: | |
2 |
|
2 | |||
3 | $ echo "[ui]" >> $HGRCPATH |
|
3 | $ echo "[ui]" >> $HGRCPATH | |
4 | $ echo "commitsubrepos = Yes" >> $HGRCPATH |
|
4 | $ echo "commitsubrepos = Yes" >> $HGRCPATH | |
5 |
|
5 | |||
6 | $ hg init t |
|
6 | $ hg init t | |
7 | $ cd t |
|
7 | $ cd t | |
8 |
|
8 | |||
9 | first revision, no sub |
|
9 | first revision, no sub | |
10 |
|
10 | |||
11 | $ echo a > a |
|
11 | $ echo a > a | |
12 | $ hg ci -Am0 |
|
12 | $ hg ci -Am0 | |
13 | adding a |
|
13 | adding a | |
14 |
|
14 | |||
15 | add first sub |
|
15 | add first sub | |
16 |
|
16 | |||
17 | $ echo s = s > .hgsub |
|
17 | $ echo s = s > .hgsub | |
18 | $ hg add .hgsub |
|
18 | $ hg add .hgsub | |
19 | $ hg init s |
|
19 | $ hg init s | |
20 | $ echo a > s/a |
|
20 | $ echo a > s/a | |
21 |
|
21 | |||
22 | Issue2232: committing a subrepo without .hgsub |
|
22 | Issue2232: committing a subrepo without .hgsub | |
23 |
|
23 | |||
24 | $ hg ci -mbad s |
|
24 | $ hg ci -mbad s | |
25 | abort: can't commit subrepos without .hgsub |
|
25 | abort: can't commit subrepos without .hgsub | |
26 | [255] |
|
26 | [255] | |
27 |
|
27 | |||
28 | $ hg -R s ci -Ams0 |
|
28 | $ hg -R s ci -Ams0 | |
29 | adding a |
|
29 | adding a | |
30 | $ hg sum |
|
30 | $ hg sum | |
31 | parent: 0:f7b1eb17ad24 tip |
|
31 | parent: 0:f7b1eb17ad24 tip | |
32 | 0 |
|
32 | 0 | |
33 | branch: default |
|
33 | branch: default | |
34 | commit: 1 added, 1 subrepos |
|
34 | commit: 1 added, 1 subrepos | |
35 | update: (current) |
|
35 | update: (current) | |
36 | $ hg ci -m1 |
|
36 | $ hg ci -m1 | |
37 |
|
37 | |||
38 | Revert subrepo and test subrepo fileset keyword: |
|
38 | Revert subrepo and test subrepo fileset keyword: | |
39 |
|
39 | |||
40 | $ echo b > s/a |
|
40 | $ echo b > s/a | |
41 | $ hg revert "set:subrepo('glob:s*')" |
|
41 | $ hg revert "set:subrepo('glob:s*')" | |
42 | reverting subrepo s |
|
42 | reverting subrepo s | |
43 | reverting s/a (glob) |
|
43 | reverting s/a (glob) | |
44 | $ rm s/a.orig |
|
44 | $ rm s/a.orig | |
45 |
|
45 | |||
46 | Revert subrepo with no backup. The "reverting s/a" line is gone since |
|
46 | Revert subrepo with no backup. The "reverting s/a" line is gone since | |
47 | we're really running 'hg update' in the subrepo: |
|
47 | we're really running 'hg update' in the subrepo: | |
48 |
|
48 | |||
49 | $ echo b > s/a |
|
49 | $ echo b > s/a | |
50 | $ hg revert --no-backup s |
|
50 | $ hg revert --no-backup s | |
51 | reverting subrepo s |
|
51 | reverting subrepo s | |
52 |
|
52 | |||
53 | Issue2022: update -C |
|
53 | Issue2022: update -C | |
54 |
|
54 | |||
55 | $ echo b > s/a |
|
55 | $ echo b > s/a | |
56 | $ hg sum |
|
56 | $ hg sum | |
57 | parent: 1:7cf8cfea66e4 tip |
|
57 | parent: 1:7cf8cfea66e4 tip | |
58 | 1 |
|
58 | 1 | |
59 | branch: default |
|
59 | branch: default | |
60 | commit: 1 subrepos |
|
60 | commit: 1 subrepos | |
61 | update: (current) |
|
61 | update: (current) | |
62 | $ hg co -C 1 |
|
62 | $ hg co -C 1 | |
63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
64 | $ hg sum |
|
64 | $ hg sum | |
65 | parent: 1:7cf8cfea66e4 tip |
|
65 | parent: 1:7cf8cfea66e4 tip | |
66 | 1 |
|
66 | 1 | |
67 | branch: default |
|
67 | branch: default | |
68 | commit: (clean) |
|
68 | commit: (clean) | |
69 | update: (current) |
|
69 | update: (current) | |
70 |
|
70 | |||
71 | commands that require a clean repo should respect subrepos |
|
71 | commands that require a clean repo should respect subrepos | |
72 |
|
72 | |||
73 | $ echo b >> s/a |
|
73 | $ echo b >> s/a | |
74 | $ hg backout tip |
|
74 | $ hg backout tip | |
75 | abort: uncommitted changes in subrepo s |
|
75 | abort: uncommitted changes in subrepo s | |
76 | [255] |
|
76 | [255] | |
77 | $ hg revert -C -R s s/a |
|
77 | $ hg revert -C -R s s/a | |
78 |
|
78 | |||
79 | add sub sub |
|
79 | add sub sub | |
80 |
|
80 | |||
81 | $ echo ss = ss > s/.hgsub |
|
81 | $ echo ss = ss > s/.hgsub | |
82 | $ hg init s/ss |
|
82 | $ hg init s/ss | |
83 | $ echo a > s/ss/a |
|
83 | $ echo a > s/ss/a | |
84 | $ hg -R s add s/.hgsub |
|
84 | $ hg -R s add s/.hgsub | |
85 | $ hg -R s/ss add s/ss/a |
|
85 | $ hg -R s/ss add s/ss/a | |
86 | $ hg sum |
|
86 | $ hg sum | |
87 | parent: 1:7cf8cfea66e4 tip |
|
87 | parent: 1:7cf8cfea66e4 tip | |
88 | 1 |
|
88 | 1 | |
89 | branch: default |
|
89 | branch: default | |
90 | commit: 1 subrepos |
|
90 | commit: 1 subrepos | |
91 | update: (current) |
|
91 | update: (current) | |
92 | $ hg ci -m2 |
|
92 | $ hg ci -m2 | |
93 | committing subrepository s |
|
93 | committing subrepository s | |
94 | committing subrepository s/ss (glob) |
|
94 | committing subrepository s/ss (glob) | |
95 | $ hg sum |
|
95 | $ hg sum | |
96 | parent: 2:df30734270ae tip |
|
96 | parent: 2:df30734270ae tip | |
97 | 2 |
|
97 | 2 | |
98 | branch: default |
|
98 | branch: default | |
99 | commit: (clean) |
|
99 | commit: (clean) | |
100 | update: (current) |
|
100 | update: (current) | |
101 |
|
101 | |||
102 | bump sub rev (and check it is ignored by ui.commitsubrepos) |
|
102 | bump sub rev (and check it is ignored by ui.commitsubrepos) | |
103 |
|
103 | |||
104 | $ echo b > s/a |
|
104 | $ echo b > s/a | |
105 | $ hg -R s ci -ms1 |
|
105 | $ hg -R s ci -ms1 | |
106 | $ hg --config ui.commitsubrepos=no ci -m3 |
|
106 | $ hg --config ui.commitsubrepos=no ci -m3 | |
107 |
|
107 | |||
108 | leave sub dirty (and check ui.commitsubrepos=no aborts the commit) |
|
108 | leave sub dirty (and check ui.commitsubrepos=no aborts the commit) | |
109 |
|
109 | |||
110 | $ echo c > s/a |
|
110 | $ echo c > s/a | |
111 | $ hg --config ui.commitsubrepos=no ci -m4 |
|
111 | $ hg --config ui.commitsubrepos=no ci -m4 | |
112 | abort: uncommitted changes in subrepo s |
|
112 | abort: uncommitted changes in subrepo s | |
113 | (use --subrepos for recursive commit) |
|
113 | (use --subrepos for recursive commit) | |
114 | [255] |
|
114 | [255] | |
115 | $ hg id |
|
115 | $ hg id | |
116 | f6affe3fbfaa+ tip |
|
116 | f6affe3fbfaa+ tip | |
117 | $ hg -R s ci -mc |
|
117 | $ hg -R s ci -mc | |
118 | $ hg id |
|
118 | $ hg id | |
119 | f6affe3fbfaa+ tip |
|
119 | f6affe3fbfaa+ tip | |
120 | $ echo d > s/a |
|
120 | $ echo d > s/a | |
121 | $ hg ci -m4 |
|
121 | $ hg ci -m4 | |
122 | committing subrepository s |
|
122 | committing subrepository s | |
123 | $ hg tip -R s |
|
123 | $ hg tip -R s | |
124 | changeset: 4:02dcf1d70411 |
|
124 | changeset: 4:02dcf1d70411 | |
125 | tag: tip |
|
125 | tag: tip | |
126 | user: test |
|
126 | user: test | |
127 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
127 | date: Thu Jan 01 00:00:00 1970 +0000 | |
128 | summary: 4 |
|
128 | summary: 4 | |
129 |
|
129 | |||
130 |
|
130 | |||
131 | check caching |
|
131 | check caching | |
132 |
|
132 | |||
133 | $ hg co 0 |
|
133 | $ hg co 0 | |
134 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
134 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
135 | $ hg debugsub |
|
135 | $ hg debugsub | |
136 |
|
136 | |||
137 | restore |
|
137 | restore | |
138 |
|
138 | |||
139 | $ hg co |
|
139 | $ hg co | |
140 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
140 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
141 | $ hg debugsub |
|
141 | $ hg debugsub | |
142 | path s |
|
142 | path s | |
143 | source s |
|
143 | source s | |
144 | revision 02dcf1d704118aee3ee306ccfa1910850d5b05ef |
|
144 | revision 02dcf1d704118aee3ee306ccfa1910850d5b05ef | |
145 |
|
145 | |||
146 | new branch for merge tests |
|
146 | new branch for merge tests | |
147 |
|
147 | |||
148 | $ hg co 1 |
|
148 | $ hg co 1 | |
149 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
149 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
150 | $ echo t = t >> .hgsub |
|
150 | $ echo t = t >> .hgsub | |
151 | $ hg init t |
|
151 | $ hg init t | |
152 | $ echo t > t/t |
|
152 | $ echo t > t/t | |
153 | $ hg -R t add t |
|
153 | $ hg -R t add t | |
154 | adding t/t (glob) |
|
154 | adding t/t (glob) | |
155 |
|
155 | |||
156 | 5 |
|
156 | 5 | |
157 |
|
157 | |||
158 | $ hg ci -m5 # add sub |
|
158 | $ hg ci -m5 # add sub | |
159 | committing subrepository t |
|
159 | committing subrepository t | |
160 | created new head |
|
160 | created new head | |
161 | $ echo t2 > t/t |
|
161 | $ echo t2 > t/t | |
162 |
|
162 | |||
163 | 6 |
|
163 | 6 | |
164 |
|
164 | |||
165 | $ hg st -R s |
|
165 | $ hg st -R s | |
166 | $ hg ci -m6 # change sub |
|
166 | $ hg ci -m6 # change sub | |
167 | committing subrepository t |
|
167 | committing subrepository t | |
168 | $ hg debugsub |
|
168 | $ hg debugsub | |
169 | path s |
|
169 | path s | |
170 | source s |
|
170 | source s | |
171 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
171 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
172 | path t |
|
172 | path t | |
173 | source t |
|
173 | source t | |
174 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad |
|
174 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad | |
175 | $ echo t3 > t/t |
|
175 | $ echo t3 > t/t | |
176 |
|
176 | |||
177 | 7 |
|
177 | 7 | |
178 |
|
178 | |||
179 | $ hg ci -m7 # change sub again for conflict test |
|
179 | $ hg ci -m7 # change sub again for conflict test | |
180 | committing subrepository t |
|
180 | committing subrepository t | |
181 | $ hg rm .hgsub |
|
181 | $ hg rm .hgsub | |
182 |
|
182 | |||
183 | 8 |
|
183 | 8 | |
184 |
|
184 | |||
185 | $ hg ci -m8 # remove sub |
|
185 | $ hg ci -m8 # remove sub | |
186 |
|
186 | |||
187 | merge tests |
|
187 | merge tests | |
188 |
|
188 | |||
189 | $ hg co -C 3 |
|
189 | $ hg co -C 3 | |
190 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
190 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
191 | $ hg merge 5 # test adding |
|
191 | $ hg merge 5 # test adding | |
192 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
192 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
193 | (branch merge, don't forget to commit) |
|
193 | (branch merge, don't forget to commit) | |
194 | $ hg debugsub |
|
194 | $ hg debugsub | |
195 | path s |
|
195 | path s | |
196 | source s |
|
196 | source s | |
197 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
197 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 | |
198 | path t |
|
198 | path t | |
199 | source t |
|
199 | source t | |
200 | revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382 |
|
200 | revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382 | |
201 | $ hg ci -m9 |
|
201 | $ hg ci -m9 | |
202 | created new head |
|
202 | created new head | |
203 | $ hg merge 6 --debug # test change |
|
203 | $ hg merge 6 --debug # test change | |
204 | searching for copies back to rev 2 |
|
204 | searching for copies back to rev 2 | |
205 | resolving manifests |
|
205 | resolving manifests | |
206 |
|
|
206 | branchmerge: True, force: False, partial: False | |
207 | ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4 |
|
207 | ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4 | |
208 | .hgsubstate: versions differ -> m |
|
208 | .hgsubstate: versions differ -> m | |
209 | updating: .hgsubstate 1/1 files (100.00%) |
|
209 | updating: .hgsubstate 1/1 files (100.00%) | |
210 | subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec |
|
210 | subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec | |
211 | subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg |
|
211 | subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg | |
212 | getting subrepo t |
|
212 | getting subrepo t | |
213 | searching for copies back to rev 1 |
|
213 | searching for copies back to rev 1 | |
214 | resolving manifests |
|
214 | resolving manifests | |
215 |
|
|
215 | branchmerge: False, force: False, partial: False | |
216 | ancestor: 60ca1237c194, local: 60ca1237c194+, remote: 6747d179aa9a |
|
216 | ancestor: 60ca1237c194, local: 60ca1237c194+, remote: 6747d179aa9a | |
217 | t: remote is newer -> g |
|
217 | t: remote is newer -> g | |
218 | updating: t 1/1 files (100.00%) |
|
218 | updating: t 1/1 files (100.00%) | |
219 | getting t |
|
219 | getting t | |
220 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
220 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
221 | (branch merge, don't forget to commit) |
|
221 | (branch merge, don't forget to commit) | |
222 | $ hg debugsub |
|
222 | $ hg debugsub | |
223 | path s |
|
223 | path s | |
224 | source s |
|
224 | source s | |
225 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
225 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 | |
226 | path t |
|
226 | path t | |
227 | source t |
|
227 | source t | |
228 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad |
|
228 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad | |
229 | $ echo conflict > t/t |
|
229 | $ echo conflict > t/t | |
230 | $ hg ci -m10 |
|
230 | $ hg ci -m10 | |
231 | committing subrepository t |
|
231 | committing subrepository t | |
232 | $ HGMERGE=internal:merge hg merge --debug 7 # test conflict |
|
232 | $ HGMERGE=internal:merge hg merge --debug 7 # test conflict | |
233 | searching for copies back to rev 2 |
|
233 | searching for copies back to rev 2 | |
234 | resolving manifests |
|
234 | resolving manifests | |
235 |
|
|
235 | branchmerge: True, force: False, partial: False | |
236 | ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf |
|
236 | ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf | |
237 | .hgsubstate: versions differ -> m |
|
237 | .hgsubstate: versions differ -> m | |
238 | updating: .hgsubstate 1/1 files (100.00%) |
|
238 | updating: .hgsubstate 1/1 files (100.00%) | |
239 | subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4 |
|
239 | subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4 | |
240 | subrepo t: both sides changed, merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg |
|
240 | subrepo t: both sides changed, merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg | |
241 | merging subrepo t |
|
241 | merging subrepo t | |
242 | searching for copies back to rev 2 |
|
242 | searching for copies back to rev 2 | |
243 | resolving manifests |
|
243 | resolving manifests | |
244 |
|
|
244 | branchmerge: True, force: False, partial: False | |
245 | ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198 |
|
245 | ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198 | |
246 | t: versions differ -> m |
|
246 | t: versions differ -> m | |
247 | preserving t for resolve of t |
|
247 | preserving t for resolve of t | |
248 | updating: t 1/1 files (100.00%) |
|
248 | updating: t 1/1 files (100.00%) | |
249 | picked tool 'internal:merge' for t (binary False symlink False) |
|
249 | picked tool 'internal:merge' for t (binary False symlink False) | |
250 | merging t |
|
250 | merging t | |
251 | my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a |
|
251 | my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a | |
252 | warning: conflicts during merge. |
|
252 | warning: conflicts during merge. | |
253 | merging t incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
253 | merging t incomplete! (edit conflicts, then use 'hg resolve --mark') | |
254 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
254 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
255 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
255 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
256 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
256 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
257 | (branch merge, don't forget to commit) |
|
257 | (branch merge, don't forget to commit) | |
258 |
|
258 | |||
259 | should conflict |
|
259 | should conflict | |
260 |
|
260 | |||
261 | $ cat t/t |
|
261 | $ cat t/t | |
262 | <<<<<<< local |
|
262 | <<<<<<< local | |
263 | conflict |
|
263 | conflict | |
264 | ======= |
|
264 | ======= | |
265 | t3 |
|
265 | t3 | |
266 | >>>>>>> other |
|
266 | >>>>>>> other | |
267 |
|
267 | |||
268 | clone |
|
268 | clone | |
269 |
|
269 | |||
270 | $ cd .. |
|
270 | $ cd .. | |
271 | $ hg clone t tc |
|
271 | $ hg clone t tc | |
272 | updating to branch default |
|
272 | updating to branch default | |
273 | cloning subrepo s from $TESTTMP/t/s (glob) |
|
273 | cloning subrepo s from $TESTTMP/t/s (glob) | |
274 | cloning subrepo s/ss from $TESTTMP/t/s/ss (glob) |
|
274 | cloning subrepo s/ss from $TESTTMP/t/s/ss (glob) | |
275 | cloning subrepo t from $TESTTMP/t/t (glob) |
|
275 | cloning subrepo t from $TESTTMP/t/t (glob) | |
276 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
276 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
277 | $ cd tc |
|
277 | $ cd tc | |
278 | $ hg debugsub |
|
278 | $ hg debugsub | |
279 | path s |
|
279 | path s | |
280 | source s |
|
280 | source s | |
281 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
281 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 | |
282 | path t |
|
282 | path t | |
283 | source t |
|
283 | source t | |
284 | revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e |
|
284 | revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e | |
285 |
|
285 | |||
286 | push |
|
286 | push | |
287 |
|
287 | |||
288 | $ echo bah > t/t |
|
288 | $ echo bah > t/t | |
289 | $ hg ci -m11 |
|
289 | $ hg ci -m11 | |
290 | committing subrepository t |
|
290 | committing subrepository t | |
291 | $ hg push |
|
291 | $ hg push | |
292 | pushing to $TESTTMP/t (glob) |
|
292 | pushing to $TESTTMP/t (glob) | |
293 | pushing subrepo s/ss to $TESTTMP/t/s/ss (glob) |
|
293 | pushing subrepo s/ss to $TESTTMP/t/s/ss (glob) | |
294 | searching for changes |
|
294 | searching for changes | |
295 | no changes found |
|
295 | no changes found | |
296 | pushing subrepo s to $TESTTMP/t/s (glob) |
|
296 | pushing subrepo s to $TESTTMP/t/s (glob) | |
297 | searching for changes |
|
297 | searching for changes | |
298 | no changes found |
|
298 | no changes found | |
299 | pushing subrepo t to $TESTTMP/t/t (glob) |
|
299 | pushing subrepo t to $TESTTMP/t/t (glob) | |
300 | searching for changes |
|
300 | searching for changes | |
301 | adding changesets |
|
301 | adding changesets | |
302 | adding manifests |
|
302 | adding manifests | |
303 | adding file changes |
|
303 | adding file changes | |
304 | added 1 changesets with 1 changes to 1 files |
|
304 | added 1 changesets with 1 changes to 1 files | |
305 | searching for changes |
|
305 | searching for changes | |
306 | adding changesets |
|
306 | adding changesets | |
307 | adding manifests |
|
307 | adding manifests | |
308 | adding file changes |
|
308 | adding file changes | |
309 | added 1 changesets with 1 changes to 1 files |
|
309 | added 1 changesets with 1 changes to 1 files | |
310 |
|
310 | |||
311 | push -f |
|
311 | push -f | |
312 |
|
312 | |||
313 | $ echo bah > s/a |
|
313 | $ echo bah > s/a | |
314 | $ hg ci -m12 |
|
314 | $ hg ci -m12 | |
315 | committing subrepository s |
|
315 | committing subrepository s | |
316 | $ hg push |
|
316 | $ hg push | |
317 | pushing to $TESTTMP/t (glob) |
|
317 | pushing to $TESTTMP/t (glob) | |
318 | pushing subrepo s/ss to $TESTTMP/t/s/ss (glob) |
|
318 | pushing subrepo s/ss to $TESTTMP/t/s/ss (glob) | |
319 | searching for changes |
|
319 | searching for changes | |
320 | no changes found |
|
320 | no changes found | |
321 | pushing subrepo s to $TESTTMP/t/s (glob) |
|
321 | pushing subrepo s to $TESTTMP/t/s (glob) | |
322 | searching for changes |
|
322 | searching for changes | |
323 | abort: push creates new remote head 12a213df6fa9! (in subrepo s) |
|
323 | abort: push creates new remote head 12a213df6fa9! (in subrepo s) | |
324 | (did you forget to merge? use push -f to force) |
|
324 | (did you forget to merge? use push -f to force) | |
325 | [255] |
|
325 | [255] | |
326 | $ hg push -f |
|
326 | $ hg push -f | |
327 | pushing to $TESTTMP/t (glob) |
|
327 | pushing to $TESTTMP/t (glob) | |
328 | pushing subrepo s/ss to $TESTTMP/t/s/ss (glob) |
|
328 | pushing subrepo s/ss to $TESTTMP/t/s/ss (glob) | |
329 | searching for changes |
|
329 | searching for changes | |
330 | no changes found |
|
330 | no changes found | |
331 | pushing subrepo s to $TESTTMP/t/s (glob) |
|
331 | pushing subrepo s to $TESTTMP/t/s (glob) | |
332 | searching for changes |
|
332 | searching for changes | |
333 | adding changesets |
|
333 | adding changesets | |
334 | adding manifests |
|
334 | adding manifests | |
335 | adding file changes |
|
335 | adding file changes | |
336 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
336 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
337 | pushing subrepo t to $TESTTMP/t/t (glob) |
|
337 | pushing subrepo t to $TESTTMP/t/t (glob) | |
338 | searching for changes |
|
338 | searching for changes | |
339 | no changes found |
|
339 | no changes found | |
340 | searching for changes |
|
340 | searching for changes | |
341 | adding changesets |
|
341 | adding changesets | |
342 | adding manifests |
|
342 | adding manifests | |
343 | adding file changes |
|
343 | adding file changes | |
344 | added 1 changesets with 1 changes to 1 files |
|
344 | added 1 changesets with 1 changes to 1 files | |
345 |
|
345 | |||
346 | update |
|
346 | update | |
347 |
|
347 | |||
348 | $ cd ../t |
|
348 | $ cd ../t | |
349 | $ hg up -C # discard our earlier merge |
|
349 | $ hg up -C # discard our earlier merge | |
350 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
350 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
351 | $ echo blah > t/t |
|
351 | $ echo blah > t/t | |
352 | $ hg ci -m13 |
|
352 | $ hg ci -m13 | |
353 | committing subrepository t |
|
353 | committing subrepository t | |
354 |
|
354 | |||
355 | pull |
|
355 | pull | |
356 |
|
356 | |||
357 | $ cd ../tc |
|
357 | $ cd ../tc | |
358 | $ hg pull |
|
358 | $ hg pull | |
359 | pulling from $TESTTMP/t (glob) |
|
359 | pulling from $TESTTMP/t (glob) | |
360 | searching for changes |
|
360 | searching for changes | |
361 | adding changesets |
|
361 | adding changesets | |
362 | adding manifests |
|
362 | adding manifests | |
363 | adding file changes |
|
363 | adding file changes | |
364 | added 1 changesets with 1 changes to 1 files |
|
364 | added 1 changesets with 1 changes to 1 files | |
365 | (run 'hg update' to get a working copy) |
|
365 | (run 'hg update' to get a working copy) | |
366 |
|
366 | |||
367 | should pull t |
|
367 | should pull t | |
368 |
|
368 | |||
369 | $ hg up |
|
369 | $ hg up | |
370 | pulling subrepo t from $TESTTMP/t/t (glob) |
|
370 | pulling subrepo t from $TESTTMP/t/t (glob) | |
371 | searching for changes |
|
371 | searching for changes | |
372 | adding changesets |
|
372 | adding changesets | |
373 | adding manifests |
|
373 | adding manifests | |
374 | adding file changes |
|
374 | adding file changes | |
375 | added 1 changesets with 1 changes to 1 files |
|
375 | added 1 changesets with 1 changes to 1 files | |
376 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
376 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
377 | $ cat t/t |
|
377 | $ cat t/t | |
378 | blah |
|
378 | blah | |
379 |
|
379 | |||
380 | bogus subrepo path aborts |
|
380 | bogus subrepo path aborts | |
381 |
|
381 | |||
382 | $ echo 'bogus=[boguspath' >> .hgsub |
|
382 | $ echo 'bogus=[boguspath' >> .hgsub | |
383 | $ hg ci -m 'bogus subrepo path' |
|
383 | $ hg ci -m 'bogus subrepo path' | |
384 | abort: missing ] in subrepo source |
|
384 | abort: missing ] in subrepo source | |
385 | [255] |
|
385 | [255] | |
386 |
|
386 | |||
387 | Issue1986: merge aborts when trying to merge a subrepo that |
|
387 | Issue1986: merge aborts when trying to merge a subrepo that | |
388 | shouldn't need merging |
|
388 | shouldn't need merging | |
389 |
|
389 | |||
390 | # subrepo layout |
|
390 | # subrepo layout | |
391 | # |
|
391 | # | |
392 | # o 5 br |
|
392 | # o 5 br | |
393 | # /| |
|
393 | # /| | |
394 | # o | 4 default |
|
394 | # o | 4 default | |
395 | # | | |
|
395 | # | | | |
396 | # | o 3 br |
|
396 | # | o 3 br | |
397 | # |/| |
|
397 | # |/| | |
398 | # o | 2 default |
|
398 | # o | 2 default | |
399 | # | | |
|
399 | # | | | |
400 | # | o 1 br |
|
400 | # | o 1 br | |
401 | # |/ |
|
401 | # |/ | |
402 | # o 0 default |
|
402 | # o 0 default | |
403 |
|
403 | |||
404 | $ cd .. |
|
404 | $ cd .. | |
405 | $ rm -rf sub |
|
405 | $ rm -rf sub | |
406 | $ hg init main |
|
406 | $ hg init main | |
407 | $ cd main |
|
407 | $ cd main | |
408 | $ hg init s |
|
408 | $ hg init s | |
409 | $ cd s |
|
409 | $ cd s | |
410 | $ echo a > a |
|
410 | $ echo a > a | |
411 | $ hg ci -Am1 |
|
411 | $ hg ci -Am1 | |
412 | adding a |
|
412 | adding a | |
413 | $ hg branch br |
|
413 | $ hg branch br | |
414 | marked working directory as branch br |
|
414 | marked working directory as branch br | |
415 | (branches are permanent and global, did you want a bookmark?) |
|
415 | (branches are permanent and global, did you want a bookmark?) | |
416 | $ echo a >> a |
|
416 | $ echo a >> a | |
417 | $ hg ci -m1 |
|
417 | $ hg ci -m1 | |
418 | $ hg up default |
|
418 | $ hg up default | |
419 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
419 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
420 | $ echo b > b |
|
420 | $ echo b > b | |
421 | $ hg ci -Am1 |
|
421 | $ hg ci -Am1 | |
422 | adding b |
|
422 | adding b | |
423 | $ hg up br |
|
423 | $ hg up br | |
424 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
424 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
425 | $ hg merge tip |
|
425 | $ hg merge tip | |
426 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
426 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
427 | (branch merge, don't forget to commit) |
|
427 | (branch merge, don't forget to commit) | |
428 | $ hg ci -m1 |
|
428 | $ hg ci -m1 | |
429 | $ hg up 2 |
|
429 | $ hg up 2 | |
430 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
430 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
431 | $ echo c > c |
|
431 | $ echo c > c | |
432 | $ hg ci -Am1 |
|
432 | $ hg ci -Am1 | |
433 | adding c |
|
433 | adding c | |
434 | $ hg up 3 |
|
434 | $ hg up 3 | |
435 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
435 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
436 | $ hg merge 4 |
|
436 | $ hg merge 4 | |
437 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
437 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
438 | (branch merge, don't forget to commit) |
|
438 | (branch merge, don't forget to commit) | |
439 | $ hg ci -m1 |
|
439 | $ hg ci -m1 | |
440 |
|
440 | |||
441 | # main repo layout: |
|
441 | # main repo layout: | |
442 | # |
|
442 | # | |
443 | # * <-- try to merge default into br again |
|
443 | # * <-- try to merge default into br again | |
444 | # .`| |
|
444 | # .`| | |
445 | # . o 5 br --> substate = 5 |
|
445 | # . o 5 br --> substate = 5 | |
446 | # . | |
|
446 | # . | | |
447 | # o | 4 default --> substate = 4 |
|
447 | # o | 4 default --> substate = 4 | |
448 | # | | |
|
448 | # | | | |
449 | # | o 3 br --> substate = 2 |
|
449 | # | o 3 br --> substate = 2 | |
450 | # |/| |
|
450 | # |/| | |
451 | # o | 2 default --> substate = 2 |
|
451 | # o | 2 default --> substate = 2 | |
452 | # | | |
|
452 | # | | | |
453 | # | o 1 br --> substate = 3 |
|
453 | # | o 1 br --> substate = 3 | |
454 | # |/ |
|
454 | # |/ | |
455 | # o 0 default --> substate = 2 |
|
455 | # o 0 default --> substate = 2 | |
456 |
|
456 | |||
457 | $ cd .. |
|
457 | $ cd .. | |
458 | $ echo 's = s' > .hgsub |
|
458 | $ echo 's = s' > .hgsub | |
459 | $ hg -R s up 2 |
|
459 | $ hg -R s up 2 | |
460 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
460 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
461 | $ hg ci -Am1 |
|
461 | $ hg ci -Am1 | |
462 | adding .hgsub |
|
462 | adding .hgsub | |
463 | $ hg branch br |
|
463 | $ hg branch br | |
464 | marked working directory as branch br |
|
464 | marked working directory as branch br | |
465 | (branches are permanent and global, did you want a bookmark?) |
|
465 | (branches are permanent and global, did you want a bookmark?) | |
466 | $ echo b > b |
|
466 | $ echo b > b | |
467 | $ hg -R s up 3 |
|
467 | $ hg -R s up 3 | |
468 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
468 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
469 | $ hg ci -Am1 |
|
469 | $ hg ci -Am1 | |
470 | adding b |
|
470 | adding b | |
471 | $ hg up default |
|
471 | $ hg up default | |
472 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
472 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
473 | $ echo c > c |
|
473 | $ echo c > c | |
474 | $ hg ci -Am1 |
|
474 | $ hg ci -Am1 | |
475 | adding c |
|
475 | adding c | |
476 | $ hg up 1 |
|
476 | $ hg up 1 | |
477 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
477 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
478 | $ hg merge 2 |
|
478 | $ hg merge 2 | |
479 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
479 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
480 | (branch merge, don't forget to commit) |
|
480 | (branch merge, don't forget to commit) | |
481 | $ hg ci -m1 |
|
481 | $ hg ci -m1 | |
482 | $ hg up 2 |
|
482 | $ hg up 2 | |
483 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
483 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
484 | $ hg -R s up 4 |
|
484 | $ hg -R s up 4 | |
485 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
485 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
486 | $ echo d > d |
|
486 | $ echo d > d | |
487 | $ hg ci -Am1 |
|
487 | $ hg ci -Am1 | |
488 | adding d |
|
488 | adding d | |
489 | $ hg up 3 |
|
489 | $ hg up 3 | |
490 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
490 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
491 | $ hg -R s up 5 |
|
491 | $ hg -R s up 5 | |
492 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
492 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
493 | $ echo e > e |
|
493 | $ echo e > e | |
494 | $ hg ci -Am1 |
|
494 | $ hg ci -Am1 | |
495 | adding e |
|
495 | adding e | |
496 |
|
496 | |||
497 | $ hg up 5 |
|
497 | $ hg up 5 | |
498 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
498 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
499 | $ hg merge 4 # try to merge default into br again |
|
499 | $ hg merge 4 # try to merge default into br again | |
500 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
500 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
501 | (branch merge, don't forget to commit) |
|
501 | (branch merge, don't forget to commit) | |
502 | $ cd .. |
|
502 | $ cd .. | |
503 |
|
503 | |||
504 | test subrepo delete from .hgsubstate |
|
504 | test subrepo delete from .hgsubstate | |
505 |
|
505 | |||
506 | $ hg init testdelete |
|
506 | $ hg init testdelete | |
507 | $ mkdir testdelete/nested testdelete/nested2 |
|
507 | $ mkdir testdelete/nested testdelete/nested2 | |
508 | $ hg init testdelete/nested |
|
508 | $ hg init testdelete/nested | |
509 | $ hg init testdelete/nested2 |
|
509 | $ hg init testdelete/nested2 | |
510 | $ echo test > testdelete/nested/foo |
|
510 | $ echo test > testdelete/nested/foo | |
511 | $ echo test > testdelete/nested2/foo |
|
511 | $ echo test > testdelete/nested2/foo | |
512 | $ hg -R testdelete/nested add |
|
512 | $ hg -R testdelete/nested add | |
513 | adding testdelete/nested/foo (glob) |
|
513 | adding testdelete/nested/foo (glob) | |
514 | $ hg -R testdelete/nested2 add |
|
514 | $ hg -R testdelete/nested2 add | |
515 | adding testdelete/nested2/foo (glob) |
|
515 | adding testdelete/nested2/foo (glob) | |
516 | $ hg -R testdelete/nested ci -m test |
|
516 | $ hg -R testdelete/nested ci -m test | |
517 | $ hg -R testdelete/nested2 ci -m test |
|
517 | $ hg -R testdelete/nested2 ci -m test | |
518 | $ echo nested = nested > testdelete/.hgsub |
|
518 | $ echo nested = nested > testdelete/.hgsub | |
519 | $ echo nested2 = nested2 >> testdelete/.hgsub |
|
519 | $ echo nested2 = nested2 >> testdelete/.hgsub | |
520 | $ hg -R testdelete add |
|
520 | $ hg -R testdelete add | |
521 | adding testdelete/.hgsub (glob) |
|
521 | adding testdelete/.hgsub (glob) | |
522 | $ hg -R testdelete ci -m "nested 1 & 2 added" |
|
522 | $ hg -R testdelete ci -m "nested 1 & 2 added" | |
523 | $ echo nested = nested > testdelete/.hgsub |
|
523 | $ echo nested = nested > testdelete/.hgsub | |
524 | $ hg -R testdelete ci -m "nested 2 deleted" |
|
524 | $ hg -R testdelete ci -m "nested 2 deleted" | |
525 | $ cat testdelete/.hgsubstate |
|
525 | $ cat testdelete/.hgsubstate | |
526 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested |
|
526 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested | |
527 | $ hg -R testdelete remove testdelete/.hgsub |
|
527 | $ hg -R testdelete remove testdelete/.hgsub | |
528 | $ hg -R testdelete ci -m ".hgsub deleted" |
|
528 | $ hg -R testdelete ci -m ".hgsub deleted" | |
529 | $ cat testdelete/.hgsubstate |
|
529 | $ cat testdelete/.hgsubstate | |
530 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested |
|
530 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested | |
531 |
|
531 | |||
532 | test repository cloning |
|
532 | test repository cloning | |
533 |
|
533 | |||
534 | $ mkdir mercurial mercurial2 |
|
534 | $ mkdir mercurial mercurial2 | |
535 | $ hg init nested_absolute |
|
535 | $ hg init nested_absolute | |
536 | $ echo test > nested_absolute/foo |
|
536 | $ echo test > nested_absolute/foo | |
537 | $ hg -R nested_absolute add |
|
537 | $ hg -R nested_absolute add | |
538 | adding nested_absolute/foo (glob) |
|
538 | adding nested_absolute/foo (glob) | |
539 | $ hg -R nested_absolute ci -mtest |
|
539 | $ hg -R nested_absolute ci -mtest | |
540 | $ cd mercurial |
|
540 | $ cd mercurial | |
541 | $ hg init nested_relative |
|
541 | $ hg init nested_relative | |
542 | $ echo test2 > nested_relative/foo2 |
|
542 | $ echo test2 > nested_relative/foo2 | |
543 | $ hg -R nested_relative add |
|
543 | $ hg -R nested_relative add | |
544 | adding nested_relative/foo2 (glob) |
|
544 | adding nested_relative/foo2 (glob) | |
545 | $ hg -R nested_relative ci -mtest2 |
|
545 | $ hg -R nested_relative ci -mtest2 | |
546 | $ hg init main |
|
546 | $ hg init main | |
547 | $ echo "nested_relative = ../nested_relative" > main/.hgsub |
|
547 | $ echo "nested_relative = ../nested_relative" > main/.hgsub | |
548 | $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub |
|
548 | $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub | |
549 | $ hg -R main add |
|
549 | $ hg -R main add | |
550 | adding main/.hgsub (glob) |
|
550 | adding main/.hgsub (glob) | |
551 | $ hg -R main ci -m "add subrepos" |
|
551 | $ hg -R main ci -m "add subrepos" | |
552 | $ cd .. |
|
552 | $ cd .. | |
553 | $ hg clone mercurial/main mercurial2/main |
|
553 | $ hg clone mercurial/main mercurial2/main | |
554 | updating to branch default |
|
554 | updating to branch default | |
555 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
555 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
556 | $ cat mercurial2/main/nested_absolute/.hg/hgrc \ |
|
556 | $ cat mercurial2/main/nested_absolute/.hg/hgrc \ | |
557 | > mercurial2/main/nested_relative/.hg/hgrc |
|
557 | > mercurial2/main/nested_relative/.hg/hgrc | |
558 | [paths] |
|
558 | [paths] | |
559 | default = $TESTTMP/mercurial/nested_absolute |
|
559 | default = $TESTTMP/mercurial/nested_absolute | |
560 | [paths] |
|
560 | [paths] | |
561 | default = $TESTTMP/mercurial/nested_relative |
|
561 | default = $TESTTMP/mercurial/nested_relative | |
562 | $ rm -rf mercurial mercurial2 |
|
562 | $ rm -rf mercurial mercurial2 | |
563 |
|
563 | |||
564 | Issue1977: multirepo push should fail if subrepo push fails |
|
564 | Issue1977: multirepo push should fail if subrepo push fails | |
565 |
|
565 | |||
566 | $ hg init repo |
|
566 | $ hg init repo | |
567 | $ hg init repo/s |
|
567 | $ hg init repo/s | |
568 | $ echo a > repo/s/a |
|
568 | $ echo a > repo/s/a | |
569 | $ hg -R repo/s ci -Am0 |
|
569 | $ hg -R repo/s ci -Am0 | |
570 | adding a |
|
570 | adding a | |
571 | $ echo s = s > repo/.hgsub |
|
571 | $ echo s = s > repo/.hgsub | |
572 | $ hg -R repo ci -Am1 |
|
572 | $ hg -R repo ci -Am1 | |
573 | adding .hgsub |
|
573 | adding .hgsub | |
574 | $ hg clone repo repo2 |
|
574 | $ hg clone repo repo2 | |
575 | updating to branch default |
|
575 | updating to branch default | |
576 | cloning subrepo s from $TESTTMP/repo/s (glob) |
|
576 | cloning subrepo s from $TESTTMP/repo/s (glob) | |
577 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
577 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
578 | $ hg -q -R repo2 pull -u |
|
578 | $ hg -q -R repo2 pull -u | |
579 | $ echo 1 > repo2/s/a |
|
579 | $ echo 1 > repo2/s/a | |
580 | $ hg -R repo2/s ci -m2 |
|
580 | $ hg -R repo2/s ci -m2 | |
581 | $ hg -q -R repo2/s push |
|
581 | $ hg -q -R repo2/s push | |
582 | $ hg -R repo2/s up -C 0 |
|
582 | $ hg -R repo2/s up -C 0 | |
583 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
583 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
584 | $ echo 2 > repo2/s/b |
|
584 | $ echo 2 > repo2/s/b | |
585 | $ hg -R repo2/s ci -m3 -A |
|
585 | $ hg -R repo2/s ci -m3 -A | |
586 | adding b |
|
586 | adding b | |
587 | created new head |
|
587 | created new head | |
588 | $ hg -R repo2 ci -m3 |
|
588 | $ hg -R repo2 ci -m3 | |
589 | $ hg -q -R repo2 push |
|
589 | $ hg -q -R repo2 push | |
590 | abort: push creates new remote head cc505f09a8b2! (in subrepo s) |
|
590 | abort: push creates new remote head cc505f09a8b2! (in subrepo s) | |
591 | (did you forget to merge? use push -f to force) |
|
591 | (did you forget to merge? use push -f to force) | |
592 | [255] |
|
592 | [255] | |
593 | $ hg -R repo update |
|
593 | $ hg -R repo update | |
594 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
594 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
595 |
|
595 | |||
596 | test if untracked file is not overwritten |
|
596 | test if untracked file is not overwritten | |
597 |
|
597 | |||
598 | $ echo issue3276_ok > repo/s/b |
|
598 | $ echo issue3276_ok > repo/s/b | |
599 | $ hg -R repo2 push -f -q |
|
599 | $ hg -R repo2 push -f -q | |
600 | $ hg -R repo update |
|
600 | $ hg -R repo update | |
601 | b: untracked file differs |
|
601 | b: untracked file differs | |
602 | abort: untracked files in working directory differ from files in requested revision (in subrepo s) |
|
602 | abort: untracked files in working directory differ from files in requested revision (in subrepo s) | |
603 | [255] |
|
603 | [255] | |
604 |
|
604 | |||
605 | $ cat repo/s/b |
|
605 | $ cat repo/s/b | |
606 | issue3276_ok |
|
606 | issue3276_ok | |
607 | $ rm repo/s/b |
|
607 | $ rm repo/s/b | |
608 | $ hg -R repo revert --all |
|
608 | $ hg -R repo revert --all | |
609 | reverting repo/.hgsubstate (glob) |
|
609 | reverting repo/.hgsubstate (glob) | |
610 | reverting subrepo s |
|
610 | reverting subrepo s | |
611 | $ hg -R repo update |
|
611 | $ hg -R repo update | |
612 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
612 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
613 | $ cat repo/s/b |
|
613 | $ cat repo/s/b | |
614 | 2 |
|
614 | 2 | |
615 | $ rm -rf repo2 repo |
|
615 | $ rm -rf repo2 repo | |
616 |
|
616 | |||
617 |
|
617 | |||
618 | Issue1852 subrepos with relative paths always push/pull relative to default |
|
618 | Issue1852 subrepos with relative paths always push/pull relative to default | |
619 |
|
619 | |||
620 | Prepare a repo with subrepo |
|
620 | Prepare a repo with subrepo | |
621 |
|
621 | |||
622 | $ hg init issue1852a |
|
622 | $ hg init issue1852a | |
623 | $ cd issue1852a |
|
623 | $ cd issue1852a | |
624 | $ hg init sub/repo |
|
624 | $ hg init sub/repo | |
625 | $ echo test > sub/repo/foo |
|
625 | $ echo test > sub/repo/foo | |
626 | $ hg -R sub/repo add sub/repo/foo |
|
626 | $ hg -R sub/repo add sub/repo/foo | |
627 | $ echo sub/repo = sub/repo > .hgsub |
|
627 | $ echo sub/repo = sub/repo > .hgsub | |
628 | $ hg add .hgsub |
|
628 | $ hg add .hgsub | |
629 | $ hg ci -mtest |
|
629 | $ hg ci -mtest | |
630 | committing subrepository sub/repo (glob) |
|
630 | committing subrepository sub/repo (glob) | |
631 | $ echo test >> sub/repo/foo |
|
631 | $ echo test >> sub/repo/foo | |
632 | $ hg ci -mtest |
|
632 | $ hg ci -mtest | |
633 | committing subrepository sub/repo (glob) |
|
633 | committing subrepository sub/repo (glob) | |
634 | $ cd .. |
|
634 | $ cd .. | |
635 |
|
635 | |||
636 | Create repo without default path, pull top repo, and see what happens on update |
|
636 | Create repo without default path, pull top repo, and see what happens on update | |
637 |
|
637 | |||
638 | $ hg init issue1852b |
|
638 | $ hg init issue1852b | |
639 | $ hg -R issue1852b pull issue1852a |
|
639 | $ hg -R issue1852b pull issue1852a | |
640 | pulling from issue1852a |
|
640 | pulling from issue1852a | |
641 | requesting all changes |
|
641 | requesting all changes | |
642 | adding changesets |
|
642 | adding changesets | |
643 | adding manifests |
|
643 | adding manifests | |
644 | adding file changes |
|
644 | adding file changes | |
645 | added 2 changesets with 3 changes to 2 files |
|
645 | added 2 changesets with 3 changes to 2 files | |
646 | (run 'hg update' to get a working copy) |
|
646 | (run 'hg update' to get a working copy) | |
647 | $ hg -R issue1852b update |
|
647 | $ hg -R issue1852b update | |
648 | abort: default path for subrepository not found (in subrepo sub/repo) (glob) |
|
648 | abort: default path for subrepository not found (in subrepo sub/repo) (glob) | |
649 | [255] |
|
649 | [255] | |
650 |
|
650 | |||
651 | Pull -u now doesn't help |
|
651 | Pull -u now doesn't help | |
652 |
|
652 | |||
653 | $ hg -R issue1852b pull -u issue1852a |
|
653 | $ hg -R issue1852b pull -u issue1852a | |
654 | pulling from issue1852a |
|
654 | pulling from issue1852a | |
655 | searching for changes |
|
655 | searching for changes | |
656 | no changes found |
|
656 | no changes found | |
657 |
|
657 | |||
658 | Try the same, but with pull -u |
|
658 | Try the same, but with pull -u | |
659 |
|
659 | |||
660 | $ hg init issue1852c |
|
660 | $ hg init issue1852c | |
661 | $ hg -R issue1852c pull -r0 -u issue1852a |
|
661 | $ hg -R issue1852c pull -r0 -u issue1852a | |
662 | pulling from issue1852a |
|
662 | pulling from issue1852a | |
663 | adding changesets |
|
663 | adding changesets | |
664 | adding manifests |
|
664 | adding manifests | |
665 | adding file changes |
|
665 | adding file changes | |
666 | added 1 changesets with 2 changes to 2 files |
|
666 | added 1 changesets with 2 changes to 2 files | |
667 | cloning subrepo sub/repo from issue1852a/sub/repo (glob) |
|
667 | cloning subrepo sub/repo from issue1852a/sub/repo (glob) | |
668 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
668 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
669 |
|
669 | |||
670 | Try to push from the other side |
|
670 | Try to push from the other side | |
671 |
|
671 | |||
672 | $ hg -R issue1852a push `pwd`/issue1852c |
|
672 | $ hg -R issue1852a push `pwd`/issue1852c | |
673 | pushing to $TESTTMP/issue1852c |
|
673 | pushing to $TESTTMP/issue1852c | |
674 | pushing subrepo sub/repo to $TESTTMP/issue1852c/sub/repo (glob) |
|
674 | pushing subrepo sub/repo to $TESTTMP/issue1852c/sub/repo (glob) | |
675 | searching for changes |
|
675 | searching for changes | |
676 | no changes found |
|
676 | no changes found | |
677 | searching for changes |
|
677 | searching for changes | |
678 | adding changesets |
|
678 | adding changesets | |
679 | adding manifests |
|
679 | adding manifests | |
680 | adding file changes |
|
680 | adding file changes | |
681 | added 1 changesets with 1 changes to 1 files |
|
681 | added 1 changesets with 1 changes to 1 files | |
682 |
|
682 | |||
683 | Incoming and outgoing should not use the default path: |
|
683 | Incoming and outgoing should not use the default path: | |
684 |
|
684 | |||
685 | $ hg clone -q issue1852a issue1852d |
|
685 | $ hg clone -q issue1852a issue1852d | |
686 | $ hg -R issue1852d outgoing --subrepos issue1852c |
|
686 | $ hg -R issue1852d outgoing --subrepos issue1852c | |
687 | comparing with issue1852c |
|
687 | comparing with issue1852c | |
688 | searching for changes |
|
688 | searching for changes | |
689 | no changes found |
|
689 | no changes found | |
690 | comparing with issue1852c/sub/repo |
|
690 | comparing with issue1852c/sub/repo | |
691 | searching for changes |
|
691 | searching for changes | |
692 | no changes found |
|
692 | no changes found | |
693 | [1] |
|
693 | [1] | |
694 | $ hg -R issue1852d incoming --subrepos issue1852c |
|
694 | $ hg -R issue1852d incoming --subrepos issue1852c | |
695 | comparing with issue1852c |
|
695 | comparing with issue1852c | |
696 | searching for changes |
|
696 | searching for changes | |
697 | no changes found |
|
697 | no changes found | |
698 | comparing with issue1852c/sub/repo |
|
698 | comparing with issue1852c/sub/repo | |
699 | searching for changes |
|
699 | searching for changes | |
700 | no changes found |
|
700 | no changes found | |
701 | [1] |
|
701 | [1] | |
702 |
|
702 | |||
703 | Check status of files when none of them belong to the first |
|
703 | Check status of files when none of them belong to the first | |
704 | subrepository: |
|
704 | subrepository: | |
705 |
|
705 | |||
706 | $ hg init subrepo-status |
|
706 | $ hg init subrepo-status | |
707 | $ cd subrepo-status |
|
707 | $ cd subrepo-status | |
708 | $ hg init subrepo-1 |
|
708 | $ hg init subrepo-1 | |
709 | $ hg init subrepo-2 |
|
709 | $ hg init subrepo-2 | |
710 | $ cd subrepo-2 |
|
710 | $ cd subrepo-2 | |
711 | $ touch file |
|
711 | $ touch file | |
712 | $ hg add file |
|
712 | $ hg add file | |
713 | $ cd .. |
|
713 | $ cd .. | |
714 | $ echo subrepo-1 = subrepo-1 > .hgsub |
|
714 | $ echo subrepo-1 = subrepo-1 > .hgsub | |
715 | $ echo subrepo-2 = subrepo-2 >> .hgsub |
|
715 | $ echo subrepo-2 = subrepo-2 >> .hgsub | |
716 | $ hg add .hgsub |
|
716 | $ hg add .hgsub | |
717 | $ hg ci -m 'Added subrepos' |
|
717 | $ hg ci -m 'Added subrepos' | |
718 | committing subrepository subrepo-2 |
|
718 | committing subrepository subrepo-2 | |
719 | $ hg st subrepo-2/file |
|
719 | $ hg st subrepo-2/file | |
720 |
|
720 | |||
721 | Check that share works with subrepo |
|
721 | Check that share works with subrepo | |
722 | $ hg --config extensions.share= share . ../shared |
|
722 | $ hg --config extensions.share= share . ../shared | |
723 | updating working directory |
|
723 | updating working directory | |
724 | cloning subrepo subrepo-2 from $TESTTMP/subrepo-status/subrepo-2 |
|
724 | cloning subrepo subrepo-2 from $TESTTMP/subrepo-status/subrepo-2 | |
725 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
725 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
726 | $ test -f ../shared/subrepo-1/.hg/sharedpath |
|
726 | $ test -f ../shared/subrepo-1/.hg/sharedpath | |
727 | [1] |
|
727 | [1] | |
728 | $ hg -R ../shared in |
|
728 | $ hg -R ../shared in | |
729 | abort: repository default not found! |
|
729 | abort: repository default not found! | |
730 | [255] |
|
730 | [255] | |
731 | $ hg -R ../shared/subrepo-2 showconfig paths |
|
731 | $ hg -R ../shared/subrepo-2 showconfig paths | |
732 | paths.default=$TESTTMP/subrepo-status/subrepo-2 |
|
732 | paths.default=$TESTTMP/subrepo-status/subrepo-2 | |
733 | $ hg -R ../shared/subrepo-1 sum --remote |
|
733 | $ hg -R ../shared/subrepo-1 sum --remote | |
734 | parent: -1:000000000000 tip (empty repository) |
|
734 | parent: -1:000000000000 tip (empty repository) | |
735 | branch: default |
|
735 | branch: default | |
736 | commit: (clean) |
|
736 | commit: (clean) | |
737 | update: (current) |
|
737 | update: (current) | |
738 | remote: (synced) |
|
738 | remote: (synced) | |
739 |
|
739 | |||
740 | Check hg update --clean |
|
740 | Check hg update --clean | |
741 | $ cd $TESTTMP/t |
|
741 | $ cd $TESTTMP/t | |
742 | $ rm -r t/t.orig |
|
742 | $ rm -r t/t.orig | |
743 | $ hg status -S --all |
|
743 | $ hg status -S --all | |
744 | C .hgsub |
|
744 | C .hgsub | |
745 | C .hgsubstate |
|
745 | C .hgsubstate | |
746 | C a |
|
746 | C a | |
747 | C s/.hgsub |
|
747 | C s/.hgsub | |
748 | C s/.hgsubstate |
|
748 | C s/.hgsubstate | |
749 | C s/a |
|
749 | C s/a | |
750 | C s/ss/a |
|
750 | C s/ss/a | |
751 | C t/t |
|
751 | C t/t | |
752 | $ echo c1 > s/a |
|
752 | $ echo c1 > s/a | |
753 | $ cd s |
|
753 | $ cd s | |
754 | $ echo c1 > b |
|
754 | $ echo c1 > b | |
755 | $ echo c1 > c |
|
755 | $ echo c1 > c | |
756 | $ hg add b |
|
756 | $ hg add b | |
757 | $ cd .. |
|
757 | $ cd .. | |
758 | $ hg status -S |
|
758 | $ hg status -S | |
759 | M s/a |
|
759 | M s/a | |
760 | A s/b |
|
760 | A s/b | |
761 | ? s/c |
|
761 | ? s/c | |
762 | $ hg update -C |
|
762 | $ hg update -C | |
763 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
763 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
764 | $ hg status -S |
|
764 | $ hg status -S | |
765 | ? s/b |
|
765 | ? s/b | |
766 | ? s/c |
|
766 | ? s/c | |
767 |
|
767 | |||
768 | Sticky subrepositories, no changes |
|
768 | Sticky subrepositories, no changes | |
769 | $ cd $TESTTMP/t |
|
769 | $ cd $TESTTMP/t | |
770 | $ hg id |
|
770 | $ hg id | |
771 | 925c17564ef8 tip |
|
771 | 925c17564ef8 tip | |
772 | $ hg -R s id |
|
772 | $ hg -R s id | |
773 | 12a213df6fa9 tip |
|
773 | 12a213df6fa9 tip | |
774 | $ hg -R t id |
|
774 | $ hg -R t id | |
775 | 52c0adc0515a tip |
|
775 | 52c0adc0515a tip | |
776 | $ hg update 11 |
|
776 | $ hg update 11 | |
777 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
777 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
778 | $ hg id |
|
778 | $ hg id | |
779 | 365661e5936a |
|
779 | 365661e5936a | |
780 | $ hg -R s id |
|
780 | $ hg -R s id | |
781 | fc627a69481f |
|
781 | fc627a69481f | |
782 | $ hg -R t id |
|
782 | $ hg -R t id | |
783 | e95bcfa18a35 |
|
783 | e95bcfa18a35 | |
784 |
|
784 | |||
785 | Sticky subrepositorys, file changes |
|
785 | Sticky subrepositorys, file changes | |
786 | $ touch s/f1 |
|
786 | $ touch s/f1 | |
787 | $ touch t/f1 |
|
787 | $ touch t/f1 | |
788 | $ hg add -S s/f1 |
|
788 | $ hg add -S s/f1 | |
789 | $ hg add -S t/f1 |
|
789 | $ hg add -S t/f1 | |
790 | $ hg id |
|
790 | $ hg id | |
791 | 365661e5936a+ |
|
791 | 365661e5936a+ | |
792 | $ hg -R s id |
|
792 | $ hg -R s id | |
793 | fc627a69481f+ |
|
793 | fc627a69481f+ | |
794 | $ hg -R t id |
|
794 | $ hg -R t id | |
795 | e95bcfa18a35+ |
|
795 | e95bcfa18a35+ | |
796 | $ hg update tip |
|
796 | $ hg update tip | |
797 | subrepository sources for s differ |
|
797 | subrepository sources for s differ | |
798 | use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)? |
|
798 | use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)? | |
799 | l |
|
799 | l | |
800 | subrepository sources for t differ |
|
800 | subrepository sources for t differ | |
801 | use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)? |
|
801 | use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)? | |
802 | l |
|
802 | l | |
803 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
803 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
804 | $ hg id |
|
804 | $ hg id | |
805 | 925c17564ef8+ tip |
|
805 | 925c17564ef8+ tip | |
806 | $ hg -R s id |
|
806 | $ hg -R s id | |
807 | fc627a69481f+ |
|
807 | fc627a69481f+ | |
808 | $ hg -R t id |
|
808 | $ hg -R t id | |
809 | e95bcfa18a35+ |
|
809 | e95bcfa18a35+ | |
810 | $ hg update --clean tip |
|
810 | $ hg update --clean tip | |
811 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
811 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
812 |
|
812 | |||
813 | Sticky subrepository, revision updates |
|
813 | Sticky subrepository, revision updates | |
814 | $ hg id |
|
814 | $ hg id | |
815 | 925c17564ef8 tip |
|
815 | 925c17564ef8 tip | |
816 | $ hg -R s id |
|
816 | $ hg -R s id | |
817 | 12a213df6fa9 tip |
|
817 | 12a213df6fa9 tip | |
818 | $ hg -R t id |
|
818 | $ hg -R t id | |
819 | 52c0adc0515a tip |
|
819 | 52c0adc0515a tip | |
820 | $ cd s |
|
820 | $ cd s | |
821 | $ hg update -r -2 |
|
821 | $ hg update -r -2 | |
822 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
822 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
823 | $ cd ../t |
|
823 | $ cd ../t | |
824 | $ hg update -r 2 |
|
824 | $ hg update -r 2 | |
825 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
825 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
826 | $ cd .. |
|
826 | $ cd .. | |
827 | $ hg update 10 |
|
827 | $ hg update 10 | |
828 | subrepository sources for t differ (in checked out version) |
|
828 | subrepository sources for t differ (in checked out version) | |
829 | use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)? |
|
829 | use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)? | |
830 | l |
|
830 | l | |
831 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
831 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
832 | $ hg id |
|
832 | $ hg id | |
833 | e45c8b14af55+ |
|
833 | e45c8b14af55+ | |
834 | $ hg -R s id |
|
834 | $ hg -R s id | |
835 | 02dcf1d70411 |
|
835 | 02dcf1d70411 | |
836 | $ hg -R t id |
|
836 | $ hg -R t id | |
837 | 7af322bc1198 |
|
837 | 7af322bc1198 | |
838 |
|
838 | |||
839 | Sticky subrepository, file changes and revision updates |
|
839 | Sticky subrepository, file changes and revision updates | |
840 | $ touch s/f1 |
|
840 | $ touch s/f1 | |
841 | $ touch t/f1 |
|
841 | $ touch t/f1 | |
842 | $ hg add -S s/f1 |
|
842 | $ hg add -S s/f1 | |
843 | $ hg add -S t/f1 |
|
843 | $ hg add -S t/f1 | |
844 | $ hg id |
|
844 | $ hg id | |
845 | e45c8b14af55+ |
|
845 | e45c8b14af55+ | |
846 | $ hg -R s id |
|
846 | $ hg -R s id | |
847 | 02dcf1d70411+ |
|
847 | 02dcf1d70411+ | |
848 | $ hg -R t id |
|
848 | $ hg -R t id | |
849 | 7af322bc1198+ |
|
849 | 7af322bc1198+ | |
850 | $ hg update tip |
|
850 | $ hg update tip | |
851 | subrepository sources for s differ |
|
851 | subrepository sources for s differ | |
852 | use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)? |
|
852 | use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)? | |
853 | l |
|
853 | l | |
854 | subrepository sources for t differ |
|
854 | subrepository sources for t differ | |
855 | use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)? |
|
855 | use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)? | |
856 | l |
|
856 | l | |
857 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
857 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
858 | $ hg id |
|
858 | $ hg id | |
859 | 925c17564ef8+ tip |
|
859 | 925c17564ef8+ tip | |
860 | $ hg -R s id |
|
860 | $ hg -R s id | |
861 | 02dcf1d70411+ |
|
861 | 02dcf1d70411+ | |
862 | $ hg -R t id |
|
862 | $ hg -R t id | |
863 | 7af322bc1198+ |
|
863 | 7af322bc1198+ | |
864 |
|
864 | |||
865 | Sticky repository, update --clean |
|
865 | Sticky repository, update --clean | |
866 | $ hg update --clean tip |
|
866 | $ hg update --clean tip | |
867 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
867 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
868 | $ hg id |
|
868 | $ hg id | |
869 | 925c17564ef8 tip |
|
869 | 925c17564ef8 tip | |
870 | $ hg -R s id |
|
870 | $ hg -R s id | |
871 | 12a213df6fa9 tip |
|
871 | 12a213df6fa9 tip | |
872 | $ hg -R t id |
|
872 | $ hg -R t id | |
873 | 52c0adc0515a tip |
|
873 | 52c0adc0515a tip | |
874 |
|
874 | |||
875 | Test subrepo already at intended revision: |
|
875 | Test subrepo already at intended revision: | |
876 | $ cd s |
|
876 | $ cd s | |
877 | $ hg update fc627a69481f |
|
877 | $ hg update fc627a69481f | |
878 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
878 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
879 | $ cd .. |
|
879 | $ cd .. | |
880 | $ hg update 11 |
|
880 | $ hg update 11 | |
881 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
881 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
882 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
882 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
883 | $ hg id -n |
|
883 | $ hg id -n | |
884 | 11+ |
|
884 | 11+ | |
885 | $ hg -R s id |
|
885 | $ hg -R s id | |
886 | fc627a69481f |
|
886 | fc627a69481f | |
887 | $ hg -R t id |
|
887 | $ hg -R t id | |
888 | e95bcfa18a35 |
|
888 | e95bcfa18a35 | |
889 |
|
889 | |||
890 | Test that removing .hgsubstate doesn't break anything: |
|
890 | Test that removing .hgsubstate doesn't break anything: | |
891 |
|
891 | |||
892 | $ hg rm -f .hgsubstate |
|
892 | $ hg rm -f .hgsubstate | |
893 | $ hg ci -mrm |
|
893 | $ hg ci -mrm | |
894 | nothing changed |
|
894 | nothing changed | |
895 | [1] |
|
895 | [1] | |
896 | $ hg log -vr tip |
|
896 | $ hg log -vr tip | |
897 | changeset: 13:925c17564ef8 |
|
897 | changeset: 13:925c17564ef8 | |
898 | tag: tip |
|
898 | tag: tip | |
899 | user: test |
|
899 | user: test | |
900 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
900 | date: Thu Jan 01 00:00:00 1970 +0000 | |
901 | files: .hgsubstate |
|
901 | files: .hgsubstate | |
902 | description: |
|
902 | description: | |
903 | 13 |
|
903 | 13 | |
904 |
|
904 | |||
905 |
|
905 | |||
906 |
|
906 | |||
907 | Test that removing .hgsub removes .hgsubstate: |
|
907 | Test that removing .hgsub removes .hgsubstate: | |
908 |
|
908 | |||
909 | $ hg rm .hgsub |
|
909 | $ hg rm .hgsub | |
910 | $ hg ci -mrm2 |
|
910 | $ hg ci -mrm2 | |
911 | created new head |
|
911 | created new head | |
912 | $ hg log -vr tip |
|
912 | $ hg log -vr tip | |
913 | changeset: 14:2400bccd50af |
|
913 | changeset: 14:2400bccd50af | |
914 | tag: tip |
|
914 | tag: tip | |
915 | parent: 11:365661e5936a |
|
915 | parent: 11:365661e5936a | |
916 | user: test |
|
916 | user: test | |
917 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
917 | date: Thu Jan 01 00:00:00 1970 +0000 | |
918 | files: .hgsub .hgsubstate |
|
918 | files: .hgsub .hgsubstate | |
919 | description: |
|
919 | description: | |
920 | rm2 |
|
920 | rm2 | |
921 |
|
921 | |||
922 |
|
922 | |||
923 | Test issue3153: diff -S with deleted subrepos |
|
923 | Test issue3153: diff -S with deleted subrepos | |
924 |
|
924 | |||
925 | $ hg diff --nodates -S -c . |
|
925 | $ hg diff --nodates -S -c . | |
926 | diff -r 365661e5936a -r 2400bccd50af .hgsub |
|
926 | diff -r 365661e5936a -r 2400bccd50af .hgsub | |
927 | --- a/.hgsub |
|
927 | --- a/.hgsub | |
928 | +++ /dev/null |
|
928 | +++ /dev/null | |
929 | @@ -1,2 +0,0 @@ |
|
929 | @@ -1,2 +0,0 @@ | |
930 | -s = s |
|
930 | -s = s | |
931 | -t = t |
|
931 | -t = t | |
932 | diff -r 365661e5936a -r 2400bccd50af .hgsubstate |
|
932 | diff -r 365661e5936a -r 2400bccd50af .hgsubstate | |
933 | --- a/.hgsubstate |
|
933 | --- a/.hgsubstate | |
934 | +++ /dev/null |
|
934 | +++ /dev/null | |
935 | @@ -1,2 +0,0 @@ |
|
935 | @@ -1,2 +0,0 @@ | |
936 | -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s |
|
936 | -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s | |
937 | -e95bcfa18a358dc4936da981ebf4147b4cad1362 t |
|
937 | -e95bcfa18a358dc4936da981ebf4147b4cad1362 t | |
938 |
|
938 | |||
939 | Test behavior of add for explicit path in subrepo: |
|
939 | Test behavior of add for explicit path in subrepo: | |
940 | $ cd .. |
|
940 | $ cd .. | |
941 | $ hg init explicit |
|
941 | $ hg init explicit | |
942 | $ cd explicit |
|
942 | $ cd explicit | |
943 | $ echo s = s > .hgsub |
|
943 | $ echo s = s > .hgsub | |
944 | $ hg add .hgsub |
|
944 | $ hg add .hgsub | |
945 | $ hg init s |
|
945 | $ hg init s | |
946 | $ hg ci -m0 |
|
946 | $ hg ci -m0 | |
947 | Adding with an explicit path in a subrepo adds the file |
|
947 | Adding with an explicit path in a subrepo adds the file | |
948 | $ echo c1 > f1 |
|
948 | $ echo c1 > f1 | |
949 | $ echo c2 > s/f2 |
|
949 | $ echo c2 > s/f2 | |
950 | $ hg st -S |
|
950 | $ hg st -S | |
951 | ? f1 |
|
951 | ? f1 | |
952 | ? s/f2 |
|
952 | ? s/f2 | |
953 | $ hg add s/f2 |
|
953 | $ hg add s/f2 | |
954 | $ hg st -S |
|
954 | $ hg st -S | |
955 | A s/f2 |
|
955 | A s/f2 | |
956 | ? f1 |
|
956 | ? f1 | |
957 | $ hg ci -R s -m0 |
|
957 | $ hg ci -R s -m0 | |
958 | $ hg ci -Am1 |
|
958 | $ hg ci -Am1 | |
959 | adding f1 |
|
959 | adding f1 | |
960 | Adding with an explicit path in a subrepo with -S has the same behavior |
|
960 | Adding with an explicit path in a subrepo with -S has the same behavior | |
961 | $ echo c3 > f3 |
|
961 | $ echo c3 > f3 | |
962 | $ echo c4 > s/f4 |
|
962 | $ echo c4 > s/f4 | |
963 | $ hg st -S |
|
963 | $ hg st -S | |
964 | ? f3 |
|
964 | ? f3 | |
965 | ? s/f4 |
|
965 | ? s/f4 | |
966 | $ hg add -S s/f4 |
|
966 | $ hg add -S s/f4 | |
967 | $ hg st -S |
|
967 | $ hg st -S | |
968 | A s/f4 |
|
968 | A s/f4 | |
969 | ? f3 |
|
969 | ? f3 | |
970 | $ hg ci -R s -m1 |
|
970 | $ hg ci -R s -m1 | |
971 | $ hg ci -Ama2 |
|
971 | $ hg ci -Ama2 | |
972 | adding f3 |
|
972 | adding f3 | |
973 | Adding without a path or pattern silently ignores subrepos |
|
973 | Adding without a path or pattern silently ignores subrepos | |
974 | $ echo c5 > f5 |
|
974 | $ echo c5 > f5 | |
975 | $ echo c6 > s/f6 |
|
975 | $ echo c6 > s/f6 | |
976 | $ echo c7 > s/f7 |
|
976 | $ echo c7 > s/f7 | |
977 | $ hg st -S |
|
977 | $ hg st -S | |
978 | ? f5 |
|
978 | ? f5 | |
979 | ? s/f6 |
|
979 | ? s/f6 | |
980 | ? s/f7 |
|
980 | ? s/f7 | |
981 | $ hg add |
|
981 | $ hg add | |
982 | adding f5 |
|
982 | adding f5 | |
983 | $ hg st -S |
|
983 | $ hg st -S | |
984 | A f5 |
|
984 | A f5 | |
985 | ? s/f6 |
|
985 | ? s/f6 | |
986 | ? s/f7 |
|
986 | ? s/f7 | |
987 | $ hg ci -R s -Am2 |
|
987 | $ hg ci -R s -Am2 | |
988 | adding f6 |
|
988 | adding f6 | |
989 | adding f7 |
|
989 | adding f7 | |
990 | $ hg ci -m3 |
|
990 | $ hg ci -m3 | |
991 | Adding without a path or pattern with -S also adds files in subrepos |
|
991 | Adding without a path or pattern with -S also adds files in subrepos | |
992 | $ echo c8 > f8 |
|
992 | $ echo c8 > f8 | |
993 | $ echo c9 > s/f9 |
|
993 | $ echo c9 > s/f9 | |
994 | $ echo c10 > s/f10 |
|
994 | $ echo c10 > s/f10 | |
995 | $ hg st -S |
|
995 | $ hg st -S | |
996 | ? f8 |
|
996 | ? f8 | |
997 | ? s/f10 |
|
997 | ? s/f10 | |
998 | ? s/f9 |
|
998 | ? s/f9 | |
999 | $ hg add -S |
|
999 | $ hg add -S | |
1000 | adding f8 |
|
1000 | adding f8 | |
1001 | adding s/f10 (glob) |
|
1001 | adding s/f10 (glob) | |
1002 | adding s/f9 (glob) |
|
1002 | adding s/f9 (glob) | |
1003 | $ hg st -S |
|
1003 | $ hg st -S | |
1004 | A f8 |
|
1004 | A f8 | |
1005 | A s/f10 |
|
1005 | A s/f10 | |
1006 | A s/f9 |
|
1006 | A s/f9 | |
1007 | $ hg ci -R s -m3 |
|
1007 | $ hg ci -R s -m3 | |
1008 | $ hg ci -m4 |
|
1008 | $ hg ci -m4 | |
1009 | Adding with a pattern silently ignores subrepos |
|
1009 | Adding with a pattern silently ignores subrepos | |
1010 | $ echo c11 > fm11 |
|
1010 | $ echo c11 > fm11 | |
1011 | $ echo c12 > fn12 |
|
1011 | $ echo c12 > fn12 | |
1012 | $ echo c13 > s/fm13 |
|
1012 | $ echo c13 > s/fm13 | |
1013 | $ echo c14 > s/fn14 |
|
1013 | $ echo c14 > s/fn14 | |
1014 | $ hg st -S |
|
1014 | $ hg st -S | |
1015 | ? fm11 |
|
1015 | ? fm11 | |
1016 | ? fn12 |
|
1016 | ? fn12 | |
1017 | ? s/fm13 |
|
1017 | ? s/fm13 | |
1018 | ? s/fn14 |
|
1018 | ? s/fn14 | |
1019 | $ hg add 'glob:**fm*' |
|
1019 | $ hg add 'glob:**fm*' | |
1020 | adding fm11 |
|
1020 | adding fm11 | |
1021 | $ hg st -S |
|
1021 | $ hg st -S | |
1022 | A fm11 |
|
1022 | A fm11 | |
1023 | ? fn12 |
|
1023 | ? fn12 | |
1024 | ? s/fm13 |
|
1024 | ? s/fm13 | |
1025 | ? s/fn14 |
|
1025 | ? s/fn14 | |
1026 | $ hg ci -R s -Am4 |
|
1026 | $ hg ci -R s -Am4 | |
1027 | adding fm13 |
|
1027 | adding fm13 | |
1028 | adding fn14 |
|
1028 | adding fn14 | |
1029 | $ hg ci -Am5 |
|
1029 | $ hg ci -Am5 | |
1030 | adding fn12 |
|
1030 | adding fn12 | |
1031 | Adding with a pattern with -S also adds matches in subrepos |
|
1031 | Adding with a pattern with -S also adds matches in subrepos | |
1032 | $ echo c15 > fm15 |
|
1032 | $ echo c15 > fm15 | |
1033 | $ echo c16 > fn16 |
|
1033 | $ echo c16 > fn16 | |
1034 | $ echo c17 > s/fm17 |
|
1034 | $ echo c17 > s/fm17 | |
1035 | $ echo c18 > s/fn18 |
|
1035 | $ echo c18 > s/fn18 | |
1036 | $ hg st -S |
|
1036 | $ hg st -S | |
1037 | ? fm15 |
|
1037 | ? fm15 | |
1038 | ? fn16 |
|
1038 | ? fn16 | |
1039 | ? s/fm17 |
|
1039 | ? s/fm17 | |
1040 | ? s/fn18 |
|
1040 | ? s/fn18 | |
1041 | $ hg add -S 'glob:**fm*' |
|
1041 | $ hg add -S 'glob:**fm*' | |
1042 | adding fm15 |
|
1042 | adding fm15 | |
1043 | adding s/fm17 (glob) |
|
1043 | adding s/fm17 (glob) | |
1044 | $ hg st -S |
|
1044 | $ hg st -S | |
1045 | A fm15 |
|
1045 | A fm15 | |
1046 | A s/fm17 |
|
1046 | A s/fm17 | |
1047 | ? fn16 |
|
1047 | ? fn16 | |
1048 | ? s/fn18 |
|
1048 | ? s/fn18 | |
1049 | $ hg ci -R s -Am5 |
|
1049 | $ hg ci -R s -Am5 | |
1050 | adding fn18 |
|
1050 | adding fn18 | |
1051 | $ hg ci -Am6 |
|
1051 | $ hg ci -Am6 | |
1052 | adding fn16 |
|
1052 | adding fn16 | |
1053 |
|
1053 | |||
1054 | Test behavior of forget for explicit path in subrepo: |
|
1054 | Test behavior of forget for explicit path in subrepo: | |
1055 | Forgetting an explicit path in a subrepo untracks the file |
|
1055 | Forgetting an explicit path in a subrepo untracks the file | |
1056 | $ echo c19 > s/f19 |
|
1056 | $ echo c19 > s/f19 | |
1057 | $ hg add s/f19 |
|
1057 | $ hg add s/f19 | |
1058 | $ hg st -S |
|
1058 | $ hg st -S | |
1059 | A s/f19 |
|
1059 | A s/f19 | |
1060 | $ hg forget s/f19 |
|
1060 | $ hg forget s/f19 | |
1061 | $ hg st -S |
|
1061 | $ hg st -S | |
1062 | ? s/f19 |
|
1062 | ? s/f19 | |
1063 | $ rm s/f19 |
|
1063 | $ rm s/f19 | |
1064 | $ cd .. |
|
1064 | $ cd .. | |
1065 |
|
1065 | |||
1066 | Courtesy phases synchronisation to publishing server does not block the push |
|
1066 | Courtesy phases synchronisation to publishing server does not block the push | |
1067 | (issue3781) |
|
1067 | (issue3781) | |
1068 |
|
1068 | |||
1069 | $ cp -r main issue3781 |
|
1069 | $ cp -r main issue3781 | |
1070 | $ cp -r main issue3781-dest |
|
1070 | $ cp -r main issue3781-dest | |
1071 | $ cd issue3781-dest/s |
|
1071 | $ cd issue3781-dest/s | |
1072 | $ hg phase tip # show we have draft changeset |
|
1072 | $ hg phase tip # show we have draft changeset | |
1073 | 5: draft |
|
1073 | 5: draft | |
1074 | $ chmod a-w .hg/store/phaseroots # prevent phase push |
|
1074 | $ chmod a-w .hg/store/phaseroots # prevent phase push | |
1075 | $ cd ../../issue3781 |
|
1075 | $ cd ../../issue3781 | |
1076 | $ cat >> .hg/hgrc << EOF |
|
1076 | $ cat >> .hg/hgrc << EOF | |
1077 | > [paths] |
|
1077 | > [paths] | |
1078 | > default=../issue3781-dest/ |
|
1078 | > default=../issue3781-dest/ | |
1079 | > EOF |
|
1079 | > EOF | |
1080 | $ hg push |
|
1080 | $ hg push | |
1081 | pushing to $TESTTMP/issue3781-dest (glob) |
|
1081 | pushing to $TESTTMP/issue3781-dest (glob) | |
1082 | pushing subrepo s to $TESTTMP/issue3781-dest/s |
|
1082 | pushing subrepo s to $TESTTMP/issue3781-dest/s | |
1083 | searching for changes |
|
1083 | searching for changes | |
1084 | no changes found |
|
1084 | no changes found | |
1085 | searching for changes |
|
1085 | searching for changes | |
1086 | no changes found |
|
1086 | no changes found | |
1087 | [1] |
|
1087 | [1] | |
1088 |
|
1088 |
@@ -1,238 +1,238 b'' | |||||
1 | $ HGMERGE=true; export HGMERGE |
|
1 | $ HGMERGE=true; export HGMERGE | |
2 |
|
2 | |||
3 | $ hg init r1 |
|
3 | $ hg init r1 | |
4 | $ cd r1 |
|
4 | $ cd r1 | |
5 | $ echo a > a |
|
5 | $ echo a > a | |
6 | $ hg addremove |
|
6 | $ hg addremove | |
7 | adding a |
|
7 | adding a | |
8 | $ hg commit -m "1" |
|
8 | $ hg commit -m "1" | |
9 |
|
9 | |||
10 | $ hg clone . ../r2 |
|
10 | $ hg clone . ../r2 | |
11 | updating to branch default |
|
11 | updating to branch default | |
12 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
12 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
13 | $ cd ../r2 |
|
13 | $ cd ../r2 | |
14 | $ hg up |
|
14 | $ hg up | |
15 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
15 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
16 | $ echo abc > a |
|
16 | $ echo abc > a | |
17 | $ hg diff --nodates |
|
17 | $ hg diff --nodates | |
18 | diff -r c19d34741b0a a |
|
18 | diff -r c19d34741b0a a | |
19 | --- a/a |
|
19 | --- a/a | |
20 | +++ b/a |
|
20 | +++ b/a | |
21 | @@ -1,1 +1,1 @@ |
|
21 | @@ -1,1 +1,1 @@ | |
22 | -a |
|
22 | -a | |
23 | +abc |
|
23 | +abc | |
24 |
|
24 | |||
25 | $ cd ../r1 |
|
25 | $ cd ../r1 | |
26 | $ echo b > b |
|
26 | $ echo b > b | |
27 | $ echo a2 > a |
|
27 | $ echo a2 > a | |
28 | $ hg addremove |
|
28 | $ hg addremove | |
29 | adding b |
|
29 | adding b | |
30 | $ hg commit -m "2" |
|
30 | $ hg commit -m "2" | |
31 |
|
31 | |||
32 | $ cd ../r2 |
|
32 | $ cd ../r2 | |
33 | $ hg -q pull ../r1 |
|
33 | $ hg -q pull ../r1 | |
34 | $ hg status |
|
34 | $ hg status | |
35 | M a |
|
35 | M a | |
36 | $ hg parents |
|
36 | $ hg parents | |
37 | changeset: 0:c19d34741b0a |
|
37 | changeset: 0:c19d34741b0a | |
38 | user: test |
|
38 | user: test | |
39 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
39 | date: Thu Jan 01 00:00:00 1970 +0000 | |
40 | summary: 1 |
|
40 | summary: 1 | |
41 |
|
41 | |||
42 | $ hg --debug up |
|
42 | $ hg --debug up | |
43 | searching for copies back to rev 1 |
|
43 | searching for copies back to rev 1 | |
44 | unmatched files in other: |
|
44 | unmatched files in other: | |
45 | b |
|
45 | b | |
46 | resolving manifests |
|
46 | resolving manifests | |
47 |
|
|
47 | branchmerge: False, force: False, partial: False | |
48 | ancestor: c19d34741b0a, local: c19d34741b0a+, remote: 1e71731e6fbb |
|
48 | ancestor: c19d34741b0a, local: c19d34741b0a+, remote: 1e71731e6fbb | |
49 | a: versions differ -> m |
|
49 | a: versions differ -> m | |
50 | preserving a for resolve of a |
|
50 | preserving a for resolve of a | |
51 | b: remote created -> g |
|
51 | b: remote created -> g | |
52 | updating: a 1/2 files (50.00%) |
|
52 | updating: a 1/2 files (50.00%) | |
53 | picked tool 'true' for a (binary False symlink False) |
|
53 | picked tool 'true' for a (binary False symlink False) | |
54 | merging a |
|
54 | merging a | |
55 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a |
|
55 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a | |
56 | updating: b 2/2 files (100.00%) |
|
56 | updating: b 2/2 files (100.00%) | |
57 | getting b |
|
57 | getting b | |
58 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
58 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
59 | $ hg parents |
|
59 | $ hg parents | |
60 | changeset: 1:1e71731e6fbb |
|
60 | changeset: 1:1e71731e6fbb | |
61 | tag: tip |
|
61 | tag: tip | |
62 | user: test |
|
62 | user: test | |
63 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
63 | date: Thu Jan 01 00:00:00 1970 +0000 | |
64 | summary: 2 |
|
64 | summary: 2 | |
65 |
|
65 | |||
66 | $ hg --debug up 0 |
|
66 | $ hg --debug up 0 | |
67 | resolving manifests |
|
67 | resolving manifests | |
68 |
|
|
68 | branchmerge: False, force: False, partial: False | |
69 | ancestor: 1e71731e6fbb, local: 1e71731e6fbb+, remote: c19d34741b0a |
|
69 | ancestor: 1e71731e6fbb, local: 1e71731e6fbb+, remote: c19d34741b0a | |
70 | b: other deleted -> r |
|
70 | b: other deleted -> r | |
71 | a: versions differ -> m |
|
71 | a: versions differ -> m | |
72 | preserving a for resolve of a |
|
72 | preserving a for resolve of a | |
73 | updating: b 1/2 files (50.00%) |
|
73 | updating: b 1/2 files (50.00%) | |
74 | removing b |
|
74 | removing b | |
75 | updating: a 2/2 files (100.00%) |
|
75 | updating: a 2/2 files (100.00%) | |
76 | picked tool 'true' for a (binary False symlink False) |
|
76 | picked tool 'true' for a (binary False symlink False) | |
77 | merging a |
|
77 | merging a | |
78 | my a@1e71731e6fbb+ other a@c19d34741b0a ancestor a@1e71731e6fbb |
|
78 | my a@1e71731e6fbb+ other a@c19d34741b0a ancestor a@1e71731e6fbb | |
79 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved |
|
79 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved | |
80 | $ hg parents |
|
80 | $ hg parents | |
81 | changeset: 0:c19d34741b0a |
|
81 | changeset: 0:c19d34741b0a | |
82 | user: test |
|
82 | user: test | |
83 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
83 | date: Thu Jan 01 00:00:00 1970 +0000 | |
84 | summary: 1 |
|
84 | summary: 1 | |
85 |
|
85 | |||
86 | $ hg --debug merge |
|
86 | $ hg --debug merge | |
87 | abort: nothing to merge |
|
87 | abort: nothing to merge | |
88 | (use 'hg update' instead) |
|
88 | (use 'hg update' instead) | |
89 | [255] |
|
89 | [255] | |
90 | $ hg parents |
|
90 | $ hg parents | |
91 | changeset: 0:c19d34741b0a |
|
91 | changeset: 0:c19d34741b0a | |
92 | user: test |
|
92 | user: test | |
93 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
93 | date: Thu Jan 01 00:00:00 1970 +0000 | |
94 | summary: 1 |
|
94 | summary: 1 | |
95 |
|
95 | |||
96 | $ hg --debug up |
|
96 | $ hg --debug up | |
97 | searching for copies back to rev 1 |
|
97 | searching for copies back to rev 1 | |
98 | unmatched files in other: |
|
98 | unmatched files in other: | |
99 | b |
|
99 | b | |
100 | resolving manifests |
|
100 | resolving manifests | |
101 |
|
|
101 | branchmerge: False, force: False, partial: False | |
102 | ancestor: c19d34741b0a, local: c19d34741b0a+, remote: 1e71731e6fbb |
|
102 | ancestor: c19d34741b0a, local: c19d34741b0a+, remote: 1e71731e6fbb | |
103 | a: versions differ -> m |
|
103 | a: versions differ -> m | |
104 | preserving a for resolve of a |
|
104 | preserving a for resolve of a | |
105 | b: remote created -> g |
|
105 | b: remote created -> g | |
106 | updating: a 1/2 files (50.00%) |
|
106 | updating: a 1/2 files (50.00%) | |
107 | picked tool 'true' for a (binary False symlink False) |
|
107 | picked tool 'true' for a (binary False symlink False) | |
108 | merging a |
|
108 | merging a | |
109 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a |
|
109 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a | |
110 | updating: b 2/2 files (100.00%) |
|
110 | updating: b 2/2 files (100.00%) | |
111 | getting b |
|
111 | getting b | |
112 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
112 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
113 | $ hg parents |
|
113 | $ hg parents | |
114 | changeset: 1:1e71731e6fbb |
|
114 | changeset: 1:1e71731e6fbb | |
115 | tag: tip |
|
115 | tag: tip | |
116 | user: test |
|
116 | user: test | |
117 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
117 | date: Thu Jan 01 00:00:00 1970 +0000 | |
118 | summary: 2 |
|
118 | summary: 2 | |
119 |
|
119 | |||
120 | $ hg -v history |
|
120 | $ hg -v history | |
121 | changeset: 1:1e71731e6fbb |
|
121 | changeset: 1:1e71731e6fbb | |
122 | tag: tip |
|
122 | tag: tip | |
123 | user: test |
|
123 | user: test | |
124 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
124 | date: Thu Jan 01 00:00:00 1970 +0000 | |
125 | files: a b |
|
125 | files: a b | |
126 | description: |
|
126 | description: | |
127 | 2 |
|
127 | 2 | |
128 |
|
128 | |||
129 |
|
129 | |||
130 | changeset: 0:c19d34741b0a |
|
130 | changeset: 0:c19d34741b0a | |
131 | user: test |
|
131 | user: test | |
132 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
132 | date: Thu Jan 01 00:00:00 1970 +0000 | |
133 | files: a |
|
133 | files: a | |
134 | description: |
|
134 | description: | |
135 | 1 |
|
135 | 1 | |
136 |
|
136 | |||
137 |
|
137 | |||
138 | $ hg diff --nodates |
|
138 | $ hg diff --nodates | |
139 | diff -r 1e71731e6fbb a |
|
139 | diff -r 1e71731e6fbb a | |
140 | --- a/a |
|
140 | --- a/a | |
141 | +++ b/a |
|
141 | +++ b/a | |
142 | @@ -1,1 +1,1 @@ |
|
142 | @@ -1,1 +1,1 @@ | |
143 | -a2 |
|
143 | -a2 | |
144 | +abc |
|
144 | +abc | |
145 |
|
145 | |||
146 |
|
146 | |||
147 | create a second head |
|
147 | create a second head | |
148 |
|
148 | |||
149 | $ cd ../r1 |
|
149 | $ cd ../r1 | |
150 | $ hg up 0 |
|
150 | $ hg up 0 | |
151 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
151 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
152 | $ echo b2 > b |
|
152 | $ echo b2 > b | |
153 | $ echo a3 > a |
|
153 | $ echo a3 > a | |
154 | $ hg addremove |
|
154 | $ hg addremove | |
155 | adding b |
|
155 | adding b | |
156 | $ hg commit -m "3" |
|
156 | $ hg commit -m "3" | |
157 | created new head |
|
157 | created new head | |
158 |
|
158 | |||
159 | $ cd ../r2 |
|
159 | $ cd ../r2 | |
160 | $ hg -q pull ../r1 |
|
160 | $ hg -q pull ../r1 | |
161 | $ hg status |
|
161 | $ hg status | |
162 | M a |
|
162 | M a | |
163 | $ hg parents |
|
163 | $ hg parents | |
164 | changeset: 1:1e71731e6fbb |
|
164 | changeset: 1:1e71731e6fbb | |
165 | user: test |
|
165 | user: test | |
166 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
166 | date: Thu Jan 01 00:00:00 1970 +0000 | |
167 | summary: 2 |
|
167 | summary: 2 | |
168 |
|
168 | |||
169 | $ hg --debug up |
|
169 | $ hg --debug up | |
170 | abort: crosses branches (merge branches or use --clean to discard changes) |
|
170 | abort: crosses branches (merge branches or use --clean to discard changes) | |
171 | [255] |
|
171 | [255] | |
172 | $ hg --debug merge |
|
172 | $ hg --debug merge | |
173 | abort: outstanding uncommitted changes |
|
173 | abort: outstanding uncommitted changes | |
174 | (use 'hg status' to list changes) |
|
174 | (use 'hg status' to list changes) | |
175 | [255] |
|
175 | [255] | |
176 | $ hg --debug merge -f |
|
176 | $ hg --debug merge -f | |
177 | searching for copies back to rev 1 |
|
177 | searching for copies back to rev 1 | |
178 | resolving manifests |
|
178 | resolving manifests | |
179 | overwrite: False, partial: False |
|
179 | branchmerge: True, force: True, partial: False | |
180 | ancestor: c19d34741b0a, local: 1e71731e6fbb+, remote: 83c51d0caff4 |
|
180 | ancestor: c19d34741b0a, local: 1e71731e6fbb+, remote: 83c51d0caff4 | |
181 | a: versions differ -> m |
|
181 | a: versions differ -> m | |
182 | preserving a for resolve of a |
|
182 | preserving a for resolve of a | |
183 | b: versions differ -> m |
|
183 | b: versions differ -> m | |
184 | preserving b for resolve of b |
|
184 | preserving b for resolve of b | |
185 | updating: a 1/2 files (50.00%) |
|
185 | updating: a 1/2 files (50.00%) | |
186 | picked tool 'true' for a (binary False symlink False) |
|
186 | picked tool 'true' for a (binary False symlink False) | |
187 | merging a |
|
187 | merging a | |
188 | my a@1e71731e6fbb+ other a@83c51d0caff4 ancestor a@c19d34741b0a |
|
188 | my a@1e71731e6fbb+ other a@83c51d0caff4 ancestor a@c19d34741b0a | |
189 | updating: b 2/2 files (100.00%) |
|
189 | updating: b 2/2 files (100.00%) | |
190 | picked tool 'true' for b (binary False symlink False) |
|
190 | picked tool 'true' for b (binary False symlink False) | |
191 | merging b |
|
191 | merging b | |
192 | my b@1e71731e6fbb+ other b@83c51d0caff4 ancestor b@000000000000 |
|
192 | my b@1e71731e6fbb+ other b@83c51d0caff4 ancestor b@000000000000 | |
193 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
193 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
194 | (branch merge, don't forget to commit) |
|
194 | (branch merge, don't forget to commit) | |
195 | $ hg parents |
|
195 | $ hg parents | |
196 | changeset: 1:1e71731e6fbb |
|
196 | changeset: 1:1e71731e6fbb | |
197 | user: test |
|
197 | user: test | |
198 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
198 | date: Thu Jan 01 00:00:00 1970 +0000 | |
199 | summary: 2 |
|
199 | summary: 2 | |
200 |
|
200 | |||
201 | changeset: 2:83c51d0caff4 |
|
201 | changeset: 2:83c51d0caff4 | |
202 | tag: tip |
|
202 | tag: tip | |
203 | parent: 0:c19d34741b0a |
|
203 | parent: 0:c19d34741b0a | |
204 | user: test |
|
204 | user: test | |
205 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
205 | date: Thu Jan 01 00:00:00 1970 +0000 | |
206 | summary: 3 |
|
206 | summary: 3 | |
207 |
|
207 | |||
208 | $ hg diff --nodates |
|
208 | $ hg diff --nodates | |
209 | diff -r 1e71731e6fbb a |
|
209 | diff -r 1e71731e6fbb a | |
210 | --- a/a |
|
210 | --- a/a | |
211 | +++ b/a |
|
211 | +++ b/a | |
212 | @@ -1,1 +1,1 @@ |
|
212 | @@ -1,1 +1,1 @@ | |
213 | -a2 |
|
213 | -a2 | |
214 | +abc |
|
214 | +abc | |
215 |
|
215 | |||
216 |
|
216 | |||
217 | test a local add |
|
217 | test a local add | |
218 |
|
218 | |||
219 | $ cd .. |
|
219 | $ cd .. | |
220 | $ hg init a |
|
220 | $ hg init a | |
221 | $ hg init b |
|
221 | $ hg init b | |
222 | $ echo a > a/a |
|
222 | $ echo a > a/a | |
223 | $ echo a > b/a |
|
223 | $ echo a > b/a | |
224 | $ hg --cwd a commit -A -m a |
|
224 | $ hg --cwd a commit -A -m a | |
225 | adding a |
|
225 | adding a | |
226 | $ cd b |
|
226 | $ cd b | |
227 | $ hg add a |
|
227 | $ hg add a | |
228 | $ hg pull -u ../a |
|
228 | $ hg pull -u ../a | |
229 | pulling from ../a |
|
229 | pulling from ../a | |
230 | requesting all changes |
|
230 | requesting all changes | |
231 | adding changesets |
|
231 | adding changesets | |
232 | adding manifests |
|
232 | adding manifests | |
233 | adding file changes |
|
233 | adding file changes | |
234 | added 1 changesets with 1 changes to 1 files |
|
234 | added 1 changesets with 1 changes to 1 files | |
235 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
235 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
236 | $ hg st |
|
236 | $ hg st | |
237 |
|
237 | |||
238 | $ cd .. |
|
238 | $ cd .. |
@@ -1,85 +1,85 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 |
|
2 | |||
3 | $ touch a |
|
3 | $ touch a | |
4 | $ hg add a |
|
4 | $ hg add a | |
5 | $ hg commit -m "Added a" |
|
5 | $ hg commit -m "Added a" | |
6 |
|
6 | |||
7 | $ touch main |
|
7 | $ touch main | |
8 | $ hg add main |
|
8 | $ hg add main | |
9 | $ hg commit -m "Added main" |
|
9 | $ hg commit -m "Added main" | |
10 | $ hg checkout 0 |
|
10 | $ hg checkout 0 | |
11 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
11 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
12 |
|
12 | |||
13 | 'main' should be gone: |
|
13 | 'main' should be gone: | |
14 |
|
14 | |||
15 | $ ls |
|
15 | $ ls | |
16 | a |
|
16 | a | |
17 |
|
17 | |||
18 | $ touch side1 |
|
18 | $ touch side1 | |
19 | $ hg add side1 |
|
19 | $ hg add side1 | |
20 | $ hg commit -m "Added side1" |
|
20 | $ hg commit -m "Added side1" | |
21 | created new head |
|
21 | created new head | |
22 | $ touch side2 |
|
22 | $ touch side2 | |
23 | $ hg add side2 |
|
23 | $ hg add side2 | |
24 | $ hg commit -m "Added side2" |
|
24 | $ hg commit -m "Added side2" | |
25 |
|
25 | |||
26 | $ hg log |
|
26 | $ hg log | |
27 | changeset: 3:91ebc10ed028 |
|
27 | changeset: 3:91ebc10ed028 | |
28 | tag: tip |
|
28 | tag: tip | |
29 | user: test |
|
29 | user: test | |
30 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
30 | date: Thu Jan 01 00:00:00 1970 +0000 | |
31 | summary: Added side2 |
|
31 | summary: Added side2 | |
32 |
|
32 | |||
33 | changeset: 2:b932d7dbb1e1 |
|
33 | changeset: 2:b932d7dbb1e1 | |
34 | parent: 0:c2eda428b523 |
|
34 | parent: 0:c2eda428b523 | |
35 | user: test |
|
35 | user: test | |
36 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
36 | date: Thu Jan 01 00:00:00 1970 +0000 | |
37 | summary: Added side1 |
|
37 | summary: Added side1 | |
38 |
|
38 | |||
39 | changeset: 1:71a760306caf |
|
39 | changeset: 1:71a760306caf | |
40 | user: test |
|
40 | user: test | |
41 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
41 | date: Thu Jan 01 00:00:00 1970 +0000 | |
42 | summary: Added main |
|
42 | summary: Added main | |
43 |
|
43 | |||
44 | changeset: 0:c2eda428b523 |
|
44 | changeset: 0:c2eda428b523 | |
45 | user: test |
|
45 | user: test | |
46 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
46 | date: Thu Jan 01 00:00:00 1970 +0000 | |
47 | summary: Added a |
|
47 | summary: Added a | |
48 |
|
48 | |||
49 |
|
49 | |||
50 | $ hg heads |
|
50 | $ hg heads | |
51 | changeset: 3:91ebc10ed028 |
|
51 | changeset: 3:91ebc10ed028 | |
52 | tag: tip |
|
52 | tag: tip | |
53 | user: test |
|
53 | user: test | |
54 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
54 | date: Thu Jan 01 00:00:00 1970 +0000 | |
55 | summary: Added side2 |
|
55 | summary: Added side2 | |
56 |
|
56 | |||
57 | changeset: 1:71a760306caf |
|
57 | changeset: 1:71a760306caf | |
58 | user: test |
|
58 | user: test | |
59 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
59 | date: Thu Jan 01 00:00:00 1970 +0000 | |
60 | summary: Added main |
|
60 | summary: Added main | |
61 |
|
61 | |||
62 | $ ls |
|
62 | $ ls | |
63 | a |
|
63 | a | |
64 | side1 |
|
64 | side1 | |
65 | side2 |
|
65 | side2 | |
66 |
|
66 | |||
67 | $ hg update --debug -C 1 |
|
67 | $ hg update --debug -C 1 | |
68 | resolving manifests |
|
68 | resolving manifests | |
69 |
|
|
69 | branchmerge: False, force: True, partial: False | |
70 | ancestor: 91ebc10ed028+, local: 91ebc10ed028+, remote: 71a760306caf |
|
70 | ancestor: 91ebc10ed028+, local: 91ebc10ed028+, remote: 71a760306caf | |
71 | side1: other deleted -> r |
|
71 | side1: other deleted -> r | |
72 | side2: other deleted -> r |
|
72 | side2: other deleted -> r | |
73 | main: remote created -> g |
|
73 | main: remote created -> g | |
74 | updating: side1 1/3 files (33.33%) |
|
74 | updating: side1 1/3 files (33.33%) | |
75 | removing side1 |
|
75 | removing side1 | |
76 | updating: side2 2/3 files (66.67%) |
|
76 | updating: side2 2/3 files (66.67%) | |
77 | removing side2 |
|
77 | removing side2 | |
78 | updating: main 3/3 files (100.00%) |
|
78 | updating: main 3/3 files (100.00%) | |
79 | getting main |
|
79 | getting main | |
80 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
80 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
81 |
|
81 | |||
82 | $ ls |
|
82 | $ ls | |
83 | a |
|
83 | a | |
84 | main |
|
84 | main | |
85 |
|
85 |
General Comments 0
You need to be logged in to leave comments.
Login now