Skip to content
Browse files

Be explicit about the PostgreSQL git repo branch

  • Loading branch information...
1 parent 512e4a6 commit c9375d7ec3a85938fc3b8e94ebd4cab2fc03aa3b Greg Smith committed Jan 14, 2012
Showing with 13 additions and 5 deletions.
  1. +1 −0 HISTORY
  2. +1 −1 README.rst
  3. +11 −4 peg
View
1 HISTORY
@@ -3,3 +3,4 @@
2011-01-15 Add "clean" command and improve documentation
2011-05-08 Switch to git as default repo, more doc updates
2011-06-20 Add "rebuild" command
+ 2012-01-14 Be explicit about the PostgreSQL git repo branch
View
2 README.rst
@@ -450,7 +450,7 @@ If you have any hints, changes or improvements, please contact:
Credits
=======
-Copyright (c) 2009-2011, Gregory Smith
+Copyright (c) 2009-2012, Gregory Smith
All rights reserved.
See COPYRIGHT file for full license details
View
15 peg
@@ -87,6 +87,11 @@ TGZDIR="tgz"
GITPGROOTDIR="postgresql"
CVSPGROOTDIR="pgsql"
+# Remote branch of interest for the PostgreSQL git repo
+# TODO An easy UI for checking out back branches would be nice
+GITMASTERREPO="origin"
+GITMASTERBRANCH="$GITMASTERREPO/master"
+
function error {
# Report an error and save its value for exit and wrap's command filtering
ERROR=$1
@@ -163,7 +168,8 @@ function pull_git {
# Apparently we already have a repo around
echo "Updating existing git repository at $GITPGROOTDIR"
cd $GITPGROOTDIR
- git fetch
+ git fetch $GITMASTERREPO
+ git merge $GITMASTERBRANCH
else
echo "Creating new git repository from master repo"
git clone git://git.postgresql.org/git/postgresql.git
@@ -261,7 +267,7 @@ function checkout_repo_git {
link_project_git
cd $PGSRC/$PGPROJECT
# TODO This will fail if this branch already exists.
- git checkout -b $PGPROJECT
+ git checkout -b $PGPROJECT $GITMASTERBRANCH
}
function checkout_repo_cvs {
@@ -349,10 +355,11 @@ function update_cvs {
}
function update_git {
- # TODO Should this split fetch/merge steps based on whether
+ # TODO Should this consider not merging automatically based on whether
# a PGPROJECT name was passed or not?
cd $PGSRC/$PGPROJECT
- git pull
+ git fetch $GITMASTERREPO
+ git merge $GITMASTERBRANCH
}
function update_project {

0 comments on commit c9375d7

Please sign in to comment.
Something went wrong with that request. Please try again.