SlideShare a Scribd company logo
Mercurial Histedit extension
Alter your commit history
for a great good
Set Up
● Enabling after 2.3:
– [extensions]
histedit =
● Before:
– [extensions]
– histedit = ~/path/to/histedit/hg_histedit.py
Invokation
● hg histedit <revision number>
– It will use commits from that revision onwards
Invokation
● hg histedit <revision number>
– It will use commits from that revision onwards
● hg histedit –outgoing
– Use commits not yet commited (most useful, IMO)
Commit edition
The text editor associated to Mercurial will be opened with the
list of commits:
pick c561b4e977df Add beta
pick 030b686bedc4 Add gamma
pick 7c2fd3b9020c Add delta
# Edit history between c561b4e977df and 7c2fd3b9020c
#
# Commands:
# p, pick = use commit
# e, edit = use commit, but stop for amending
# f, fold = use commit, but fold into previous commit
# d, drop = remove commit from history
#
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
Commands
● pick
– Simply accepts the changeset as is. This is the
default action.
Commands
● pick
– Simply accepts the changeset as is. This is the
default action.
● fold
– Combines a changeset with the previous
changeset in the list and opens an editor to edit
the commit message.
Commands
● pick
– Simply accepts the changeset as is. This is the default action.
● fold
– Combines a changeset with the previous changeset in the list and
opens an editor to edit the commit message.
● drop
– Removes the changeset from history. Important: removing a
commit from history does not remove code changes. Use strip
or backout or any other tool for that.
Commands
● Edit
– Drops to the command prompt, allowing to edit
files freely to commit some changes as a separate
commit.
– When done, any remaining uncommitted changes
will be committed as well.
– When done, run hg histedit --continue to finish this
step or hg histedit --abort to abandon the new
changes and keep the previous state.
Commands
● mess
– Simply edit commit message. Useful for typos and
minor mistakes.
End
“All your commits belong to us”
End
“All your commits belong to us”
QUESTIONS

More Related Content

DOCX
Git commands
ODP
Automating good coding practices
PPTX
How Samsung Engineers Do Pre-Commit Builds with Perforce Helix Streams
PDF
Apache Yetus: Intro to Precommit for HBase Contributors
PDF
Apache Yetus: Helping Solve the Last Mile Problem
PDF
Perforce - Under New Management by Konrad Litwin
PPTX
Write microservice in golang
PPTX
Mercurial training
Git commands
Automating good coding practices
How Samsung Engineers Do Pre-Commit Builds with Perforce Helix Streams
Apache Yetus: Intro to Precommit for HBase Contributors
Apache Yetus: Helping Solve the Last Mile Problem
Perforce - Under New Management by Konrad Litwin
Write microservice in golang
Mercurial training

Similar to Histedit Mercurial Extension (20)

PDF
Bend time to your will with git
ZIP
Mercurial Distributed Version Control
PPTX
Source control management
PDF
Github git-cheat-sheet
PDF
Github git-cheat-sheet
PDF
Github git-cheat-sheet
PDF
Github git-cheat-sheet
PPT
Git Introduction
PDF
Github git-cheat-sheet
PDF
Github git-cheat-sheet
KEY
Git Distributed Version Control System
PDF
Advanced Git Tutorial
PPTX
Git Memento of basic commands
PDF
Mercurial intro
PPTX
Git basics 2
PDF
Advanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
PDF
Advanted git
PDF
GTALUG Short Talk On Mercurial
PDF
Git cheat-sheet
PPTX
Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Bend time to your will with git
Mercurial Distributed Version Control
Source control management
Github git-cheat-sheet
Github git-cheat-sheet
Github git-cheat-sheet
Github git-cheat-sheet
Git Introduction
Github git-cheat-sheet
Github git-cheat-sheet
Git Distributed Version Control System
Advanced Git Tutorial
Git Memento of basic commands
Mercurial intro
Git basics 2
Advanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Advanted git
GTALUG Short Talk On Mercurial
Git cheat-sheet
Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Ad

Recently uploaded (20)

PPTX
history of c programming in notes for students .pptx
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Nekopoi APK 2025 free lastest update
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Transform Your Business with a Software ERP System
PDF
top salesforce developer skills in 2025.pdf
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
PTS Company Brochure 2025 (1).pdf.......
PPT
Introduction Database Management System for Course Database
PPTX
L1 - Introduction to python Backend.pptx
PDF
Odoo Companies in India – Driving Business Transformation.pdf
history of c programming in notes for students .pptx
Softaken Excel to vCard Converter Software.pdf
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Nekopoi APK 2025 free lastest update
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Digital Systems & Binary Numbers (comprehensive )
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Transform Your Business with a Software ERP System
top salesforce developer skills in 2025.pdf
wealthsignaloriginal-com-DS-text-... (1).pdf
Reimagine Home Health with the Power of Agentic AI​
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PTS Company Brochure 2025 (1).pdf.......
Introduction Database Management System for Course Database
L1 - Introduction to python Backend.pptx
Odoo Companies in India – Driving Business Transformation.pdf
Ad

Histedit Mercurial Extension

  • 1. Mercurial Histedit extension Alter your commit history for a great good
  • 2. Set Up ● Enabling after 2.3: – [extensions] histedit = ● Before: – [extensions] – histedit = ~/path/to/histedit/hg_histedit.py
  • 3. Invokation ● hg histedit <revision number> – It will use commits from that revision onwards
  • 4. Invokation ● hg histedit <revision number> – It will use commits from that revision onwards ● hg histedit –outgoing – Use commits not yet commited (most useful, IMO)
  • 5. Commit edition The text editor associated to Mercurial will be opened with the list of commits: pick c561b4e977df Add beta pick 030b686bedc4 Add gamma pick 7c2fd3b9020c Add delta # Edit history between c561b4e977df and 7c2fd3b9020c # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # f, fold = use commit, but fold into previous commit # d, drop = remove commit from history # 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
  • 6. Commands ● pick – Simply accepts the changeset as is. This is the default action.
  • 7. Commands ● pick – Simply accepts the changeset as is. This is the default action. ● fold – Combines a changeset with the previous changeset in the list and opens an editor to edit the commit message.
  • 8. Commands ● pick – Simply accepts the changeset as is. This is the default action. ● fold – Combines a changeset with the previous changeset in the list and opens an editor to edit the commit message. ● drop – Removes the changeset from history. Important: removing a commit from history does not remove code changes. Use strip or backout or any other tool for that.
  • 9. Commands ● Edit – Drops to the command prompt, allowing to edit files freely to commit some changes as a separate commit. – When done, any remaining uncommitted changes will be committed as well. – When done, run hg histedit --continue to finish this step or hg histedit --abort to abandon the new changes and keep the previous state.
  • 10. Commands ● mess – Simply edit commit message. Useful for typos and minor mistakes.
  • 11. End “All your commits belong to us”
  • 12. End “All your commits belong to us” QUESTIONS