0

我已经使用 Mercurial 几个星期没有问题,但今天早上我遇到了一个问题。我尝试同时运行“hg pull”和“hg update”来从存储库中获取所有文件更改,如下所示。但是,当我之后运行“hg diff”时,我仍然看到文件更改。

> hg pull
searching for changes
adding changesets
adding manifests
adding file changes
added 7 changesets with 8 changes to 6 files

> hg update
6 files updated, 0 files merged, 0 files removed, 0 files unresolved

> hg diff
(a file change is listed)

我如何达到“hg diff”将产生零变化的程度?

PS - hg status 产生一个变化:

M aPath\bPath\cPath\MyForm.Designer.cs
4

2 回答 2

2

您看到的结果只是意味着您的MyForm.Designer.cs文件有您没有提交的更改(即本地修改)。您可以查看如何使用hg diff.

您有两种选择来处理本地修改:

  1. 提交并推送本地修改
  2. 丢弃本地更改 ( hg update --clean)
于 2012-11-14T18:49:02.317 回答
1

hg pull仅更新回购

This finds all changes from the repository at the specified path or URL
and adds them to a local repository (the current one unless -R is
specified). By default, this does not update the copy of the project in
the working directory.

你必须hg up为了更新工作副本。而且我看不到 diff 和 pull 的结果之间有任何相关性 - 您可以以更简单、快速和正确的方式撤消本地更改

于 2012-11-14T14:41:07.587 回答