Re: [PATCH v2] git-svn: Make following parents atomic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Deskin Miller <deskinm@xxxxxxxxx> 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?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux