aborting update spanning branches!

Matt Mackall mpm at selenic.com
Thu Jul 28 02:01:08 UTC 2005


On Wed, Jul 27, 2005 at 09:56:46PM -0400, Aron Griffis wrote:
> Hello,
> 
> I'm just getting started using Mercurial.  Here's what I've dabbled
> with so far.
> 
> First, put linux-2.6.0 into a repo:
> 
>   $ mkdir linux
>   $ cd linux
>   $ hg init
>   $ tar xjf ../linux-2.6.0.tar.bz2  --strip-components=1
>   $ hg ci -A -t 'linux-2.6.0.tar.bz2'
> 
> Second, add all the patches up to the current:
> 
>   $ bunzip2 ../patch-2.6.*.bz2
>   $ hg import -p1 ../patch-2.6.{1,2,3,4,5,6,7,8,9,10,11,12}
>   $ hg import -p1 ../patch-2.6.12.{1,2,3}
> 
> Third, create tags for these revisions so they're easy to find:
> 
>   $ hg log | sed -n '
>         /^changeset/ { s/.*://; h }
>         /^summary/   { s/.*-//; s/.tar.*//; H; x; s/\n/ /; p }' | \
>     while read cs ver; do
>         hg tag v$ver $cs
>     done
> 
> Now it's not really obvious what that did, so here's the result:
> 
>   $ hg tags
>   tip           31:aff80755b219d3eceb7c700db03cbd257eb2cfc0
>   v2.6.12.3     15:cc276dbc3dfdbf96c87722ecabbc82b74512a188
>   v2.6.12.2     14:0dc672dd599b5cab27127f35a9083c715980dcd0
>   v2.6.12.1     13:fe2a79251da7f1d22620849f846f8de59db8275f
>   v2.6.12       12:e1776c56d05f898db62398126ba33fcf73cc210b
>   v2.6.11       11:34599418892d33c5e21effa90bab6747a08c3576
>   v2.6.10       10:704091954dd1ce0560cf9eb70ae8e6ef87dd9722
>   v2.6.9         9:70830238bf3f12020020b5ef06d165a92d55556f
>   v2.6.8         8:dbb7a5cdff9278e64674ecfa0d668ddbe23759fd
>   v2.6.7         7:898953a69e6044f00bb39ba7514b7a40a46b553a
>   v2.6.6         6:508ed351d6a91615ab13f0ec6ec8c83f2fff4f5e
>   v2.6.5         5:9eb117bf38d877a6f53042515c3e3fad5d3fe6ac
>   v2.6.4         4:90ced1a44236acb5ccc661cc12974374a61cb50b
>   v2.6.3         3:bb3d1a28808096fc52551672e3498c539e386a8e
>   v2.6.2         2:6f20b4ef18700fd08a7fda319dc3dab082f4ca6f
>   v2.6.1         1:107573c70f9dffa6d5e40934f8ec655b9d6f8745
>   v2.6.0         0:92d899abea066d6449267bec16285099b8fafb3d
> 
> Great!  Next I went back to some older revisions and created new
> branches for the extra stable releases.  (This isn't an entirely
> accurate picture of kernel development, but that's ok for now)
> 
>   $ hg up 8     # go back to v2.6.8
>   $ hg import ../patch-2.6.8.1
>   $ hg tag v2.6.8.1
>   $ hg heads
>   changeset:   33:4cf0d6fdc99fc65a1f4c7f6cc7d80d8efca33411
>   tag:         tip
>   user:        agriffis at ...
>   date:        Wed Jul 27 14:53:02 2005
>   summary:     Added tag v2.6.8.1 for changeset 39cbecf940933c2fad09e33b07da9032421e2ea8
> 
>   changeset:   31:aff80755b219d3eceb7c700db03cbd257eb2cfc0
>   user:        agriffis at ...
>   date:        Wed Jul 27 14:10:23 2005
>   summary:     Added tag v2.6.0 for changeset 92d899abea066d6449267bec16285099b8fafb3d
> 
> Cool, now I'd like to do the same for 2.6.11 since there are 12 stable
> patches against it.
> 
>   $ hg up 12    # planning to make a new head from v2.6.12
>   this update spans a branch affecting the following files:
>    CREDITS
>    Documentation/00-INDEX
>    Documentation/Changes
>    ...
>   aborting update spanning branches!
>   (use update -m to perform a branch merge)
> 
> Now I can't figure out how to get out of this situation.  It seems
> like nothing I do will convince Mercurial to let me switch to that
> revision, even though I have no changes in my working copy.  What am
> I missing here?

You're missing the -C switch which forcibly moves to that version and
throws away what's in your working directory.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list