comparison tests/test-pick.t @ 4485:e3785a8d0712 stable

pick: update working dir branch (issue6089) Previously the working copy was left in an "inconsistent" state.
author Manuel Jacob <me@manueljacob.de>
date Sat, 23 Feb 2019 15:17:55 +0100
parents 302cd64f71e1
children bdaf34903430
comparison
equal deleted inserted replaced
4484:302cd64f71e1 4485:e3785a8d0712
332 $ hg pick -r 508d572e7053 332 $ hg pick -r 508d572e7053
333 picking 12:508d572e7053 "added l" 333 picking 12:508d572e7053 "added l"
334 334
335 $ hg phase -r . 335 $ hg phase -r .
336 13: secret 336 13: secret
337 $ cd ..
338
339 Check pick behavior regarding working copy branch (issue6089)
340 -------------------------------------------------------------
341
342 The branch of the picked changeset should be preserved, and the working copy updated
343
344 $ hg init issue6089
345 $ cd issue6089
346
347 $ touch a
348 $ hg add a
349 $ hg ci -m 'first commit on default'
350
351 $ hg branch foo
352 marked working directory as branch foo
353 (branches are permanent and global, did you want a bookmark?)
354 $ touch b
355 $ hg add b
356 $ hg ci -m 'first commit on foo'
357
358 $ hg up default
359 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
360 $ echo test > a
361 $ hg ci -m 'second commit on default'
362 $ hg log -G --template '{node|short}: {branch}\n' --rev 'all()+wdir()'
363 o ffffffffffff: default
364 |
365 @ 5f07cbf7d111: default
366 |
367 | o 96bb2057779e: foo
368 |/
369 o d03a6bcc83cd: default
370
371
372 $ hg pick 1
373 picking 1:96bb2057779e "first commit on foo"
374 $ hg log --template '{branch}\n' -r tip
375 foo
376 $ hg branch
377 foo
378 $ hg log -G --template '{node|short}: {branch}\n' --rev 'all()+wdir()'
379 o ffffffffffff: foo
380 |
381 @ 5344a77549bd: foo
382 |
383 o 5f07cbf7d111: default
384 |
385 o d03a6bcc83cd: default
386
387 $ cd ..