Re: [PATCH v2] git-svn: Make following parents atomic
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 8, 2008, 08:33 UTC
- Message-ID
- <7v1vwj83sd.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <1228717252-1016-1-git-send-email-deskinm@umich.edu>
Deskin Miller <deskinm@umich.edu> writes:
Show 8 quoted lines
> +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.
Show 7 quoted lines
> + 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?