comparison tests/test-phases.t @ 51410:eababb7b4a82

phases: leverage the collected information to record phase update Since the lower level function already gather this information, we can directly use it. This comes with a small change to the test that are actually fixing them. The previous version over-reported some phase change that did not exists. In both case, we are force revision `1` to be secret and `0` remains draft`, the previous code wrongly reported `0` as moving to secret while it properly remained draft in the repository.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 20 Feb 2024 23:46:21 +0100
parents 80bda4254b84
children 23950e39281f
comparison
equal deleted inserted replaced
51409:2f39c7aeb549 51410:eababb7b4a82
52 52
53 53
54 Working directory phase is secret when its parent is secret. 54 Working directory phase is secret when its parent is secret.
55 55
56 $ hg phase --force --secret . 56 $ hg phase --force --secret .
57 test-debug-phase: move rev 0: 1 -> 2
58 test-debug-phase: move rev 1: 1 -> 2 57 test-debug-phase: move rev 1: 1 -> 2
59 test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: draft -> secret
60 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: draft -> secret 58 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: draft -> secret
61 $ hg log -r 'wdir()' -T '{phase}\n' 59 $ hg log -r 'wdir()' -T '{phase}\n'
62 secret 60 secret
63 $ hg log -r 'wdir() and public()' -T '{phase}\n' 61 $ hg log -r 'wdir() and public()' -T '{phase}\n'
64 $ hg log -r 'wdir() and draft()' -T '{phase}\n' 62 $ hg log -r 'wdir() and draft()' -T '{phase}\n'