[Pkg-ocaml-maint-commits] r5449 - in /trunk/projects/git-guide: ./ README 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
Tue Apr 8 15:29:26 UTC 2008


Author: zack
Date: Tue Apr  8 15:29:26 2008
New Revision: 5449

URL: http://svn.debian.org/wsvn/?sc=1&rev=5449
Log:
first notes and scripts to create/checkout remote git repositories on alioth

Added:
    trunk/projects/git-guide/
    trunk/projects/git-guide/README
    trunk/projects/git-guide/checkout-d-o-m-git-repo   (with props)
    trunk/projects/git-guide/new-d-o-m-git-repo   (with props)
    trunk/projects/git-guide/notes.mdwn

Added: trunk/projects/git-guide/README
URL: http://svn.debian.org/wsvn/trunk/projects/git-guide/README?rev=5449&op=file
==============================================================================
--- trunk/projects/git-guide/README (added)
+++ trunk/projects/git-guide/README Tue Apr  8 15:29:26 2008
@@ -1,0 +1,4 @@
+notes for the forthcoming new section about git repository usage to be
+embedded/replaced in the OCaml policy
+
+Stefano Zacchiroli Tue, 08 Apr 2008 13:33:30 +0200 zack

Added: 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=5449&op=file
==============================================================================
--- trunk/projects/git-guide/checkout-d-o-m-git-repo (added)
+++ trunk/projects/git-guide/checkout-d-o-m-git-repo Tue Apr  8 15:29:26 2008
@@ -1,0 +1,20 @@
+#!/bin/bash
+set -e
+
+PACKAGE="$1"
+if [ -z "$PACKAGE" ] ; then
+  echo "Usage: checkout-d-o-m-git-repo PKGNAME"
+  exit 1
+fi
+
+REPODIR="/git/pkg-ocaml-maint/packages/$PACKAGE.git"
+
+echo "I: cloning remote repository"
+git clone git+ssh://git.debian.org/$REPODIR
+
+echo "I: setting up remote tracking"
+(cd $PACKAGE
+ git branch --track upstream remotes/origin/upstream)
+
+echo "I: all done, enjoy."
+

Propchange: trunk/projects/git-guide/checkout-d-o-m-git-repo
------------------------------------------------------------------------------
    svn:executable = *

Added: 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=5449&op=file
==============================================================================
--- trunk/projects/git-guide/new-d-o-m-git-repo (added)
+++ trunk/projects/git-guide/new-d-o-m-git-repo Tue Apr  8 15:29:26 2008
@@ -1,0 +1,39 @@
+#!/bin/bash
+set -e
+
+PACKAGE="$1"
+TARBALL="$2"
+if [ -z "$PACKAGE" -o -z "$TARBALL" ] ; then
+  echo "Usage: new-d-o-m-git-repo PKGNAME TARBALL"
+  exit 1
+fi
+
+ALIOTH="alioth.debian.org"
+REPODIR="/git/pkg-ocaml-maint/packages/$PACKAGE.git"
+
+echo "I: initialize (empty) remote repository on alioth.d.o"
+ssh $ALIOTH GIT_DIR=$REPODIR git init --shared=world
+ssh $ALIOTH "echo $PACKAGE packaging > $REPODIR/description"
+
+echo "I: check in upstream tarball and setup branch layout"
+mkdir $PACKAGE
+(cd $PACKAGE
+ git init
+ git-import-orig "$TARBALL")
+ 
+echo "I: pushing first changes to alioth.d.o"
+(cd $PACKAGE
+ git remote add origin git+ssh://git.debian.org/$REPODIR
+ git push --all)
+
+echo "I: cleaning up"
+rm -rf $PACKAGE/
+
+echo "I: all done. You can now checkout your new git repo with:"
+echo
+echo "   git clone git+ssh://git.debian.org/$REPODIR"
+echo "   cd $PACKAGE ; git branch --track upstream remotes/origin/upstream"
+echo
+echo "   # or:   checkout-d-o-m-git-repo $PACKAGE"
+echo
+

Propchange: trunk/projects/git-guide/new-d-o-m-git-repo
------------------------------------------------------------------------------
    svn:executable = *

Added: trunk/projects/git-guide/notes.mdwn
URL: http://svn.debian.org/wsvn/trunk/projects/git-guide/notes.mdwn?rev=5449&op=file
==============================================================================
--- trunk/projects/git-guide/notes.mdwn (added)
+++ trunk/projects/git-guide/notes.mdwn Tue Apr  8 15:29:26 2008
@@ -1,0 +1,57 @@
+
+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
+
+
+New git package repository creation
+-----------------------------------
+
+(the following is implemented by: `new-d-o-m-git-repo`)
+
+    # 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/
+
+    # 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
+
+Fresh checkout
+--------------
+
+(the following is implemented by: `checkout-d-o-m-git-repo`)
+
+    # 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
+




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