[Bug 6095] New: `hg amend` on windows can lead to a broken repository

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Fri Mar 1 07:57:09 EST 2019


https://bz.mercurial-scm.org/show_bug.cgi?id=6095

            Bug ID: 6095
           Summary: `hg amend` on windows can lead to a broken repository
           Product: Mercurial
           Version: stable branch
          Hardware: PC
                OS: Windows
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla at mercurial-scm.org
          Reporter: 7895pulkit at gmail.com
                CC: mercurial-devel at mercurial-scm.org

I just ran `hg amend` on windows and it resulted in following output:

```
D:\Files\pulkit\something>hg amend --config extensions.amend=
warning: Watchman unavailable: "watchman" executable not in PATH ([Error 2] The
system cannot find the file specified)
saved backup bundle to
D:\Files\pulkit\something\.hg\strip-backup/2f6c61f2fcd3-0ff913ce-amend.hg
transaction abort!
failed to truncate 00changelog.i
rollback failed - please run hg recover
(failure reason: [Errno 13] Permission denied)
strip failed, backup bundle stored in
'D:\Files\pulkit\something\.hg\strip-backup/2f6c61f2fcd3-0ff913ce-amend.hg'
strip failed, unrecovered changes stored in
'D:\Files\pulkit\something\.hg\strip-backup/2f6c61f2fcd3-a8a80da8-temp.hg'
(fix the problem, then recover the changesets with "hg unbundle
'D:\Files\pulkit\something\.hg\strip-backup/2f6c61f2fcd3-a8a80da8-temp.hg'")
abort: Permission denied
```

There are two things which I think are worth improving here:

1) better support for rollbacking a transaction, there is something wrong in
amend code
2) fix this issue


The amend which I used was the amend extension present in core. There might be
issues with opening an editor and that can lead to Permission denied.

Although, the amend extension in core does not opens an editor IIUC.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list