我是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 tipYou can check what changes are in the other repository using:
hg incoming pathThis 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更多推荐
发布评论