A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-February/108433.html below:

[Python-Dev] of branches and heads

[Python-Dev] of branches and headsAdrian Buehlmann adrian at cadifra.com
Sun Feb 27 11:42:21 CET 2011
On 2011-02-26 23:26, Greg Ewing wrote:
> From: Antoine Pitrou
>> - a "branch" usually means a "named branch": a set of changesets
>>   bearing the same label (e.g. "default"); that label is freely chosen
>>   by the committer at any point, and enforces no topological
>>   characteristic
> 
> There are *some* topological restrictions, because hg won't
> let you assign a branch name that's been used before to a node
> unless one of its parents has that name. So you can't create
> two disconnected subgraphs whose nodes have the same branch
> name.

That's not completely correct. You *can* do that.

Mercurial by default assumes you're probably in error if you are
trying to create such disconnected branch name subgraphs, but you
can convince it that it's really what you want by doing:

  hg branch --force <existing branch name>

Example (glog command requires the graphlog extension enabled [1]):

  $ hg init a
  $ cd a
  $ echo foo > bla
  $ hg ci -Am1
  adding bla
  $ hg branch b1
  marked working directory as branch b1
  $ hg ci -m2
  $ hg branch default
  abort: a branch of the same name already exists (use 'hg update' to switch to it)
  $ hg branch --force default
  marked working directory as branch default
  $ hg ci -m3
  created new head
  $ hg glog --template "{rev}, {branch}\n"
  @  2, default
  |
  o  1, b1
  |
  o  0, default

[1] http://mercurial.selenic.com/wiki/GraphlogExtension
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4