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