Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • thg-hgtk thg-hgtk
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 509
    • Issues 509
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • mercurial
  • TortoiseHg
  • thg-hgtkthg-hgtk
  • Issues
  • #851

Closed
Open
Created Jan 07, 2010 by Bitbucket Importer@bitbucket_importerOwner

Partial backout tool

Created originally on Bitbucket by AngelEzquerra (Angel Ezquerra)

Currently, the backout item on the Revision History tool just gives you direct access to Mercurial's backout command.

It would be amazing if instead it gave you access to a tool that allowed you to do a "partial" backout, where you could chose which files to backout and perhaps even select which changes of which files to backout.

Today a colleague asked me to help him to backout a change of an old revision that he had just realized that caused a bug. Unfortunately that particular revision contained several unrelated changes spanning multiple files and thus it was not a matter of simply backing out the whole revision. What we needed to do was to undo the changes to 2 of the files changed in that revision.

After trying to come up with a good and simple way to achieve this (even looking into the file annotation tool to see if it was possible to backout an individual file), we ended up doing the following:

  • We updated to the parent revision of the revision containing the bug.
  • We saved copies of the two files in which the bug was introduced.
  • We updated to the revision containing the bug.
  • We manually overwrote the two offending files with their previous versions that we had just saved.
  • We commited the changes, creating a new "bugfix" branch.
  • We merged that "bugfix" branch with the tip of the repository.

As you can see this is a quite cumbersome and manual process, but one that seems perfectly possible to automate!

Thus my proposal is for a new "Backout too" that would let you chose which files to backout. By default select all the files, in which case TortoiseHg would perform a regular Mercurial backout. However, if the user unselected some of the files to backout, TortoiseHg would perform the algorithm described above instead.

Ideally it could be even possible to select which changes to backout, rather than selecting whole files (in a similar way to how you are able to select which changes to commit on the commit tool), but that could be something for future improvement.

What do you think? I believe that this would make fixing all sorts of errors much simpler that it currently is, and that this is a tool that is very well suited to a GUI tool such as TortoiseHg as this is something that would be quite hard to pull off with a command line based tool.

Cheers,

Amadawn

P.S.- I don't know what Component to assign this to, and whether this should instead be a proposal, rather than an enhancement.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking