In Mercurial, why can't we undo commit when there are other modified files?

Yesterday I made a file and then wanted hg backout, but Mercurial says it cannot back off because I have other modified files in the project ...

This is a bit strange ... is this not an atomic level for every file? Commit file 1 and then backup file 1?

Secondly, I can save a copy of these modified files A, B, C, tmp, hg to return them, and then back up and then copy these tmp files back to A, B, C and it will not be the same as only hg backout, which the latter does, but only works more?

+3
source share
2 answers

, . : coyp, , . Mercurial , : Mercurial , .

. , - , MQ. MQ,

hg diff > tmp
hg revert --all
# working directory is now clean, do your merge/backout/...
hg import --no-commit tmp

. , , , : .

+3

. Mercurial , -. , , .

, , , , . , .

+2

Source: https://habr.com/ru/post/1752356/


All Articles