使用 Mercurial/通用版本控制分解文件的正确方法?
我目前有一个源文件,其中包含两个类。我想将其中一个移动到一个单独的文件中。有没有办法以类似于“hg mv”的方式来实现这一点,其中Mercurial实现新文件和旧文件部分之间的关系?或者在 Mercurial 看来,它是否必须像删除一个文件的一大块并创建一个全新的文件一样?我还应该遵循其他一些最佳实践吗?
如果这种跟踪确实存在,我会印象非常深刻,但这并不是 Mercurial 第一次给我带来惊喜。
I currently have a source file with two classes in it. I'd like to move one of them into a separate file. Is there any way to do this in a way similar to "hg mv" where Mercurial realizes the relationship between the new file and the part of the old file? Or does it have to look to Mercurial like a big chunk of one file was deleted and a brand new file was created? Is there some other best-practice I should be following here?
I will be very impressed if this kind of tracking actually exists, but it wouldn't be the first time Mercurial has pleasantly surprised me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过复制(hg copy)命令来完成此操作。只需创建一个副本,更改每个副本并提交即可。
You may do it via copy (hg copy) command. Just create a copy, change each copy and commit.