Mercurial:我如何找出我的工作副本和其他副本之间的区别(Mercurial: How do I find out the difference between my working copy

编程入门 行业动态 更新时间:2024-10-28 18:31:36
Mercurial:我如何找出我的工作副本和其他副本之间的区别(Mercurial: How do I find out the difference between my working copy and another copy)

我是Mercurial的新手,主要从事Clearcase。

在我从最新的分支引入更改之前,我想知道有哪些更改以及哪些文件存在冲突。 (主要是看我现在或以后是否应该更新。)

有没有办法做一个工作副本之间的HG diff和另一个?

I am new to Mercurial and mostly worked on Clearcase.

Before I pull in changes from the latest branch, I would like to know the changes that are there and which files have conflicts. (Mainly to see if I should do a update now or later.)

Is there any way do do a hg diff between a working copy and another?

最满意答案

您可以使用以下命令查看其他存储库中的更改:

hg incoming path

这基本上像pull ,但它实际上并没有拉。

但实际上,您通常可以拉动,因为拉动传入的变更集不会触及您的工作副本。 只有在update或merge ,您的工作副本才会更新,并存在冲突风险。

理想情况下,在update和merge会有一个选项来进行试探性合并,也就是说,除非存在冲突,否则它会合并,但目前尚不存在这样的选项。

将更改提取到存储库后,您可以像往常一样使用diff将其与工作副本进行比较。

hg diff -r tip

You can check what changes are in the other repository using:

hg incoming path

This is basically like pull, however it doesn’t actually pull.

But actually, you can usually just pull, because pulling incoming changesets doesn’t touch your working copy. Only when you update or merge does your working copy get updated, with a risk for conflicts.

Ideally there would be an option on update and merge to do a tentative merge, that is, it would merge unless there is a conflict, but afaik such an option currently does not exist yet.

Once the changes are pulled into your repository though, you can use diff to compare it with your working copy as usual.

hg diff -r tip

更多推荐

本文发布于:2023-07-14 17:13:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1106037.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:副本   区别   工作   Mercurial   copy

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!