Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • thg thg
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 829
    • Issues 829
    • List
    • Boards
    • Service Desk
    • Milestones
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • mercurial
  • TortoiseHg
  • thgthg
  • Issues
  • #5129
Closed
Open
Created Jul 04, 2018 by Bitbucket Importer@bitbucket_importerOwner

Renaming an MQ patch with only a case difference can delete the patch

Created originally on Bitbucket by Anonymous

On Windows, renaming a patch in TortoiseHg can delete the patch.

To reproduce:

  1. Create a patch in TortoiseHg.
  2. Right-click the patch, select Modify History, Rename Patch..
  3. Rename the patch with a name that only varies in case.
  4. A warning dialog is displayed saying the patch already exists (unfortunately my coworker didn't read it too closely).
  5. Select overwrite existing patchfile.
  6. Thg displays "abort: the system cannot find the file specified". The patch is deleted. Work is lost.

From watching the filesystem with SysInternals Procmon, it looks like THG is deleting the "patch that already exists" not realizing that it is the original patch since Windows is case-insensitive. It then spawns hg.exe to rename the patch but it is gone.

On Windows, at least, checking that the old and new names don't match with a case-insensitive compare would prevent lost work.

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