Note that there are some explanatory texts on larger screens.

plurals
  1. POMercurial Bookmarks and 'Git like branching'
    primarykey
    data
    text
    <p>I am not having any luck using Bookmarks in Mercurial for Git like branching.</p> <p>From the article: <a href="https://www.mercurial-scm.org/wiki/BookmarksExtension" rel="nofollow noreferrer">https://www.mercurial-scm.org/wiki/BookmarksExtension</a>, I've set "track.current" to true in my .hgrc file. </p> <p>Excerpt below:</p> <blockquote> <p>By default, when several bookmarks point to the same changeset, they will all move forward together. It is possible to obtain a more Git-like experience by adding the following configuration option to your .hgrc</p> <pre><code>[bookmarks] track.current = True </code></pre> </blockquote> <p>However, as soon as I start trying to do parallel / independent development on more than one bookmark, then switch back and forth between the bookmarks, I run into the following:</p> <pre><code>abort: crosses branches (use 'hg merge' or 'hg update -C') </code></pre> <p>Example to reproduce:</p> <pre><code># Make a new directory and Mercurial repository $ mkdir bookmark $ cd bookmark $ hg init # Create two bookmarks $ hg bookmark bk1 $ hg bookmark bk2 # Checkout bk1 $ hg update bk1 0 files updated, 0 files merged, 0 files removed, 0 files unresolved # Create and commit a file to bk1 $ touch bk1.txt $ hg add adding bk1.txt $ hg commit -m "bk1 file" # Checkout bk2 $ hg update bk2 0 files updated, 0 files merged, 1 files removed, 0 files unresolved # Create and commit a file to bk2 $ touch bk2.txt $ hg add adding bk2.txt $ hg commit -m "bk2 file" created new head # Checkout bk1 $ hg up bk1 abort: crosses branches (use 'hg merge' or 'hg update -C') </code></pre> <p>Is this normal behavior, for there to be "crosses branches" forcing a merge or file overwrite, when moving between bookmarks?</p> <p>For a 'Git-like experience' I would expect to be able to flick back and forth between bk1 and bk2, committing and developing on either, merging if and when I needed to.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload