New Evolve extension release: version 10.2.0

2021-02-01

We released a new version of the evolve extension: 10.2.0.post1.

(There was an issue with the 10.2.0 release, so we made a 10.2.0.post1)

This extension extends core features around history rewriting and draft changesets sharing.

As usual, the release is [available on PyPI](https://pypi.python.org/pypi/hg- evolve/10.2.0.post1) and upgrade is recommended.

This version introduces support for Mercurial 5.7 and comes with a variety of improvements and bugfixes. Check the changelog for details. The most notable change are: an improved logic to decide the resolution parent for content-divergence resolution in case only one of the changesets was moved from its original position, and better handling of topics when rebasing.

Thanks to all the people involved:

Evolve: 10.2.0

  • compatibility with Mercurial 5.7

  • doc: update the MQ To Evolve guide and fix build warning for index.rst

  • evolve: improve resolution of some case of parent divergence

  • evolve: respect command-templates.oneline-summary if configured

  • evolve: remove spurious "working directory is now at ..." messages

  • evolve: various documentation improvements

  • packaging: default to building docs on Python 3

  • strip: remove experimental.prunestrip option

Topic : 0.21.0

  • performance: speed up various operations using an in-memory cache for topic

  • rebase: prevent in-memory rebase from silently dropping topic (by disabling the feature)

  • topic: rework how ctx.branch() is wrapped

  • topic: look for topic heads only when necessary, this fixes the output of e.g. hg heads when topics are in play

Modern Mercurial

Antoine Cezar
Raphaël Gomès
2020-11-26

General perception

Mercurial draws a wide range of opinions from its users, both former and current, and even from those who have not tried it yet. Such opinions range from "it's super easy, way simpler to use than Git" to "it's slow and the UX sucks", along with "Mercurial? Isn't it dead?" and "It's not on Github" and the (usually) more quiet "I like the features" and "it scales very well".

Like with most technical discussions, whether any opinion is "right" really depends on who you ask.

In the case of 15 year-old software like Mercurial, when you've asked a particular question is important, as things may have changed from when you last made up your mind. Your workflow might not be well supported, the tools you need might not exist... you might also just not like it.

Our goal with this article is to re-state some of the evolutions that Mercurial has seen over the past few years and to review some of its strong points and weaknesses.

Hopefully, you come out of this read with more up-to-date information to help you take informed decisions about the tools you're using.

> Read more

New Evolve extension release: version 10.1.0

2020-10-31

We pushed a new release for the evolve extension: 10.1.0.

This extension extends core features around history rewriting and draft changesets sharing.

As usual, the release is [available on PyPI](https://pypi.python.org/pypi/hg- evolve/10.1.0) and upgrade is recommended.

This version introduces support for Mercurial 5.6 and comes with a variety of improvements and bugfixes. Check the changelog for details. The most notable changes are: rewind command now has a --dry-run flag that shows what would be done; it's now possible to address the whole stack (as defined by topic extension) on newer Mercurial (5.4+) using foo#stack operator (where foo is any revset, multiple revisions supported); and there's now an experimental config option allowing a merge with an ancestor in specific cases.

Thanks to all the people involved:

Evolve: 10.1.0

  • compatibility with Mercurial 5.6

  • numerous minor changes to packaging, Makefile, README moved to README.rst

  • evolve: various improvements to content-divergence resolution

  • evolve: fix various issues with --continue when solving content-divergence

  • evolve: specify the source of config override for server.bundle1=no

  • evolve: avoid leaving mergestate after instability resolution

  • evolve: while resolving conflicts, the evolved node will no longer be a dirstate parent (won't show up in hg parents and not as @ in hg log -G, but it will show up as % with hg >= 5.4)

  • metaedit: update bookmark location when applicable

  • rewind: add a --dry-run flag

  • rewind: properly record rewind of splits as folds

Topic: 0.20.0

  • stack: support foo#stack relation revset (hg-5.4+ only)
  • merge: add an experimental.topic.linear-merge option to allow oedipus merges in some cases

New Evolve extension release: version 10.0.2

2020-09-09

We pushed a new release for the evolve extension: 10.0.2.

This extension extends core features around history rewriting and draft changesets sharing.

As usual, the release is [available on PyPI](https://pypi.python.org/pypi/hg- evolve/10.0.2) and upgrade is recommended.

This is a bugfix release that addresses issues in split and uncommit commands from evolve extension and revset logic in topic extension. Check the changelog for details.

Thanks to all the people involved:

Evolve: 10.0.2

10.0.2 -- 2020-09-08

  • py3: use '%d' for formatting revision numbers in stable range cache warning (issue6390)

  • split: correctly handle discard action after previously splitting changes into more than one commit

  • uncommit: fix situation where added file would be left in a wrong state

Topic: 0.19.2

  • revset: when processing topic(REVSET), no longer return changesets without topic from REVSET

Announcing the Mercurial public Bitbucket archive

2020-08-05

Back in April of this year we announced a partnership with Software Heritage to archive all public Mercurial data on Bitbucket before they remove it permanently.

Now that the Bitbucket deadline is well behind us, we are happy to say that the public archive website we've promised is complete and visible at the following URL: https://bitbucket-archive.softwareheritage.org/

You will find all of the data we were able to download from Bitbucket's API (and some help from their VCS team, thanks!) in a very simple static index.

Note: if you want to download the entire archive (it's about 6TB) or a large portion of it, please contact us or Software Heritage before writing your own crawlers and abusing the server, we will be happy to help.

New Evolve extension release: version 10.0.1

Anton Shestakov
2020-07-31

We pushed a new release for the evolve extension: 10.0.1.

This extension extends core features around history rewriting and draft changesets sharing.

As usual, the release is [available on PyPI](https://pypi.python.org/pypi/hg- evolve/10.0.1) and upgrade is recommended.

This version introduces support for Mercurial 5.5 and comes with a variety of improvements and bugfixes. Check the changelog for details. The most notable change is: push --topic and outgoing --topic now work as expected when using a topic name that doesn't exist and "." as the topic.

Thanks to all the people involved:

Evolve: 10.0.1

10.0.1 -- 2020-07-31

  • compatibility with Mercurial 5.5

  • evolve: update the template keywords section in hg help -e evolve

  • obslog: make obslog --no-origin -f work with multiple successor sets

Topic: 0.19.1

  • compatibility with Mercurial 5.5

  • topic: hg push --topic does-not-exist now doesn't try to push unrelated changesets and aborts instead

  • topic: hg outgoing/push --topic . will use current topic

Not everything is UTF-8

Raphaël Gomès
2020-06-05

Over the past few weeks I've helped a new developer get started with both Mercurial and Rust, exposing them to somewhat niche subjects that they've had (understandably) little experience with.

One of them is the encoding (or lack thereof) in Mercurial and how it affects how we write code in both Python and Rust. As easy as it was to explain the issue to said developer, in the few instances of asking around for help on implementation details (mostly to get information about what had already been done and what I needed to do myself) I've noticed that not everyone I'd interacted with outside of our circle of VCS developers even understood the problem I was trying to solve.

Please note that I am not pointing fingers or accusing anyone of being disingenuous, just about everyone I talked to was very much trying to help me and to understand what is it that I wanted to solve in the first place. I usually don't have that much trouble explaining things to people in those situations, so I figured this warranted a full blog post.

> Read more

Archiving Bitbucket Content: Status Report

Pierre-Yves David
2020-05-26

We are continuing our effort to archive all of Bitbucket Mercurial content before Atlassian delete it all. And we are making great progress since we have already retrieved all existing public content. So far we identified a total of 244,609 public project using Mercurial.

Currently archived

In these 244,609 projects we identified:

  • 244,569 source code repositories,
  • 81,154 wiki repositories,
  • 213,345 issues in there bug trackers (with 603,334 comments, and 4445 images),
  • 86,372 pull requests and their comments and 1,320 images,
  • 45,977 project attachments (for about 750GB of data).

Looking at the 5.5TB of repositories more closely gives interresting data:

  • 27,662 (8.5%) repositories went missing either deleted or made private since we observed them in February,
  • 98 (0.03%) repositories are inaccessible (Bitbucket itself crashing trying to access them),
  • about a couple hundred repositories are still receiving pushes, less than 1 week away from the initial deadline.

What the plan for this content?

Ultimately, we plan to offer a set of tarballs for each project. People will be able to download:

  • the main mercurial repositories,
  • the wiki repositories,
  • the set of metadata associated to a project (as json),
  • the individual project attachment,

However… we will only do this once the set of data is frozen. So for the coming months, our server will tirelessly gather all new content that gets pushed to Bitbucket. Starting of July 1st, when the Mercurial content stops getting updated. We will start building and servicing tarballs through the Sofware Heritage infrastructure.

Anything else?

Yes! In addition to offering tarballs, we are also planning to import all this content inside the Software Heritage database. This will provide us with an excellent corpus to make Software Heritage's Mercurial importer more robust. This effort can start right now, so stay tuned for more news soon.

New Evolve extension release: version 10.0.0

Pierre-Yves David
2020-05-09

We pushed a new release for the evolve extension: 10.0.0.

This extension extends core features around history rewriting and draft changesets sharing.

As usual, the release is [available on PyPI](https://pypi.python.org/pypi/hg- evolve/10.0.0) and upgrade is recommended.

This version introduces support for Mercurial 5.4 and comes with a variety of improvements and bugfixes. Check the changelog for details. The most notable changes is: a new obslog flag --origin that shows predecessors instead of successors which is enabled by default in this release (use --no-origin for the old behavior)> The --no-origin mode might be dropped in the future. In adition, this release comes with a new a new template keyword {obsorigin} and improved divergence resolution.

Thanks to all the people involved:

Evolve: 10.0.0

  • compat: clean up old compatibility code
  • compat: compatibility with Mercurial 5.4
  • evolve: add {obsorigin}, a template keyword that works similarly to {obsfate}, but shows predecessors of a changeset
  • evolve: fix permissions of new cache files using SQLite
  • evolve: always create commit when resolving divergence
  • evolve: handle relocation during divergence resolution producing no changes
  • evolve: provide cache to successorssets() in more cases
  • obslog: make --all and --filternonlocal work properly with --no-graph
  • obslog: add --origin flag to show predecessors instead of successors
  • obslog: make --origin flag the default
  • stablerangecache: sanity check subranges

Topic 0.19.0

  • auto-publish: issue the capabilities in all cases
  • topic: provide cache to successorssets() in one more case

BitBucket, Alternative and Archival

Georges Racinet
2020-04-23

After BitBucket's decision to discontinue support for the Mercurial version control system, and to remove Mercurial-based repositories by June 30, 2020, we decided to step up and make sure that all these precious projects would not be lost.

We have created a new hosting platform for active projects to move to, and we are archiving all public projects, in order to include them in the Software Heritage Archive, the universal archive of source code.

We are delighted to announce today that the intense work we have done over the past months is now bearing fruits.

Heptapod: a new home for Mercurial-based projects

We're excited to open up to the world, in a joint effort with Clever Cloud, heptapod.host: the ultimate Mercurial BitBucket replacement. Heptapod.host is a brand new code hosting platform where active projects using Mercurial can now migrate seamlessly.

Heptapod sports a powerful and intuitive BitBucket import feature that allows you to recover not only the repository itself, but also issues and pull requests. Not only do they become Heptapod (GitLab) issues and merge requests, but they also preserve their original numbering.

This feature will help reduce the disruption for lots of project: it is indeed common that commit messages reference issues or pull requests by number, be it in an explicit form (#123) or as a link (https://bitbucket.org/my/repo/issues/123). How many of us developers have been frustrated trying to understand a change done a while ago because such references have become useless in the meantime? How many emails or spreadsheets have turned into useless noise because of that? After an import to Heptapod, these references will still be usable. Learn more in our Heptapod.host presentation at FOSDEM.

In addition to the commercial instance, Heptapod.host, we've also launched a free instance for open source project at foss.heptapod.net. If you are an open-source project, please submit a hosting request.

Archiving data and metadata of 250 000 projects

Over 250 000 mercurial repositories are at risk of disappearing in the next few weeks, and we could not let this happen. In collaboration with Software Heritage, we've started a project to archive hard copies of all public project data and metadata. This means the source code repositories, of course, but also the wikis, the issues, the pull requests, attachments, associated comments and inline images.

The project is public and available on heptapod.host. You can track its progress on the software heritage mailing list. After June 30th, once BitBucket deletes the archived result, we will make them available to the public.

Importing source code in the Software Heritage database

For the last few months, we have been working with Software Heritage to improve its capability to import Mercurial repositories.

Thanks to an European grant managed by NLNet, we are developing specialized connectors that allow for efficiently archiving software developed using the Mercurial version control system. This effort will ensure that no Mercurial public repository will be lost.

Hurry up!

Would you like to import your BitBucket Mercurial projects? Register to the Clever Cloud platform, create a Clever Cloud organization, and sign-in to the Heptapod instance.

Contact-us for more information!

New Evolve extension release: version 9.3.1

Pierre-Yves David
2020-04-08

We pushed a new release for the evolve extension: 9.3.1.

This extension extends core features around history rewriting and draft changesets sharing.

As usual, the release is [available on PyPI](https://pypi.python.org/pypi/hg- evolve/9.3.1) and upgrade is recommended.

The release contains improvements and bugfixes on multiple aspects. Check the changelog for details. The most notable changes are: fixes and improvements to discovery and exchange algorithm (and pushing in general) and improved support for Mercurial 5.3.

Thanks to all the people involved:

Evolve: 9.3.1

  • compat: make touch-noise and rewind-hash extra field be bytes

  • obsexchange: avoid sending too large request to http server

  • obsdiscovery: server no longer aborts with a 500 error if client sends a request without obscommon

  • obsdiscovery: avoid considering locally hidden changeset

  • single-heads: ignore obsolete section when enforcing one head per branch

  • evolve: improved behavior when evolving above the result of a split

  • evolve: checking for new head on push is no longer confused by mixed branches (or topics)

Topic 0.18.1

  • topic: fix auto-publish=abort with server that auto-publishes bare branches

Augmenting Software Heritage archiving capabilities

2020-03-24

Paris, Tuesday, March 24th 2020 — Two ambitious French companies, Octobus and Tweag, will contribute new key open source components to Software Heritage, a non profit initiative started by Inria, in collaboration with UNESCO.

Software Heritage’s mission is to collect, preserve and share all software that is publicly available in source code form, which is an important part of humankind’s heritage. “We are delighted to welcome Octobus and Tweag, with support from an European grant managed by NLNet, as contributors to Software Heritage’s long term mission”, said Roberto Di Cosmo, director of Software Heritage, “Building the universal archive of software source code is a humbling undertaking, and the participation of leading experts to our development effort is of paramount importance to succeed”.

Octobus will develop specialised connectors that allow to efficiently archive software developed using the Mercurial version control system. "We are happy to put ten years of Mercurial expertise at the service of a great mission. We will improve Software Heritage capability to import Mercurial repositories, and the experience gained in this process will allow us, Mercurial developers, to better understand our user base." said Pierre-Yves David, CEO of Octobus, "Working with Software Heritage to refine their data model is a great opportunity to learn more about the other systems and to find new way to make Mercurial an even better version control system”.

Tweag will develop the components needed to ensure that the source code used to build packages using the Nix functional package manager is systematically archived in the Software Heritage archive. “Reproducible components are the basis of collaboration and progress in software engineering. It is this belief that made Tweag a pioneer of reproducible software systems at industry scale and a fervent supporter of Nix, a tool that allows putting such systems into place.”, said Mathieu Boespflug, CEO of Tweag, Collaborating with Software Heritage to combine Nix with a long-term source code archive is really the natural step forward”.

“The Next Generation Internet Initiative is a significant R&D effort backed by the European Commission to make the internet more trustworthy, resilient and sustainable. The internet is an amazing global technical and social resource, but it was built for the short term - like a house of cards", says Michiel Leenaars, director of Strategy at NLnet Foundation and project lead for NGI Zero. "Everything that we can click to, download or link to today, may be gone tomorrow. Software Heritage secures the technology commons of today for the long future ahead of us, so how could we not support such a forward-looking endeavour given our mission to reimagine the internet for the next millennium and beyond?

"The European Commission appreciates the forward looking nature of Software Heritage, and we are very happy to contribute to the long term sustainability of the technology ecosystem", states Oliver Bringer, Head of the Next Generation Internet Unit at the European Commission. "This is the first R&D programme that takes such a step, and it is a natural fit for the NGI initiative. We need solid technological foundations to build the internet of tomorrow and an open repository of publicly available software source code is clearly one of these foundations."

About Octobus

Octobus is a company focussing on commercial support for the Mercurial source control system. Their work ranges from building a hosting solution (https://heptapod.net) to ad-hoc development for companies who need performance boosts, custom features or workflow consulting. Octobus provides a significant part of current Mercurial development. In particular, for a couple of years, Octobus drove the effort to use the Rust programming language in Mercurial, improving both the performance and the robustness of the codebase. You can learn more at https://octobus.net/.

About Tweag

Tweag is a software innovation lab that helps deep tech startups quickly scale their engineering performance and execute on high-risk, high-reward projects with confidence. Tweag’s team of engineers are behind today’s boldest innovations in machine learning, distributed computing and biotech. Applying mathematics, computer science and the methods of open source to software engineering, Tweag stretches what’s possible for clients. Learn more at tweag.io.

About NLnet Foundation

NLnet Foundation is an independent organisation whose means come from donations and legacies. The history of NLnet goes back to 1982 when Teus Hagen announced the European Unix Network (EUnet) which became the first public wide area network in Europe and the place where internet was introduced to Europe. NLnet also pioneered the worlds first dial-in and ISDN infrastructure with full country coverage. In 1997 all commercial activities were sold to UUnet (now Verizon) and since that time NLnet has focused on supporting the open internet and the privacy and security of internet users. The articles of association for the NLnet Foundation state: "to promote the exchange of electronic information and all that is related or beneficial to that purpose". NLnet's core business is to support independent organizations and people that contribute to an open information society and to a safe, secure and open internet. NLnet currently spearheads NGI Zero, a unique consortium that funds privacy and trust enhancing technologies and improves search and discovery as part of the Next Generation Internet initiative of the European Commission. Please visit https://nlnet.nl

About Software Heritage

Software Heritage is a non-profit initiative with the stated mission is to collect, preserve and share all software that is publicly available in source code form. Started by Inria, in collaboration with UNESCO, Software Heritage is building the largest public archive of software source code, for the benefit of society as a whole. For more information, please visit https://www.softwareheritage.org.

New Evolve extension release: version 9.3.0

Pierre-Yves David
2020-03-04

We pushed a new release for the evolve extension: 9.3.0.

This extension extends core features around history rewriting and draft changesets sharing.

As usual, the release is [available on PyPI](https://pypi.python.org/pypi/hg- evolve/9.3.0) and upgrade is recommended.

The release contains improvements and bugfixes on multiple aspects. Check the changelog for details. The most notable change are: Improved support for Mercurial 5.3, drop of support for Mercurial 4.5, and a new configuration in topic to hide changesets with a topic set to clients without topic support.

Thanks to all the people involved:

Evolve: 9.3.0

9.3.0 -- 2020-03-04

  • compat: compatibility with Mercurial 5.3

  • compat: drop compatibility with Mercurial 4.5

  • compat: cleanup old compatibility code for Mercurial < 4.5

  • evolve: extensive cleanup of functions, template keywords and compatibility code related to obsfate and successorssets

  • evolve: add content divergence checking to the standard pre-rewrite check

  • evolve: improve the message associated with content divergence

  • evolve: correctly handle --continue and --stop when relocating content-divergent changesets

  • exchange: dropped more bundle-1 related dead code

  • help: categorizing evolve and topic commands

  • obslog: make templatable (more change coming in the next version)

  • obslog: show folds and use more specific verbs when possible

Topic 0.18.0

  • topic: add a experimental.topic.server-gate-topic-changesets config

Talks we gave at FOSDEM 2020

2020-02-05T00:00:00Z

Octobus was at FOSDEM 2020, which was, as usual, a success for the free and open-source community, and tons of fun.

Georges gave a lightning talk about Heptapod, our friendly fork of Gitlab with support for Mercurial. The video should become available in the coming days at this link. In short, Heptapod is more alive than ever, with a free instance for FOSS projects that qualify and a commercial option coming very soon. Fear not, Heptapod is FOSS itself, you can also run it self-hosted. See the announcements for more information: https://heptapod.net/category/announcements.html

Georges getting ready for his lightning talk:

Georges getting ready for his lightning talk

Raphaël gave two talks on the subject of bridging Python and Rust together, one in the Python devroom and one in the Rust devroom. Interesting progress is being made in Rust/Python FFI within rust-cpython, Mercurial is always getting faster, and even more so in the near future.

Audience at Raphaël's talk in the Python devroom:

Audience at Raphaël's talk in the Python devroom

A few minutes before Raphaël's talk:

A few minutes before Raphaël's talk

I hope you enjoyed your FOSDEM! If you could not come, we hope to see you there next year. Who knows, we might have more good news for Mercurial and FOSS in general. ;)

New Evolve extension release: version 9.2.2

Pierre-Yves David
2020-01-31

We pushed a new release for the evolve extension: 9.2.2.

This extension extends core features around history rewriting and draft changesets sharing.

As usual, the release is [available on PyPI](https://pypi.python.org/pypi/hg- evolve/9.2.2) and upgrade is recommended.

This version introduces support for Mercurial 5.3, fixes installation issues on Python 3, improves various aspects of the documentation and comes with a variety of others bugfixes.

Thanks to all the people involved:

Evolve: 9.2.2

Bug fixes:

  • debian: allow to build with python 3
  • evolve: fix content-divergence resolution when p1 is null (issue6201)
  • evolve: make sure divergence resolution doesn't undo changes (issue6203)
  • evolve: preserve date when resolving content-divergence (issue6202)
  • metaedit: don't change commit date by default (issue5994)
  • pick: don't create any successors when there were no changes (issue6093)
  • py3: fix documentation generation
  • py3: fix setup.py --version
  • py3: fix some exception formatting

Improvements:

  • amend: abort when both --patch and --extract are passed
  • compatibility for changes in upcoming Mercurial 5.3
  • documentation: update text and add missing figures
  • evolve: also merge the date field when solving content-divergence
  • evolve: use more often seen metavariables in command synopsis strings
  • rewind: preserve date

Topic 0.17.2

  • topic: add more options to command synopsis
  • topic: fix a bug in logic of choosing destination for hg update
  • topic: fix a bug in logic to choose destination when no active topic

News from Heptapod

Georges Racinet
2020-01-28

For the past 6 months, we have put a lot of effort in Heptapod, the friendly fork of GitLab with Mercurial support. A lot of important features have been added, like Continuous Integration (CI), SSH support and Bitbucket import. We also secured a partnership with CleverCloud, a hosting company who is sponsoring the new foss.heptapod.net instance and preparing a commercial offer for Heptapod.

The coming months will keep being full of Heptapod related news. We have work planned to remove the internal usage of hg-git in favor of direct communication between Gitlab and Mercurial and more efforts to catch up with the moving target that is the current GitLab version. To follow Heptapod progress more closely, check the Heptapod blog!

New Evolve extension release: version 9.2.0

Pierre-Yves David
2019-09-28

We pushed a new release for the evolve extension: 9.2.0

This extension extends core features around history rewriting and draft changesets sharing.

As usual, the release is [available on pypi](https://pypi.python.org/pypi/hg- evolve/9.2.0) and upgrade is recommended.

This version introduces support for hg abort, beta support for python-3.6+ and various other improvemend and bugfix.

Thanks to all the people involved:

Evolve: 9.2.0

Bug fixes:

  • evolve: check that relocating makes sense in _solvedivergent() (issue5958)
  • evolve: test that target is not orig in _solveunstable() (issue6097)
  • fold: check allowdivergence before folding obsolete changesets (issue5817)
  • obslog: correct spacing of patch output with word-diff=yes (issue6175)
  • evolve: avoid possible race conditions by locking earlier

Improvements:

  • prune: improve documentation for --pair
  • python3: beta support for Python 3.6+ (thanks to Ludovic Chabant, Martin von Zweigbergk and Raphël Gomès for their hard work)
  • prune: clarify error message when no revision were passed,
  • abort: add support for evolve and pick to hg abort (hg-5.1+)
  • rewind: add --keep flag to preserve working copy

Topic 0.17.0

  • stack: make sure to preserve dependencies, fixes certain complex case

Heptapod's default workflow

Pierre-Yves David
2019-09-04

Why having a clear default workflow is important?

When we started working on Heptapod, our version of Gitlab with support for the Mercurial version control, an important question arose: What should be the recommended workflow?

Great versatility and extensibility are two of Mercurial strengths. Howerever these properties also have their drawbacks, as different groups of users might end up using the tool in quite different ways, hence forcing collaboration platforms to deal with many variants.

Selecting one standard workflow for Heptapod is important to avoid these traps. Having one, unified and smooth, way to interact with Heptapod makes such platform much more powerful and is much more comfortable to users.

Furthermore, selecting one default workflow means we can optimize the default user experience towards it. This helps us to offer the best to people sticking to that workflow.

However, selecting a default workflow and optimizing for it does not mean blocking all other alternatives. It is possible to configure Heptapod to unlock other behaviors if users want to.

What needs should this workflow meet?

We want a workflow that:

  • stick to Mercurial core concepts and empower them as much as possible,
  • fit the popular Merge Request system of GitLab,
  • keep changesets as first class citizens,
  • accomodate both simple usecase and more advanced usage in a smooth way,
  • in particular, smoothly compatible with Mercurial history editing capability.

What choices did we make ?

To accommodate these goals, we made a handful of choices in the default Heptapod configuration and user experience:

  • Server side, Each name (eg: named branches) cannot have multiple heads.

  • The branching model uses named branches and topics. Long lived branches are based on named branches, feature branches are based on topic-branches,

  • Phase movements use a simple scheme based on the branching model: changesets get published upon pushes unless they have a topic

  • Support for changeset evolution is enabled by default.

  • Bookmarks aren't allowed by default.

What do these choices means

Using a single head per name

While having multiple heads locally offers a great flexibility, it gets confusing for users and tooling when a name points to ambiguous content. Users might learn to work around it but tooling usually can't. To address this, Heptapod server will only accept a single head per named branch. This also applies to topics too, each topic will need to have a single head server side.

To give an example: Having one single head for each branches and topics means the Merge Request logic can be driven by these names without fear of ambiguity or sudden/drastic changes in their meaning.

To accommodate older repositories or different workflow, this constraint can be lifted through configuration. However this might prevent the use of some features of Heptapod on those branches.

More details in our FAQ

Branching model and mutability

We decided to use named branches and topics for our branching model as both fit well in the general philosophy of Mercurial.

In Heptapod, named branches are meant to be used for long term branches, their content is immutable and they come with all the clarity and advantage of what they usually provide. However, named branch are not ideal for short lived feature branches, so we decided to use topics for that. Topics are very similar to named branches but are designed for a shorter and automatic life cycle.

Each changeset can be assigned a topic in addition to its named branch. All changesets within this topic will make a small feature branch that Heptapod will use for Merge Request. However, once the Merge Request gets merged, the changesets move to the public phase, the topic "fades away" and gets fully integrated to its target named branch. This lightweight life cycle is appealing: opening and closing Merge Requests comes at a very low overhead and won't leave unwelcome long term marks in the history.

In addition, since all changesets are explicitly in a topic, the content of each feature branches is clearly defined for both Heptapod, server side and the user locally. This was an important criteria for us.

The strong link between Heptapod Merge Request workflow and Mercurial concept works both way. Users can decide to locally publish a feature branch and Heptapod will be able to acknowledge the operation once pushed.

Users can also decide to use named branches only. The Merge Request system fully supports a branch to branch workflow.

Mutability and evolution

An important choice we made was to enforce everything outside of topics to be public. This comes with various advantages.

First, it provides backward compatibility with how Mercurial has been working for many years. People using default Mercurial configuration before going to Heptapod, without topic, will keep the same behavior. Whatever they push will move to the public space. However it makes it easy for them (even a subset of them) to exchange draft feature branches, by simply start using topic for it. This way, instead of having to deal with the combination of multiple dimensions (branch type + mutability), the different concepts align to expose a clear boundary and behavior: feature branch are mutable, long term branch are not.

Second, having the phase movements deeply integrated with the general workflow comes with an additional benefit. The amount of draft changesets gets naturally controled since they need to get public to reach the main branches. In such context, enabling changesets evolution for everybody seems like a sane default. The topic space keeps on being mutable and can be amended and rebased, while the named branch space provides strong immutability guarantees and will need explicit merge changesets to integrate content from one branch to another.

(Of course, users can also change their instance configuration to whatever publication mode they want to)

No bookmark by default

The branching model and its integration to GitLab Merge Request is based exclusively on branches and topic, we do not support bookmarks yet. Bookmarks have a long history of being less well integrated with other Mercurial concepts and still have some issues. We believe that branches and topics cover enough use cases to avoid dealing with an extra concept here, especially since it could be a source of technical issues.

Still, we might gradually improve bookmarks support in Heptapod as time passes, depending on what kind of needs people express. The most probable first step would be limited support for bookmarks whilst providing a mirror of an external Git source repository.

New Evolve extension release: version 9.1.0

Pierre-Yves David
2019-07-29

We pushed a new release for the evolve extension: 9.1.0

This extension extends core features around history rewriting and draft changesets sharing.

As usual, the release is [available on pypi](https://pypi.python.org/pypi/hg- evolve/9.1.0) and upgrade is recommended.

This version introduces support for Mercurial 5.1 and comes with a variety of improvements and bug fixes. Check the full changelog below for details. Significant progress toward Python 3 compatibility has been made too, next version might come with experimental Python 3 support.

Thanks to all the people involved:

Evolve: 9.1.0

Bug fixes:

  • pick: no longer forget file in case of conflict (issue6037),
  • pick: properly report and cleanup "unfinished state",
  • prune: don't update working copy parent if pruned revisions are unrelated (issue6137),
  • prune: update to the successor of wdir also with --pair/--biject (issue6142),
  • evolve: properly prune changeset with no change in case of conflict (issue5967),

Improvements:

  • prune: spell --successor flag without any unnecessary shortcuts,

  • evolve: compatibility with Mercurial 5.1,

  • evolve: use the same wording as core in case of unresolved conflict,

  • evolve: minor output message improvements,

  • evolve: improve hg evolve --all behavior when "." is obsolete,

  • touch: detect resulting divergence in more cases (issue6107),

  • touch: now works with merge commit too,

  • rewind: fix behavior with merge commit,

  • fold: allow fold with merge commit,

  • metaedit: now works on merge commit.

Topic 0.16.0

  • topic: fix confusion in branch heads checking logic.

Sharing references between Python and Rust

Raphaël Gomès
2019-07-25

In 2018, the Mercurial project decided to use Rust to improve performance and maintainability of previous high-performance code, you can read more about it in the Oxidation Plan.

While one may argue that Rust took inspiration from Python in some aspects of its semantics, the two languages don't share a lot of similarities at a lower level. Rust strict memory borrowing rules and default immutability don't play very nice with some of Python's features: its dynamic typing, mutability rules, classes, garbage collecting, to name the big ones.

We have faced some interesting challenges when bridging the Python implementation with the new Rust code, and this is one that I have not found any literature about.

> Read more

Mercurial's format source extension version 0.4.0

Pierre-Yves David
2019-07-17

Version 0.4.0 of the formatsource extension for Mercurial just got pushed. The extension deals with codebase formatting and smooths its consequences during merges.

The release is available on pypi and upgrading is recommended.

Version 0.4.0 brings the following changes:

  • Formatting of the help text was improved

  • The format-source command gained an --extra-config-file flag. Use it to record custom config files when running initial formatting.

  • It is now possible to track the tool version number when formatting files. The value will be put to use in later version of the extension to help to react to tool version changes. Tools coming with a default configuration will now track their version.

  • A new format-source.run-mode config option has been added. Set it to yes to forcibly run formatters during any merge involving formatted files. Set it to no to disable any formatting during merges.

  • The format-source command gained a --current flag to run formatter on the working copy files. Each files get formatted according formatter defined in previous hg format-source call.

New Evolve extension release: version 9.0.0

Pierre-Yves David
2019-06-06

We pushed a new release for the evolve extension: 9.0.0

This extension extends core features around history rewriting and draft changesets sharing.

As usual, the release is [available on pypi](https://pypi.python.org/pypi/hg- evolve/9.0.0) and upgrade is recommended.

This version drops support for Mercurial version 4.4 and introduces a significant behavior change.

The hg evolve command now uses the --all and --no-update flag by default. Starting from this version hg evolve will try to stabilize all changesets related to the current working copy parent (eg: your stack if you use topic), but will remain on the current changesets (or its successors if applicable). To perform iterative evolution use the hg next command or the --no-all or --rev flags.

It also comes with a variety of improvements and bug fixes. Check the full changelog below for details. Thanks to all the people involved:

  • Anton Shestakov
  • Faheem Mitha
  • Joerg Sonnenberger
  • Martin von Zweigbergk
  • Matt Harbison
  • Pierre-Yves David
  • Pulkit Goyal
  • Sushil khanchi

Evolve: 9.0.0

Behavior changes

  • evolve: preserve the working directory after resolving instability (BC) (use hg next or hg evolve --update to get the old behavior)

  • evolve: evolve all relevant revisions by default (BC) (use hg next or --no-all to evolve only one)

  • obsdiscovery: drop support for deprecated discovery protocol obshash (Make sure your servers are configured to use the obshashrange one. It is available in evolve 7.2 and above. If you are just migrating now, check the obshashrange documentation

Compatibility

  • evolve: drop compatibility with 4.4
  • evolve: fix compatibility with narrow repositories

Improvements:

  • evolve: use "unstable" instead of "troubled" in some output
  • evolve: run multiple stabilization in the same transaction
  • evolve: improve username merging during content-divergence
  • evolve: reduce the verbosity of content-divergence resolution
  • documentation: various improvements and vocabulary update
  • packaging: fix documentation build step on Debian
  • progress: improved support in various commands
  • help: avoid duplicated entries for some templates

Topic 0.15.0

  • stack: handle hash sizes when --debug flag is provided
  • stack: remove 'topic.' prefix from colors/labels (BC)
  • stack: always provide (full) node hash to non-default --template
  • topic: drop the b# alias. It conflicted with normal hashes.
  • topic: add an experimental.topic.allow-publish option (default: True)

New Evolve extension release: version 8.5.1

Pierre-Yves David
2019-04-23

We pushed a new bugfix release for the evolve extension: 8.5.1

This extension extends core features around history rewriting and draft changesets sharing.

As usual, the release is [available on pypi](https://pypi.python.org/pypi/hg- evolve/8.5.1) and upgrade is recommended.

his version brings a couple of bug fixes and compatibility adjustement.

Talking about compatibility, the next non bugfix version version will drop support for Mercurial 4.4 and probably a couple of others.

Evolve 8.5.1

  • evolve: make sure we use upstream merge code with 5.0,
  • evolve: restore compatibility with 4.4 (This regress the narrow compatibility)
  • evolve: fix progress display with hg <= 4.6

Topic 0.14.1

  • topic: compatibility with mercurial-5.0,
  • topic: improve extensions isolation (issue6121).

Mercurial April 2019 mini-sprint reports

Pierre-Yves David
2019-04-17

From April 4th to April 7th, a group of 12 Mercurial developers and users gathered in Paris for hacking and discussing.

  • Arthur Lutz (Logilab)
  • Boris Feld (Octobus)
  • Denis Laxalde (Logilab)
  • Georges Racinet (Octobus)
  • Joerg Sonnenberger (NetBSD)
  • Manuel Jacob (Pypy)
  • Marcin Kizminski (Rhode-Code)
  • Philippe Pepiot (Logilab)
  • Pierre Verkest (Anybox)
  • Pierre-Yves David (Octobus
  • Raphaël Gomès (Octobus)
  • Simon Sapin (Mozilla)
  • Augie Fackler (Google) also made a 1h video call.

The work and discussion covered various aspects of Mercurial.

Denis improved the user experience around hg commit/revert -i FILES and wrote an amazing code documentation on the "matcher" classes in the Mercurial codebase.

Philippe made some packaging related improvements, clearing up the path to experimental python 3 package and looked into including chg into the official Debian package.

Boris setup multiple alternative builds in Octobus' Jenkins instance. Most notably we now have CI coverage for the hg-git extensions and the main test suite of Mercurial using Pypy.

Manuel Jacob worked with Pierre-Yves on offering an option to access obsolete changesets in hgweb and during pull/clone. The result of this work is currently in review. Manuel also worked on his own on build reproduction and fixes to bugs affecting corner cases around rebase, evolve and topics.

Georges Racinet mostly worked on various aspects of the Heptapod project. He reviewed and integrated various improvements from Thomas Riboulet, worked with Arthur to fix various bugs and gathered additional feedback, supported Pierre who was installing his own heptapod instance and chatted with Marcin, Pierre-Yves (and others) about unifying topic based workflow across platforms.

Raphaël worked on various aspect of the Mercurial oxidation with regard to status, including the matcher classes that Denis has been documenting. He also discussed the interaction of Rust and Python in Mercurial with Simon. Finally he worked on ASV to add support for an environment matrix in build and test phases, which will ease Mercurial benchmarking down the line.

Joerg looked into hg incoming issues with pull-bundle and various hooks needed by the NetBSD project. He also discussed with Pierre-Yves the ability to filter arbitrary revisions on "shares" for servers with, reviewed the "stable-range" feature and discussed its possible application for exchanging arbitrary notes applied to changesets at any point in time (tags, code signing, CI status, etc.).

Marcin updated evolve and topic versions on Rhode-Code and improved topic-based workflow in Rhode-Code. He worked with Marla da Silva (Logilab), Pierre-Yves and Georges to bootstrap the first user-focused Mercurial conference to happen on May 28th in Paris (France).

Pierre-Yves chatted and worked with various people on various topics, obsolescence access, shares filtering, conference, etc. (see above) and also worked on integrating various contributions to the evolve extension as well as fixed a couple of bug. This work resulted in the release of evolve-8.5.0 last week.

Thanks to all who attended and to our 3 hosts, Logilab, Sup'Internet and Mozilla Paris

We are looking forward to our next gathering at the end of May around the Mercurial user conference.

New Evolve extension release: version 8.5.0

Pierre-Yves David
2019-04-12

We pushed a new release for the evolve extension: 8.5.0

This extension extends core features around history rewriting and draft changesets sharing.

As usual, the release is [available on pypi](https://pypi.python.org/pypi/hg- evolve/8.5.0) and upgrade is recommended.

This version brings a variety of improvements and bug fixes. Notably, evolve now support smooth automatic resolution of a wider range of divergence instabilities.

The next evolve version will likely include behavior changes to the hg evolve command. Making --no-update and --all the defaults. For a few version, users can already rely on hg next for day to day incremental evolution.

Check the full changelog below for details. Thanks to all the people involved:

  • Anton Shestakov
  • Joerg Sonnenberger
  • Manuel Jacob
  • Martijn Pieters
  • Martin von Zweigbergk
  • Matt Harbison
  • Pierre-Yves David
  • Sangeet Kumar Mishra
  • Sushil khanchi

Evolve: 8.5.0

Bugfixes

  • evolve: fix an recoverable state (issue6053),
  • evolve: share evolve related cache between shares,
  • evolve: make sure the extensions are only active on repository that enables it (issue6057).
  • evolve: preserve --[no-]update value over --continue,
  • evolve: make sure divergence resolution keep the initial author (issue6113),
  • pick: align working dir branch with the one from the pick result (issue6089),
  • prune: fix error message when pruning public changesets,
  • split: preserve phases (issue6048),
  • touch: fix error message when touching public changesets,

Improvements

  • evolve: improved compatibility with narrow repositories,
  • evolve: improved support for content-divergence with public changesets,
  • pick: add the standard --tool option,
  • uncommit: abort if an explicitly given file cannot be uncommitted.

Topic 0.14.0

  • prune: fix error message when pruning public changesets,
  • split: preserve phases (issue6048),
  • touch: fix error message when touching public changesets.