changeset 385:60b84e2d3336

version: fix version calculation for new repo layout.
author Augie Fackler <durin42@gmail.com>
date Sat, 30 May 2009 15:34:51 -0500
parents 26337d097e18
children cdb066f41e31
files hgsubversion/util.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/util.py
+++ b/hgsubversion/util.py
@@ -18,7 +18,8 @@ def version(ui):
     """Guess the version of hgsubversion.
     """
     # TODO make this say something other than "unknown" for installed hgsubversion
-    repo = hg.repository(ui, os.path.dirname(__file__))
+    dn = os.path.dirname
+    repo = hg.repository(ui, dn(dn(__file__)))
     ver = repo.dirstate.parents()[0]
     return node.hex(ver)[:12]