Is there a hg equivalent of `git stash save -p` that can break pieces into smaller pieces?

I want to commit only some changes made to my files, and my preferred way to do this is to postpone / discard changes that I do not want to make. This allows me to check the changes that I will make before they make them.

The problem I am facing is that when I use the shelf tool in the tortoise layer, I cannot find a way to break the piece into two small pieces. For example, I have a piece that looks like this:

@@ -1,1 +1,2 @@
-hallo world
+hello world
+something else

I would like to postpone "something else" so that I can fix the "hallo-> hello" fix. However, since the tortoise sees this one piece, I can either postpone both, or none of the changes.

I also tried using the shelf extension through the command line, but from what I understood from the documentation, it does not offer a function to delay only part of the files.

+4
source share
2 answers

You can complete your task from the command line. There are interactive versions hg commit, hg revertand hg shelve, and they have low-level options for cracking the patch together, if necessary; you can use them with a command line parameter -i(or --interactive).

, hg commit -i hg commit --amend -i. , hg uncommit, ; , hg revert -r .~1 hg revert -i -r .~1 hg commit --amend -i, .

, . e ( . ).

hg shelve, .


hg shelve -i, ; hg shelve -i, Merurial merge , , ( ). hg commit -i hg commit --amend -i, (hg shelve -i , ).


( ) crecord, hgrc:

[experimental]
crecord = true

hunk hg commit -i, hg revert -i hg shelve -i, (, , ). ?, ; f, / , hunks/lines.

, hg shelve -i , ; .. hg commit -i hg commit --amend -i, . , hg revert -i - . ( , - .)

+6

, tortoiseHg, , () .

.

0

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


All Articles