Re: Rebasing stgit stacks

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

 



On 28/01/07, Theodore Tso <tytso@xxxxxxx> wrote:
Well, a typical use case for me is:

        stg branch master
        git pull .
        stg branch 2.6.20-rc5
        stg export -d /tmp/temp-stack
        stg branch master
        stg branch -C 2.6.20-rc6
        stg import -s /tmp/temp-stack/series

That's because I want to keep the original patch series for
2.6.20-rc5, but I also want rebase the patch set to 2.6.20-rc6.  Is
there a better way of doing this?

As Yann pointed out, you could just clone 2.6.20-rc5 into 2.6.20-rc6
and rebase the latter (currently with 'stg rebase v2.6.20-rc6').

If you have the branches already created, you can avoid the
export/import with a cherry-pick (with better merging than just
applying a patch). The 'pick' command only takes an argument (I'd like
to extend it to accept multiple or patch ranges) but you can use it
with 'series':

stg branch 2.6.20-rc6
stg series -b 2.6.20-rc5 --noprefix --showbranch [patches...] \
 | xargs -rn1 stg pick

You could even use the --missing instead of -b for the series command.
This option shows the patches on the remote branch which are missing
in current. Pretty useful if you want to continue importing after
fixing a conflict for example (that's a reason why I haven't extended
'pick' yet, 'series -m' seemed pretty powerful).

Another trick if you modify some patches in one branch (i.e.
2.6.20-rc5) is to use 'stg sync -b 2.6.20-rc5 [patches]' in the other
branch. It tries a three-way merge of each individual patch with the
corresponding one in the other branch, showing you any possible
conflicts (I usually have 'imerger' set to emacs... and 'autoimerge'
to 'yes' in the config file so that emacs' ediff is automatically
invoked for every conflict).

--
Catalin
-
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]