Show More
@@ -2418,6 +2418,18 b' def strip(ui, repo, rev, **opts):' | |||
|
2418 | 2418 | elif rev not in (cl.ancestor(p[0], rev), cl.ancestor(p[1], rev)): |
|
2419 | 2419 | update = False |
|
2420 | 2420 | |
|
2421 | q = repo.mq | |
|
2422 | if q.applied: | |
|
2423 | if rev == cl.ancestor(repo.lookup('qtip'), rev): | |
|
2424 | q.applied_dirty = True | |
|
2425 | start = 0 | |
|
2426 | end = len(q.applied) | |
|
2427 | applied_list = [i.node for i in q.applied] | |
|
2428 | if rev in applied_list: | |
|
2429 | start = applied_list.index(rev) | |
|
2430 | del q.applied[start:end] | |
|
2431 | q.save_dirty() | |
|
2432 | ||
|
2421 | 2433 | repo.mq.strip(repo, rev, backup=backup, update=update, force=opts['force']) |
|
2422 | 2434 | return 0 |
|
2423 | 2435 |
@@ -53,3 +53,19 b' hg parents' | |||
|
53 | 53 | hg strip 4 2>&1 | hidebackup |
|
54 | 54 | echo % after strip of merge parent |
|
55 | 55 | hg parents |
|
56 | ||
|
57 | #strip of applied mq should cleanup status file | |
|
58 | hg up -C 3 | |
|
59 | echo fooagain >> bar | |
|
60 | hg ci -mf | |
|
61 | hg qimport -r tip:2 | |
|
62 | echo % applied patches before strip | |
|
63 | hg qapplied | |
|
64 | echo % stripping revision in queue | |
|
65 | hg strip 3 | hidebackup | |
|
66 | echo % applied patches after stripping rev in queue | |
|
67 | hg qapplied | |
|
68 | echo % stripping ancestor of queue | |
|
69 | hg strip 1 | hidebackup | |
|
70 | echo % applied patches after stripping ancestor of queue | |
|
71 | hg qapplied |
@@ -165,3 +165,17 b' user: test' | |||
|
165 | 165 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
166 | 166 | summary: b |
|
167 | 167 | |
|
168 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
169 | % applied patches before strip | |
|
170 | 2.diff | |
|
171 | 3.diff | |
|
172 | 4.diff | |
|
173 | % stripping revision in queue | |
|
174 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
175 | saved backup bundle to | |
|
176 | % applied patches after stripping rev in queue | |
|
177 | 2.diff | |
|
178 | % stripping ancestor of queue | |
|
179 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
180 | saved backup bundle to | |
|
181 | % applied patches after stripping ancestor of queue |
@@ -400,15 +400,13 b' 2 bar qtip tip' | |||
|
400 | 400 | popping bar |
|
401 | 401 | now at: foo |
|
402 | 402 | changeset: 0:cb9a9f314b8b |
|
403 | mq status file refers to unknown node | |
|
404 | 403 | tag: tip |
|
405 | 404 | user: test |
|
406 | 405 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
407 | 406 | summary: a |
|
408 | 407 | |
|
409 | mq status file refers to unknown node | |
|
410 | 408 | default 0:cb9a9f314b8b |
|
411 | abort: trying to pop unknown node | |
|
409 | no patches applied | |
|
412 | 410 | new file |
|
413 | 411 | |
|
414 | 412 | diff --git a/new b/new |
General Comments 0
You need to be logged in to leave comments.
Login now