##// END OF EJS Templates
shelve: add a shelve extension to save/restore working changes...
shelve: add a shelve extension to save/restore working changes This extension saves shelved changes using a temporary draft commit, and bundles the temporary commit and its draft ancestors, then strips them. This strategy makes it possible to use Mercurial's bundle and merge machinery to resolve conflicts if necessary when unshelving, even when the destination commit or its ancestors have been amended, squashed, or evolved. (Once a change has been unshelved, its associated unbundled commits are either rolled back or stripped.) Storing the shelved change as a bundle also avoids the difficulty that hidden commits would cause, of making it impossible to amend the parent if it is a draft commits (a common scenario). Although this extension shares its name and some functionality with the third party hgshelve extension, it has little else in common. Notably, the hgshelve extension shelves changes as unified diffs, which makes conflict resolution a matter of finding .rej files and conflict markers, and cleaning up the mess by hand. We do not yet allow hunk-level choosing of changes to record. Compared to the hgshelve extension, this is a small regression in usability, but we hope to integrate that at a later point, once the record machinery becomes more reusable and robust.

File last commit:

r18631:e2dc5397 default
r19854:49d4919d default
Show More
test-rename-merge1.t
195 lines | 4.6 KiB | text/troff | Tads3Lexer
/ tests / test-rename-merge1.t
Adrian Buehlmann
tests: unify test-rename-merge1
r12298 $ hg init
$ echo "[merge]" >> .hg/hgrc
$ echo "followcopies = 1" >> .hg/hgrc
$ echo foo > a
$ echo foo > a2
$ hg add a a2
$ hg ci -m "start"
$ hg mv a b
$ hg mv a2 b2
$ hg ci -m "rename"
$ hg co 0
2 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ echo blahblah > a
$ echo blahblah > a2
$ hg mv a2 c2
$ hg ci -m "modify"
created new head
$ hg merge -y --debug
searching for copies back to rev 1
unmatched files in local:
c2
unmatched files in other:
b
b2
Thomas Arendsen Hein
merge: show renamed on one and deleted on the other side in debug output
r16795 all copies found (* = to merge, ! = divergent, % = renamed and deleted):
Siddharth Agarwal
copies: make debug messages more sensible...
r18135 src: 'a' -> dst: 'b' *
src: 'a2' -> dst: 'b2' !
Mads Kiilerich
copies: report found copies sorted
r18362 src: 'a2' -> dst: 'c2' !
Adrian Buehlmann
tests: unify test-rename-merge1
r12298 checking for directory renames
resolving manifests
Siddharth Agarwal
manifestmerge: pass in branchmerge and force separately...
r18605 branchmerge: True, force: False, partial: False
Martin Geisler
merge: make debug output easier to read...
r15625 ancestor: af1939970a1c, local: 044f8520aeeb+, remote: 85c198ef2f6c
Adrian Buehlmann
tests: unify test-rename-merge1
r12298 a: remote moved to b -> m
Mads Kiilerich
merge: delay debug messages for merge actions...
r18541 preserving a for resolve of b
a2: divergent renames -> dr
Adrian Buehlmann
tests: unify test-rename-merge1
r12298 b2: remote created -> g
removing a
Bryan O'Sullivan
tests: update test output (will be folded into parent)
r18631 getting b2
updating: b2 1/3 files (33.33%)
updating: a 2/3 files (66.67%)
Adrian Buehlmann
tests: unify test-rename-merge1
r12298 picked tool 'internal:merge' for b (binary False symlink False)
merging a and b to b
my b@044f8520aeeb+ other b@85c198ef2f6c ancestor a@af1939970a1c
premerge successful
Bryan O'Sullivan
tests: update test output (will be folded into parent)
r18631 updating: a2 3/3 files (100.00%)
Dan Villiom Podlaski Christiansen
merge: make 'diverging renames' diagnostic a more helpful note....
r12757 note: possible conflict - a2 was renamed multiple times to:
Adrian Buehlmann
tests: unify test-rename-merge1
r12298 c2
b2
1 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg status -AC
M b
a
M b2
R a
C c2
$ cat b
blahblah
$ hg ci -m "merge"
Sune Foldager
tests: fix deprecated use of hg debugdata/debugindex...
r14182 $ hg debugindex b
Bryan O'Sullivan
tests: reduce spurious failures when run with generaldelta...
r17132 rev offset length ..... linkrev nodeid p1 p2 (re)
0 0 67 ..... 1 57eacc201a7f 000000000000 000000000000 (re)
1 67 72 ..... 3 4727ba907962 000000000000 57eacc201a7f (re)
Adrian Buehlmann
tests: unify test-rename-merge1
r12298
$ hg debugrename b
b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66
Dan Villiom Podlaski Christiansen
copies: don't detect copies as "divergent renames"...
r12683 This used to trigger a "divergent renames" warning, despite no renames
$ hg cp b b3
$ hg cp b b4
$ hg ci -A -m 'copy b twice'
$ hg up eb92d88a9712
0 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ hg up
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg rm b3 b4
$ hg ci -m 'clean up a bit of our mess'
We'd rather not warn on divergent renames done in the same changeset (issue2113)
$ hg cp b b3
$ hg mv b b4
$ hg ci -A -m 'divergent renames in same changeset'
$ hg up c761c6948de0
1 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ hg up
2 files updated, 0 files merged, 1 files removed, 0 files unresolved
Matt Mackall
context: generate file ancestors in reverse revision order (issue2642)...
r13468
Check for issue2642
$ hg init t
$ cd t
$ echo c0 > f1
$ hg ci -Aqm0
$ hg up null -q
$ echo c1 > f1 # backport
$ hg ci -Aqm1
$ hg mv f1 f2
$ hg ci -qm2
$ hg up 0 -q
$ hg merge 1 -q --tool internal:local
$ hg ci -qm3
$ hg merge 2
merging f1 and f2 to f2
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ cat f2
c0
Wagner Bruna
tests: test renaming a file added on two branches (issue2089)...
r13492
Thomas Arendsen Hein
tests: do not create repos inside repos in test-rename-merge1.t...
r16793 $ cd ..
Wagner Bruna
tests: test renaming a file added on two branches (issue2089)...
r13492 Check for issue2089
$ hg init repo2089
$ cd repo2089
Patrick Mezard
test-rename-merge1: make it easier to review, windows friendly...
r13537 $ echo c0 > f1
$ hg ci -Aqm0
Wagner Bruna
tests: test renaming a file added on two branches (issue2089)...
r13492
Patrick Mezard
test-rename-merge1: make it easier to review, windows friendly...
r13537 $ hg up null -q
$ echo c1 > f1
$ hg ci -Aqm1
Wagner Bruna
tests: test renaming a file added on two branches (issue2089)...
r13492
Patrick Mezard
test-rename-merge1: make it easier to review, windows friendly...
r13537 $ hg up 0 -q
Wagner Bruna
tests: test renaming a file added on two branches (issue2089)...
r13492 $ hg merge 1 -q --tool internal:local
Patrick Mezard
test-rename-merge1: make it easier to review, windows friendly...
r13537 $ echo c2 > f1
$ hg ci -qm2
Wagner Bruna
tests: test renaming a file added on two branches (issue2089)...
r13492
Patrick Mezard
test-rename-merge1: make it easier to review, windows friendly...
r13537 $ hg up 1 -q
$ hg mv f1 f2
$ hg ci -Aqm3
Wagner Bruna
tests: test renaming a file added on two branches (issue2089)...
r13492
Patrick Mezard
test-rename-merge1: make it easier to review, windows friendly...
r13537 $ hg up 2 -q
Wagner Bruna
tests: test renaming a file added on two branches (issue2089)...
r13492 $ hg merge 3
Patrick Mezard
test-rename-merge1: make it easier to review, windows friendly...
r13537 merging f1 and f2 to f2
Wagner Bruna
tests: test renaming a file added on two branches (issue2089)...
r13492 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
Patrick Mezard
test-rename-merge1: make it easier to review, windows friendly...
r13537 $ cat f2
c2
Thomas Arendsen Hein
tests: do not create repos inside repos in test-rename-merge1.t...
r16793
$ cd ..
Thomas Arendsen Hein
merge: warn about file deleted in one branch and renamed in other (issue3074)...
r16794
Check for issue3074
$ hg init repo3074
$ cd repo3074
$ echo foo > file
$ hg add file
$ hg commit -m "added file"
$ hg mv file newfile
$ hg commit -m "renamed file"
$ hg update 0
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg rm file
$ hg commit -m "deleted file"
created new head
Thomas Arendsen Hein
merge: show renamed on one and deleted on the other side in debug output
r16795 $ hg merge --debug
searching for copies back to rev 1
unmatched files in other:
newfile
all copies found (* = to merge, ! = divergent, % = renamed and deleted):
Siddharth Agarwal
copies: make debug messages more sensible...
r18135 src: 'file' -> dst: 'newfile' %
Thomas Arendsen Hein
merge: show renamed on one and deleted on the other side in debug output
r16795 checking for directory renames
resolving manifests
Siddharth Agarwal
manifestmerge: pass in branchmerge and force separately...
r18605 branchmerge: True, force: False, partial: False
Thomas Arendsen Hein
merge: show renamed on one and deleted on the other side in debug output
r16795 ancestor: 19d7f95df299, local: 0084274f6b67+, remote: 5d32493049f0
Mads Kiilerich
merge: delay debug messages for merge actions...
r18541 file: rename and delete -> rd
Thomas Arendsen Hein
merge: show renamed on one and deleted on the other side in debug output
r16795 newfile: remote created -> g
Bryan O'Sullivan
tests: update test output (will be folded into parent)
r18631 getting newfile
updating: newfile 1/2 files (50.00%)
updating: file 2/2 files (100.00%)
Thomas Arendsen Hein
merge: warn about file deleted in one branch and renamed in other (issue3074)...
r16794 note: possible conflict - file was deleted and renamed to:
newfile
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg status
M newfile
$ cd ..