Merge lp:~tom.prince/twisted-trac-integration/bzr-release-branches into lp:twisted-trac-integration

Proposed by Tom Prince
Status: Merged
Approved by: Thomas Herve
Approved revision: no longer in the source branch.
Merged at revision: 81
Proposed branch: lp:~tom.prince/twisted-trac-integration/bzr-release-branches
Merge into: lp:twisted-trac-integration
Diff against target: 74 lines (+25/-4)
2 files modified
svn-hooks/bzr/incremental-bzr-update.sh (+17/-2)
svn-hooks/bzr/monolithic-bzr-update.sh (+8/-2)
To merge this branch: bzr merge lp:~tom.prince/twisted-trac-integration/bzr-release-branches
Reviewer Review Type Date Requested Status
Thomas Herve Approve
Review via email: mp+126139@code.launchpad.net

Description of the change

I think this will properly mirror the release branches as well.

I'll see about doing some tests locally later.

To post a comment you must log in.
71. By Tom Prince

Merge trunk.

72. By Tom Prince

Fix bug 1087580: Don't crash if a test case isn't provided.

73. By Tom Prince

force-builds: Remove unused constant.

74. By Tom Prince

Add initial git-mirroring setup.

75. By Tom Prince

Add reamde, and options.

76. By Tom Prince

Fixes.

- python 2.6 support
- typo
- ~ idempotency wrt refs/svn/releases

77. By Tom Prince

typo

Revision history for this message
Thomas Herve (therve) wrote :

Looks good! I think you introduced some tabs which would be good to remove. +1.

review: Approve
78. By Jean-Paul Calderone

Add the currently deployed Twisted svn post-commit hook

79. By Jean-Paul Calderone

Add the currently deployed Twisted svn pre-commit hook

80. By Tom Prince

Add disown-tickets.py to repo.

81. By Jean-Paul Calderone <exarkun@top>

Support release branches in the bzr mirroring code

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'svn-hooks/bzr/incremental-bzr-update.sh'
--- svn-hooks/bzr/incremental-bzr-update.sh 2012-09-24 19:43:39 +0000
+++ svn-hooks/bzr/incremental-bzr-update.sh 2012-09-25 02:33:22 +0000
@@ -9,6 +9,7 @@
99
10TRUNK_FOLDER="trunk/"10TRUNK_FOLDER="trunk/"
11BRANCHES_FOLDER="branches/"11BRANCHES_FOLDER="branches/"
12RELEASE_FOLDER="releases/"
12SVNLOOK_BIN=`which svnlook`13SVNLOOK_BIN=`which svnlook`
13BZR_BIN=`which bzr`14BZR_BIN=`which bzr`
14MKDIR_BIN=`which mkdir`15MKDIR_BIN=`which mkdir`
@@ -66,6 +67,12 @@
66 then67 then
67 $MKDIR_BIN -p $branches_path68 $MKDIR_BIN -p $branches_path
68 fi69 fi
70
71 release_branches_path=${BZR_MIRROR_ROOT}${BRANCHES_FOLDER}${RELEASE_FOLDER}
72 if [ ! -d $release_branches_path ]
73 then
74 $MKDIR_BIN -p $release_branches_path
75 fi
69}76}
7077
7178
@@ -221,10 +228,18 @@
221 if [[ "$path" = ${BRANCHES_FOLDER}* ]]228 if [[ "$path" = ${BRANCHES_FOLDER}* ]]
222 then229 then
223 branch_name=${path##${BRANCHES_FOLDER}}230 branch_name=${path##${BRANCHES_FOLDER}}
224 branch_name=${branch_name%%/*}231 if [[ "$branch_name" == ${RELEASE_FOLDER}* ]]
232 then
233 release_name=${branch_name##${RELEASE_FOLDER}}
234 release_name=${release_name%%/*}
235 branch_name=${RELEASE_FOLDER}$branch_name
236 else
237 branch_name=${branch_name%%/*}
238 fi
225239
226 # Look for changes to root branches (add/delete).240 # Look for changes to root branches (add/delete).
227 if [[ "$path" =~ ${BRANCHES_FOLDER}[^/]+/$ ]]241 if [[ "$path" =~ ${BRANCHES_FOLDER}[^/]+/$
242 || "$path" =~ ${BRANCHES_FOLDER}${RELEASE_FOLDER}[^/]+/$ ]]
228 then243 then
229 if [[ "$action" = "A" ]]244 if [[ "$action" = "A" ]]
230 then245 then
231246
=== modified file 'svn-hooks/bzr/monolithic-bzr-update.sh'
--- svn-hooks/bzr/monolithic-bzr-update.sh 2012-09-24 19:43:39 +0000
+++ svn-hooks/bzr/monolithic-bzr-update.sh 2012-09-25 02:33:22 +0000
@@ -12,7 +12,8 @@
1212
13# Update or add remote branches.13# Update or add remote branches.
14remote_branches=`svn ls ${REMOTE_BASE_URL}/branches`14remote_branches=`svn ls ${REMOTE_BASE_URL}/branches`
15for remote_branch in $remote_branches15remote_release_branches=`svn ls ${REMOTE_BASE_URL}/branches/releases | sed -e 's,^,releases/,'`
16for remote_branch in $remote_branches $remote_release_branches
16do17do
17 # Skip the directory containing release branches - it, itself, is not a branch.18 # Skip the directory containing release branches - it, itself, is not a branch.
18 if [ $remote_branch == "releases" ]; then19 if [ $remote_branch == "releases" ]; then
@@ -32,8 +33,13 @@
3233
33# Delete local branches that are no longer used on the server.34# Delete local branches that are no longer used on the server.
34local_branches=`ls -1`35local_branches=`ls -1`
35for local_branch in $local_branches36local_release_branches=`ls -1 releases | sed -e 's,^,releases/,'`
37for local_branch in $local_branches $local_release_branches
36do38do
39 # Skip the directory containing release branches - it, itself, is not a branch.
40 if [ $local_branch == "releases" ]; then
41 continue
42 fi
37 if [[ $remote_branches == *$local_branch* ]]; then43 if [[ $remote_branches == *$local_branch* ]]; then
38 echo '* Branch exists' `pwd`/$local_branch44 echo '* Branch exists' `pwd`/$local_branch
39 else45 else

Subscribers

People subscribed via source and target branches

to all changes: