Hi all! Christoph Egger schrieb: > Just converted xwelltris to topgit to give it an try, looks very > usefull indeed (and can't be easier as far as I have come). Thanks for > this usefull pointer! As I was asked on IRC to share my experience with topgit while trying it on xwelltris, here comes the mail. I had no experience with topgit at all but was in the mood to try something out as I read the mail here so I just tried it. xwelltris is nothing overly complex, it has, as of now, 2 independent patches touching not more than an hand full lines but if we decide to use it -- or are ok with team maintained packages using it -- libsfml will probably be next trying out something bigger. The working of topgit could, I guess described as follows: You do some special git branches for every «patch» you want to apply to your pakage, and topgit then creates the full quilt stuff for you from it so you can work directly on the source and changes to the patches are a lot easier to read -- you don't have diffs of patches/diffs but diffs against the code! Robin, you introduced topgit, if you have some time, could you have a look at this to see if I have done some mistakes in here? Usage: ====== For an existing git project using quilt you'll want to do the following: * go to the git-cloned repos * tg remote origin #or alioth * iterate through your quilt patches * tg create {debian,fixes,...}/patchname while in master branch if this particular patch does not depend on previos ones otherwise in the branch with the needed patch * apply the patch, edit .topmsg * git commit * go to master * add -include /usr/share/topgit/tg2quilt.mk directly after your quilt.make include Workings: ========= I'm just guessing here as I did not have an look at the actual sources! Topgit somehow knows which branches are tg branches. The trick with the makefile include let's topgit override quilt's patch, unpatch targets so if topgit is installed it refreshes your debian/patches on unpatch target so you'll always get the newest patches for build. Order in the series is determined by the .topdeps file in each branch which is automatically created by tg create and points to the branch you did the tg create in. You do not want to change this file straight away, it's used to create the patch and if you have debian/foo listed there but branched off debian/bar you can end up having quilt trying to apply the same changes twice wich obviously won't work! If there is no topgit around, the include will fail quietly and the build process will use quilt directly, that's what we want on buildds and such -> don't put topgit in build-depends! Changes on master, new upstreams are handled as usual. You simply do an tg summary afterwards, check out the branches marked with an 'D' and do an tg update -- this is more or less the same as an quilt refresh. tg update does merge in the origin branch (that's what is in .topdeps) so everything now works with the changes Pitfalls: ========= I missed the tg remote part on my first run and totaly messed up some time later. As I did not push the mess I tought I'll clone freshly and continue but tg wouldn't recognize the topgit branches. When setting up tg remote however everything should work well. Never simply edit .topdeps. This will result in loads of funny things, e.g., as mentioned above, quilt trying to apply the same change in different patches (when changing from foo/bar to master) or revert the effect of previous patches (if done the other way 'round) Summary: ======== I had the personal impression topgit will ease working on git. you can't forget to quilt add an file before editing, you have readable diffs between revisions of diffs, you do have everything in git and (if you have an serie of depending topgit branches and not more than one based on master) an git branch containing the source as it will be seen by the buildsystem. Switching from git/quilt to git/topgit certainly is not something one can do without learning something new, it *is* different and it has some tricky things around. Switching is, however not an one-way thing. You're back at normal git by deleting the topgit branches and the topgit make snipped as topgit will place the patches and series on the expected places. Reverting back is really an no-brainer. /usr/share/doc/topgit/HOWTO-tg2quilt.gz contains an somewhat decent description on how to work with an package already using topgit (http://www.byteme.org.uk/git.html if you don't want to install topgit, it's quite similar, but not the same) but starting new with topgit certainly should be documented somewhere. Regards Christoph -- /"\ ASCII Ribbon : GPG-Key ID: 0x0372275D \ / Campaign : X against HTML : http://www.debian.org/ / \ in eMails :
Attachment:
signature.asc
Description: OpenPGP digital signature