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

Re: [Xen-devel] [PATCH] automation: introduce a script for build test



On Wed, Jul 25, 2018 at 12:04:33PM +0100, George Dunlap wrote:
> On 07/25/2018 11:53 AM, Wei Liu wrote:
> > On Wed, Jul 25, 2018 at 11:48:36AM +0100, Anthony PERARD wrote:
> >>     git rebase --exec ./scripts/basic-build.sh <base>
> > 
> > To expound this a bit:
> > 
> > That's what I used and told others to use before, but it is far more
> > dangerous than this script because git-rebase _rewrites_ history.
> > 
> > A failed command also doesn't restore original head, so it is less
> > convenient -- you have to check the status of the tree every time
> > something breaks.
> 
> I'm not opposed to the script you have, but it might be worth seeing
> what we can do to to use `git rebase`, since that simplifies the processing.

On the other hand, there might not be any support for git-rebase --exec,
at it's a fairly new options, so the script would work with older
version of git.

> We could have a script, for instance, do something like:
> 
> curbranch=$(git name-rev --name-only HEAD)
> git checkout -b tmp-series-build-test
> if ! git rebase --exec ... $base ; then
>       git rebase --abort
> fi
> git checkout -f $curbranch
> git delete -D tmp-series-build-test
> 
> The history rewriting is now moot because you're rewriting a temporary
> branch.

Also, in my experience, rebase doesn't change history as long as it only
picks commits (no squash/fixup moving commits arround), but it might with
thing like --autosquash.

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.