18:59:36 #startmeeting 18:59:36 Meeting started Sun Aug 7 18:59:36 2011 UTC. The chair is dam. Information about MeetBot at http://wiki.debian.org/MeetBot. 18:59:36 Useful Commands: #action #agreed #help #info #idea #link #topic. 18:59:51 #topic Debian Perl Group | Git training session | telnet termcast.org 19:00:05 here we go 19:00:13 hello everybody! 19:00:36 o/ 19:00:43 \o 19:00:45 \o/ 19:00:56 o/ 19:01:01 o/^ 19:01:45 please be patiant with me as this is the first event of such sort I make. all glitches/faults are solely mine 19:02:54 I'll try to show a certain workflow as an excersise of working with Git for maintaining a pkg-perl DEbian package 19:03:34 for this session, I have a simple goal, preparing a stable update fixing #636505 19:04:55 you can watch my terminal by running 'telnet termcast.org' and selecting the obvious 19:05:27 the bug is already fixed in sid, which makes things easy 19:06:21 however, for extra git fancyness, I'll show how to cherry-pick the fixing commit from the upstream repository 19:07:16 according to the link in the bug log, kindly posted there by gregoa, the address is git://git.code.sf.net/p/mail-imapclient/git 19:07:36 so we first add that as a 'remote' repository 19:08:23 that was easy, but it doesn't really do anything. to retrieve the meat we need to 'fetch' it 19:08:26 hm, the termcast showed only parts for me 19:08:40 (it doesn't scroll or simething) 19:08:44 mistaching term size ? 19:08:55 that seems likely... 19:09:11 80x24 should be it 19:09:45 gregoa: still bad? 19:10:07 can you type something again? I've made the window floating now 19:10:44 looks better 19:10:49 80 col is fine here, but your long prompt make commands harder to read 19:11:04 the cyrillic text means 'command not found' 19:11:20 dodathome: suggestions? I really like the coloured part 19:11:43 how about a wider term ? eg 120 19:11:46 FWIW, in my term, commands wrap (and overwrite) the same line 19:11:55 I'm seeing this as the prompt: dtp0:~/work/pkg-perl/git/packages/libmail-imapclient-perl master= $ 19:11:59 everyone fine with 120 columns terminal? 19:12:50 cool 19:13:02 seems to work 19:13:23 okay, will drop the remote and re-add, should be quick 19:13:41 oops 19:14:03 now, the fetching 19:14:40 the 'no common commits' part is normal, meaning that the local repository shares no commits with that remote. 19:15:08 sharing commits means the two repositories have (or had at some point) common history 19:15:30 since we never branched from their repository, we have nothing common with them (in the Git sense) 19:15:33 which means a commons sha1 for some stuff ? 19:15:49 I guess so :) 19:15:54 yes 19:16:08 cool 19:16:32 now, according to the bug log, the commit we want is 62973f8c02c567b82ddc132e2c291ab72da5bfb2 19:16:48 I'll 'cherry-pick' 19:17:33 yuck, conflicts. 19:17:39 hmpf, I again missed the command 19:17:42 why your promit changes to CHERRY-PICK? 19:17:51 because of the conflict 19:17:54 ah ok 19:18:23 in any case we need to apply that commit to the package in stable, so I'll back up 19:18:32 not a criticism, but I find it hard to control the urge to type on the termcast screen :-) 19:18:42 :) 19:18:54 sit on your hands ;-) 19:19:06 haha 19:19:39 first, we create a branch for the stable update. I think naming it 'squeeze' is ok. any other suggestions? 19:19:49 (could someone please paste the cherry-pick command again?) 19:19:58 git cherry-pick 62973f8c02c567b82ddc132e2c291ab72da5bfb2 19:20:04 hvala! 19:20:32 wrapping is probably somewhat terminal-specific (gnome-terminal here) 19:21:04 ok, let it be 'squeeze' I guess 'squeeze-updates' could do too 19:21:20 as a shortcut, here's a way to both create a branch and switch to it 19:21:35 co is an alias 19:21:48 oops, I have to find the tag to branch from 19:22:06 shouldn't there be a tag? 19:22:09 git tag -l 'debian/*' 19:22:24 but we need to know what's in squeeze 19:22:30 yes, but I don't remeber which version is in squeeze :) 19:22:38 okok 19:22:57 it seems 3.25-1 is what we need to branch from. let's do it (finally!) 19:23:30 tada, we have a branch containing the state of the package in squeeze 19:23:51 (for the log) the command to do it is git co -b squeeze debian/3.25-1 19:23:58 'debian/3.25-1' is just a tag ? or is there more semantic ? 19:24:06 just a tag 19:24:16 can be anything git recognises as a commit 19:24:23 ok 19:24:35 e.g, another branch name, a hash 19:24:51 now, the cherry-pick 19:25:12 git cherry-pick 62973f8c02c567b82ddc132e2c291ab72da5bfb2 19:25:28 funny to grab a hash from somewhere elese :) 19:25:46 does git log show the merge? 19:25:47 I sometimes like to use -x option 19:25:54 it is much easier to do it woth a GUI tool, like gitk 19:26:11 it's not a merge 19:26:34 ah you are right 19:26:35 cherry-pick is very simple, it just copies a patch 19:26:36 for example, I could use 'gitk upstream-git/master', then select the commit 19:26:45 right-click it and select 'cherry-pick' 19:27:00 looks like a simple commit in the squeeze branch, right? 19:27:06 right 19:27:32 admittedly this is not what we really want. a modified upstream sources, we don't do this, right? 19:27:35 + :) 19:27:49 we want a patch to add to debian/patches 19:28:02 that would be the first 19:28:50 I'll reset the squeeze branch to what it was before the cherry-pick 19:28:57 and then will create a patch from that commit 19:29:21 that's really easy. 'git show' shows a nice, commented patch when asked to show a commit 19:29:53 tig confirms we are at debian/3.25-1 19:30:46 my default 'show' options only include a one-line commit message 19:30:58 I want the full details for the patch though 19:31:18 that's better 19:31:34 now, let's save this as a patch 19:31:43 or git format-patch -1 19:31:51 the whole commit or only parts of it? 19:32:15 bremner_: what would that do? :) 19:32:28 create a 0001-3.26_01-rt.cpan.org-60045-Logout-error-if-delay-betw.patch file 19:32:57 even after the reset? or should I give it the hash? 19:33:05 give it the hash 19:33:08 git format-patch -1 62973f8c02c567b82ddc132e2c291ab72da5bfb2 19:33:27 great. -1 is for limitting to only one commit, right? 19:33:32 yes 19:33:55 cool. do not let a day pass without learning something new :) 19:34:33 now, to gregoa's question. we only want the changes in the patch that really fix things for the stable package. Changes is probably out of the game 19:35:45 it feels a bit awkward to edit the patch, breaking the hash sum, but I think I can make it nice in the end 19:36:20 a hunk changing the version. not for a stable update IMO 19:36:41 hm, is there no such think as apply-interactive ...? ok, we want our patch file to be nice. 19:37:08 there is 'git add -i' 19:37:22 why not cherry-pick -n (not commit) and use git checkout to revert some files? - and then git diff > debian/patches/foo.patch? 19:37:49 you know perl? Git has something similar: TIMTOWTDI :) 19:37:58 hehe, yes :) 19:38:34 I'll keep editting the patch, making it suitable for an ordinary quilt patch of ours 19:39:16 actually, that's it. I am not famous for following that DEP very closely :) 19:40:03 hmm, you could use quilt import 19:40:06 adding the debian bug number is probably a good idea too 19:40:19 dodathome: I could, yes :) 19:40:27 okok 19:41:30 120x24 here 19:41:42 you remove '6' instead of '#' 19:41:44 dam: Bug-Debian without the # 19:41:55 (dam fooled looking at backlog for bug number) 19:42:01 thanks! 19:42:32 RT is such a bad thing with no easy to remember URLd :( 19:42:50 https://rt.cpan.org/Public/Bug/Display.html?id=60045 19:42:55 luckily, the BTS ... riiight! 19:43:13 looks OK? 19:43:34 can't config-edit check DEP5? := 19:43:50 if you pull from mercurial, yes :p 19:44:07 gregoa: have the command line handy? 19:45:01 dam: --> dodathome 19:45:22 I'll test if the patch applies in the mean time 19:45:34 yay! 19:45:37 you can check the whole dpkg file with 'config-edit -appli dpkg -ui none' 19:45:54 But DEp5 checks is not released yet 19:46:07 you forgot -ui none 19:47:17 the last warning is normal\ 19:47:43 akay, there are things relevant in general, but I'll ignore them for this stable update 19:47:55 now you could run the same command with '-apply-fixes' 19:48:06 emphasis on 'could' 19:48:22 for sid, certainly :) 19:48:23 may be later ;-p 19:48:49 I guess there is nothing git-specific from this point on. 19:49:06 the patch is there, it applies. ah, building the package could be useful 19:49:15 hmm, git-build package and taggin ? 19:49:38 I have a script that builds for me, not git-buildpackage :/ 19:49:57 for doing the stable update we anyway have to simply only do the changes for the bug fix :) 19:50:11 building from the right branch is interesting 19:50:43 the script I use builds from what is in ./ 19:50:55 that was my assumption :) 19:50:56 no VCS cleverness at all :) 19:51:28 git-buildpackage --git-debian-branch=squeeze maybe 19:51:43 left as an excersise for the reader :) 19:51:46 well, it probably needs to know 19:51:49 what is upstream too 19:52:07 it would be good to work out for our "branch instructions" 19:52:11 stupid sudo 19:52:36 "git-buildpackage --git-debian-branch=squeeze" looks good so far. 19:52:59 just that it of course uses the sid chroot now, but that's a problem of my build setup :) 19:53:26 I refuse to type that password on a termcasted terminal :) 19:53:36 heh :) 19:53:37 dam I don't think we'll see your passwd. Type some dummy char to make sure 19:53:38 xD 19:53:51 dodathome: and the server? 19:54:06 just makes me freak, can't help it :) 19:54:07 it'll just forward what's sent to us 19:54:20 dam: I understand :-) 19:55:12 I am trying to force me access via sudoers 19:55:32 oh, seems I don't need --git-debian-branch=squeeze, because I always export the WC in gbp \o/ 19:55:44 even better 19:56:02 now the environment. bummer :( 19:56:19 dam: 19:56:19 User_Alias FULLTIMERS = dam 19:56:19 FULLTIMERS ALL = NOPASSWD: ALL 19:57:04 Defaults!PBUILDER setenv 19:57:13 where PBUILDER is an Cmnd_Alias 19:57:44 gregoa: can you paste the alias too? 19:58:04 Cmnd_Alias PBUILDER = /usr/lib/pbuilder/pbuilder-satisfydepends, /usr/sbin/pbuilder, /usr/bin/debuild-pbuilder, /usr/sbin/cowbuilder, /usr/sbin/qemubuilder, /usr/bin/pdebuild-cross 19:58:19 ah bit, ehm, long, and historically grown :) 19:58:30 that's full 4 lines or one long? 19:58:35 one long 19:59:17 (and no guarantees that that's the correct way to deal with sudo and environment) 20:00:41 (visudo warned about errors in sudoers, caused by a typo on my side) 20:00:49 seems to be building 20:00:55 good :) 20:01:09 but hehe, we want a changelog too :/ 20:01:47 and the tagging is just "git tag debian/3.25-1+something"? 20:02:00 probably 20:02:33 hm, is dch really missing an option for p-u? 20:02:50 seems like it :( 20:03:07 p-u ? 20:03:09 clive --> debian/2.2.13-5+squeeze2 20:03:19 dodathome: *-proposed-updates 20:04:22 oops, I gotta go and meet a friend. thanks a lot so far, and I'll be back later 20:04:27 gregoa: thanks, 20:04:31 pkg-perl 03ansgar 05signed tags f02d536 06clive 03debian/2.2.13-5+squeeze3 20:04:32 pkg-perl tagging version debian/2.2.13-5+squeeze3 20:04:32 pkg-perl tagged commit: 3167154 20:04:36 gregoa: see you soon! 20:04:49 speaking of stable updates :) 20:05:14 I just saw you mention it ;) 20:07:26 now it is better 20:07:46 so, that's it. build again... 20:08:51 some lintian checks can't hurt 20:09:08 seems sufficiently ok 20:09:42 so now, build and update as usual and that's it. 20:09:55 I use 'debcommit -a -r' for tagging, so nothing fancy there too 20:10:27 maybe git diff --stat before the mega-commit 20:10:51 wmega-commit? I just had 'git diff' 20:11:12 ooh, sorry, my bad 20:11:37 just a knee-jerk reaction to "commit -a" 20:11:44 :) 20:12:13 do stable uploads still require coordination with stable release managers? (sorry, labe question) 20:13:12 *lame 20:13:41 yes: Before uploading a package to proposed-updates ,., mail is sent to debian-release@lists.debian.org explaining why these bugs should be fixed in stable (oldstable) via a point release and include a diff against the version in stable/proposed-updates (oldstable/oldstable-proposed-updates) 20:13:55 see http://www.debian.org/releases/proposed-updates 20:14:06 reportbug release.debian.org even has a template for the mail. 20:14:32 dodathome: thanks! ansgar thanks! so this seems to go outside of the subject we have :) 20:14:47 time for questions? 20:15:36 * dodathome needs to practice 20:16:22 maybe a team upload notice? 20:17:00 that's certainly part of our group policy :-) 20:17:13 Q: what was the command you used to revert the cherry-pick (without git-revert)? 20:17:37 bolangi: 'git revert' creates a new commit, containing the reversal of a given commit 20:17:52 I remember something HEAD ^ 20:17:55 this is good when the commit you want to revert is already public, i.e. pushed 20:18:30 Q: How do you get the git related prompt on your term ? 20:18:37 what I used was a nicety git has, resetting the state of the working directory to the state it was in when a given commit was on the top of the history 20:18:38 I'll look over the termcast again (somehow I used a term without scroll back) 20:18:57 bolangi: it was 'git reset --hard HEAD^' 20:19:22 bolangi: --hard means 'lose any changes' and HEAD^ means "the previous commit" 20:19:33 dam, Wouldn't HEAD~n where n is the number of commits back work as well? Albeit at the expense of causing a split in the tree. 20:19:51 so in plain English: 'reset my tree to the state it was one commit ago, and wipe any change I've made since that' 20:20:16 hlieberman: probably (not sure about the syntax now), but HEAD^ is a handy shortcut to the "previous commit" 20:20:29 dam: great! I'll have fewer stupid reverts in my trees now. :-) 20:20:58 bolangi: just remember not to do this with commits you have already puvlished (a.h.a. pushed) 20:21:27 dodathome: there is a __git_ps1 thing floating in the net. I think I got it from guthub 20:21:43 dam: ok, I'll find this 20:21:54 dam: right 20:22:05 I modified it a bit and will modify it more in the future, for example to colour the branch in red of the tree is dirty (instead of adding * to the prompt) 20:22:32 I used zsh before and the git prompt snippet I've found for it was quite nice too 20:22:53 yeah, I think I started with madduck's zsh prompt 20:23:03 the prompt help is very important. otherwise you can easily get lost what branch you are working on 20:23:28 heartfully agreed 20:24:09 http://sitaramc.github.com/2-command-line-usage/souped-up-bash-prompt.html 20:24:10 more questions? 20:24:22 Q: config-edit... what package is that in? 20:24:31 libconfig-model-perl 20:24:44 config-edit is domain of dodathome :) 20:25:00 you can also work interactively when you install libconfig-model-tkui-perl 20:25:07 #link http://sitaramc.github.com/2-command-line-usage/souped-up-bash-prompt.html 20:26:18 See also http://sourceforge.net/apps/mediawiki/config-model/index.php?title=Using_Config-Model 20:26:34 #link http://sourceforge.net/apps/mediawiki/config-model/index.php?title=Using_Config-Model 20:27:36 thanks everybody for attending. sorry for the hiccups :) 20:27:40 #endmeeting