comparison tests/test-uncommit.t @ 1786:b674277ea4ef stable

uncommit: don't lose copy information of remaining files (issue5403) As reported in the issue, "hg uncommit" would lose copy information of the files that remained in the commit. The problem was simply that the a dict of copies was iterated as "src, dst in copies.items()" where it should have been "dst, src ...".
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 31 Jan 2017 12:32:45 -0800
parents a7dcfff8c4a9
children 2be05515b142 9f42f819267b
comparison
equal deleted inserted replaced
1784:c3741a5adbb0 1786:b674277ea4ef
250 M b 250 M b
251 M d 251 M d
252 M j 252 M j
253 M o 253 M o
254 A aa 254 A aa
255 a
255 A ff 256 A ff
256 f 257 f
257 A h 258 A h
258 g 259 g
259 A k 260 A k
262 R f 263 R f
263 R g 264 R g
264 R m 265 R m
265 R n 266 R n
266 $ glog --hidden 267 $ glog --hidden
267 @ 5:c706fe2c12f8@bar(draft) touncommit 268 @ 5:a1d4c1ad76cc@bar(draft) touncommit
268 | 269 |
269 | o 4:e8db4aa611f6@bar(draft) touncommit 270 | o 4:e8db4aa611f6@bar(draft) touncommit
270 |/ 271 |/
271 | x 3:5eb72dbe0cb4@bar(obsolete/draft) touncommit 272 | x 3:5eb72dbe0cb4@bar(obsolete/draft) touncommit
272 |/ 273 |/
276 | 277 |
277 o 0:07f494440405@default(draft) adda 278 o 0:07f494440405@default(draft) adda
278 279
279 $ hg debugobsolete 280 $ hg debugobsolete
280 5eb72dbe0cb409d094e3b4ae8eaa30071c1b8730 e8db4aa611f6d5706374288e6898e498f5c44098 0 (*) {'user': 'test'} (glob) 281 5eb72dbe0cb409d094e3b4ae8eaa30071c1b8730 e8db4aa611f6d5706374288e6898e498f5c44098 0 (*) {'user': 'test'} (glob)
281 5eb72dbe0cb409d094e3b4ae8eaa30071c1b8730 c706fe2c12f83ba5010cb60ea6af3bd1f0c2d6d3 0 (*) {'user': 'test'} (glob) 282 5eb72dbe0cb409d094e3b4ae8eaa30071c1b8730 a1d4c1ad76cc7eb5e8a36ef52396da334b6d59c5 0 (*) {'user': 'test'} (glob)
282 283
283 Test --all 284 Test --all
284 285
285 $ hg up -C 3 --hidden 286 $ hg up -C 3 --hidden
286 2 files updated, 0 files merged, 0 files removed, 0 files unresolved 287 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
287 working directory parent is obsolete! 288 working directory parent is obsolete!
288 (use 'hg evolve' to update to its successor) 289 (use 'hg evolve' to update to its successor)
289 $ hg --config extensions.purge= purge 290 $ hg --config extensions.purge= purge
290 $ hg uncommit --all -X e 291 $ hg uncommit --all -X e
291 1 new divergent changesets 292 1 new divergent changesets
310 $ hg st --copies --change . 311 $ hg st --copies --change .
311 A e 312 A e
312 313
313 $ hg debugobsolete 314 $ hg debugobsolete
314 5eb72dbe0cb409d094e3b4ae8eaa30071c1b8730 e8db4aa611f6d5706374288e6898e498f5c44098 0 (*) {'user': 'test'} (glob) 315 5eb72dbe0cb409d094e3b4ae8eaa30071c1b8730 e8db4aa611f6d5706374288e6898e498f5c44098 0 (*) {'user': 'test'} (glob)
315 5eb72dbe0cb409d094e3b4ae8eaa30071c1b8730 c706fe2c12f83ba5010cb60ea6af3bd1f0c2d6d3 0 (*) {'user': 'test'} (glob) 316 5eb72dbe0cb409d094e3b4ae8eaa30071c1b8730 a1d4c1ad76cc7eb5e8a36ef52396da334b6d59c5 0 (*) {'user': 'test'} (glob)
316 5eb72dbe0cb409d094e3b4ae8eaa30071c1b8730 c4cbebac3751269bdf12d1466deabcc78521d272 0 (*) {'user': 'test'} (glob) 317 5eb72dbe0cb409d094e3b4ae8eaa30071c1b8730 c4cbebac3751269bdf12d1466deabcc78521d272 0 (*) {'user': 'test'} (glob)
317 318
318 Display a warning if nothing left 319 Display a warning if nothing left
319 320
320 $ hg uncommit e 321 $ hg uncommit e
321 new changeset is empty 322 new changeset is empty
322 (use 'hg prune .' to remove it) 323 (use 'hg prune .' to remove it)
323 $ hg debugobsolete 324 $ hg debugobsolete
324 5eb72dbe0cb409d094e3b4ae8eaa30071c1b8730 e8db4aa611f6d5706374288e6898e498f5c44098 0 (*) {'user': 'test'} (glob) 325 5eb72dbe0cb409d094e3b4ae8eaa30071c1b8730 e8db4aa611f6d5706374288e6898e498f5c44098 0 (*) {'user': 'test'} (glob)
325 5eb72dbe0cb409d094e3b4ae8eaa30071c1b8730 c706fe2c12f83ba5010cb60ea6af3bd1f0c2d6d3 0 (*) {'user': 'test'} (glob) 326 5eb72dbe0cb409d094e3b4ae8eaa30071c1b8730 a1d4c1ad76cc7eb5e8a36ef52396da334b6d59c5 0 (*) {'user': 'test'} (glob)
326 5eb72dbe0cb409d094e3b4ae8eaa30071c1b8730 c4cbebac3751269bdf12d1466deabcc78521d272 0 (*) {'user': 'test'} (glob) 327 5eb72dbe0cb409d094e3b4ae8eaa30071c1b8730 c4cbebac3751269bdf12d1466deabcc78521d272 0 (*) {'user': 'test'} (glob)
327 c4cbebac3751269bdf12d1466deabcc78521d272 4f1c269eab68720f54e88ce3c1dc02b2858b6b89 0 (*) {'user': 'test'} (glob) 328 c4cbebac3751269bdf12d1466deabcc78521d272 4f1c269eab68720f54e88ce3c1dc02b2858b6b89 0 (*) {'user': 'test'} (glob)
328 329
329 Test instability warning 330 Test instability warning
330 331