zsh-workers
 help / color / mirror / code / Atom feed
From: Wayne Davison <wayned@users.sourceforge.net>
To: zsh-workers@sunsite.dk
Subject: Git mirror at SF + link to "repos" script
Date: Sat, 14 Mar 2009 12:23:59 -0700	[thread overview]
Message-ID: <20090314192359.GA17014@blorf.net> (raw)

I've finished the setup of the git mirror at SF.  It is updating from
the CVS version every 10 minutes.  This lets me do all my zsh work using
git now.  I set it up this way:

I did a read-only git clone (from git://zsh.git.sf.net/gitroot/zsh) and
then put a read/write CVS checkout named "cvs" inside the .git subdir.
I have a push script that looks for that dir and chooses to run the git
cvsexportcommit command, which will save all my recent git commits to
the CVS repo.

If anyone is interested in seeing what I did to make pushing from git
easy, check out my multi-repo helper script, "repos" (look at the git_pu
and git_cvsexportcommit functions):

    http://opencoder.net/repos

That "repos" script expects to have been called via a 2-letter symlink
of the actual operation to perform:  "di", "st", "up", "lo", "ci", or
"pu".  It figures out what kind of repo you're in, and calls the right
command for that action.

Some of the "repo" script's features:

- "st" (status) for CVS implements a local-only status of changed files
  (though it doesn't list unknown files).  Use "st -u" for a combined
  remote + local status that also includes unknown files.  If the local
  status shows too many changes (e.g. if you touched a file without
  changing it), running "di" or "up" on the file will make "st" accurate
  again.

- "di" (diff) and "lo" (log) automatically pipe the output through a
  pager if STDOUT is a terminal (emulating git).  For svn it turns off
  the displaying of deleted files (i.e. --no-diff-deleted).

- "up" (update) for git does a rebase update instead of a merge update.
  For CVS it supports the -n option to disable the update.

- "pu" (push) in a git repo knows now to deal with a git-svn repo and
  (with an embedded "cvs" checkout), a cvsexportcommit repo (the cvs
  code has been lightly tested so far, but I set it up to be pedantic,
  so it should be safe).  I also made "pu" for git understand that if
  there is a remote named "pu" in the config, it should use that for the
  push (this lets you have one URL for pushing (e.g. ssh://...), and one
  for fetching (e.g. git://...), should you so desire).

- "lo" (log) for git has a -v option that makes it easier to get the
  --name-status output.  It also has an -s option that lets you see the
  git-svn log output when in a git-svn repo.

- "ci" (checkin) for git makes the default to commit everything unless
  you specify other (non-"-m") options or files.  I also made a trailing
  -i mean to commit just the changes that are currently added (which is
  the normal git default).  This makes "ci" for git behave more like
  other SCMs I'm used to.

Though the script has support for hg and bzr, I don't do much committing
to those repos, so those SCMs could probably use some more work.

Examples:

ci -m 'The commit message'
di foobar.c
lo -p        (-p is git only, but is so useful that I thought I'd mention it)

..wayne..


             reply	other threads:[~2009-03-14 19:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-14 19:23 Wayne Davison [this message]
2009-03-14 21:51 ` Frank Terbeck
2009-03-14 23:22   ` Wayne Davison
2009-03-15  5:59   ` Clint Adams
2009-03-15 16:54     ` Wayne Davison
2009-03-15 19:56       ` Clint Adams
2009-03-15 21:20       ` Wayne Davison
2009-04-04 22:12         ` Git mirror at SF Wayne Davison
2009-04-05 20:41           ` Wayne Davison
2009-04-26 10:29           ` Frank Terbeck
2009-04-26 16:05             ` Wayne Davison
2009-04-26 17:44               ` Frank Terbeck
2009-04-27 16:19                 ` Wayne Davison
2009-03-14 22:14 ` Git mirror at SF + link to "repos" script Ingmar Vanhassel
2009-03-15  1:33 ` Wayne Davison
     [not found] ` <20091204045055.GA13426@scru.org>
2009-12-04 17:16   ` Wayne Davison

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090314192359.GA17014@blorf.net \
    --to=wayned@users.sourceforge.net \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).