git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Baudis <pasky@suse.cz>
To: martin f krafft <madduck@madduck.net>
Cc: git@vger.kernel.org
Subject: Re: TopGit: how to deal with upstream inclusion
Date: Sun, 14 Sep 2008 23:03:16 +0200	[thread overview]
Message-ID: <20080914210316.GJ10360@machine.or.cz> (raw)
In-Reply-To: <20080914203043.GA4872@lapse.rw.madduck.net>

  Hi,

On Sun, Sep 14, 2008 at 09:30:43PM +0100, martin f krafft wrote:
> So the Debian topgit package used to have a branch fixes/destdir to
> make the Makefile distro-friendly. TopGit 0.3 has integrated this,
> thus obsoleting the fixes/destdir branch.
> 
> I thought the way to handle this would be to simply delete the
> TopGit branch, but of course that breaks everything, e.g.:
> 
> lapse:..t/topgit|debian/locations|% tg update
> tg: fatal: some dependencies are missing: fixes/destdir
> 
> I now we had a recent discussion about how to remove branches, and
> that there's basically no way to do this. In the discussion,
> upstream inclusion was listed as one of the instances when this
> wouldn't be needed, but that refers to upstream pulling/am'ing my
> commits, not implementing the same functionality differently.

  upstream should never pull TopGit branches! They have ugly history and
contain .topdeps and .topmsg junk files. That's what tg patch and
tg export is there for. :-)

  If upstream applies the changes, the branch becomes unnecessary and
then it is ok to have some command like 'tg depend rm' to get rid of the
branch, since the *changes* aren't going away, thus we don't need to
create any "revert commits", which is the real issue with the general
'tg depend rm' command.

> How do I retire the fixes/destdir branch? Do I manually remove the
> dependency from depending branches?

  Almost. The real 'tg depend rm' (or maybe rather, 'tg depend fold' as
in "this topic branch got folded to that branch") command would be
slightly more complicated, I think, in order to ensure that no
mysterious leftovers of the retired patch are lurking in your patch
tree. Assuming

	tg depend fold RETIRED VANILLA

  (i) Take the RETIRED _base_ branch

  (ii) Merge in VANILLA

  (iii) Merge in RETIRED head branch with -s ours

  (iv) Now we have a commit that contains RETIRED topic branch, but with
the RETIRED's changes taken from VANILLA instead of RETIRED

  (v) Merge this into the base of your current branch

  (vi) Merge base to the head of your current branch, replacing RETIRED
with VANILLA (if not already there) in the .topdeps

  (vii) You do not have to add VANILLA if you depend on it recursively
and ran tg update before to get it from your dependencies

  Maybe in your case this could be even simpler but this should be the
general process. Does that sound right?

-- 
				Petr "Pasky" Baudis
The next generation of interesting software will be done
on the Macintosh, not the IBM PC.  -- Bill Gates

  reply	other threads:[~2008-09-14 21:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-14 20:30 TopGit: how to deal with upstream inclusion martin f krafft
2008-09-14 21:03 ` Petr Baudis [this message]
2008-09-19 17:04   ` martin f krafft
2008-09-21 14:19     ` Petr Baudis
2008-09-23  6:35       ` martin f krafft
2008-09-23  9:55         ` Petr Baudis
2008-09-24 11:21           ` martin f krafft
2008-09-24 15:29             ` Petr Baudis
2008-09-24 18:13               ` martin f krafft

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=20080914210316.GJ10360@machine.or.cz \
    --to=pasky@suse.cz \
    --cc=git@vger.kernel.org \
    --cc=madduck@madduck.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).