##// END OF EJS Templates
repair.py: don't import commands.py
Alexis S. L. Carvalho -
r5898:52cfe86e default
parent child Browse files
Show More
@@ -1,127 +1,130 b''
1 # repair.py - functions for repository repair for mercurial
1 # repair.py - functions for repository repair for mercurial
2 #
2 #
3 # Copyright 2005, 2006 Chris Mason <mason@suse.com>
3 # Copyright 2005, 2006 Chris Mason <mason@suse.com>
4 # Copyright 2007 Matt Mackall
4 # Copyright 2007 Matt Mackall
5 #
5 #
6 # This software may be used and distributed according to the terms
6 # This software may be used and distributed according to the terms
7 # of the GNU General Public License, incorporated herein by reference.
7 # of the GNU General Public License, incorporated herein by reference.
8
8
9 import changegroup, revlog, os, commands
9 import changegroup, revlog, os
10
10
11 def strip(ui, repo, rev, backup="all"):
11 def strip(ui, repo, rev, backup="all"):
12 def limitheads(chlog, stop):
12 def limitheads(chlog, stop):
13 """return the list of all nodes that have no children"""
13 """return the list of all nodes that have no children"""
14 p = {}
14 p = {}
15 h = []
15 h = []
16 stoprev = 0
16 stoprev = 0
17 if stop in chlog.nodemap:
17 if stop in chlog.nodemap:
18 stoprev = chlog.rev(stop)
18 stoprev = chlog.rev(stop)
19
19
20 for r in xrange(chlog.count() - 1, -1, -1):
20 for r in xrange(chlog.count() - 1, -1, -1):
21 n = chlog.node(r)
21 n = chlog.node(r)
22 if n not in p:
22 if n not in p:
23 h.append(n)
23 h.append(n)
24 if n == stop:
24 if n == stop:
25 break
25 break
26 if r < stoprev:
26 if r < stoprev:
27 break
27 break
28 for pn in chlog.parents(n):
28 for pn in chlog.parents(n):
29 p[pn] = 1
29 p[pn] = 1
30 return h
30 return h
31
31
32 def bundle(repo, bases, heads, rev, suffix):
32 def bundle(repo, bases, heads, rev, suffix):
33 cg = repo.changegroupsubset(bases, heads, 'strip')
33 cg = repo.changegroupsubset(bases, heads, 'strip')
34 backupdir = repo.join("strip-backup")
34 backupdir = repo.join("strip-backup")
35 if not os.path.isdir(backupdir):
35 if not os.path.isdir(backupdir):
36 os.mkdir(backupdir)
36 os.mkdir(backupdir)
37 name = os.path.join(backupdir, "%s-%s" % (revlog.short(rev), suffix))
37 name = os.path.join(backupdir, "%s-%s" % (revlog.short(rev), suffix))
38 ui.warn("saving bundle to %s\n" % name)
38 ui.warn("saving bundle to %s\n" % name)
39 return changegroup.writebundle(cg, name, "HG10BZ")
39 return changegroup.writebundle(cg, name, "HG10BZ")
40
40
41 def stripall(revnum):
41 def stripall(revnum):
42 mm = repo.changectx(rev).manifest()
42 mm = repo.changectx(rev).manifest()
43 seen = {}
43 seen = {}
44
44
45 for x in xrange(revnum, repo.changelog.count()):
45 for x in xrange(revnum, repo.changelog.count()):
46 for f in repo.changectx(x).files():
46 for f in repo.changectx(x).files():
47 if f in seen:
47 if f in seen:
48 continue
48 continue
49 seen[f] = 1
49 seen[f] = 1
50 if f in mm:
50 if f in mm:
51 filerev = mm[f]
51 filerev = mm[f]
52 else:
52 else:
53 filerev = 0
53 filerev = 0
54 seen[f] = filerev
54 seen[f] = filerev
55 # we go in two steps here so the strip loop happens in a
55 # we go in two steps here so the strip loop happens in a
56 # sensible order. When stripping many files, this helps keep
56 # sensible order. When stripping many files, this helps keep
57 # our disk access patterns under control.
57 # our disk access patterns under control.
58 seen_list = seen.keys()
58 seen_list = seen.keys()
59 seen_list.sort()
59 seen_list.sort()
60 for f in seen_list:
60 for f in seen_list:
61 ff = repo.file(f)
61 ff = repo.file(f)
62 filerev = seen[f]
62 filerev = seen[f]
63 if filerev != 0:
63 if filerev != 0:
64 if filerev in ff.nodemap:
64 if filerev in ff.nodemap:
65 filerev = ff.rev(filerev)
65 filerev = ff.rev(filerev)
66 else:
66 else:
67 filerev = 0
67 filerev = 0
68 ff.strip(filerev, revnum)
68 ff.strip(filerev, revnum)
69
69
70 chlog = repo.changelog
70 chlog = repo.changelog
71 # TODO delete the undo files, and handle undo of merge sets
71 # TODO delete the undo files, and handle undo of merge sets
72 pp = chlog.parents(rev)
72 pp = chlog.parents(rev)
73 revnum = chlog.rev(rev)
73 revnum = chlog.rev(rev)
74
74
75 # save is a list of all the branches we are truncating away
75 # save is a list of all the branches we are truncating away
76 # that we actually want to keep. changegroup will be used
76 # that we actually want to keep. changegroup will be used
77 # to preserve them and add them back after the truncate
77 # to preserve them and add them back after the truncate
78 saveheads = []
78 saveheads = []
79 savebases = {}
79 savebases = {}
80
80
81 heads = limitheads(chlog, rev)
81 heads = limitheads(chlog, rev)
82 seen = {}
82 seen = {}
83
83
84 # search through all the heads, finding those where the revision
84 # search through all the heads, finding those where the revision
85 # we want to strip away is an ancestor. Also look for merges
85 # we want to strip away is an ancestor. Also look for merges
86 # that might be turned into new heads by the strip.
86 # that might be turned into new heads by the strip.
87 while heads:
87 while heads:
88 h = heads.pop()
88 h = heads.pop()
89 n = h
89 n = h
90 while True:
90 while True:
91 seen[n] = 1
91 seen[n] = 1
92 pp = chlog.parents(n)
92 pp = chlog.parents(n)
93 if pp[1] != revlog.nullid:
93 if pp[1] != revlog.nullid:
94 for p in pp:
94 for p in pp:
95 if chlog.rev(p) > revnum and p not in seen:
95 if chlog.rev(p) > revnum and p not in seen:
96 heads.append(p)
96 heads.append(p)
97 if pp[0] == revlog.nullid:
97 if pp[0] == revlog.nullid:
98 break
98 break
99 if chlog.rev(pp[0]) < revnum:
99 if chlog.rev(pp[0]) < revnum:
100 break
100 break
101 n = pp[0]
101 n = pp[0]
102 if n == rev:
102 if n == rev:
103 break
103 break
104 r = chlog.reachable(h, rev)
104 r = chlog.reachable(h, rev)
105 if rev not in r:
105 if rev not in r:
106 saveheads.append(h)
106 saveheads.append(h)
107 for x in r:
107 for x in r:
108 if chlog.rev(x) > revnum:
108 if chlog.rev(x) > revnum:
109 savebases[x] = 1
109 savebases[x] = 1
110
110
111 # create a changegroup for all the branches we need to keep
111 # create a changegroup for all the branches we need to keep
112 if backup == "all":
112 if backup == "all":
113 bundle(repo, [rev], chlog.heads(), rev, 'backup')
113 bundle(repo, [rev], chlog.heads(), rev, 'backup')
114 if saveheads:
114 if saveheads:
115 chgrpfile = bundle(repo, savebases.keys(), saveheads, rev, 'temp')
115 chgrpfile = bundle(repo, savebases.keys(), saveheads, rev, 'temp')
116
116
117 stripall(revnum)
117 stripall(revnum)
118
118
119 change = chlog.read(rev)
119 change = chlog.read(rev)
120 chlog.strip(revnum, revnum)
120 chlog.strip(revnum, revnum)
121 repo.manifest.strip(repo.manifest.rev(change[0]), revnum)
121 repo.manifest.strip(repo.manifest.rev(change[0]), revnum)
122 if saveheads:
122 if saveheads:
123 ui.status("adding branch\n")
123 ui.status("adding branch\n")
124 commands.unbundle(ui, repo, "file:%s" % chgrpfile, update=False)
124 f = open(chgrpfile, "rb")
125 gen = changegroup.readbundle(f, chgrpfile)
126 repo.addchangegroup(gen, 'strip', 'bundle:' + chgrpfile)
127 f.close()
125 if backup != "strip":
128 if backup != "strip":
126 os.unlink(chgrpfile)
129 os.unlink(chgrpfile)
127
130
@@ -1,458 +1,455 b''
1 % help
1 % help
2 mq extension - patch management and development
2 mq extension - patch management and development
3
3
4 This extension lets you work with a stack of patches in a Mercurial
4 This extension lets you work with a stack of patches in a Mercurial
5 repository. It manages two stacks of patches - all known patches, and
5 repository. It manages two stacks of patches - all known patches, and
6 applied patches (subset of known patches).
6 applied patches (subset of known patches).
7
7
8 Known patches are represented as patch files in the .hg/patches
8 Known patches are represented as patch files in the .hg/patches
9 directory. Applied patches are both patch files and changesets.
9 directory. Applied patches are both patch files and changesets.
10
10
11 Common tasks (use "hg help command" for more details):
11 Common tasks (use "hg help command" for more details):
12
12
13 prepare repository to work with patches qinit
13 prepare repository to work with patches qinit
14 create new patch qnew
14 create new patch qnew
15 import existing patch qimport
15 import existing patch qimport
16
16
17 print patch series qseries
17 print patch series qseries
18 print applied patches qapplied
18 print applied patches qapplied
19 print name of top applied patch qtop
19 print name of top applied patch qtop
20
20
21 add known patch to applied stack qpush
21 add known patch to applied stack qpush
22 remove patch from applied stack qpop
22 remove patch from applied stack qpop
23 refresh contents of top applied patch qrefresh
23 refresh contents of top applied patch qrefresh
24
24
25 list of commands:
25 list of commands:
26
26
27 qapplied print the patches already applied
27 qapplied print the patches already applied
28 qclone clone main and patch repository at same time
28 qclone clone main and patch repository at same time
29 qcommit commit changes in the queue repository
29 qcommit commit changes in the queue repository
30 qdelete remove patches from queue
30 qdelete remove patches from queue
31 qdiff diff of the current patch
31 qdiff diff of the current patch
32 qfold fold the named patches into the current patch
32 qfold fold the named patches into the current patch
33 qgoto push or pop patches until named patch is at top of stack
33 qgoto push or pop patches until named patch is at top of stack
34 qguard set or print guards for a patch
34 qguard set or print guards for a patch
35 qheader Print the header of the topmost or specified patch
35 qheader Print the header of the topmost or specified patch
36 qimport import a patch
36 qimport import a patch
37 qinit init a new queue repository
37 qinit init a new queue repository
38 qnew create a new patch
38 qnew create a new patch
39 qnext print the name of the next patch
39 qnext print the name of the next patch
40 qpop pop the current patch off the stack
40 qpop pop the current patch off the stack
41 qprev print the name of the previous patch
41 qprev print the name of the previous patch
42 qpush push the next patch onto the stack
42 qpush push the next patch onto the stack
43 qrefresh update the current patch
43 qrefresh update the current patch
44 qrename rename a patch
44 qrename rename a patch
45 qrestore restore the queue state saved by a rev
45 qrestore restore the queue state saved by a rev
46 qsave save current queue state
46 qsave save current queue state
47 qselect set or print guarded patches to push
47 qselect set or print guarded patches to push
48 qseries print the entire series file
48 qseries print the entire series file
49 qtop print the name of the current patch
49 qtop print the name of the current patch
50 qunapplied print the patches not yet applied
50 qunapplied print the patches not yet applied
51 strip strip a revision and all later revs on the same branch
51 strip strip a revision and all later revs on the same branch
52
52
53 use "hg -v help mq" to show aliases and global options
53 use "hg -v help mq" to show aliases and global options
54 adding a
54 adding a
55 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
55 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
56 adding b/z
56 adding b/z
57 % qinit
57 % qinit
58 % -R qinit
58 % -R qinit
59 % qinit -c
59 % qinit -c
60 A .hgignore
60 A .hgignore
61 A series
61 A series
62 % qnew implies add
62 % qnew implies add
63 A .hgignore
63 A .hgignore
64 A series
64 A series
65 A test.patch
65 A test.patch
66 % qinit; qinit -c
66 % qinit; qinit -c
67 .hgignore:
67 .hgignore:
68 syntax: glob
68 syntax: glob
69 status
69 status
70 guards
70 guards
71 series:
71 series:
72 abort: repository already exists!
72 abort: repository already exists!
73 % qinit; <stuff>; qinit -c
73 % qinit; <stuff>; qinit -c
74 adding .hg/patches/A
74 adding .hg/patches/A
75 adding .hg/patches/B
75 adding .hg/patches/B
76 A .hgignore
76 A .hgignore
77 A A
77 A A
78 A B
78 A B
79 A series
79 A series
80 .hgignore:
80 .hgignore:
81 status
81 status
82 bleh
82 bleh
83 series:
83 series:
84 A
84 A
85 B
85 B
86 % qnew with uncommitted changes
86 % qnew with uncommitted changes
87 abort: local changes found, refresh first
87 abort: local changes found, refresh first
88 A somefile
88 A somefile
89 % qnew with uncommitted changes and missing file (issue 803)
89 % qnew with uncommitted changes and missing file (issue 803)
90 someotherfile: No such file or directory
90 someotherfile: No such file or directory
91 A somefile
91 A somefile
92 issue803.patch
92 issue803.patch
93 Patch queue now empty
93 Patch queue now empty
94 % qnew -m
94 % qnew -m
95 foo bar
95 foo bar
96 % qrefresh
96 % qrefresh
97 foo bar
97 foo bar
98
98
99 diff -r xa
99 diff -r xa
100 --- a/a
100 --- a/a
101 +++ b/a
101 +++ b/a
102 @@ -1,1 +1,2 @@
102 @@ -1,1 +1,2 @@
103 a
103 a
104 +a
104 +a
105 % empty qrefresh
105 % empty qrefresh
106 revision:
106 revision:
107 patch:
107 patch:
108 foo bar
108 foo bar
109
109
110 working dir diff:
110 working dir diff:
111 --- a/a
111 --- a/a
112 +++ b/a
112 +++ b/a
113 @@ -1,1 +1,2 @@
113 @@ -1,1 +1,2 @@
114 a
114 a
115 +a
115 +a
116 % qpop
116 % qpop
117 Patch queue now empty
117 Patch queue now empty
118 % qpush
118 % qpush
119 applying test.patch
119 applying test.patch
120 Now at: test.patch
120 Now at: test.patch
121 % pop/push outside repo
121 % pop/push outside repo
122 Patch queue now empty
122 Patch queue now empty
123 applying test.patch
123 applying test.patch
124 Now at: test.patch
124 Now at: test.patch
125 % qrefresh in subdir
125 % qrefresh in subdir
126 % pop/push -a in subdir
126 % pop/push -a in subdir
127 Patch queue now empty
127 Patch queue now empty
128 applying test.patch
128 applying test.patch
129 applying test2.patch
129 applying test2.patch
130 Now at: test2.patch
130 Now at: test2.patch
131 % qseries
131 % qseries
132 test.patch
132 test.patch
133 test2.patch
133 test2.patch
134 Now at: test.patch
134 Now at: test.patch
135 0 A test.patch: foo bar
135 0 A test.patch: foo bar
136 1 U test2.patch:
136 1 U test2.patch:
137 applying test2.patch
137 applying test2.patch
138 Now at: test2.patch
138 Now at: test2.patch
139 % qapplied
139 % qapplied
140 test.patch
140 test.patch
141 test2.patch
141 test2.patch
142 % qtop
142 % qtop
143 test2.patch
143 test2.patch
144 % qprev
144 % qprev
145 test.patch
145 test.patch
146 % qnext
146 % qnext
147 All patches applied
147 All patches applied
148 % pop, qnext, qprev, qapplied
148 % pop, qnext, qprev, qapplied
149 Now at: test.patch
149 Now at: test.patch
150 test2.patch
150 test2.patch
151 Only one patch applied
151 Only one patch applied
152 test.patch
152 test.patch
153 % commit should fail
153 % commit should fail
154 abort: cannot commit over an applied mq patch
154 abort: cannot commit over an applied mq patch
155 % push should fail
155 % push should fail
156 pushing to ../../k
156 pushing to ../../k
157 abort: source has mq patches applied
157 abort: source has mq patches applied
158 % qunapplied
158 % qunapplied
159 test2.patch
159 test2.patch
160 % qpush/qpop with index
160 % qpush/qpop with index
161 applying test2.patch
161 applying test2.patch
162 Now at: test2.patch
162 Now at: test2.patch
163 Now at: test.patch
163 Now at: test.patch
164 applying test1b.patch
164 applying test1b.patch
165 Now at: test1b.patch
165 Now at: test1b.patch
166 applying test2.patch
166 applying test2.patch
167 Now at: test2.patch
167 Now at: test2.patch
168 Now at: test1b.patch
168 Now at: test1b.patch
169 Now at: test.patch
169 Now at: test.patch
170 applying test1b.patch
170 applying test1b.patch
171 applying test2.patch
171 applying test2.patch
172 Now at: test2.patch
172 Now at: test2.patch
173 % push should succeed
173 % push should succeed
174 Patch queue now empty
174 Patch queue now empty
175 pushing to ../../k
175 pushing to ../../k
176 searching for changes
176 searching for changes
177 adding changesets
177 adding changesets
178 adding manifests
178 adding manifests
179 adding file changes
179 adding file changes
180 added 1 changesets with 1 changes to 1 files
180 added 1 changesets with 1 changes to 1 files
181 % qpush/qpop error codes
181 % qpush/qpop error codes
182 applying test.patch
182 applying test.patch
183 applying test1b.patch
183 applying test1b.patch
184 applying test2.patch
184 applying test2.patch
185 Now at: test2.patch
185 Now at: test2.patch
186 % pops all patches and succeeds
186 % pops all patches and succeeds
187 Patch queue now empty
187 Patch queue now empty
188 qpop -a succeeds
188 qpop -a succeeds
189 % does nothing and succeeds
189 % does nothing and succeeds
190 no patches applied
190 no patches applied
191 qpop -a succeeds
191 qpop -a succeeds
192 % fails - nothing else to pop
192 % fails - nothing else to pop
193 no patches applied
193 no patches applied
194 qpop fails
194 qpop fails
195 % pushes a patch and succeeds
195 % pushes a patch and succeeds
196 applying test.patch
196 applying test.patch
197 Now at: test.patch
197 Now at: test.patch
198 qpush succeeds
198 qpush succeeds
199 % pops a patch and succeeds
199 % pops a patch and succeeds
200 Patch queue now empty
200 Patch queue now empty
201 qpop succeeds
201 qpop succeeds
202 % pushes up to test1b.patch and succeeds
202 % pushes up to test1b.patch and succeeds
203 applying test.patch
203 applying test.patch
204 applying test1b.patch
204 applying test1b.patch
205 Now at: test1b.patch
205 Now at: test1b.patch
206 qpush test1b.patch succeeds
206 qpush test1b.patch succeeds
207 % does nothing and succeeds
207 % does nothing and succeeds
208 qpush: test1b.patch is already at the top
208 qpush: test1b.patch is already at the top
209 qpush test1b.patch succeeds
209 qpush test1b.patch succeeds
210 % does nothing and succeeds
210 % does nothing and succeeds
211 qpop: test1b.patch is already at the top
211 qpop: test1b.patch is already at the top
212 qpop test1b.patch succeeds
212 qpop test1b.patch succeeds
213 % fails - can't push to this patch
213 % fails - can't push to this patch
214 abort: cannot push to a previous patch: test.patch
214 abort: cannot push to a previous patch: test.patch
215 qpush test.patch fails
215 qpush test.patch fails
216 % fails - can't pop to this patch
216 % fails - can't pop to this patch
217 abort: patch test2.patch is not applied
217 abort: patch test2.patch is not applied
218 qpop test2.patch fails
218 qpop test2.patch fails
219 % pops up to test.patch and succeeds
219 % pops up to test.patch and succeeds
220 Now at: test.patch
220 Now at: test.patch
221 qpop test.patch succeeds
221 qpop test.patch succeeds
222 % pushes all patches and succeeds
222 % pushes all patches and succeeds
223 applying test1b.patch
223 applying test1b.patch
224 applying test2.patch
224 applying test2.patch
225 Now at: test2.patch
225 Now at: test2.patch
226 qpush -a succeeds
226 qpush -a succeeds
227 % does nothing and succeeds
227 % does nothing and succeeds
228 all patches are currently applied
228 all patches are currently applied
229 qpush -a succeeds
229 qpush -a succeeds
230 % fails - nothing else to push
230 % fails - nothing else to push
231 patch series already fully applied
231 patch series already fully applied
232 qpush fails
232 qpush fails
233 % does nothing and succeeds
233 % does nothing and succeeds
234 all patches are currently applied
234 all patches are currently applied
235 qpush test2.patch succeeds
235 qpush test2.patch succeeds
236 % strip
236 % strip
237 adding x
237 adding x
238 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
238 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
239 saving bundle to
239 saving bundle to
240 adding changesets
240 adding changesets
241 adding manifests
241 adding manifests
242 adding file changes
242 adding file changes
243 added 1 changesets with 1 changes to 1 files
243 added 1 changesets with 1 changes to 1 files
244 (run 'hg update' to get a working copy)
244 (run 'hg update' to get a working copy)
245 % cd b; hg qrefresh
245 % cd b; hg qrefresh
246 adding a
246 adding a
247 foo
247 foo
248
248
249 diff -r cb9a9f314b8b a
249 diff -r cb9a9f314b8b a
250 --- a/a
250 --- a/a
251 +++ b/a
251 +++ b/a
252 @@ -1,1 +1,2 @@
252 @@ -1,1 +1,2 @@
253 a
253 a
254 +a
254 +a
255 diff -r cb9a9f314b8b b/f
255 diff -r cb9a9f314b8b b/f
256 --- /dev/null
256 --- /dev/null
257 +++ b/b/f
257 +++ b/b/f
258 @@ -0,0 +1,1 @@
258 @@ -0,0 +1,1 @@
259 +f
259 +f
260 % hg qrefresh .
260 % hg qrefresh .
261 foo
261 foo
262
262
263 diff -r cb9a9f314b8b b/f
263 diff -r cb9a9f314b8b b/f
264 --- /dev/null
264 --- /dev/null
265 +++ b/b/f
265 +++ b/b/f
266 @@ -0,0 +1,1 @@
266 @@ -0,0 +1,1 @@
267 +f
267 +f
268 M a
268 M a
269 % qpush failure
269 % qpush failure
270 Patch queue now empty
270 Patch queue now empty
271 applying foo
271 applying foo
272 applying bar
272 applying bar
273 file foo already exists
273 file foo already exists
274 1 out of 1 hunk FAILED -- saving rejects to file foo.rej
274 1 out of 1 hunk FAILED -- saving rejects to file foo.rej
275 patch failed, unable to continue (try -v)
275 patch failed, unable to continue (try -v)
276 patch failed, rejects left in working dir
276 patch failed, rejects left in working dir
277 Errors during apply, please fix and refresh bar
277 Errors during apply, please fix and refresh bar
278 ? foo
278 ? foo
279 ? foo.rej
279 ? foo.rej
280 % mq tags
280 % mq tags
281 0 qparent
281 0 qparent
282 1 qbase foo
282 1 qbase foo
283 2 qtip bar tip
283 2 qtip bar tip
284 new file
284 new file
285
285
286 diff --git a/new b/new
286 diff --git a/new b/new
287 new file mode 100755
287 new file mode 100755
288 --- /dev/null
288 --- /dev/null
289 +++ b/new
289 +++ b/new
290 @@ -0,0 +1,1 @@
290 @@ -0,0 +1,1 @@
291 +foo
291 +foo
292 copy file
292 copy file
293
293
294 diff --git a/new b/copy
294 diff --git a/new b/copy
295 copy from new
295 copy from new
296 copy to copy
296 copy to copy
297 Now at: new
297 Now at: new
298 applying copy
298 applying copy
299 Now at: copy
299 Now at: copy
300 diff --git a/new b/copy
300 diff --git a/new b/copy
301 copy from new
301 copy from new
302 copy to copy
302 copy to copy
303 diff --git a/new b/copy
303 diff --git a/new b/copy
304 copy from new
304 copy from new
305 copy to copy
305 copy to copy
306 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
306 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
307 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
307 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
308 adding branch
308 adding branch
309 adding changesets
309 adding changesets
310 adding manifests
310 adding manifests
311 adding file changes
311 adding file changes
312 added 1 changesets with 1 changes to 1 files
312 added 1 changesets with 1 changes to 1 files
313 (run 'hg update' to get a working copy)
314 Patch queue now empty
313 Patch queue now empty
315 applying bar
314 applying bar
316 Now at: bar
315 Now at: bar
317 diff --git a/bar b/bar
316 diff --git a/bar b/bar
318 new file mode 100644
317 new file mode 100644
319 --- /dev/null
318 --- /dev/null
320 +++ b/bar
319 +++ b/bar
321 @@ -0,0 +1,1 @@
320 @@ -0,0 +1,1 @@
322 +bar
321 +bar
323 diff --git a/foo b/baz
322 diff --git a/foo b/baz
324 rename from foo
323 rename from foo
325 rename to baz
324 rename to baz
326 2 baz (foo)
325 2 baz (foo)
327 diff --git a/bar b/bar
326 diff --git a/bar b/bar
328 new file mode 100644
327 new file mode 100644
329 --- /dev/null
328 --- /dev/null
330 +++ b/bar
329 +++ b/bar
331 @@ -0,0 +1,1 @@
330 @@ -0,0 +1,1 @@
332 +bar
331 +bar
333 diff --git a/foo b/baz
332 diff --git a/foo b/baz
334 rename from foo
333 rename from foo
335 rename to baz
334 rename to baz
336 2 baz (foo)
335 2 baz (foo)
337 diff --git a/bar b/bar
336 diff --git a/bar b/bar
338 diff --git a/foo b/baz
337 diff --git a/foo b/baz
339
338
340 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
339 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
341 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
340 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
342 adding branch
341 adding branch
343 adding changesets
342 adding changesets
344 adding manifests
343 adding manifests
345 adding file changes
344 adding file changes
346 added 1 changesets with 1 changes to 1 files
345 added 1 changesets with 1 changes to 1 files
347 (run 'hg update' to get a working copy)
348 Patch queue now empty
346 Patch queue now empty
349 applying bar
347 applying bar
350 Now at: bar
348 Now at: bar
351 diff --git a/foo b/bleh
349 diff --git a/foo b/bleh
352 rename from foo
350 rename from foo
353 rename to bleh
351 rename to bleh
354 diff --git a/quux b/quux
352 diff --git a/quux b/quux
355 new file mode 100644
353 new file mode 100644
356 --- /dev/null
354 --- /dev/null
357 +++ b/quux
355 +++ b/quux
358 @@ -0,0 +1,1 @@
356 @@ -0,0 +1,1 @@
359 +bar
357 +bar
360 3 bleh (foo)
358 3 bleh (foo)
361 diff --git a/foo b/barney
359 diff --git a/foo b/barney
362 rename from foo
360 rename from foo
363 rename to barney
361 rename to barney
364 diff --git a/fred b/fred
362 diff --git a/fred b/fred
365 new file mode 100644
363 new file mode 100644
366 --- /dev/null
364 --- /dev/null
367 +++ b/fred
365 +++ b/fred
368 @@ -0,0 +1,1 @@
366 @@ -0,0 +1,1 @@
369 +bar
367 +bar
370 3 barney (foo)
368 3 barney (foo)
371 % refresh omitting an added file
369 % refresh omitting an added file
372 C newfile
370 C newfile
373 A newfile
371 A newfile
374 Now at: bar
372 Now at: bar
375 % create a git patch
373 % create a git patch
376 diff --git a/alexander b/alexander
374 diff --git a/alexander b/alexander
377 % create a git binary patch
375 % create a git binary patch
378 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
376 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
379 diff --git a/bucephalus b/bucephalus
377 diff --git a/bucephalus b/bucephalus
380 % check binary patches can be popped and pushed
378 % check binary patches can be popped and pushed
381 Now at: addalexander
379 Now at: addalexander
382 applying addbucephalus
380 applying addbucephalus
383 Now at: addbucephalus
381 Now at: addbucephalus
384 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
382 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
385 % strip again
383 % strip again
386 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
384 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
387 merging foo
385 merging foo
388 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
386 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
389 (branch merge, don't forget to commit)
387 (branch merge, don't forget to commit)
390 changeset: 3:99615015637b
388 changeset: 3:99615015637b
391 tag: tip
389 tag: tip
392 parent: 2:20cbbe65cff7
390 parent: 2:20cbbe65cff7
393 parent: 1:d2871fc282d4
391 parent: 1:d2871fc282d4
394 user: test
392 user: test
395 date: Thu Jan 01 00:00:00 1970 +0000
393 date: Thu Jan 01 00:00:00 1970 +0000
396 summary: merge
394 summary: merge
397
395
398 changeset: 2:20cbbe65cff7
396 changeset: 2:20cbbe65cff7
399 parent: 0:53245c60e682
397 parent: 0:53245c60e682
400 user: test
398 user: test
401 date: Thu Jan 01 00:00:00 1970 +0000
399 date: Thu Jan 01 00:00:00 1970 +0000
402 summary: change foo 2
400 summary: change foo 2
403
401
404 changeset: 1:d2871fc282d4
402 changeset: 1:d2871fc282d4
405 user: test
403 user: test
406 date: Thu Jan 01 00:00:00 1970 +0000
404 date: Thu Jan 01 00:00:00 1970 +0000
407 summary: change foo 1
405 summary: change foo 1
408
406
409 changeset: 0:53245c60e682
407 changeset: 0:53245c60e682
410 user: test
408 user: test
411 date: Thu Jan 01 00:00:00 1970 +0000
409 date: Thu Jan 01 00:00:00 1970 +0000
412 summary: add foo
410 summary: add foo
413
411
414 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
412 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
415 saving bundle to
413 saving bundle to
416 saving bundle to
414 saving bundle to
417 adding branch
415 adding branch
418 adding changesets
416 adding changesets
419 adding manifests
417 adding manifests
420 adding file changes
418 adding file changes
421 added 1 changesets with 1 changes to 1 files
419 added 1 changesets with 1 changes to 1 files
422 (run 'hg update' to get a working copy)
423 changeset: 1:20cbbe65cff7
420 changeset: 1:20cbbe65cff7
424 tag: tip
421 tag: tip
425 user: test
422 user: test
426 date: Thu Jan 01 00:00:00 1970 +0000
423 date: Thu Jan 01 00:00:00 1970 +0000
427 summary: change foo 2
424 summary: change foo 2
428
425
429 changeset: 0:53245c60e682
426 changeset: 0:53245c60e682
430 user: test
427 user: test
431 date: Thu Jan 01 00:00:00 1970 +0000
428 date: Thu Jan 01 00:00:00 1970 +0000
432 summary: add foo
429 summary: add foo
433
430
434 % qclone
431 % qclone
435 abort: versioned patch repository not found (see qinit -c)
432 abort: versioned patch repository not found (see qinit -c)
436 adding .hg/patches/patch1
433 adding .hg/patches/patch1
437 main repo:
434 main repo:
438 rev 1: change foo
435 rev 1: change foo
439 rev 0: add foo
436 rev 0: add foo
440 patch repo:
437 patch repo:
441 rev 0: checkpoint
438 rev 0: checkpoint
442 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
439 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
443 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
440 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
444 main repo:
441 main repo:
445 rev 0: add foo
442 rev 0: add foo
446 patch repo:
443 patch repo:
447 rev 0: checkpoint
444 rev 0: checkpoint
448 Patch queue now empty
445 Patch queue now empty
449 main repo:
446 main repo:
450 rev 0: add foo
447 rev 0: add foo
451 patch repo:
448 patch repo:
452 rev 0: checkpoint
449 rev 0: checkpoint
453 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
450 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
454 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
451 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
455 main repo:
452 main repo:
456 rev 0: add foo
453 rev 0: add foo
457 patch repo:
454 patch repo:
458 rev 0: checkpoint
455 rev 0: checkpoint
General Comments 0
You need to be logged in to leave comments. Login now