Using revision number is fragile. Moving to full hash to help with further development.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
hg-reviewers |
Using revision number is fragile. Moving to full hash to help with further development.
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | tests/test-shelve.t (24 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
Boris Feld | May 29 2018, 12:01 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan |
$ hg commit -q -m "Branch commit 2" | $ hg commit -q -m "Branch commit 2" | ||||
$ hg shelve | $ hg shelve | ||||
nothing changed | nothing changed | ||||
[1] | [1] | ||||
cleaning the branches made for name checking tests | cleaning the branches made for name checking tests | ||||
$ hg up default -q | $ hg up default -q | ||||
$ hg strip 3 -q | $ hg strip e9177275307e+6a6d231f43d+882bae7c62c2 -q | ||||
$ hg strip 2 -q | |||||
$ hg strip 1 -q | |||||
create an mq patch - shelving should work fine with a patch applied | create an mq patch - shelving should work fine with a patch applied | ||||
$ echo n > n | $ echo n > n | ||||
$ hg add n | $ hg add n | ||||
$ hg commit n -m second | $ hg commit n -m second | ||||
$ hg qnew second.patch | $ hg qnew second.patch | ||||
$ cd .. | $ cd .. | ||||
$ hg init shelverebase | $ hg init shelverebase | ||||
$ cd shelverebase | $ cd shelverebase | ||||
$ printf 'x\ny\n' > x | $ printf 'x\ny\n' > x | ||||
$ echo z > z | $ echo z > z | ||||
$ hg commit -Aqm xy | $ hg commit -Aqm xy | ||||
$ echo z >> x | $ echo z >> x | ||||
$ hg commit -Aqm z | $ hg commit -Aqm z | ||||
$ hg up 0 | $ hg up 5c4c67fb7dce | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ printf 'a\nx\ny\nz\n' > x | $ printf 'a\nx\ny\nz\n' > x | ||||
$ hg commit -Aqm xyz | $ hg commit -Aqm xyz | ||||
$ echo c >> z | $ echo c >> z | ||||
$ hg shelve | $ hg shelve | ||||
shelved as default | shelved as default | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ hg rebase -d 1 --config extensions.rebase= | $ hg rebase -d 6c103be8f4e4 --config extensions.rebase= | ||||
rebasing 2:323bfa07f744 "xyz" (tip) | rebasing 2:323bfa07f744 "xyz" (tip) | ||||
merging x | merging x | ||||
saved backup bundle to $TESTTMP/shelverebase/.hg/strip-backup/323bfa07f744-78114325-rebase.hg | saved backup bundle to $TESTTMP/shelverebase/.hg/strip-backup/323bfa07f744-78114325-rebase.hg | ||||
$ hg unshelve | $ hg unshelve | ||||
unshelving change 'default' | unshelving change 'default' | ||||
rebasing shelved changes | rebasing shelved changes | ||||
rebasing 4:82a0d7d6ba61 "changes to: xyz" (tip) | rebasing 4:82a0d7d6ba61 "changes to: xyz" (tip) | ||||
$ hg status | $ hg status | ||||
M z | M z | ||||
$ cd .. | $ cd .. | ||||
shelve should only unshelve pending changes (issue4068) | shelve should only unshelve pending changes (issue4068) | ||||
$ hg init onlypendingchanges | $ hg init onlypendingchanges | ||||
$ cd onlypendingchanges | $ cd onlypendingchanges | ||||
$ touch a | $ touch a | ||||
$ hg ci -Aqm a | $ hg ci -Aqm a | ||||
$ touch b | $ touch b | ||||
$ hg ci -Aqm b | $ hg ci -Aqm b | ||||
$ hg up -q 0 | $ hg up -q 3903775176ed | ||||
$ touch c | $ touch c | ||||
$ hg ci -Aqm c | $ hg ci -Aqm c | ||||
$ touch d | $ touch d | ||||
$ hg add d | $ hg add d | ||||
$ hg shelve | $ hg shelve | ||||
shelved as default | shelved as default | ||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ hg up -q 1 | $ hg up -q 0e067c57feba | ||||
$ hg unshelve | $ hg unshelve | ||||
unshelving change 'default' | unshelving change 'default' | ||||
rebasing shelved changes | rebasing shelved changes | ||||
rebasing 3:958bcbd1776e "changes to: c" (tip) | rebasing 3:958bcbd1776e "changes to: c" (tip) | ||||
$ hg status | $ hg status | ||||
A d | A d | ||||
unshelve should work on an ancestor of the original commit | unshelve should work on an ancestor of the original commit | ||||
$ hg shelve | $ hg shelve | ||||
shelved as default | shelved as default | ||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ hg up 0 | $ hg up 3903775176ed | ||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ hg unshelve | $ hg unshelve | ||||
unshelving change 'default' | unshelving change 'default' | ||||
rebasing shelved changes | rebasing shelved changes | ||||
rebasing 3:013284d9655e "changes to: b" (tip) | rebasing 3:013284d9655e "changes to: b" (tip) | ||||
$ hg status | $ hg status | ||||
A d | A d | ||||
test bug 4073 we need to enable obsolete markers for it | test bug 4073 we need to enable obsolete markers for it | ||||
$ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
> [experimental] | > [experimental] | ||||
> evolution.createmarkers=True | > evolution.createmarkers=True | ||||
> EOF | > EOF | ||||
$ hg shelve | $ hg shelve | ||||
shelved as default | shelved as default | ||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ hg debugobsolete `hg --debug id -i -r 1` | $ hg debugobsolete `hg log -r 0e067c57feba -T '{node}'` | ||||
obsoleted 1 changesets | obsoleted 1 changesets | ||||
$ hg unshelve | $ hg unshelve | ||||
unshelving change 'default' | unshelving change 'default' | ||||
unshelve should leave unknown files alone (issue4113) | unshelve should leave unknown files alone (issue4113) | ||||
$ echo e > e | $ echo e > e | ||||
$ hg shelve | $ hg shelve | ||||
? f.orig | ? f.orig | ||||
$ cat f.orig | $ cat f.orig | ||||
g | g | ||||
$ hg shelve --delete default | $ hg shelve --delete default | ||||
Recreate some conflict again | Recreate some conflict again | ||||
$ cd ../repo | $ cd ../repo | ||||
$ hg up -C -r 3 | $ hg up -C -r 2e69b451d1ea | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
(leaving bookmark test) | (leaving bookmark test) | ||||
$ echo y >> a/a | $ echo y >> a/a | ||||
$ hg shelve | $ hg shelve | ||||
shelved as default | shelved as default | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ hg up test | $ hg up test | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ sh $TESTTMP/checkvisibility.sh after-unshelving | $ sh $TESTTMP/checkvisibility.sh after-unshelving | ||||
==== after-unshelving: | ==== after-unshelving: | ||||
VISIBLE 5:703117a2acfb | VISIBLE 5:703117a2acfb | ||||
ACTUAL 5:703117a2acfb | ACTUAL 5:703117a2acfb | ||||
==== | ==== | ||||
== test visibility to external update hook | == test visibility to external update hook | ||||
$ hg update -q -C 5 | $ hg update -q -C 703117a2acfb | ||||
$ cat >> .hg/hgrc <<EOF | $ cat >> .hg/hgrc <<EOF | ||||
> [hooks] | > [hooks] | ||||
> update.visibility = sh $TESTTMP/checkvisibility.sh update | > update.visibility = sh $TESTTMP/checkvisibility.sh update | ||||
> EOF | > EOF | ||||
$ echo nnnn >> n | $ echo nnnn >> n | ||||
unshelve of 'default' aborted | unshelve of 'default' aborted | ||||
abort: $ENOENT$* (glob) | abort: $ENOENT$* (glob) | ||||
[255] | [255] | ||||
Can the user leave the current state? | Can the user leave the current state? | ||||
$ hg up -C . | $ hg up -C . | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
Try again but with a corrupted shelve state file | Try again but with a corrupted shelve state file | ||||
$ hg strip -r 2 -r 1 -q | $ hg strip -r 406ad6fb39eb -r e22bdf25c863 -q | ||||
$ hg up -r 0 -q | $ hg up -r 0 -q | ||||
$ echo '' > root | $ echo '' > root | ||||
$ hg shelve -q | $ hg shelve -q | ||||
$ echo 'contADDent' > root | $ echo 'contADDent' > root | ||||
$ hg unshelve -q | $ hg unshelve -q | ||||
warning: conflicts while merging root! (edit, then use 'hg resolve --mark') | warning: conflicts while merging root! (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] | ||||
and unshelve i expect that it will not preserve previous | and unshelve i expect that it will not preserve previous | ||||
test branch. | test branch. | ||||
$ echo "xxx" > b | $ echo "xxx" > b | ||||
$ hg add b | $ hg add b | ||||
$ hg shelve | $ hg shelve | ||||
shelved as test | shelved as test | ||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ hg update -r default | $ hg update -r 7049e48789d7 | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ hg unshelve | $ hg unshelve | ||||
unshelving change 'test' | unshelving change 'test' | ||||
rebasing shelved changes | rebasing shelved changes | ||||
rebasing 2:357525f34729 "changes to: test-commit" (tip) | rebasing 2:357525f34729 "changes to: test-commit" (tip) | ||||
$ hg status | $ hg status | ||||
A b | A b | ||||
$ hg branch | $ hg branch |