comparison push_cmd.py @ 181:e37f9d3fd5e7

remove decorators (compat with python2.3)
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Tue, 13 Jan 2009 13:59:50 +0100
parents 2412800b1258
children 57355b0e7bd1
comparison
equal deleted inserted replaced
180:3f1e8a5ec9dd 181:e37f9d3fd5e7
9 import svnwrap 9 import svnwrap
10 import fetch_command 10 import fetch_command
11 import utility_commands 11 import utility_commands
12 12
13 13
14 @util.register_subcommand('push')
15 @util.register_subcommand('dcommit') # for git expats
16 def push_revisions_to_subversion(ui, repo, hg_repo_path, svn_url, 14 def push_revisions_to_subversion(ui, repo, hg_repo_path, svn_url,
17 stupid=False, **opts): 15 stupid=False, **opts):
18 """Push revisions starting at a specified head back to Subversion. 16 """Push revisions starting at a specified head back to Subversion.
19 """ 17 """
20 oldencoding = merc_util._encoding 18 oldencoding = merc_util._encoding
89 rebasesrc = node.bin(child.extra().get('rebase_source', node.hex(node.nullid))) 87 rebasesrc = node.bin(child.extra().get('rebase_source', node.hex(node.nullid)))
90 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path, ui_=ui) 88 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path, ui_=ui)
91 svn_commit_hashes = dict(zip(hge.revmap.itervalues(), hge.revmap.iterkeys())) 89 svn_commit_hashes = dict(zip(hge.revmap.itervalues(), hge.revmap.iterkeys()))
92 merc_util._encoding = oldencoding 90 merc_util._encoding = oldencoding
93 return 0 91 return 0
92 push_revisions_to_subversion = util.register_subcommand('push')(push_revisions_to_subversion)
93 # for git expats
94 push_revisions_to_subversion = util.register_subcommand('dcommit')(push_revisions_to_subversion)
94 95
95 def _isdir(svn, branchpath, svndir): 96 def _isdir(svn, branchpath, svndir):
96 try: 97 try:
97 svn.list_dir('%s/%s' % (branchpath, svndir)) 98 svn.list_dir('%s/%s' % (branchpath, svndir))
98 return True 99 return True