Frage

Coming originally from SVN, I am still new to Mercurial.

I am interested in creating an experimental workflow to see if I can rewrite a troubled feature from scratch. If my attempt fails though, I wish to delete the experimental workflow - abandoning the work — with nobody else ever seeing it.

The problem is though I still need to push changes of this experimental workflow across laptops and PCs and keep working for a couple of weeks. But still keep the option open to delete that branch and fall back to the main branch, without having any trace of the experimental branch.

Is something like this possible in Mercurial and how could I achieve this?

FYI, I am using mercurialeclipse plugin on Aptana Studio 3.0. (so I use a UI but commands should be fine too)

War es hilfreich?

Lösung

After changeset is pushed to the central server (assuming you have one) - there is no way to remove it from there.

So the possible (but terribly inconvenient) solution for you now could be to create a personal separated repository and synchronize your devices using it. And if you like the result - you push to the shared central repo then. Otherwise you just delete the temporary repository.

Andere Tipps

With a Distributed Version Control System like Mercurial you can sync between any clone of a repository, not just a "central" one that all users have agreed to use.

Therefore, you can:

  1. Clone the repository to private a share that the systems "experimenting" can access.

  2. Clone to a USB key and move that between systems.

  3. Use hg serve to start a web server for a local repository on a system and clone and pull that history to other systems.

  4. Use hg bundle/unbundle to package up new history and email it to another system.

To abandon work, just delete all these extra clones and clone from the common "central" repository again.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top