使用 Fossil DVCS 重命名目录
是否可以使用 Fossil 重命名目录?我尝试了明显的命令:
fossil mv oldname newname
化石然后通知我它已经做了一些事情:
RENAME oldname newname
但是,调用“化石更改”会导致一个空列表。据我所知,重命名目录要么不受支持,要么尚未实现,要么只是被破坏。这有什么技巧吗?
Is it possible to rename directories with Fossil? I've tried the obvious command:
fossil mv oldname newname
Fossil then informs me that it has done something:
RENAME oldname newname
However, calling "fossil changes" results in an empty list. As far as I can tell, renaming directories is either not supported, not yet implemented or just broken. Is there a trick to this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过一番研究,我发现这是可以做到的,但这是违反直觉的。 Fossil 并不真正关心目录会发生什么;它所关心的是其中文件的位置。
重命名目录时,Fossil 会:
如果新目录不存在,则此操作失败。新位置中没有文件,因此 Fossil 无法将新旧位置匹配,因此不会进行任何更改。
简而言之:在尝试对 Fossil 进行更改之前,您必须通过文件系统重命名该文件夹。如果你不这样做,Fossil 就会忽略你。
现在我想了一下,这是有道理的,尽管我更希望 Fossil 只更新文件系统本身,而不是强迫用户执行两步过程。
作为附录,似乎不可能向 Fossil 添加空目录。我假设它在内部只存储文件;文件夹被视为元数据。空文件夹是不描述任何内容的元数据,因此添加它们没有任何意义。
After some research I've found that it can be done, but it is counter-intuitive. Fossil doesn't really care what happens to directories; all it cares about is the location of the files within them.
When renaming a directory, Fossil appears to:
If the new directory does not exist, this fails. There are no files in the new location so Fossil cannot match up the old with the new, so no changes are made.
In short: You must rename the folder via the filesystem before you try to make the change to Fossil. If you don't, Fossil ignores you.
Now that I think about it, this makes sense, though I'd prefer it if Fossil would just update the filesystem itself instead of forcing a two-step process on its users.
As an addendum, it appears to be impossible to add an empty directory to Fossil. I assume that internally it stores just files; folders are considered to be metadata. An empty folder is metadata describing nothing, so adding them makes no sense.