[Pkg-ocaml-maint-commits] r5468 - in /trunk/projects/git-guide: checkout-d-o-m-git-repo new-d-o-m-git-repo notes.mdwn

zack at users.alioth.debian.org zack at users.alioth.debian.org
Thu Apr 10 20:45:09 UTC 2008


Author: zack
Date: Thu Apr 10 20:45:09 2008
New Revision: 5468

URL: http://svn.debian.org/wsvn/?sc=1&rev=5468
Log:
reference the scripts in the notes, add something about directory structure and what the scripts do

Modified:
    trunk/projects/git-guide/checkout-d-o-m-git-repo
    trunk/projects/git-guide/new-d-o-m-git-repo
    trunk/projects/git-guide/notes.mdwn

Modified: trunk/projects/git-guide/checkout-d-o-m-git-repo
URL: http://svn.debian.org/wsvn/trunk/projects/git-guide/checkout-d-o-m-git-repo?rev=5468&op=diff
==============================================================================
--- trunk/projects/git-guide/checkout-d-o-m-git-repo (original)
+++ trunk/projects/git-guide/checkout-d-o-m-git-repo Thu Apr 10 20:45:09 2008
@@ -1,5 +1,7 @@
 #!/bin/bash
 set -e
+
+REMOTE_BRANCHES="upstream pristine-tar"
 
 PACKAGE="$1"
 if [ -z "$PACKAGE" ] ; then
@@ -14,8 +16,9 @@
 
 echo "I: setting up remote tracking"
 (cd $PACKAGE
- git branch --track upstream remotes/origin/upstream
- git branch --track pristine-tar remotes/origin/pristine-tar)
+ for branch in $REMOTE_BRANCHES ; do
+   git branch --track $branch remotes/origin/$branch
+ done)
 
 echo "I: all done, enjoy."
 

Modified: trunk/projects/git-guide/new-d-o-m-git-repo
URL: http://svn.debian.org/wsvn/trunk/projects/git-guide/new-d-o-m-git-repo?rev=5468&op=diff
==============================================================================
--- trunk/projects/git-guide/new-d-o-m-git-repo (original)
+++ trunk/projects/git-guide/new-d-o-m-git-repo Thu Apr 10 20:45:09 2008
@@ -1,8 +1,7 @@
 #!/bin/bash
 set -e
 
-#NOTIFY_EMAIL="pkg-ocaml-maint-commits at lists.alioth.debian.org"
-NOTIFY_EMAIL="zack at debian.org"	# temp value, for testing purposes
+NOTIFY_EMAIL="pkg-ocaml-maint-commits at lists.alioth.debian.org"
 CIA_PROJECT="debian-ocaml-maint"
 
 PACKAGE="$1"

Modified: trunk/projects/git-guide/notes.mdwn
URL: http://svn.debian.org/wsvn/trunk/projects/git-guide/notes.mdwn?rev=5468&op=diff
==============================================================================
--- trunk/projects/git-guide/notes.mdwn (original)
+++ trunk/projects/git-guide/notes.mdwn Thu Apr 10 20:45:09 2008
@@ -47,64 +47,60 @@
 benefit from the ignores.  You can add .gitignore files mode down in the
 directory hierarchy to ignore files only in a specific sub-tree.
 
+Directory layout
+================
+
+Mantra: there is *one git repository* on alioth *for each package*, project,
+whatever.  The base, group writable directory we have is `/git/pkg-ocaml-maint/`
+on alioth.d.o. We use subdirectories to distinguish packages from other stuff,
+e.g.:
+
+    $ ls -F /git/pkg-ocaml-maint/   # on alioth
+    packages/
+    projects/
+
+Inside packages, as in the other directories, we have one `foo.git` directory
+for each repository, e.g.:
+
+    $ ls -F /git/pkg-ocaml-maint/packages/  # on alioth
+    dose2.git/
+    # one git repository, for the "dose2" package
+
 Common action recipes
 =====================
 
-Examples using the "dose2" package.
-
-Assumed shell variables:
-
-    PACKAGE=dose2
-
-    # path on the alioth.debian.org file system
-    REPODIR=/git/pkg-ocaml-maint/packages/$PACKAGE.git
-
+Examples use the (forthcoming) `dose2` package.
 
 New git package repository creation
 -----------------------------------
 
-(the following is implemented by: `new-d-o-m-git-repo`)
+    $ new-d-o-m-git-repo  dose2  /some/where/dose2-1.2.tar.gz
 
-    # initialize (empty) repository on alioth
-    $ ssh alioth.debian.org GIT_DIR=$REPODIR git init --shared=world
-    Initialized empty shared Git repository in /git/pkg-ocaml-maint/packages/dose2.git/
+this script does the following:
+- create the remote repo on alioth following the [alioth guide for
+that](http://wiki.debian.org/Alioth/Git), and implementing the aforementioned
+directory layout
+- set up notifications:
+  - mail notifications to the -commit mailing list
+  - mail notifications to the PTS
+  - CIA notifications (for IRC and <http://cia.vc>)
+- inject the given tarball in the repository in the upstream branch (using
+`pristine-tar` to be able to checkout later on the exact very same tarball)
 
-    # human readable description, to the benefit of gitweb
-    $ ssh alioth.debian.org "echo $PACKAGE packaging > $REPODIR/description"
-
-    # check-in of upstream tarball, and branch layout setup
-    $ mkdir $PACKAGE ; cd $PACKAGE
-    $ git init
-    Initialized empty Git repository in .git/
-    $ git-import-orig /tmp/dose2-1.2.tar.gz   # or wherever you have the tarball
-    Upstream version is 1.2
-    Initial import of '/tmp/dose2-1.2.tar.gz' ...
-    Succesfully merged version 1.2 of /tmp/dose2-1.2.tar.gz into .
-
-    # push changes to alioth
-    $ git remote add origin git+ssh://git.debian.org/$REPODIR
-    $ git push --all
-    Counting objects: 211, done.
-    Compressing objects: 100% (204/204), done.
-    Writing objects: 100% (211/211), 193.31 KiB, done.
-    Total 211 (delta 10), reused 0 (delta 0)
-    To git+ssh://git.debian.org//git/pkg-ocaml-maint/packages/dose2.git/
-     * [new branch]      master -> master
-     * [new branch]      upstream -> upstream
+To run it you will need to install the following packages:
+- `git-core`
+- `git-buildpackage`
+- `pristine-tar`
 
 Fresh checkout
 --------------
 
-(the following is implemented by: `checkout-d-o-m-git-repo`)
+    $ checkout-d-o-m-git-repo  dose2
 
-    # clone the remote repository
-    $ git clone git+ssh://git.debian.org/$REPODIR
-
-    # track remote branches
-    $ cd $PACKAGE
-    $ git branch --track upstream remotes/origin/upstream
-    Branch upstream set up to track remote branch refs/remotes/origin/upstream.
-    # repeat as desired for other branches
+this script does the following:
+- clone the repository for alioth
+- set up remote branch tracking for the main branches ("upstream", "master",
+"pristine-tar")
 
 More info
 =========




More information about the Pkg-ocaml-maint-commits mailing list