comparison tests/bundles/rename.sh @ 16551:ebf6d38c9063 stable

localrepo: add setparents() to adjust dirstate copies (issue3407) The fix introduced in eab9119c5dee was only partially successful. It is correct to turn dirstate 'm' merge records into normal/dirty ones but copy records are lost in the process. To adjust them as well, we need to look in the first parent manifest to know which files were added and preserve only related records. But the dirstate does not have access to changesets, the logic has to moved at another level, in localrepo.
author Patrick Mezard <patrick@mezard.eu>
date Sun, 29 Apr 2012 22:25:55 +0200
parents
children
comparison
equal deleted inserted replaced
16550:0d494a38c586 16551:ebf6d38c9063
1 #!/bin/sh
2
3 # @ 3: 'move2'
4 # |
5 # o 2: 'move1'
6 # |
7 # | o 1: 'change'
8 # |/
9 # o 0: 'add'
10
11 hg init copies
12 cd copies
13 echo a > a
14 echo b > b
15 echo c > c
16 hg ci -Am add
17 echo a >> a
18 echo b >> b
19 echo c >> c
20 hg ci -m change
21 hg up -qC 0
22 hg cp a d
23 hg mv b e
24 hg mv c f
25 hg ci -m move1
26 hg mv e g
27 hg mv f c
28 hg ci -m move2
29 hg bundle -a ../renames.hg
30 cd ..