On 05/28/12 10:50, Peter Reynolds wrote:
> In TortoiseHg Workbench it's possible to right click a revision and go 
> 'Update'
>then 'Merge' given the right scenario, or right click and choose 'Merge with 
>local'.
> I've never been able to find documentation behind each and when to use one 
> over
>the other. Also, under what scenario does 'Not a head revision' appear?
>We only occasionally see it (myself and 1 other on project), other times 
>nothing.
>I'd like to be able to explain it and educate others which to use but hard to
>find info and reasoning which way to go.

Suppose that you've pulled revision 3:

              you're here
                  v
    0 ---- 1 ----[2]
     \
      \
       ----------------- 3

merge without updating to 3 will create the following changeset 4:

    0 ---- 1 ---- 2 -----------[4] (parent1: 2, parent2: 3)
     \                         /
      \                       /
       ----------------- 3 ---

update to 3 and merge is:

    0 ---- 1 ---- 2 ----------
     \                        \
      \                        \
       ----------------- 3 ----[4] (parent1: 3, parent2: 2)

there's no significant difference as long as both 2 and 3 belong to the same 
named
branch.

If you update to 1 before merging, TortoiseHg tells you 'Not a head revision':

    0 ----[1]---- 2 (<- head)
     \
      \
       ----------------- 3 (<- head)

because it doesn't reduce heads after merging:

    0 ---- 1 ---- 2 (<- head)
     \      \__________________[4] (<- head)
      \                        /
       ----------------- 3 ----

You can find detailed info from Mercurial Wiki:

http://mercurial.selenic.com/wiki/Merge
http://mercurial.selenic.com/wiki/MultipleHeads

Regards,

> I found this page below which had some info...
> Url - http://ratfactor.com/mercurial-named-branches#pull-from-bitbucket
>
> 3 sentences of interest...
> "After a pull, you're likely to see a "Not a head revision!"
>message on your Working Directory."
> "This is Mercurial's way of saying that the revision(s) you've just downloaded
>from the Bitbucket repository are more recent than any you have committed
>to the current branch in your local repository. There are two ways to fix 
>this."
> "If you have not made any commits since the last time you were synchronized
>with Bitbucket, you can simply run an update to switch to this newer version.
>See Switching branches ('updating'). Yes, this does mean that the act of
>pulling new revisions created a new unnamed branch in your repository for that 
>purpose!"

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Tortoisehg-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-discuss

Reply via email to