comparison utility_commands.py @ 162:7a58ff3502b7

Punctuation.
author Martin Geisler <mg@daimi.au.dk>
date Tue, 30 Dec 2008 19:24:16 -0600
parents 7a5a0b5c8e34
children a05250261102
comparison
equal deleted inserted replaced
161:47127255145c 162:7a58ff3502b7
6 import util 6 import util
7 import hg_delta_editor 7 import hg_delta_editor
8 8
9 @util.register_subcommand('url') 9 @util.register_subcommand('url')
10 def print_wc_url(ui, repo, hg_repo_path, **opts): 10 def print_wc_url(ui, repo, hg_repo_path, **opts):
11 """Url of Subversion repository 11 """Url of Subversion repository.
12 """ 12 """
13 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path, 13 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path,
14 ui_=ui) 14 ui_=ui)
15 ui.status(hge.url, '\n') 15 ui.status(hge.url, '\n')
16 16
17 17
18 @util.register_subcommand('info') 18 @util.register_subcommand('info')
19 def run_svn_info(ui, repo, hg_repo_path, **opts): 19 def run_svn_info(ui, repo, hg_repo_path, **opts):
20 """Like svn info details 20 """Like svn info details.
21 """ 21 """
22 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path, 22 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path,
23 ui_=ui) 23 ui_=ui)
24 svn_commit_hashes = dict(zip(hge.revmap.itervalues(), 24 svn_commit_hashes = dict(zip(hge.revmap.itervalues(),
25 hge.revmap.iterkeys())) 25 hge.revmap.iterkeys()))
59 }) 59 })
60 60
61 61
62 @util.register_subcommand('parent') 62 @util.register_subcommand('parent')
63 def print_parent_revision(ui, repo, hg_repo_path, **opts): 63 def print_parent_revision(ui, repo, hg_repo_path, **opts):
64 """Display hg hash and svn revision of nearest svn parent 64 """Display hg hash and svn revision of nearest svn parent.
65 """ 65 """
66 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path, 66 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path,
67 ui_=ui) 67 ui_=ui)
68 svn_commit_hashes = dict(zip(hge.revmap.itervalues(), 68 svn_commit_hashes = dict(zip(hge.revmap.itervalues(),
69 hge.revmap.iterkeys())) 69 hge.revmap.iterkeys()))
80 return 0 80 return 0
81 81
82 82
83 @util.register_subcommand('rebase') 83 @util.register_subcommand('rebase')
84 def rebase_commits(ui, repo, hg_repo_path, extrafn=None, sourcerev=None, **opts): 84 def rebase_commits(ui, repo, hg_repo_path, extrafn=None, sourcerev=None, **opts):
85 """Rebases current unpushed revisions onto Subversion head 85 """Rebases current unpushed revisions onto Subversion head.
86 86
87 This moves a line of development from making its own head to the top of 87 This moves a line of development from making its own head to the top of
88 Subversion development, linearizing the changes. In order to make sure you 88 Subversion development, linearizing the changes. In order to make sure you
89 rebase on top of the current top of Subversion work, you should probably run 89 rebase on top of the current top of Subversion work, you should probably run
90 'hg svn pull' before running this. 90 'hg svn pull' before running this.