Details
Details
- Reviewers
marmoute pulkit - Group Reviewers
hg-reviewers - Commits
- rHG69b091cdc506: shelve: fix ordering of merge labels
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- stable
- Lint
No Linters Available - Unit
No Unit Test Coverage
( )
marmoute | |
pulkit |
hg-reviewers |
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/shelve.py (2 lines) | |||
M | tests/test-shelve.t (4 lines) | |||
M | tests/test-shelve2.t (12 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
d3f2691a53f8 | 68fb657b86b2 | Kyle Lippincott | Feb 20 2020, 7:21 PM |
(b'phases', b'new-commit'): phases.secret, | (b'phases', b'new-commit'): phases.secret, | ||||
} | } | ||||
with repo.ui.configoverride(overrides, b'unshelve'): | with repo.ui.configoverride(overrides, b'unshelve'): | ||||
ui.status(_(b'rebasing shelved changes\n')) | ui.status(_(b'rebasing shelved changes\n')) | ||||
stats = merge.graft( | stats = merge.graft( | ||||
repo, | repo, | ||||
shelvectx, | shelvectx, | ||||
shelvectx.p1(), | shelvectx.p1(), | ||||
labels=[b'shelve', b'working-copy'], | labels=[b'working-copy', b'shelve'], | ||||
keepconflictparent=True, | keepconflictparent=True, | ||||
) | ) | ||||
if stats.unresolvedcount: | if stats.unresolvedcount: | ||||
tr.close() | tr.close() | ||||
nodestoremove = [ | nodestoremove = [ | ||||
repo.changelog.node(rev) | repo.changelog.node(rev) | ||||
for rev in pycompat.xrange(oldtiprev, len(repo)) | for rev in pycompat.xrange(oldtiprev, len(repo)) |
R b/b | R b/b | ||||
? a/a.orig | ? a/a.orig | ||||
$ hg diff | $ hg diff | ||||
diff --git a/a/a b/a/a | diff --git a/a/a b/a/a | ||||
--- a/a/a | --- a/a/a | ||||
+++ b/a/a | +++ b/a/a | ||||
@@ -1,2 +1,6 @@ | @@ -1,2 +1,6 @@ | ||||
a | a | ||||
+<<<<<<< shelve: 2377350b6337 - shelve: pending changes temporary commit | +<<<<<<< working-copy: 2377350b6337 - shelve: pending changes temporary commit | ||||
c | c | ||||
+======= | +======= | ||||
+a | +a | ||||
+>>>>>>> working-copy: a68ec3400638 - shelve: changes to: [mq]: second.patch | +>>>>>>> shelve: a68ec3400638 - shelve: changes to: [mq]: second.patch | ||||
diff --git a/b/b b/b.rename/b | diff --git a/b/b b/b.rename/b | ||||
rename from b/b | rename from b/b | ||||
rename to b.rename/b | rename to b.rename/b | ||||
diff --git a/c b/c.copy | diff --git a/c b/c.copy | ||||
copy from c | copy from c | ||||
copy to c.copy | copy to c.copy | ||||
$ hg resolve -l | $ hg resolve -l | ||||
U a/a | U a/a |
o 0 a test 1970-01-01 00:00 +0000 | o 0 a test 1970-01-01 00:00 +0000 | ||||
#endif | #endif | ||||
$ hg st | $ hg st | ||||
M f | M f | ||||
? f.orig | ? f.orig | ||||
$ cat f | $ cat f | ||||
<<<<<<< shelve: d44eae5c3d33 - shelve: pending changes temporary commit | <<<<<<< working-copy: d44eae5c3d33 - shelve: pending changes temporary commit | ||||
g | g | ||||
======= | ======= | ||||
f | f | ||||
>>>>>>> working-copy: aef214a5229c - shelve: changes to: commit stuff | >>>>>>> shelve: aef214a5229c - shelve: changes to: commit stuff | ||||
$ cat f.orig | $ cat f.orig | ||||
g | g | ||||
$ hg unshelve --abort -t false | $ hg unshelve --abort -t false | ||||
tool option will be ignored | tool option will be ignored | ||||
unshelve of 'default' aborted | unshelve of 'default' aborted | ||||
$ hg st | $ hg st | ||||
M a | M a | ||||
? f.orig | ? f.orig | ||||
merging f | merging f | ||||
warning: conflicts while merging f! (edit, then use 'hg resolve --mark') | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') | ||||
unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | ||||
[1] | [1] | ||||
$ hg st | $ hg st | ||||
M f | M f | ||||
? f.orig | ? f.orig | ||||
$ cat f | $ cat f | ||||
<<<<<<< shelve: 6b563750f973 - test: intermediate other change | <<<<<<< working-copy: 6b563750f973 - test: intermediate other change | ||||
g | g | ||||
======= | ======= | ||||
f | f | ||||
>>>>>>> working-copy: aef214a5229c - shelve: changes to: commit stuff | >>>>>>> shelve: aef214a5229c - shelve: changes to: commit stuff | ||||
$ cat f.orig | $ cat f.orig | ||||
g | g | ||||
#if abortcommand | #if abortcommand | ||||
when in dry-run mode | when in dry-run mode | ||||
$ hg abort --dry-run | $ hg abort --dry-run | ||||
unshelve in progress, will be aborted | unshelve in progress, will be aborted | ||||
#endif | #endif | ||||
$ hg shelve -q | $ hg shelve -q | ||||
$ echo "this is in wdir, conflicts with shelve" >> foo | $ echo "this is in wdir, conflicts with shelve" >> foo | ||||
$ hg unshelve -q | $ hg unshelve -q | ||||
warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') | ||||
unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | ||||
[1] | [1] | ||||
$ cat foo | $ cat foo | ||||
r0 | r0 | ||||
<<<<<<< shelve: 0b2fcf2a90e9 - shelve: pending changes temporary commit | <<<<<<< working-copy: 0b2fcf2a90e9 - shelve: pending changes temporary commit | ||||
this is in wdir, conflicts with shelve | this is in wdir, conflicts with shelve | ||||
======= | ======= | ||||
this will be shelved | this will be shelved | ||||
>>>>>>> working-copy: 9c072a2163db - shelve: changes to: r0 | >>>>>>> shelve: 9c072a2163db - shelve: changes to: r0 | ||||
$ cd .. | $ cd .. |