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

  ViewVC Help
Powered by ViewVC 1.1.22