Mercurial:修改过的文件的信息

时间:2010-11-29 11:30:08

标签: version-control mercurial

在从中央存储器中拉出之前,我通常使用'hg incoming'命令来查看我将要拉的内容。但是,这只给出了包含一些注释的变更集列表,而不是已修改的实际文件列表。

1)在这种情况下,如何获取修改后的文件列表(包括有关chane的一些基本信息,如Removed,Moved等)?

2)同样,当我执行“hg status”时,我会得到本地工作副本与存储库中当前工作副本之间的差异。但是,更有用的功能是获取传入和本地工作副本之间的差异。我怎么能得到这个?

谢谢!

2 个答案:

答案 0 :(得分:3)

1 /大多数选项都显示在“how to see files in repository before running 'update'”中:

hg incoming --stat

注意:

  
      
  • 对于远程存储库,使用--bundle可以避免在传入后跟拉动时两次下载更改集。
  •   
  • --stat:输出diffstat样式的更改摘要   (即:使用以下格式的更改统计信息:“已修改的文件:+已添加/删除的行”)
  •   

2 /见RDiff extension(以及SO问题“Using Mercurial, is there an easy way to diff my working copy with the tip file in the default remote repository”)

答案 1 :(得分:1)

如果您没有--stat的最新版本,则可以使用status获得类似的概述:

cd repo

// grab the newest changes into a bundle
hg incoming --bundle morechanges.bun

// get an id for the current tip
hg tip
  changeset: x:abcdef
  ...

// see what's changed by overlaying the bundle on the repo
hg -R morechanges.bun status --rev abcdef:tip
  //info you're looking for

// everything's good; add the bundle to the repo
hg pull morechanges.bun

rm morechanges.bun
相关问题