Titelbild

Archive for November, 2008

Shelve it, baby

#07 [from::the office]; the workspace or empty

As a some people seem to miss a shelve / unshelve feature in Mercurial, we now have a self-grown solution that works a lot like the hgshelve extension. It does the following:

  • Check if we have not already shelved something for this project. If the shelf is not empty, we notify the user and abort.
  • Determine which project files are in one of the states modified, added, removed or deleted. If the repository root is hierarchically above the project level, only the files within the current project are considered.
  • Export a diff for all of these files to the file <project-name>-patchfile.patch that resides in the folder .hg/mercurialeclipse-shelve-backup. This patch file contains the diffs for all modified files in the project.
  • Determine the changeset at which the current working directory is via hg id.
  • Update to that changeset with hg update -C -r <changeset>.
  • Refresh the resources whose diff was exported.

For Unshelving these changes we do the following:

  • Check if there are files in our backup directory that contain shelved changes. Notify user and abort if no changes are shelved.
  • Import changes via hg import <patchfile>.
  • Empty shelve by deleting the patch file.
  • Refresh the project directory for updating files and decorations within Eclipse.

The mandatory screenshot:

The shelve functionality in MercurialEclipse

The current implementation is not compatible with the hg shelve extension, but this extension a) currently does not work and b) is only using interactive mode.

Kommentare

New wizards for importing / exporting patches

Steeven Lee contributed some nice wizards to MercurialEclipse. They facilitate importing and exporting of patches. See screenshots below:

Import:

Import wizard

Export:

Export wizard

Kommentare

Grandioses Turandot in der Staatsoper

Semperoper
Creative Commons License photo credit: hannesseibt

Soeben bin ich aus der Hamburgischen Staatsoper zurückgekehrt, wo Giacomo Puccinis Turandot aufgeführt wurde. Es war grandios: Der ganze Saal war restlos begeistert, die Vorstellung ausverkauft. Abgesehen von der für meinen Geschmack nicht so schönen Stimme der Prinzessin Turandot war das ganze ein echtes Gänsehaut-Erlebnis. Deswegen: Karten sichern und sofort hingehen!

Hier ein paar Appetithappen:

Aus der Arena di Verona (okay, kein fairer Vergleich…)

Kommentare

Unvermutete Wikipedia Artikel

Für die Familie vielleicht interessant: Großonkel Karl hat, was mich doch ein wenig überrascht, einen Wikipedia Eintrag.

Kommentare

Bookmarks, a.k.a. local branches in MercurialEclipse

Had I known yesterday that I would have another feature to blog about, I’d have skipped the previous post and put it all together in this…

Screenshot of Bookmark dialog, create tab

Anyway, a new feature is now available in the current development version of MercurialEclipse, the Mercurial team plug-in for Eclipse: So called bookmarks.

The functionality is provided by the bookmarks extension, distributed together with Mercurial versions that are newer than 24.10.2008. So what are bookmarks? Have you heard of the complaint that Mercurial can’t do deleteable named branches within one clone? Don’t you want to clone to create a branch? Then the bookmark extension could be the solution for you. But keep in mind that bookmarks do not propagate to remote repositories. They are only available on your machine.

Bookmarks are pointers to specific heads. As with git local branches, they move with each commit and always point at the head. Update: There’s a nice introduction available at the blog of the extension’s author if you want to read more about the extension.

The dialog tab in the screenshot above allows you to create such bookmarks. If nothing is selected, it just sets the new bookmark to the tip revision. If you select a revision - I trust, you get it…

Contrary to named branches, bookmarks are local only and therefore aren’t under source control. This means, you can modify them as much as you like. Below you see our interface for renaming or deleting bookmarks.

Screenshot of Bookmark dialog, modify tab

Working with bookmarks is like using branches. On the command line you can use it wherever a revision needs to be specified. So we’ve extended our “Update to different changeset dialog…” to include bookmarks. The new tab looks like this:

Screenshot of UpdateToChangeset dialog, bookmark tab

Okay, that’s it for now. The next post about this follows when new features are available.

Kommentare (2)

Rebase and subversion support in MercurialEclipse

Screenshot of Rebase wizard

As MercurialEclipse is steadily evolving, the development version has got a few new features:

  • Rebase support has landed, but is of course only usable with current Mercurial crew as there hasn’t been a stable Mercurial release that supports rebase. Our new wizard supports all rebase options, including aborting and continuing previously started rebases.
  • The hgsubversion extension is now supported when pulling, pushing and cloning. This means, it is now possible to read from and write to subversion repositories while still using MercurialEclipse. Therefore you won’t have to interrupt your normal workflow, you can just work as with a normal Mercurial repository. Unfortunately, you need a rather new Mercurial installation for this as well. Other dependencies can be found at our project page.
  • Finally, we’ve been able to integrate the official Mercurial logo as Matt Mackall has granted usage of the official icons, even though the plug-in is not GPL, but EPL licensed.
  • Some internationalization fixes (UTF-8) have landed.

So feel free to grab a copy at http://hg.assembla.com/mercurialeclipse and enjoy the new stuff :-).

Bastian

Kommentare

McCain und Palin nach der Wahlnacht

The morning after

Diese schöne Karikatur von Zina Zaunders ist auf dessen Internetseite anzutreffen.

Gefunden via BoingBoing

Kommentare