Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As far as I know, Mercurial doesnt any have tools to split changesets. If youre lucky, all the changes you want are in separate changesets and then you can use the <a href="https://www.mercurial-scm.org/wiki/TransplantExtension" rel="nofollow noreferrer">TransplantExtension</a>. I think it can be compared to Git's cherry-pick but I havent used git much.</p> <p>You can also use hg diff to manually commit the changes to a certain file to a new branch. Use the rev range to mark your entire source branch:</p> <pre><code>hg diff myfile -r startrevision:endrevision </code></pre> <p>The output can be treated as a patch. Do this for each file you want and commit them and then merge. Skipping the destructive changes. You can also, of course, do this multiple times of a destructive change is in the middle of a revision range.</p> <p><strong>Having said that</strong> what youre trying to do isnt something mercurial was built for. That hardcore history editing is more Git's area (note that its just my opinion). Keep your stable changes and destructive changes in separate changesets (and maybe even in separate branches). I use <a href="https://www.mercurial-scm.org/wiki/TransplantExtension" rel="nofollow noreferrer">transplant</a>, <a href="https://www.mercurial-scm.org/wiki/RebaseExtension" rel="nofollow noreferrer">rebase</a> and <a href="https://www.mercurial-scm.org/wiki/Strip" rel="nofollow noreferrer">strip</a> to move changes around. When its all done, they are merged and properly pushed.</p> <p>Oh, and check <a href="https://www.mercurial-scm.org/wiki/MqExtension" rel="nofollow noreferrer">MercurialQueues</a>. I havent used it myself but Ive seen it do some crazy stuff. Maybe its capable of doing something along the lines of what you want.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload