Mercurial hg pull hg up hg merge Heads blah blah 整个过程不是很清楚
我们使用 Kiln 作为我们的 Mercurial 服务器,我有三个开发人员在同一个存储库上工作,我经常遇到这个问题,我不太确定发生了什么。
每隔一段时间我就会做一次hg pull
。
然后当我运行 hg up 时,我收到以下消息
abort:交叉分支(使用'hg merge'进行合并或使用'hg update -C' 放弃更改)
好的,所以我运行 hg merge
并得到
中止:未提交的未提交更改(使用“hg status”列出 变化)
好的,所以我运行 hg status
并得到类似这样的信息,
! Safemail 3.0\CSM3.0\AddinSetup\Release\AddinSetup.tmp
! Safemail 3.0\CSM3.0\Outlook2007Addin\Outlook2007Addin_TemporaryKey.pfx
不知道该怎么办。
如果我再次运行 hg commit
,它会说没有更改。
最后,如果我运行 hg Heads
,我会
changeset: 51:daea74a29d5c
tag: tip
parent: 49:b88e6e522672
user: Rahul Chandran
date: Mon Jan 23 13:30:54 2012 -0800
summary: added login code
changeset: 50:cb6f6e1eec5e
parent: 46:d83431c322ad
user: [email protected]
date: Mon Jan 16 22:10:11 2012 -0600
summary: Adjusted Email-PDF formatting
清楚地看到,我没有 DSCS 背景,而且我可能缺少对正在发生的事情的一些基本了解。任何帮助表示赞赏。
我所知道的是,我的同事通过推送签入的代码与我的更改没有共同的文件。我不希望在非分布式源控制系统中出现合并冲突或类似的情况。本质上我很难理解这里到底发生了什么
We are using Kiln as our mercurial server and I there are three developers working on the same repo and i get this issue often and I am not quite sure what is happening.
Every once in a while I will do an hg pull
.
Then when I run hg up I get the following message
abort: crosses branches (use 'hg merge' to merge or use 'hg update -C'
to discard changes )
ok so I run hg merge
and I get
abort: outstanding uncommitted changes (use 'hg status' to list
changes)
ok so I run hg status
and I get something like this
! Safemail 3.0\CSM3.0\AddinSetup\Release\AddinSetup.tmp
! Safemail 3.0\CSM3.0\Outlook2007Addin\Outlook2007Addin_TemporaryKey.pfx
no idea what to do with that.
If I run hg commit
again it says no changes.
Finally if i run hg heads
I get
changeset: 51:daea74a29d5c
tag: tip
parent: 49:b88e6e522672
user: Rahul Chandran
date: Mon Jan 23 13:30:54 2012 -0800
summary: added login code
changeset: 50:cb6f6e1eec5e
parent: 46:d83431c322ad
user: [email protected]
date: Mon Jan 16 22:10:11 2012 -0600
summary: Adjusted Email-PDF formatting
Clearly I do not come from a DSCS background and I am probably missing some basic understanding of what is going on . Any help appreciated.
What I do know is that the code that my co worker checked in via a push has like no files in common with my changes. I would not expect like a merge conflict or some such in a non distributed source control system . essentially I am having some trouble understanding what is happening here exactly
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看
hg status
的帮助。它会告诉您!
的意思是:因此您删除了存储库中跟踪的一些文件。如果您一开始就不想跟踪它们(它们看起来像是很好的
.hgignore
候选者),您可以hg 忘记 FILENAMES; hg 提交
他们。相反,如果您确实想跟踪它们,则可以hg revert FILENAMES
它们(将它们从存储库返回到您的工作目录中。一旦
hg status
同意,您就没有 。考虑花一点时间阅读(免费)Mercurial 书籍的前几章,这些基本概念如果按顺序呈现的话很容易 可怕地当你试图从谷歌搜索和 Stack Overflow 问题中零碎地找到它们时,这会令人沮丧。为了节省你的时间,花 30 分钟是值得的。
Check out the help for
hg status
. It will tell you that!
means:So you deleted some files that are tracked in your repository. If you didn't mean to track them in the first place (they look like good
.hgignore
candidates) you canhg forget FILENAMES; hg commit
them. If, instead, you do mean to track them you canhg revert FILENAMES
them (to get them back into your working dir from your repository.Once
hg status
agrees you have no uncommitted changes you'll be able tohg merge
.Consider taking a little time to read the first few chapters of the (free) Mercurial book. These basic concepts are easy when presented well and in order, but horribly frustrating when you try to pick them up piecemeal from google searches and Stack Overflow questions. It's worth the 30 minutes to save you hours.