# HG changeset patch # User Tero Marttila # Date 1252792169 -10800 # Node ID 7dbe0ee1a27bb0de08d2d8159d0fe11bc93320fd # Parent a25d1bf758e62ea234750c3fef798c324268833a fix use of mercurial API to be compatible with 1.3.1 - this breaks backwards-compability, though... diff -r a25d1bf758e6 -r 7dbe0ee1a27b version.py --- a/version.py Mon Feb 16 03:25:00 2009 +0200 +++ b/version.py Sun Sep 13 00:49:29 2009 +0300 @@ -19,17 +19,17 @@ return _VERSION # code adapted from mercurial.commands.identify - from mercurial import ui, hg, util + from mercurial import ui, hg, encoding from mercurial.node import short # open the repo repo = hg.repository(ui.ui(), path) # the working copy change context - ctx = repo.workingctx() + ctx = repo[None] # branch - branch = util.tolocal(ctx.branch()) + branch = encoding.tolocal(ctx.branch()) # map default -> None if branch == 'default' : @@ -55,8 +55,13 @@ Currently, this assumes that the given path points to a local Mercurial repo. """ - # get info - branch, tags, parents, modified = version_mercurial(path) + try : + # get info + branch, tags, parents, modified = version_mercurial(path) + + except : + # XXX: ignore + raise # tags: [ "-" [ ... ]] if tags :