/[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 279 - (hide annotations) (download) (as text)
Thu Dec 23 11:48:33 2010 UTC (9 years, 10 months ago) by william
File MIME type: application/x-sh
File size: 4791 byte(s)
uncommited changes to some scripts
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 132 if [ "$current_downstream_revision" == "$PCSX2_REVISION" ] ; then
16     if [ $current_local_revision -lt $PCSX2_REVISION_LOCAL ] ; then
17     echo "UPSTREAM REVISION: $PCSX2_REVISION"
18     echo "DOWNSTREAM REVISION: $current_downstream_revision"
19     echo "LOCAL REVISION: $current_local_revision"
20     echo "LOCAL COMMITTED REVISION: $PCSX2_REVISION_LOCAL"
21     else
22     echo "UPSTREAM REVISION: $PCSX2_REVISION"
23     echo "DOWNSTREAM REVISION: $current_downstream_revision"
24     echo "LOCAL REVISION: $current_local_revision"
25     echo "LOCAL COMMITTED REVISION: $PCSX2_REVISION_LOCAL"
26     echo
27     echo -e "\\tThere is no need to update the local repository. reason: upstream repository has not been updated and local has not been modified."
28     echo
29     echo -e "\\tAborting update of $downstream_export_location/trunk"
30     echo
31     exit 0
32     fi
33     else
34 william 129 echo "UPSTREAM REVISION: $PCSX2_REVISION"
35 william 93 echo "DOWNSTREAM REVISION: $current_downstream_revision"
36 william 130 echo "LOCAL REVISION: $current_local_revision"
37     echo "LOCAL COMMITTED REVISION: $PCSX2_REVISION_LOCAL"
38 william 93 fi
39     else
40 william 132 echo "UPSTREAM REVISION: $PCSX2_REVISION"
41     echo "DOWNSTREAM REVISION: $current_downstream_revision"
42     echo "LOCAL REVISION: $current_local_revision"
43     echo "LOCAL COMMITTED REVISION: $PCSX2_REVISION_LOCAL"
44     echo
45     echo -e "\\tDetected the use of: --force-update ... forcing update ..."
46 william 93 fi
47    
48 william 141 export BRANCH_COMMIT_MESSAGE="Creating $BRANCH_NAME branch for r$PCSX2_REVISION"
49    
50 william 93 echo $BRANCH_COMMIT_MESSAGE
51    
52     rm -Rf "$BRANCH_LOCATION/$BRANCH_NAME"
53     #remove the latest branch from the base repository
54 william 141 #echo "calling: svn delete $BRANCH_LOCATION/$BRANCH_NAME"
55 william 279 svn delete "$BRANCH_LOCATION/$BRANCH_NAME" --non-interactive --trust-server-cert && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
56     #svn delete "$BRANCH_LOCATION/$BRANCH_NAME" --non-interactive --trust-server-cert >/dev/null 2>/dev/null && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
57 william 93
58     #update the working copy
59 william 141 #echo "calling: svn commit $BRANCH_LOCATION"
60     #svn commit "$BRANCH_LOCATION" --non-interactive --trust-server-cert --depth immediates -m "remove latest branch for re-branching" && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
61     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="1" || BRANCH_CREATE_SUCCESS="0"
62 william 93 echo
63     echo -n "EXPORTING: $downstream_export_location/trunk to $BRANCH_LOCATION/$BRANCH_NAME ... "
64 william 279 svn export --force $downstream_export_location/trunk "$BRANCH_LOCATION/$BRANCH_NAME" && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
65     #svn export --force $downstream_export_location/trunk "$BRANCH_LOCATION/$BRANCH_NAME" 2>/dev/null && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
66 william 93
67    
68     # add new branch to svn
69     echo
70     echo -n "Adding latest branch to svn ... "
71 william 279 svn add "$BRANCH_LOCATION/$BRANCH_NAME" && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
72     #svn add "$BRANCH_LOCATION/$BRANCH_NAME" >/dev/null 2>/dev/null && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
73 william 93 echo "Done."
74    
75     cd "$BRANCH_LOCATION/$BRANCH_NAME"
76 william 141 echo
77     echo -n "Committing latest branch to svn ... "
78 william 93 # commit the newly created branch
79 william 279 svn commit -m "$BRANCH_COMMIT_MESSAGE" "$BRANCH_LOCATION" --non-interactive --trust-server-cert && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
80     #svn commit -m "$BRANCH_COMMIT_MESSAGE" "$BRANCH_LOCATION" --non-interactive --trust-server-cert >/dev/null 2>/dev/null && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
81 william 141 echo "Done."
82 william 93
83    
84     # call auto_build_latest_upstream.sh
85 william 104 #"$downstream_export_location/auto_import_patches.sh"
86     #"$downstream_export_location/auto_build.sh"
87 william 105 if [ "$BRANCH_CREATE_SUCCESS" == "1" ] ; then
88 william 141 cd "$downstream_export_location/"
89 william 105 "$downstream_export_location/auto_tag_latest_upstream.sh"
90     else
91     echo "AUTO BRANCH FAILED ... AUTO TAGGING NOT PERFORMED."
92     exit 1
93     fi

  ViewVC Help
Powered by ViewVC 1.1.22