Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8862875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:50:06+00:00 2026-06-14T15:50:06+00:00

This answer shows how you can demote a commit to a patch, but how

  • 0

This answer shows how you can demote a commit to a patch, but how can I convert an mq patch to local changes only?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T15:50:09+00:00Added an answer on June 14, 2026 at 3:50 pm

    Short answer

    Make sure the patch is applied, then:

    hg qrefresh nothing
    hg qpop --keep-changes
    hg qdelete "Name of patch"
    

    Long answer

    First, you need to make sure no changes are tracked by the patch. To do that, use

    hg qrefresh nothing
    

    nothing is just a random file name that is not in the repository. I usually use hg qref 0 for brevity. hg qrefresh accepts an optional file pattern. If it is given, the patch will track the changes that match the pattern – and only those. When nothing matches the file pattern, no changes will be tracked by the patch, and thus there will be local changes only.

    Now you have a useless patch lying around, and you have some local changes. To clean up, you can do

    hg qpop --keep-changes
    

    to pop the patch even though there are local changes. Finally, to remove the dead, empty and unapplied patch you can use

    hg qrm "Name of patch"
    

    You can’t remove an applied patch, which is why you need the hg qpop --keep-changes step.

    (Note: hg qrm and hg qremove are aliases of hg qdelete.)

    If using TortoiseHg

    With TortoiseHg, exporting the patch to the clipboard (Workbench > right-click the patch > Export > Copy Patch), then unapplying the patch, and finally importing from the clipboard with the destination being “Working Directory” seems to work. Here are some screen captures demonstrating this procedure:
    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've tried to search around for the answer to this question, but can't seem
I have been searching all over but I can't find any answer to this.
There is probably a reeeeeally obvious answer to this, but I can't find it,
I feel silly, but I just can't find an answer to this. Let's say
This answer has helped me largely but hasn't fully resolved my issues. I'm using
In this answer to 'GhostScript command line parameters to convert EPS to PDF' ;
in this answer he said that i can use RIA services while creating my
The obvious answer is to use Charset.defaultCharset() but we recently found out that this
I've searched around for the answer to this many times, but I don't know
I'm sure there is an answer to this somewhere but I'm clearly using the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.