如何在删除文件后将文件添加到 Mercurial 存储库
我有一个水银存储库。我从中删除了一个包含许多子文件夹和文件的文件夹并进行了提交。
现在,当我尝试添加一个具有相同名称且还包含大量文件和子文件夹的文件夹时,mercurial 看不到这些新文件。
我尝试了 hg addfolder_name、hg addfolder_name/ 甚至 hg addfolder_name/* 但 hg status 没有显示任何内容在那之后。
怎么了?
UPD:我尝试添加一个具有不同名称的新文件夹而不删除旧文件夹:hg add service/resources/skels/0.92/*但这没有添加0.92 文件夹的子文件夹中的文件。
I have a mercurial repository. I removed a folder that contained a lot of subfolders and files from it and made a commit.
Now, when I try to to add a folder that has the same name that also contains huge amount of files and subfolders, mercurial doesn't see these new files.
I tried hg add folder_name, hg add folder_name/ and even hg add folder_name/* but hg status displays nothing after that.
What is wrong?
UPD: I tried to add a new folder with a different name withoud deleting the old one: hg add service/resources/skels/0.92/* but that didn't add files that are in subfolders of 0.92 folder.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下使用 Mercurial 1.7.1 的会话演示了删除并重新添加文件夹通常不是问题:
您能显示重现该问题的命令序列吗?
The following session with Mercurial 1.7.1 demonstrates that removing and re-adding a folder is normally not a problem:
Can you show such a sequence of commands which reproduces the problem?
我猜您在最初的删除/提交过程中犯了错误。
尝试完全删除 folder_name,然后进行提交并验证它是否已从最新变更集中完全删除。然后将 folder_name 移回到存储库中。然后您应该能够
hg addfolder_name
。I'm guessing you made an error during your original deletion/commit.
Try removing folder_name entirely, then doing a commit and verify it's completely removed from the latest changeset. Then move folder_name back into the repo. You should then be able to
hg add folder_name
.