mirror of
https://github.com/chocolate-doom/agito-config.git
synced 2024-11-10 07:11:55 +00:00
Update Agito configuration to deal with new branch URLs.
Subversion-branch: /git Subversion-revision: 2624
This commit is contained in:
parent
abcd43a3e0
commit
51a15de176
1 changed files with 16 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
import re
|
||||
|
||||
SVN_REPO_URL_RE = re.compile('http.*/svnroot/chocolate-doom(.*)')
|
||||
SVN_REPO_URL2_RE = re.compile('svn.*/p/chocolate-doom/code(.*)')
|
||||
|
||||
# URL of the Subversion repository.
|
||||
|
||||
|
@ -35,7 +36,7 @@ AUTHORS = {
|
|||
|
||||
DEFAULT_AUTHOR = ("%", "%@users.sourceforge.net")
|
||||
|
||||
FILTER_REVISIONS = [ 5, 391, 392, 1027, 2528 ]
|
||||
FILTER_REVISIONS = [ 5, 391, 392, 1027, 2528, 2622 ]
|
||||
|
||||
# Callback function to invoke before creating each commit. This is similar
|
||||
# to git's 'filter-branch' command. Invoked with the branch path, log entry
|
||||
|
@ -150,9 +151,21 @@ def branch_helper_callback(path, entry, changed):
|
|||
parent_url = agito.propget(path, entry.revision.number - 1,
|
||||
'branch_helper:parent_url')
|
||||
|
||||
# Try both URL patterns.
|
||||
match = SVN_REPO_URL_RE.match(parent_url)
|
||||
assert match
|
||||
return (match.group(1), after)
|
||||
if not match:
|
||||
match = SVN_REPO_URL2_RE.match(parent_url)
|
||||
|
||||
if match:
|
||||
parent_path = match.group(1)
|
||||
else:
|
||||
# If neither patteerns match, it may be a "modern"
|
||||
# repository-relative path, but it must begin with /
|
||||
|
||||
assert parent_url.startswith('/')
|
||||
parent_path = parent_url.strip()
|
||||
|
||||
return (parent_path, after)
|
||||
|
||||
MERGE_CALLBACKS = {
|
||||
"branch_helper:last_merged": branch_helper_callback
|
||||
|
|
Loading…
Reference in a new issue