# HG changeset patch # User Augie Fackler # Date 1230653536 21600 # Node ID 7a5a0b5c8e348f0aa165978fe88f77eeac0c16e7 # Parent 463998d266e3ba1bf33e298a1c520563993cece2 info: Actually determine and show the repo root. diff --git a/tests/test_utility_commands.py b/tests/test_utility_commands.py --- a/tests/test_utility_commands.py +++ b/tests/test_utility_commands.py @@ -13,7 +13,7 @@ import fetch_command import test_util expected_info_output = '''URL: file://%(repo)s/%(branch)s -Repository Root: None +Repository Root: file://%(repo)s Repository UUID: df2126f7-00ab-4d49-b42c-7e981dde0bcf Revision: %(rev)s Node Kind: directory diff --git a/utility_commands.py b/utility_commands.py --- a/utility_commands.py +++ b/utility_commands.py @@ -37,6 +37,9 @@ def run_svn_info(ui, repo, hg_repo_path, url = url[:-1] url = '%s%s' % (url, branchpath) author = '@'.join(workingctx.user().split('@')[:-1]) + # cleverly figure out repo root w/o actually contacting the server + subdir = workingctx.extra()['convert_revision'][40:].split('@')[0] + reporoot = url[:len(url)-len(subdir)] ui.status('''URL: %(url)s Repository Root: %(reporoot)s Repository UUID: %(uuid)s @@ -45,7 +48,7 @@ Node Kind: directory Last Changed Author: %(author)s Last Changed Rev: %(revision)s Last Changed Date: %(date)s\n''' % - {'reporoot': None, + {'reporoot': reporoot, 'uuid': open(hge.uuid_file).read(), 'url': url, 'author': author,