##// END OF EJS Templates
rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo -
r13778:46c30432 default
parent child Browse files
Show More
@@ -277,7 +277,7 b' def updatedirstate(repo, rev, p1, p2):'
277 277 if k in m1:
278 278 if v in m1 or v in m2:
279 279 repo.dirstate.copy(v, k)
280 if v in m2 and v not in m1:
280 if v in m2 and v not in m1 and k in m2:
281 281 repo.dirstate.remove(v)
282 282
283 283 def concludenode(repo, rev, p1, p2, commitmsg=None, extrafn=None):
@@ -119,3 +119,52 b' Copy is not lost:'
119 119 copy from a
120 120 copy to a-copied
121 121
122 $ cd ..
123
124
125 Test rebase across repeating renames:
126
127 $ hg init repo
128
129 $ cd repo
130
131 $ echo testing > file1.txt
132 $ hg add file1.txt
133 $ hg ci -m "Adding file1"
134
135 $ hg rename file1.txt file2.txt
136 $ hg ci -m "Rename file1 to file2"
137
138 $ echo Unrelated change > unrelated.txt
139 $ hg add unrelated.txt
140 $ hg ci -m "Unrelated change"
141
142 $ hg rename file2.txt file1.txt
143 $ hg ci -m "Rename file2 back to file1"
144
145 $ hg update -r -2
146 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
147
148 $ echo Another unrelated change >> unrelated.txt
149 $ hg ci -m "Another unrelated change"
150 created new head
151
152 $ hg tglog
153 @ 4: 'Another unrelated change'
154 |
155 | o 3: 'Rename file2 back to file1'
156 |/
157 o 2: 'Unrelated change'
158 |
159 o 1: 'Rename file1 to file2'
160 |
161 o 0: 'Adding file1'
162
163
164 $ hg rebase -s 4 -d 3
165 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-backup.hg (glob)
166
167 $ hg diff --stat -c .
168 unrelated.txt | 1 +
169 1 files changed, 1 insertions(+), 0 deletions(-)
170
General Comments 0
You need to be logged in to leave comments. Login now