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
1=== modified file 'svn-hooks/bzr/incremental-bzr-update.sh'
2--- svn-hooks/bzr/incremental-bzr-update.sh 2012-09-24 19:43:39 +0000
3+++ svn-hooks/bzr/incremental-bzr-update.sh 2012-09-25 02:33:22 +0000
4@@ -9,6 +9,7 @@
5
6 TRUNK_FOLDER="trunk/"
7 BRANCHES_FOLDER="branches/"
8+RELEASE_FOLDER="releases/"
9 SVNLOOK_BIN=`which svnlook`
10 BZR_BIN=`which bzr`
11 MKDIR_BIN=`which mkdir`
12@@ -66,6 +67,12 @@
13 then
14 $MKDIR_BIN -p $branches_path
15 fi
16+
17+ release_branches_path=${BZR_MIRROR_ROOT}${BRANCHES_FOLDER}${RELEASE_FOLDER}
18+ if [ ! -d $release_branches_path ]
19+ then
20+ $MKDIR_BIN -p $release_branches_path
21+ fi
22 }
23
24
25@@ -221,10 +228,18 @@
26 if [[ "$path" = ${BRANCHES_FOLDER}* ]]
27 then
28 branch_name=${path##${BRANCHES_FOLDER}}
29- branch_name=${branch_name%%/*}
30+ if [[ "$branch_name" == ${RELEASE_FOLDER}* ]]
31+ then
32+ release_name=${branch_name##${RELEASE_FOLDER}}
33+ release_name=${release_name%%/*}
34+ branch_name=${RELEASE_FOLDER}$branch_name
35+ else
36+ branch_name=${branch_name%%/*}
37+ fi
38
39 # Look for changes to root branches (add/delete).
40- if [[ "$path" =~ ${BRANCHES_FOLDER}[^/]+/$ ]]
41+ if [[ "$path" =~ ${BRANCHES_FOLDER}[^/]+/$
42+ || "$path" =~ ${BRANCHES_FOLDER}${RELEASE_FOLDER}[^/]+/$ ]]
43 then
44 if [[ "$action" = "A" ]]
45 then
46
47=== modified file 'svn-hooks/bzr/monolithic-bzr-update.sh'
48--- svn-hooks/bzr/monolithic-bzr-update.sh 2012-09-24 19:43:39 +0000
49+++ svn-hooks/bzr/monolithic-bzr-update.sh 2012-09-25 02:33:22 +0000
50@@ -12,7 +12,8 @@
51
52 # Update or add remote branches.
53 remote_branches=`svn ls ${REMOTE_BASE_URL}/branches`
54-for remote_branch in $remote_branches
55+remote_release_branches=`svn ls ${REMOTE_BASE_URL}/branches/releases | sed -e 's,^,releases/,'`
56+for remote_branch in $remote_branches $remote_release_branches
57 do
58 # Skip the directory containing release branches - it, itself, is not a branch.
59 if [ $remote_branch == "releases" ]; then
60@@ -32,8 +33,13 @@
61
62 # Delete local branches that are no longer used on the server.
63 local_branches=`ls -1`
64-for local_branch in $local_branches
65+local_release_branches=`ls -1 releases | sed -e 's,^,releases/,'`
66+for local_branch in $local_branches $local_release_branches
67 do
68+ # Skip the directory containing release branches - it, itself, is not a branch.
69+ if [ $local_branch == "releases" ]; then
70+ continue
71+ fi
72 if [[ $remote_branches == *$local_branch* ]]; then
73 echo '* Branch exists' `pwd`/$local_branch
74 else

Subscribers

People subscribed via source and target branches

to all changes: