comparison utility_commands.py @ 160:7a5a0b5c8e34

info: Actually determine and show the repo root.
author Augie Fackler <durin42@gmail.com>
date Tue, 30 Dec 2008 10:12:16 -0600
parents 91541523ea5c
children 7a58ff3502b7
comparison
equal deleted inserted replaced
159:463998d266e3 160:7a5a0b5c8e34
35 url = hge.url 35 url = hge.url
36 if url[-1] == '/': 36 if url[-1] == '/':
37 url = url[:-1] 37 url = url[:-1]
38 url = '%s%s' % (url, branchpath) 38 url = '%s%s' % (url, branchpath)
39 author = '@'.join(workingctx.user().split('@')[:-1]) 39 author = '@'.join(workingctx.user().split('@')[:-1])
40 # cleverly figure out repo root w/o actually contacting the server
41 subdir = workingctx.extra()['convert_revision'][40:].split('@')[0]
42 reporoot = url[:len(url)-len(subdir)]
40 ui.status('''URL: %(url)s 43 ui.status('''URL: %(url)s
41 Repository Root: %(reporoot)s 44 Repository Root: %(reporoot)s
42 Repository UUID: %(uuid)s 45 Repository UUID: %(uuid)s
43 Revision: %(revision)s 46 Revision: %(revision)s
44 Node Kind: directory 47 Node Kind: directory
45 Last Changed Author: %(author)s 48 Last Changed Author: %(author)s
46 Last Changed Rev: %(revision)s 49 Last Changed Rev: %(revision)s
47 Last Changed Date: %(date)s\n''' % 50 Last Changed Date: %(date)s\n''' %
48 {'reporoot': None, 51 {'reporoot': reporoot,
49 'uuid': open(hge.uuid_file).read(), 52 'uuid': open(hge.uuid_file).read(),
50 'url': url, 53 'url': url,
51 'author': author, 54 'author': author,
52 'revision': r, 55 'revision': r,
53 # TODO I'd like to format this to the user's local TZ if possible 56 # TODO I'd like to format this to the user's local TZ if possible