Cannot add file after reverting largefile addition
Created originally on Bitbucket by Mojca Miklavec
When user tries to add something as largefile, then changes his mind, reverts the addition and tries to add the file again, the process fails.
Steps to reproduce:
- Create a file
- Right-click on the file and choose
- Right-click on the same file, choose
- The file now seems to be back as if it was never added. The
hg statuscommands also says
? foo.txt, but the file
.hglf/foo.txtis still present on the disk; note that this is also the case with command-line mercurial; manually adding and reverting a file also causes the file to remain inside
- Right-click on the file, choose
- Select the file, enter commit message and try to commit it. This step fails with the following error:
abort: .hglf/foo.txt: file not tracked! [Code: 255].
- On the other hand
hg commit -m "Add foo.txt"from the command line seems to succeed.
The only workaround seems to be to manually delete the file
.hglf/foo.txt, but there's absolutely no indication about this, and we had an user who kept struggling with the issue of being unable to commit the file until someone else helped him figure out what the actual problem was.
The behaviour seems to be specific to TortoiseHg, but I also suspect that mercurial was supposed to delete the file from
.hglf in the first place.