##// END OF EJS Templates
svn: expose txn_id in pre-commit hooks so we can analyze it in pre transaction hooks.
marcink -
r670:af889011 default
parent child Browse files
Show More
@@ -623,7 +623,7 b' def git_post_receive(unused_repo_path, r'
623 def _get_extras_from_txn_id(path, txn_id):
623 def _get_extras_from_txn_id(path, txn_id):
624 extras = {}
624 extras = {}
625 try:
625 try:
626 cmd = ['svnlook', 'pget',
626 cmd = [settings.SVNLOOK_EXECUTABLE, 'pget',
627 '-t', txn_id,
627 '-t', txn_id,
628 '--revprop', path, 'rc-scm-extras']
628 '--revprop', path, 'rc-scm-extras']
629 stdout, stderr = subprocessio.run_command(
629 stdout, stderr = subprocessio.run_command(
@@ -638,7 +638,7 b' def _get_extras_from_txn_id(path, txn_id'
638 def _get_extras_from_commit_id(commit_id, path):
638 def _get_extras_from_commit_id(commit_id, path):
639 extras = {}
639 extras = {}
640 try:
640 try:
641 cmd = ['svnlook', 'pget',
641 cmd = [settings.SVNLOOK_EXECUTABLE, 'pget',
642 '-r', commit_id,
642 '-r', commit_id,
643 '--revprop', path, 'rc-scm-extras']
643 '--revprop', path, 'rc-scm-extras']
644 stdout, stderr = subprocessio.run_command(
644 stdout, stderr = subprocessio.run_command(
@@ -664,7 +664,7 b' def svn_pre_commit(repo_path, commit_dat'
664 return 0
664 return 0
665
665
666 extras['hook_type'] = 'pre_commit'
666 extras['hook_type'] = 'pre_commit'
667 extras['commit_ids'] = []
667 extras['commit_ids'] = [txn_id]
668 extras['txn_id'] = txn_id
668 extras['txn_id'] = txn_id
669 extras['new_refs'] = {
669 extras['new_refs'] = {
670 'total_commits': 1,
670 'total_commits': 1,
@@ -17,4 +17,6 b''
17
17
18 WIRE_ENCODING = 'UTF-8'
18 WIRE_ENCODING = 'UTF-8'
19 GIT_EXECUTABLE = 'git'
19 GIT_EXECUTABLE = 'git'
20 SVN_EXECUTABLE = 'svn'
21 SVNLOOK_EXECUTABLE = 'svnlook'
20 BINARY_DIR = ''
22 BINARY_DIR = ''
General Comments 0
You need to be logged in to leave comments. Login now