简体   繁体   中英

Mercurial hg pull hg up hg merge heads blah blah the whole process not very clear

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:        dthompson@Jabberwock.lan
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

Check out the help for hg status . It will tell you that ! means:

  ! = missing (deleted by non-hg command, but still tracked)

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 can hg forget FILENAMES; hg commit hg forget FILENAMES; hg commit them. If, instead, you do mean to track them you can hg 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 to hg 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM