how to see files in repository before running 'update'

﹥>﹥吖頭↗ 提交于 2019-12-12 08:37:02

问题


I run hg pull which added new changes to my repository. Before updating my working directory with the new changes i would like to see these new files/changes. I believe in SVN i used svn st -u but how is it done in Mercurial?


回答1:


(After pulling the changes via hg pull) you can run hg status --rev tip to show an output similar to svn st -u.




回答2:


Before you even pull you can use:

hg incoming --stat

to see a summary of changes or

hg incoming --patch

to see the actual deltas.

After pulling (but before updating!) you can do:

hg status --rev tip

to see a list of the changed files, or

hg diff --rev tip

to see a summary of the changes, or

hg diff -r tip

to see the combined diff.




回答3:


There is also hg incoming (alias hg in; additionally hg outgoing/hg out) which can be used before pulling which will show you the revisions which will be pulled. At times this can be useful.



来源:https://stackoverflow.com/questions/4271274/how-to-see-files-in-repository-before-running-update

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!