From: "Shawn O. Pearce" <spearce@spearce.org>
To: Sam Vilain <sam@vilain.net>
Cc: git@vger.kernel.org
Subject: Re: Client-side mirroring patches (v0)
Date: Wed, 25 Nov 2009 16:58:37 -0800 [thread overview]
Message-ID: <20091126005837.GN11919@spearce.org> (raw)
In-Reply-To: <1259143617-26580-1-git-send-email-sam@vilain.net>
Sam Vilain <sam@vilain.net> wrote:
> Hey folks, this is the first stage of git mirroring
...
> Also there is the matter of falling over to the next mirror should one
> not be reachable, but then we're getting into C weaknesses really.
> Should I plan to do exception recovery using 'longjmp' ?
Please don't use longjmp.
You'll have to change the code to not die() upon connection failure,
but instead return an error code to the higher level which can
locate another mirror and retry.
> Also the
> process should be interruptible and provide a user menu. Again this
> seems like it would be very tedious and clumsy in C. How do people
> manage?
With great pain. :-)
To do a user menu you can do a simple interface like `git add -i`
does, which just dumps the choices to stdout and a prompt for the
user to enter their selection. If you want something more complex
you need to link to curses or ncurses, which IIRC opens some issues
with portablity, but lets you do a bit nicer interface on the tty.
--
Shawn.
next prev parent reply other threads:[~2009-11-26 0:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-25 10:06 Client-side mirroring patches (v0) Sam Vilain
2009-11-25 10:06 ` [PATCH 1/4] remote: allow mirroring to be specified, and document settings Sam Vilain
2009-11-25 10:06 ` [PATCH 2/4] fetch: try mirrors if selected Sam Vilain
2009-11-25 10:06 ` [PATCH 3/4] fetch --use-mirror: don't fetch with 'autotags' for actual fetch Sam Vilain
2009-11-25 10:06 ` [PATCH 4/4] fetch: cleanup refs with --use-mirror Sam Vilain
2009-11-26 1:20 ` [PATCH 2/4] fetch: try mirrors if selected Shawn O. Pearce
2009-11-26 0:58 ` Shawn O. Pearce [this message]
2010-01-01 0:05 ` Client-side mirroring patches (v0) Nanako Shiraishi
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=20091126005837.GN11919@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=sam@vilain.net \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox