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

Annotation of /auto_branch_latest_upstream.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 130 - (hide 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 william 93 #!/bin/bash
2 william 94 . ./auto_defs.sh
3 william 93
4 william 105 export BRANCH_CREATE_SUCCESS="0"
5 william 93
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 william 129 export current_local_revision=`cat "$BRANCH_LOCATION/$BRANCH_NAME/local_repository_revision.txt"`
13 william 93
14     if [ "$OVERRIDE_UPDATE_NEEDED_CHECK" != "1" ] ; then
15 william 130 if [ "$current_downstream_revision" == "$PCSX2_REVISION" && "$current_local_revision" -lt "$PCSX2_REVISION_LOCAL" ] ; then
16 william 129 echo "UPSTREAM REVISION: $PCSX2_REVISION"
17 william 93 echo "DOWNSTREAM REVISION: $current_downstream_revision"
18 william 130 echo "LOCAL REVISION: $current_local_revision"
19     echo "LOCAL COMMITTED REVISION: $PCSX2_REVISION_LOCAL"
20 william 93 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 william 130 if [ "$current_downstream_revision" == "$PCSX2_REVISION" && "$current_local_revision" -lt "$PCSX2_REVISION_LOCAL" ] ; then
29 william 129 echo "UPSTREAM REVISION: $PCSX2_REVISION"
30 william 93 echo "DOWNSTREAM REVISION: $current_downstream_revision"
31 william 130 echo "LOCAL REVISION: $current_local_revision"
32     echo "LOCAL COMMITTED REVISION: $PCSX2_REVISION_LOCAL"
33 william 93 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 william 105 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 william 93
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 william 105 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 william 93
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 william 105 svn export --force $downstream_export_location/trunk "$BRANCH_LOCATION/$BRANCH_NAME" 2>/dev/null && BRANCH_CREATE_SUCCESS="0" || BRANCH_CREATE_SUCCESS="1"
56 william 93
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 william 105 svn add "$BRANCH_LOCATION/$BRANCH_NAME" >/dev/null 2>/dev/null && BRANCH_CREATE_SUCCESS="0" || BRANCH_CREATE_SUCCESS="1"
63 william 93 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 william 105 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 william 93
70    
71     # call auto_build_latest_upstream.sh
72 william 104 #"$downstream_export_location/auto_import_patches.sh"
73     #"$downstream_export_location/auto_build.sh"
74 william 105 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