Mercurial > hgsubversion
comparison hgsubversion/utility_commands.py @ 503:00ecb2bc005c
Add a -r option to hg svn. Use with hg svn info to change the mercurial rev.
author | Jason Ostrander <jason@sentilla.com> |
---|---|
date | Thu, 10 Dec 2009 13:04:57 -0800 |
parents | 0f7095f53ca3 |
children | e5dedda7bee0 |
comparison
equal
deleted
inserted
replaced
502:89eda60c90b3 | 503:00ecb2bc005c |
---|---|
34 def info(ui, repo, hg_repo_path, **opts): | 34 def info(ui, repo, hg_repo_path, **opts): |
35 """show Subversion details similar to `svn info' | 35 """show Subversion details similar to `svn info' |
36 """ | 36 """ |
37 meta = repo.svnmeta() | 37 meta = repo.svnmeta() |
38 hashes = meta.revmap.hashes() | 38 hashes = meta.revmap.hashes() |
39 parent = util.parentrev(ui, repo, meta, hashes) | 39 |
40 if opts.get('rev'): | |
41 parent = repo[opts['rev']] | |
42 else: | |
43 parent = util.parentrev(ui, repo, meta, hashes) | |
44 | |
40 pn = parent.node() | 45 pn = parent.node() |
41 if pn not in hashes: | 46 if pn not in hashes: |
42 ui.status('Not a child of an svn revision.\n') | 47 ui.status('Not a child of an svn revision.\n') |
43 return 0 | 48 return 0 |
44 r, br = hashes[pn] | 49 r, br = hashes[pn] |