ksummit.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: James Hogan <james.hogan@imgtec.com>
To: Josh Triplett <josh@joshtriplett.org>
Cc: ksummit-discuss@lists.linuxfoundation.org
Subject: Re: [Ksummit-discuss] [ANNOUNCE] git-series: track changes to a patch series over time
Date: Mon, 15 Aug 2016 23:06:47 +0100	[thread overview]
Message-ID: <20160815220647.GW19514@jhogan-linux.le.imgtec.org> (raw)
In-Reply-To: <20160815213536.f5aq7afgu7bcsrsq@x>

[-- Attachment #1: Type: text/plain, Size: 5317 bytes --]

On Mon, Aug 15, 2016 at 02:35:37PM -0700, Josh Triplett wrote:
> On Mon, Aug 15, 2016 at 07:46:47PM +0100, James Hogan wrote:
> > The metadata for my current workflow would be a set of other series that
> > each series is dependent on (usually 1, but sometmes more if there are
> > series for different subsystems, which need merging together before the
> > base of the new series).
> > 
> > If I update one of the earlier series, I'd normally just rebase all the
> > others on top one by one (git rebase -p --onto HEAD <base> <branch>). It
> > gets a bit repetative, but with tig alongside showing the graph with
> > commit ids, and -p to preserve merges when necessary, and diffing to
> > sanity check changes, its doable.
> > 
> > git-series could make that easier as I could just "git series rebase
> > otherbranch" without having to check the commit id for the base, asside
> > from when it contains merges of course.
> 
> Would it help to suport "git series rebase seriesname" to rebase on top
> of a series?
> 
> Actually you can do that today with "git series rebase
> git-series/seriesname:series", thanks to git's "extended" syntax.
> Still, probably a good idea to support a shorter syntax like "git series
> rebase seriesname" as well.

Right, I've already done it using a branch with the same name as the
series, so unless the default branch name is different I guess it
wouldn't help much.

> 
> > So I suppose it'd be nice to be able to do something roughly like:
> > 
> > $ git series create kvm/a/main v4.8-rc2
> 
> I do plan to add a second argument to start to provide a base.  Sounds
> like I should also consider providing an alias "create" for "start". :)

Yep, I meant start :-).

> 
> > ...
> > $ git series create mips/a/main v4.8-rc2
> > ...
> > $ git series create kvm/b/main kvm/a/main
> > (Implicitly depends on "kvm/a/main" branch / series)
> > ...
> > $ git series depend add mips/a/main
> > (Adds [sequence of] distinct merges at the beginning of the series)
> > ...
> > $ git series create kvm/c/main kvm/b/main
> > ...
> > $ git series checkout mips/a/main
> > ... hack a bit on that branch
> > $ git series update
> >  It'd probably be necessary to analyse the graph of dependencies to
> >  figure out the order, and for each series regenerate the merges and
> >  rebase on top of them:
> >    checkout dependency 1
> >    merge dependency 2
> >    ...
> >    rebase --onto HEAD <last merge at beginning of current series> series
> > 
> > it'd probably be convenient to be able to autocommit each rebased
> > series too, which I suppose raises the question of conflicts, and how
> > hard it'd be to have --abort-all, --abort, & --continue options.
> > 
> > git series rebase -i should obviously go back to the last merge after
> > the bases, since you can't meaningfully rebase -i merges.
> > 
> > git series rebase onto... perhaps that should require a dependent branch
> > or series that is being replaced (previously implicitly the current
> > base), and I suppose require regenerating the merges too, to avoid
> > storing more metadata.
> > 
> > Sounds like it'd certainly need a fair bit of complexity to do that
> > though, although if number of dependencies was limited to 1 it could be
> > a lot simpler.
> 
> Yeah, I could imagine several possible workflows here, but it would
> definitely increase complexity quite a bit.
> 
> If it would help people with various interdependent maintainer trees,
> I'd definitely consider it, especially if the complexity remains limited
> to people who actually declare series dependencies.
> 
> As an alternative to doing all of that completely automatically, I could
> imagine tracking the dependencies similar to how git tracks upstream
> "tracking" branches, and then providing guided next steps but still
> requiring you to rebase the series individually.  For instance, if
> you have a series 4.7/base, and then another series 4.7/kvm that depends
> on 4.7/base, "git series status" on 4.7/kvm could notice if you've made
> changes in 4.7/base since the version you based 4.7/kvm on, like this:
> 
> $ git series status
> On series 4.7/kvm
> Base series 4.7/base updated (rebased N commits ahead)
>   (use "git series rebase 4.7/base" to update)
> 
> And conversely, "git series status" on 4.7/base could say:
> 
> $ git series status
> On series 4.7/base
> Dependent series 4.7/kvm (and N more) needs update
>   ("git series checkout 4.7/kvm" then "git rebase 4.7/base" to update)
> 
> Would that help simplify the process, to avoid having to carefully
> orchestrate it while watching a repository browser?

I could see that being useful, although personally I'm usually quite
aware of the overall commit graph I'm dealing with, so it might be more
handy for when I forget that some other random WIP branch is based on
it.

I suppose though once you have git-series taking away the need to find
the base commit, its much simpler to script a sequence of rebases in the
right order, so the problem may just fade away. Even redundant rebases
should be harmless (although I just tried one and "Base unchanged" seems
to be treated as an error which necessitates a "git rebase --continue"
after it).

Cheers
James

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-08-15 22:06 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-29  7:50 Josh Triplett
2016-07-29 12:20 ` David Howells
2016-07-29 13:11   ` Josh Triplett
2016-08-04 22:46     ` Catalin Marinas
2016-08-04 23:07       ` Michael S. Tsirkin
2016-08-08 17:27         ` Catalin Marinas
2016-08-15 23:44           ` Michael S. Tsirkin
2016-08-04 23:46       ` Josh Triplett
2016-08-08 17:37         ` Catalin Marinas
2016-07-29 14:06   ` David Howells
2016-07-29 14:21     ` Christoph Lameter
2016-07-29 14:37       ` Josh Triplett
2016-07-29 15:00       ` Daniel Vetter
2016-07-29 15:18         ` Josh Triplett
2016-07-29 15:40           ` Daniel Vetter
2016-07-29 16:21             ` Josh Triplett
2016-07-29 16:31               ` Luis R. Rodriguez
2016-07-29 17:52       ` Bird, Timothy
2016-07-29 17:57         ` James Bottomley
2016-07-29 21:59           ` James Hogan
2016-07-30  2:55           ` Steven Rostedt
2016-07-29 20:13         ` David Howells
2016-07-30  5:02           ` Josh Triplett
2016-07-30  8:43             ` Arnd Bergmann
2016-08-04 12:44             ` Jani Nikula
2016-07-29 14:34     ` Josh Triplett
2016-07-29 14:37     ` David Howells
2016-07-29 14:56       ` Josh Triplett
2016-07-29 14:55 ` James Bottomley
2016-07-29 15:05   ` Josh Triplett
2016-08-09  0:10     ` Paul E. McKenney
2016-07-29 15:26 ` James Hogan
2016-08-04 23:52 ` Michael S. Tsirkin
2016-08-05 20:26   ` Josh Triplett
2016-08-15 13:20     ` James Hogan
2016-08-15 16:14       ` Josh Triplett
2016-08-15 23:42     ` Michael S. Tsirkin
2016-08-15 12:53 ` James Hogan
2016-08-15 16:34   ` Josh Triplett
2016-08-15 18:46     ` James Hogan
2016-08-15 21:35       ` Josh Triplett
2016-08-15 22:06         ` James Hogan [this message]
2016-08-15 23:59           ` Josh Triplett
2016-08-16  2:38             ` Michael S. Tsirkin

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=20160815220647.GW19514@jhogan-linux.le.imgtec.org \
    --to=james.hogan@imgtec.com \
    --cc=josh@joshtriplett.org \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    /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