Show More
@@ -2418,6 +2418,18 b' def strip(ui, repo, rev, **opts):' | |||||
2418 | elif rev not in (cl.ancestor(p[0], rev), cl.ancestor(p[1], rev)): |
|
2418 | elif rev not in (cl.ancestor(p[0], rev), cl.ancestor(p[1], rev)): | |
2419 | update = False |
|
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 | repo.mq.strip(repo, rev, backup=backup, update=update, force=opts['force']) |
|
2433 | repo.mq.strip(repo, rev, backup=backup, update=update, force=opts['force']) | |
2422 | return 0 |
|
2434 | return 0 | |
2423 |
|
2435 |
@@ -53,3 +53,19 b' hg parents' | |||||
53 | hg strip 4 2>&1 | hidebackup |
|
53 | hg strip 4 2>&1 | hidebackup | |
54 | echo % after strip of merge parent |
|
54 | echo % after strip of merge parent | |
55 | hg parents |
|
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 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
165 | date: Thu Jan 01 00:00:00 1970 +0000 | |
166 | summary: b |
|
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 | popping bar |
|
400 | popping bar | |
401 | now at: foo |
|
401 | now at: foo | |
402 | changeset: 0:cb9a9f314b8b |
|
402 | changeset: 0:cb9a9f314b8b | |
403 | mq status file refers to unknown node |
|
|||
404 | tag: tip |
|
403 | tag: tip | |
405 | user: test |
|
404 | user: test | |
406 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
405 | date: Thu Jan 01 00:00:00 1970 +0000 | |
407 | summary: a |
|
406 | summary: a | |
408 |
|
407 | |||
409 | mq status file refers to unknown node |
|
|||
410 | default 0:cb9a9f314b8b |
|
408 | default 0:cb9a9f314b8b | |
411 | abort: trying to pop unknown node |
|
409 | no patches applied | |
412 | new file |
|
410 | new file | |
413 |
|
411 | |||
414 | diff --git a/new b/new |
|
412 | diff --git a/new b/new |
General Comments 0
You need to be logged in to leave comments.
Login now