2010-11-29 50 views
3

在从中央存储库中提取数据之前,我通常使用'hg incoming'命令来查看我将要执行的操作。但是,这只给出了一些含有某些注释的变更集列表,而不是已修改的实际文件列表。Mercurial:已修改文件的信息

1)在这种情况下,如何获得修改文件的列表(包括一些关于chane的基本信息,如Removed,Moved等)? 2)同样,当我做'hg状态'时,我得到了本地工作副本和存储库上当前工作副本之间的区别。但是,更有用的功能是获取传入内容和本地工作副本之间的差异。我怎样才能得到这个?

谢谢!

回答

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 
3

1 /大部分选项被呈现在 “how to see files in repository before running 'update'”:

hg incoming --stat 

注:

  • 对于远程存储库,使用--bundle避免下载的变更两次,如果传入的后面是拉。
  • --stat:输出diffstat风格的变更汇总。
    (即:用下面的格式变化的统计: “修改的文件:+添加/ -removed线”)

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”)

+0

的--stat选项没有被我的版本Mercur酒店的认可IAL。该选项是否可以从本地产品获得,或者是否需要附加产品?谢谢。 – elesser 2010-11-29 11:59:35

相关问题