Tuvimos un problema de producción en el que se realizó un cambio duplicado en diferentes twigs (una de ellas por crash) y no lo detectamos porque el historial del file Hg no nos mostró el cambio en la segunda twig.
Hemos hecho algunos análisis y esto es bastante fácil de replicar (vea el ejemplo simple a continuación). ¿Es esto una característica o un error?
Pasos para replicar:
hg init Test cd Test hg branch "branch 1" echo "file1" > test.txt hg add hg commit -m "Added test.txt - branch 1" hg branch "branch 2" echo "file2" > test.txt hg commit -m "Updated test.txt - branch 2" hg update "branch 1" hg branch "branch 3" echo "file2" > test.txt hg commit -m "Updated test.txt - branch 3"
Si corremos
> hg log test.txt
Luego solo mostramos 2 cambios en el historial de files: falta el cambio en la twig 3.
changeset: 1:1754be7ba0aa branch: branch 2 user: chrisgill date: Tue Jun 06 14:30:13 2017 +0100 summary: Updated test.txt - branch 2 changeset: 0:b10c4fde7ba1 branch: branch 1 user: chrisgill date: Tue Jun 06 14:30:13 2017 +0100 summary: Added test.txt - branch 1
Pero la historia del repository muestra los 3 commits
> hg log changeset: 2:f6f91ab357a6 branch: branch 3 tag: tip parent: 0:b10c4fde7ba1 user: chrisgill date: Tue Jun 06 14:30:14 2017 +0100 summary: Updated test.txt - branch 3 changeset: 1:1754be7ba0aa branch: branch 2 user: chrisgill date: Tue Jun 06 14:30:13 2017 +0100 summary: Updated test.txt - branch 2 changeset: 0:b10c4fde7ba1 branch: branch 1 user: chrisgill date: Tue Jun 06 14:30:13 2017 +0100 summary: Added test.txt - branch 1
Eso está documentado :
Nota:
Por razones de performance,
'hg log FILE'
puede omitir los cambios duplicates realizados en las sucursales y no mostrará las eliminaciones ni los cambios de modo. Para ver todos esos cambios, use el interruptor--removed
.