Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
thg
thg
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 798
    • Issues 798
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

There will be about 1h of downtime on 2020-03-02 at 13:00 UTC+1 (change of servers and upgrade to Heptapod 0.20.0 final)

  • mercurial
  • TortoiseHg
  • thgthg
  • Issues
  • #5129

Closed
Open
Opened 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.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: mercurial/tortoisehg/thg#5129