All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Deskin Miller <deskinm@umich.edu>
Cc: git@vger.kernel.org, normalperson@yhbt.net
Subject: Re: [PATCH v2] git-svn: Make following parents atomic
Date: Mon, 08 Dec 2008 00:33:22 -0800	[thread overview]
Message-ID: <7v1vwj83sd.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1228717252-1016-1-git-send-email-deskinm@umich.edu> (Deskin Miller's message of "Mon, 8 Dec 2008 01:20:52 -0500")

Deskin Miller <deskinm@umich.edu> writes:

> +test_expect_success "follow-parent is atomic" '
> +	cd wc &&
> +	svn up &&
> +	svn mkdir stunk &&
> +	cd stunk &&
> +	echo "trunk stunk" > readme &&
> +	svn add readme &&
> +	cd .. &&

If you need to chdir around inside a test, please do that in a subshell,
so that after failing any command in between, the next test will not start
in an unexpected directory.

> +	svn ci -m "trunk stunk" &&
> +	echo "stunk like junk" >> stunk/readme &&
> +	svn ci -m "really stunk" &&
> +	echo "stink stank stunk" >> stunk/readme &&
> +	svn ci -m "even the grinch agrees" &&
> +	cd .. &&
> +	svn copy -m "stunk flunked" "$svnrepo"/stunk "$svnrepo"/flunk &&

> +	(svn cp -m "early stunk flunked too" \
> +		"$svnrepo"/stunk@17 "$svnrepo"/flunked ||
> +	svn cp -m "early stunk flunked too" \
> +		-r17 "$svnrepo"/stunk "$svnrepo"/flunked) &&

On the other hand, I do not see a need for this portion to be in a
subshell.  Wouldn't a normal statement grouping with {} work just as well?

  reply	other threads:[~2008-12-08  8:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-07 16:06 [PATCH] git-svn: Make following parents atomic Deskin Miller
2008-12-07 16:10 ` [ANNOUNCE] git-svn-bugfix script (Re: [PATCH] git-svn: Make following parents atomic) Deskin Miller
2008-12-07 22:24 ` [PATCH] git-svn: Make following parents atomic Deskin Miller
2008-12-08  6:20   ` [PATCH v2] " Deskin Miller
2008-12-08  8:33     ` Junio C Hamano [this message]
2008-12-08 13:31       ` [PATCH v3] " Deskin Miller
2008-12-08 23:35         ` Eric Wong
2008-12-16 13:22           ` Thomas Jarosch
2008-12-22  8:41             ` Thomas Jarosch

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=7v1vwj83sd.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=deskinm@umich.edu \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.