comparison utility_commands.py @ 185:57355b0e7bd1

Creating patch for documention messages.
author Dan Villiom Podlaski Christiansen <danchr@cs.au.dk>
date Sat, 17 Jan 2009 15:30:37 -0600
parents e37f9d3fd5e7
children 77812f98e250
comparison
equal deleted inserted replaced
184:d3ea6c98a086 185:57355b0e7bd1
5 5
6 import util 6 import util
7 import hg_delta_editor 7 import hg_delta_editor
8 8
9 def print_wc_url(ui, repo, hg_repo_path, **opts): 9 def print_wc_url(ui, repo, hg_repo_path, **opts):
10 """Url of Subversion repository. 10 """show the location (URL) of the Subversion repository
11 """ 11 """
12 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path, 12 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path,
13 ui_=ui) 13 ui_=ui)
14 ui.status(hge.url, '\n') 14 ui.status(hge.url, '\n')
15 print_wc_url = util.register_subcommand('url')(print_wc_url) 15 print_wc_url = util.register_subcommand('url')(print_wc_url)
16 16
17 17
18 def run_svn_info(ui, repo, hg_repo_path, **opts): 18 def run_svn_info(ui, repo, hg_repo_path, **opts):
19 """Like svn info details. 19 """show Subversion details similar to `svn info'
20 """ 20 """
21 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path, 21 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path,
22 ui_=ui) 22 ui_=ui)
23 svn_commit_hashes = dict(zip(hge.revmap.itervalues(), 23 svn_commit_hashes = dict(zip(hge.revmap.itervalues(),
24 hge.revmap.iterkeys())) 24 hge.revmap.iterkeys()))
58 }) 58 })
59 run_svn_info = util.register_subcommand('info')(run_svn_info) 59 run_svn_info = util.register_subcommand('info')(run_svn_info)
60 60
61 61
62 def print_parent_revision(ui, repo, hg_repo_path, **opts): 62 def print_parent_revision(ui, repo, hg_repo_path, **opts):
63 """Display hg hash and svn revision of nearest svn parent. 63 """show Mercurial & Subversion parents of the working dir or revision
64 """ 64 """
65 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path, 65 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path,
66 ui_=ui) 66 ui_=ui)
67 svn_commit_hashes = dict(zip(hge.revmap.itervalues(), 67 svn_commit_hashes = dict(zip(hge.revmap.itervalues(),
68 hge.revmap.iterkeys())) 68 hge.revmap.iterkeys()))
79 return 0 79 return 0
80 print_parent_revision = util.register_subcommand('parent')(print_parent_revision) 80 print_parent_revision = util.register_subcommand('parent')(print_parent_revision)
81 81
82 82
83 def rebase_commits(ui, repo, hg_repo_path, extrafn=None, sourcerev=None, **opts): 83 def rebase_commits(ui, repo, hg_repo_path, extrafn=None, sourcerev=None, **opts):
84 """Rebases current unpushed revisions onto Subversion head. 84 """rebase current unpushed revisions onto the Subversion head
85 85
86 This moves a line of development from making its own head to the top of 86 This moves a line of development from making its own head to the top of
87 Subversion development, linearizing the changes. In order to make sure you 87 Subversion development, linearizing the changes. In order to make sure you
88 rebase on top of the current top of Subversion work, you should probably run 88 rebase on top of the current top of Subversion work, you should probably run
89 'hg svn pull' before running this. 89 'hg svn pull' before running this.
129 extrafn=extrafn) 129 extrafn=extrafn)
130 rebase_commits = util.register_subcommand('rebase')(rebase_commits) 130 rebase_commits = util.register_subcommand('rebase')(rebase_commits)
131 131
132 132
133 def show_outgoing_to_svn(ui, repo, hg_repo_path, **opts): 133 def show_outgoing_to_svn(ui, repo, hg_repo_path, **opts):
134 """Show changesets not yet pushed to SVN. 134 """show changesets not found in the Subversion repository
135 """ 135 """
136 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path, 136 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path,
137 ui_=ui) 137 ui_=ui)
138 svn_commit_hashes = dict(zip(hge.revmap.itervalues(), 138 svn_commit_hashes = dict(zip(hge.revmap.itervalues(),
139 hge.revmap.iterkeys())) 139 hge.revmap.iterkeys()))