1

我的仓库有两个分支:默认和稳定。我可能在某个地方搞砸了。我看到两个头。这是正常的吗?

这里是头:

changeset:   10:b4131c44f968
branch:      stable
tag:         tip
parent:      8:f06486c8c9f1
parent:      9:135102b0cb32
user:        nobody nobody <nobody@nobody.org>
date:        Mon Apr 29 00:08:57 2013 -0400
summary:     Merged with development on #2

changeset:   9:135102b0cb32
parent:      7:cf9ae7e052dd
parent:      8:f06486c8c9f1
user:        nobody nobody <nobody@nobody.org>
date:        Mon Apr 29 00:08:20 2013 -0400
summary:     BUG: Working on #2 gallery width/height not set.

这是图表日志。

nobody@nobody:~/hg/project-js-backup$ hg log -G
o    changeset:   10:b4131c44f968
|\   branch:      stable
| |  tag:         tip
| |  parent:      8:f06486c8c9f1
| |  parent:      9:135102b0cb32
| |  user:        nobody nobody <nobody@nobody.org>
| |  date:        Mon Apr 29 00:08:57 2013 -0400
| |  summary:     Merged with development on #2
| |
| @  changeset:   9:135102b0cb32
|/|  parent:      7:cf9ae7e052dd
| |  parent:      8:f06486c8c9f1
| |  user:        nobody nobody <nobody@nobody.org>
| |  date:        Mon Apr 29 00:08:20 2013 -0400
| |  summary:     BUG: Working on #2 gallery width/height not set.
| |
o |  changeset:   8:f06486c8c9f1
|\|  branch:      stable
| |  parent:      6:c8a92230bc6c
| |  parent:      7:cf9ae7e052dd
| |  user:        nobody nobody <nobody@nobody.org>
| |  date:        Sun Apr 28 23:14:37 2013 -0400
| |  summary:     Merged with devleopment branch. Fixed #1 data reporting double /beta in url.
| |
| o  changeset:   7:cf9ae7e052dd
| |  parent:      5:7582497d8a1b
| |  user:        nobody nobody <nobody@nobody.org>
| |  date:        Sun Apr 28 23:09:11 2013 -0400
| |  summary:     BUG: Fixed issue #1.
| |
o |  changeset:   6:c8a92230bc6c
|/   branch:      stable
|    user:        nobody nobody <nobody@nobody.org>
|    date:        Tue Apr 23 13:26:23 2013 -0400
|    summary:     Created branch stable
|
o  changeset:   5:7582497d8a1b
|  user:        nobody <nobody@nobody.org>
|  date:        Mon Apr 22 17:54:43 2013 -0300
|  summary:     Fixed result should return 200 not 201.
|
o  changeset:   4:69ddb4892fc7
|  user:        nobody <nobody@nobody.org>
|  date:        Mon Apr 22 17:49:50 2013 -0300
|  summary:     Fixed response.status on line 272.
|
o  changeset:   3:b029e0a90db8
|  user:        nobody <nobody@nobody.org>
|  date:        Mon Apr 22 17:48:18 2013 -0300
|  summary:     get rid of response_ok check in other functions.
|
o  changeset:   2:9dbccc12d211
|  user:        nobody <nobody@nobody.org>
|  date:        Mon Apr 22 17:28:01 2013 -0300
|  summary:     get rid of response_ok check in postCreateResult
|
o  changeset:   1:517b642f7785
|  user:        nobody nobody <nobody@nobody.org>
|  date:        Mon Apr 22 16:05:53 2013 -0400
|  summary:     Initialized ged.js
|
o  changeset:   0:b7eb08ae529a
   user:        nobody <nobody@nobody.org>
   date:        Mon Apr 22 13:04:36 2013 -0700
   summary:     Initial commit

如果我需要合并,我尝试将它们与(基于此http://kiln.stackexchange.com/questions/1696/how-to-fix-multiple-heads/1698#1698

hg up -C -r 10
hg merge -r 9

但我明白了abort: merging with a working directory ancestor has no effect

主意?

4

1 回答 1

1

当您使用两个分支时,这是完全正常的。每个分支只有一个头,这意味着没有更多的东西可以合并。采用

$ hg heads default
$ hg heads stable

仔细检查这一点。您还会注意到hg merge报告没有要合并的内容:它只会在您当前的分支上寻找第二个头。

使用两个分支允许您将存储库中的变更集分为两组:稳定的和默认的。您在stable分支上进行错误修复(从而创建更稳定的变更集)。然后,您合并stabledefault以将错误修复传播回default您的主要开发所在的分支。请参阅Mercurial 的 wiki了解更多信息。我的命名分支指南也可能有用。

于 2013-04-29T07:21:03.037 回答