/[pcsx2_0.9.7]/auto_branch_latest_upstream.sh
ViewVC logotype

Contents of /auto_branch_latest_upstream.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 105 - (show annotations) (download) (as text)
Thu Sep 9 20:10:48 2010 UTC (10 years, 1 month ago) by william
File MIME type: application/x-sh
File size: 3334 byte(s)
Call auto_tag from auto_branch_latest_upstream.sh, and only do it if branching was successful
1 #!/bin/bash
2 . ./auto_defs.sh
3
4 export BRANCH_CREATE_SUCCESS="0"
5
6 export OVERRIDE_UPDATE_NEEDED_CHECK="0"
7 if [ "$1" == "--force-update" ] ; then
8 OVERRIDE_UPDATE_NEEDED_CHECK="1"
9 fi
10
11 export current_downstream_revision=`cat "$BRANCH_LOCATION/$BRANCH_NAME/upstream_repository_revision.txt"`
12
13 if [ "$OVERRIDE_UPDATE_NEEDED_CHECK" != "1" ] ; then
14 if [ "$current_downstream_revision" == "$upstream_revision" ] ; then
15 echo "UPSTREAM REVISION: $upstream_revision"
16 echo "DOWNSTREAM REVISION: $current_downstream_revision"
17 echo
18 echo -e "\\tThere is no need to update the local repository. reason: upstream repository has not been updated."
19 echo
20 echo -e "\\tAborting update of $BRANCH_LOCATION/$BRANCH_NAME"
21 echo
22 exit 0
23 fi
24 else
25 if [ "$current_downstream_revision" == "$upstream_revision" ] ; then
26 echo "UPSTREAM REVISION: $upstream_revision"
27 echo "DOWNSTREAM REVISION: $current_downstream_revision"
28 echo
29 echo -e "\\tThere is no need to update the local repository. reason: upstream repository has not been updated."
30 echo
31 echo -e "\\tDetected the use of: --force-update ... forcing update ..."
32 fi
33
34 fi
35
36 echo $BRANCH_COMMIT_MESSAGE
37
38 rm -Rf "$BRANCH_LOCATION/$BRANCH_NAME"
39 #remove the latest branch from the base repository
40 #svn delete "$BRANCH_LOCATION/$BRANCH_NAME" --non-interactive --trust-server-cert
41 svn delete "$BRANCH_LOCATION/$BRANCH_NAME" --non-interactive --trust-server-cert >/dev/null 2>/dev/null && BRANCH_CREATE_SUCCESS="0" || BRANCH_CREATE_SUCCESS="1"
42
43 #update the working copy
44 #svn commit "$BRANCH_LOCATION" --non-interactive --trust-server-cert --depth immediates -m "remove latest branch for re-branching"
45 svn commit "$BRANCH_LOCATION" --non-interactive --trust-server-cert --depth immediates -m "remove latest branch for re-branching" >/dev/null 2>/dev/null && BRANCH_CREATE_SUCCESS="0" || BRANCH_CREATE_SUCCESS="1"
46
47 echo
48 echo -n "EXPORTING: $downstream_export_location/trunk to $BRANCH_LOCATION/$BRANCH_NAME ... "
49 #svn export --force $downstream_export_location/trunk "$BRANCH_LOCATION/$BRANCH_NAME"
50 svn export --force $downstream_export_location/trunk "$BRANCH_LOCATION/$BRANCH_NAME" 2>/dev/null && BRANCH_CREATE_SUCCESS="0" || BRANCH_CREATE_SUCCESS="1"
51
52
53 # add new branch to svn
54 echo
55 echo -n "Adding latest branch to svn ... "
56 #svn add "$BRANCH_LOCATION/$BRANCH_NAME"
57 svn add "$BRANCH_LOCATION/$BRANCH_NAME" >/dev/null 2>/dev/null && BRANCH_CREATE_SUCCESS="0" || BRANCH_CREATE_SUCCESS="1"
58 echo "Done."
59
60 cd "$BRANCH_LOCATION/$BRANCH_NAME"
61 # commit the newly created branch
62 #svn commit -m "$BRANCH_COMMIT_MESSAGE" "$BRANCH_LOCATION" --non-interactive --trust-server-cert
63 svn commit -m "$BRANCH_COMMIT_MESSAGE" "$BRANCH_LOCATION" --non-interactive --trust-server-cert >/dev/null 2>/dev/null && BRANCH_CREATE_SUCCESS="0" || BRANCH_CREATE_SUCCESS="1"
64
65
66 # call auto_build_latest_upstream.sh
67 #"$downstream_export_location/auto_import_patches.sh"
68 #"$downstream_export_location/auto_build.sh"
69 if [ "$BRANCH_CREATE_SUCCESS" == "1" ] ; then
70 "$downstream_export_location/auto_tag_latest_upstream.sh"
71 else
72 echo "AUTO BRANCH FAILED ... AUTO TAGGING NOT PERFORMED."
73 exit 1
74 fi

  ViewVC Help
Powered by ViewVC 1.1.22