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

  ViewVC Help
Powered by ViewVC 1.1.22