I had a CSS file from a previous revision called ‘bootstrap.css’
I deleted the file and recreated a totally new file with the same name.
When I came to commit my changes, the deletion of the original bootstrap.css was detected. But the creation of the new file was not detected. Immediately after I committed, the new file was detected.
The only way I could find to get the new file into the repository was to do two separate commits.
Did I do something wrong? Is it a config issue? Or is it supposed to work like that?
(I was using TortoiseHg)
Mercurial does not maintain a file identity, so you cannot talk about the “old”
bootstrap.cssand the “new”bootstrap.css. To Mercurial, it’s just data stored under the same file name. You’ll see thatwill interleave the history of the two files — since there’s really only one file in Mercurial’s eyes.
This is normally fine and works like you would expect. You can run
(or the equivalent from TortoiseHg) and the result is that
bootstrap.cssis modified:Modified just means that it’s different compared to the parent revision.