Wednesday, 2011-11-23

*** Joins: kirillka (~Miranda@195.242.142.17)00:33
*** Joins: Davidinc (~Davidinc@213.55.100.134)00:53
*** Parts: Davidinc (~Davidinc@213.55.100.134) ()00:53
*** Quits: giallu (~giallu@fedora/giallu) (Ping timeout: 252 seconds)01:57
*** Joins: Cupertino (~Cupez@62-177-158-122.dsl.bbeyond.nl)02:26
*** Quits: Cupertino (~Cupez@62-177-158-122.dsl.bbeyond.nl) (Changing host)02:26
*** Joins: Cupertino (~Cupez@unaffiliated/cupertino)02:26
*** Joins: giallu (~giallu@fedora/giallu)02:46
*** Joins: soustruh (~Miranda@ip-86-49-121-75.net.upcbroadband.cz)02:52
*** Joins: asm89 (~asm89@unaffiliated/asm89)03:05
*** Quits: dregad (~dregad@wwwgate1.merck.de) (Remote host closed the connection)03:11
*** Joins: dregad (~dregad@wwwgate1.merck.de)03:12
*** Joins: Rixie (~Rixie@188.177.20.182)03:13
*** Joins: dhx1 (~anonymous@60-242-108-164.static.tpgi.com.au)03:27
*** Joins: cerf (~quassel@mcl71-3-78-241-52-239.fbx.proxad.net)03:41
Protogeneshi, is there some real documentation of the source integration plugin i missed?04:51
Protogenesi'm stumbling over the commit function and have no idea when it is called or which data it gets as parameter.. please highlight on response04:51
*** Quits: Cupertino (~Cupez@unaffiliated/cupertino) (Read error: Operation timed out)06:20
*** Joins: Davidinc (~Davidinc@213.55.100.134)06:32
*** Quits: soustruh (~Miranda@ip-86-49-121-75.net.upcbroadband.cz) (Quit: visit http://wormscesky.cz)06:46
Protogenesjreese does a source integration plugin documentation exist? if yes, where?06:50
*** Joins: mgretler (~chatzilla@vpn.rzz.ch)07:33
*** Quits: giallu (~giallu@fedora/giallu) (Ping timeout: 240 seconds)07:43
*** Parts: Davidinc (~Davidinc@213.55.100.134) ()07:50
*** Joins: giallu (~giallu@fedora/giallu)07:56
*** Quits: mgretler (~chatzilla@vpn.rzz.ch) (Ping timeout: 244 seconds)08:24
*** Joins: soustruh (~Miranda@193.85.226.67)08:33
*** Quits: dhx1 (~anonymous@60-242-108-164.static.tpgi.com.au) (Read error: Connection reset by peer)08:54
*** Quits: kirillka (~Miranda@195.242.142.17) (Quit: kirillka)09:00
*** Joins: mgretler (~chatzilla@vpn.rzz.ch)09:32
*** Quits: FrankZZ (~FrankZZ@unaffiliated/frankzz) (Quit: FrankZZ - http://wammes.org)09:54
*** Joins: FrankZZ (~FrankZZ@unaffiliated/frankzz)10:02
*** Quits: Rixie (~Rixie@188.177.20.182) (Quit: Rixie)10:20
*** Joins: Rixie_ (~Rixie@188.177.20.182)10:25
*** Quits: mgretler (~chatzilla@vpn.rzz.ch) (Ping timeout: 244 seconds)10:32
*** Joins: mgretler (~chatzilla@vpn.rzz.ch)10:35
*** Quits: mgretler (~chatzilla@vpn.rzz.ch) (Quit: ChatZilla 0.9.87 [Firefox 8.0/20111104165243])11:32
*** Quits: asm89 (~asm89@unaffiliated/asm89) (Quit: bye!)11:45
*** Quits: giallu (~giallu@fedora/giallu) (Ping timeout: 240 seconds)12:11
*** Quits: soustruh (~Miranda@193.85.226.67) (Quit: visit http://wormscesky.cz)12:27
*** Quits: cerf (~quassel@mcl71-3-78-241-52-239.fbx.proxad.net) (Remote host closed the connection)13:32
*** Joins: soustruh (~Miranda@ip-86-49-121-75.net.upcbroadband.cz)13:40
jreeseProtogenes: sorry, no, there's no documentation for that other than what's on my website/blog at http://noswap.com14:04
Protogenes:( too bad14:04
Protogenesbecause it isn't as self-explanatory as you might think.14:05
Protogenesi want to write a bitbucket Hg plugin :(14:05
jreeseand sorry for the delay in responding, I'm in temporary housing until I can finally move into my new place this weekend, so I don't get to check my IRC session much14:05
Protogenesnot a problem, i'm very patient14:05
Protogenesbitbucket has a post service. but i don't see how i can all this working14:06
jreeseProtogenes: yeah, proper documentation is one of my long-term goals for the project that never materialized because I just haven't had the time14:06
Protogenesdocumentation is always an orphan14:07
jreeseit's a bit dated, but http://noswap.com/blog/integrating-source-control-with-mantisbt/ has some basic details, and you should be able to look at the existing plugins as a guide, esp the Github plugin14:07
Protogenessomeone else who has some time and give me a hand by answering questions till i get this running?14:07
Protogenesjohn i read all 4 posts about source integration and looked at gitweb and github plugins. and i'm think i'm a good programmer. but i still don't understand all of it. and i don't feel like digging through the main plugin code :/14:09
jreeseProtogenes: if you can catch dhx when he's around, he had started on his own hg integration plugin, so maybe he has some tips, otherwise you can ask me about anything you're having troubles with14:09
Protogenesi read i can get changes pushed to source integration. what function of the plugin handles those?14:10
jreeseprecommit() and commit() are the two methods related to that...14:12
Protogeneswhat is the $data parameter they recieve?14:12
Protogenesand why are there two of it?14:12
jreeseprecommit() is only needed if the posted data doesn't match the format source integration is expecting14:12
Protogenesthe question at this point... which format is it expecting?14:13
jreesecommit() is used to handle the actual data gathering after source integration knows what repository/vcs the post is meant for14:13
Protogenesok14:13
Protogenescommit is for push. alright14:13
Protogeneswhat is the $data param?14:14
Protogenesi guess it is the data that gets posted to the php?14:14
jreeseyeah14:15
jreesehttps://github.com/mantisbt-plugins/source-integration/blob/master/Source/pages/checkin.php14:15
jreeseyou can see the interaction between precommit() and commit() in that flow14:15
jreeseit's a bit ugly, but I hope it shouldn't be too hard to follow14:16
Protogenesokay precommit gets called for all registered VCS... that event there. and it should handly unmatching data format...14:17
*** Joins: Ragnor_ (~Ragnor@dslb-188-100-035-241.pools.arcor-ip.net)14:18
Protogenesand it should make it an array of "repo" => the name; and "data" ... some data?14:18
jreeseright, and data in this context is "whatever the plugin needs in order to know what to fetch/import"14:19
Protogenesokay14:19
Protogenesi also noticed the system uses a database table to store already imported changesets?14:20
jreeseyes14:20
jreesethat way it can store everything in a generic format14:20
Protogenes"generic format" .. describe:P14:20
Protogenesis it plugin defined or defined by source integration plugin itself14:21
*** Quits: Ragnor (~Ragnor@dslb-092-072-243-163.pools.arcor-ip.net) (Ping timeout: 276 seconds)14:21
jreesedefined by the main plugin starting here: https://github.com/mantisbt-plugins/source-integration/blob/master/Source/Source.API.php#L55314:21
jreeseSourceRepo, SourceChangeset, and SourceFile14:22
jreeseI tried to design the format to account for all types of VCS, including SVN, Git, and Hg14:23
Protogenesah right i somewhere saw the new SourceChangeset(...)14:24
Protogenesso i have to call save and then it gets stored to DB14:24
jreeseyou don't need to call save() yourself, your plugin should return an array of changesets back to the framework, which will post-process and save them for you14:25
Protogenesah okay14:25
jreesehmm, maybe you do...14:25
Protogenesam i lucky bitbucket provides a json api14:25
jreesebeen so long :P14:25
Protogenesokay last question so far... how do i know which is the last changeset known to source integration.. so i know how much i have to import14:26
jreeseok, yes, you do not need to save them, the post-processing will do that14:27
jreesethe way I did that in Github plugin was to take the tip changeset, and use SourceChangeset::exists() to see if that changeset is already imported14:30
jreeseif it's not already there, import it, and walk to that commit's parents, and repeat until I find changesets that are already in the db14:31
Protogenesi hope i figure that out.. i'm new to Hg too. just moved there with a project and setup bugtracker and stuff14:32
jreeseah, then good luck :)14:32
jreesethe Github plugin is using Github's json API to pull in data, so you might be able to follow it pretty closely, considering how much Git and Hg share in architecture14:33
Protogenesyep14:34
Protogenesjreese where do i point the post service to? i believe i read it somewhere but can't remember14:50
jreeseplugin.php?page=Source/checkin14:55
jreeseadding &repo_id=X allows you to get by without a precommit14:55
Protogenesid is database id?14:57
Protogenesi will just copy most of the github plugin. as it seems to match quite well14:57
Protogeneswhat is that api token story about?14:59
Protogeneshow can i benefit from it?15:00
Protogenesor is it to get data FROm github?15:00
*** Quits: soustruh (~Miranda@ip-86-49-121-75.net.upcbroadband.cz) (Quit: visit http://wormscesky.cz)15:11
*** Joins: asm89 (~asm89@unaffiliated/asm89)15:16
jreeseProtogenes: originally, source integration used the IP to authorize remote commits, but with services like Github, the IP is part of a large block of addresses they use, so you add the API key to the Github service hook, and that authorizes the commit15:56
jreeseeg, go to Source Integration -> Configuration, and you can specify there what you want the API key to be, and then the remote vcs needs to send that API with the initial POST data to authorize the connection15:57
Protogeneshow do i add it? somehow to the  plugin.php?page=Source/checkin ?15:58
jreeseright, it should be something like &api_key=whatever15:58
Protogenesokay.. api_key15:59
Protogenesthx15:59
jreeseyw15:59
asm89jreese: i wasn't able to hunt it down, but i couldn't get source integration to work with github16:00
Protogenesjreese i found the code for configuring the api_key in SourceGitHub ... but nowhere is it checked. is this done by source itself somehow?16:00
jreeseasm89: yeah, there's something preventing the checkins from working with github atm, but I haven't been able to track it down since I'm in the middle of moving16:01
jreeseProtogenes: yes, it's done by the framework in pages/checkin.php16:02
Protogenesah okay16:02
asm89jreese: ah ok, so i'm not the only one16:04
jreeseasm89: if you know how git-bisect works, you might be able to track it down by using the "test service hook" feature from Github16:04
asm89jreese: but i checked, but gave up after quite some debugging16:04
jreeseor at least, if it's caused by something on the plugin's side16:04
asm89i know how that works, but i'm unsure how you'd use it with the test thing :p16:04
asm89i don't remember what i found, but it was quite weird16:05
jreeseyou can run git-bisect in a manual mode, where you tell it each time if the commit is good or bad16:05
jreesein the github repo's admin panel, under service hooks, you can trigger a "test" of each service hook16:06
jreeseit would be quite a bit of work, but it would be possible16:06
*** Joins: Paul24 (~IceChat09@2001:470:9310:aaaa:fd3d:55c8:1cc:14af)16:18
Protogenesjreese another question. can users map their git usernames to mantis usernames?16:24
jreeseProtogenes: by default, it tries to match the logged email address and real name to the user data in Mantis...16:25
Protogenesah okay16:25
Protogenesthank you16:25
Protogenesthat shall be sufficient16:25
jreesebut it also adds a property to the user's profile/settings page that allows them to specify a user account for source control if it's different from their Mantis account16:26
jreeseeg, in svn if their commit username doesn't match their Mantis username16:26
Protogenesawesome16:27
jreesethe framework is there to do all the tedious things that apply to all vcs systems :P16:27
Protogenesi was wondering if and how16:28
Protogenesi hope it doesn't collide with my forum login integration XD16:28
Protogenesi'm done with the logic for bitbucked.. i'm writing the payload functions now....16:28
Protogenesi will hand it to you after that16:28
jreesesounds good, best thing would be to create a pull request in Github, and if you don't mind, submit a feature request on my bugtracker linking to that pull request, and I'll get to it as soon as I get the time16:30
Paul24lo john16:30
jreesehi Paul16:33
jreesehow's it going?16:33
Protogenesjreese i hope i figure out how to do that. Hg is new to me.. and never used git. and hg is more userfriendly16:35
jreeseProtogenes: if you "fork" the repo on github.com, make a new branch and push that to your fork, the github web ui should make it easy to send a pull request16:36
Protogenesalright16:36
jreesealternately, Github makes an hg plugin that allows you to interact with Github using your normal Hg client16:36
jreesehttp://hg-git.github.com/16:37
Protogenestoo much input at the moment :D16:39
jreeselol, no worries16:39
jreeseyou can always just attach it to a feature request the old fashioned way if you prefer16:40
jreeseor email it to me, or something16:40
Protogenesfirst finish, then try, then debug, then swearing, then get it working, then sending it to you....16:43
jreese:)16:43
Protogeneslet's try :S17:23
Protogeneshm didn't work17:26
Protogenesjreese most important question.. how do i debug it?17:26
jreeseProtogenes: it's not easy =\17:27
Protogenesit's not C17:27
Protogenesokay17:27
Protogenesi noticed i have to create a repository in mantis17:28
Protogenesshould my custom fields show up there?17:28
Protogenesupdate_repo_form17:28
jreeseany debug you do will have to either be print/echo to screen, or outputting to a log file17:28
jreeseyes17:28
Protogenesdoesn't :/17:28
Protogenesi noticed the Type string is truncated17:28
Protogenesmight that be the blocker?17:29
jreeseProtogenes: your plugin needs to declare a "type string" that it handles, eg "github" for the Github plugin, you might want to set yours as "bitbucket", and then when you create a repo in mantis, you need to select that type17:29
Protogenesi did that17:30
Protogenesit was shown nicely in the create dialoge17:30
jreeseok17:30
ProtogenesBUT in the update repository it was truncated to HqBitBuc17:30
Protogenesi assume you do a string match to find the correct class....17:30
jreesehmm17:30
Protogenesi will use smth shorter17:31
jreeseah, apparently I decided that nobody would need a type string longer than 8 characters... =\17:31
Protogenesonly 8 letters...17:31
Protogenesyes that might be why you used a show_type() function for the visible string ^^17:32
jreeseif only I could go back in time and smack myself three years ago...17:32
Protogenes:D17:33
Protogenesnow it works ^^17:33
jreesecongrats :)17:33
Protogenesi hope it won't explode when i click "Import Everything" :D17:34
jreesesame here, I'd hate to lose the only person willing to implement hg integration :P17:34
ProtogenesXD17:34
Protogenesfatal error... something i can deal with :D17:35
jreesecool, good luck on debugging it all; a decent logging/debugging system is yet another feature that's been on the back burner for years...17:35
Protogeneswell.. that should be part of php itself. well could setup a local server. but toooo lazy17:36
Protogenesyou know i never wrote php before? haha17:37
Protogenestons of errors forgetting the $this-> on function calls -.-17:37
jreesewhat a way to learn php.... O.o17:37
Protogenesit looks like C... so no problem17:40
Protogenesonly thing annoying is the convention in mantis to put p_ or t_ in front of paramters or locals17:41
jreeseyeah, I've never liked that either; just put up with it to stick with existing code17:41
Protogeneshmm firefox wheel spinning for 4 minutes by now17:42
Protogeneslooks like it is actually doing smth17:42
jreeseProtogenes: it helps to test on a smaller repo so you actually get results quickly :P17:43
Protogeneshmm17:43
Protogeneswhy isn't there a working single site login addon for mantis + simple machines forum -.-17:44
Protogenes"Imported 0 changesets, 0 files, and 0 bug references." dammit17:45
*** Joins: soustruh (~Miranda@ip-86-49-121-75.net.upcbroadband.cz)17:51
jreeseProtogenes: if you're not returning the SourceChangeset objects at the end of your methods, it won't be counting them17:52
Protogenesi do17:52
*** Quits: FrankZZ (~FrankZZ@unaffiliated/frankzz) (Quit: FrankZZ - http://wammes.org)17:52
*** Joins: FrankZZ (~FrankZZ@unaffiliated/frankzz)17:53
Protogenesokay found the mistake.... forking typo -.-17:53
Protogeneshas php something like option explicit that forces me to define all used variables?17:53
jreeseif you change your mantis config to display infos and warnings, php should let you know if you're using a variable that you haven't yet initialized17:55
Protogenesjust put error_reporting(E_ALL); in my file :D17:55
jreeseor that17:56
jreesejust don't leave that in ;)17:56
Protogenes:P17:56
Protogeneswhat kind of regular expression does Source integration use?17:57
jreesepcre17:58
Protogenes_     /i, ?:, and such expressions i have never seen before17:58
Protogenesah i guess / <regex> /option    or smth?17:59
jreesebasically18:00
jreese /i is for case-insensitive18:00
jreese?: is for an non-capturing group18:00
Protogenesnon-capturing == non-greedy?18:01
jreeseno18:02
jreesenon-greedy is something like *? or .?18:02
jreese+? even18:02
jreesenon-capturing meaning it doesn't grab the matched text inside the parentheses like it normally would18:03
Protogenesyou mind to explain?18:03
Protogenesahh okay18:03
jreeseeg, it doesn't create a back ref18:03
Protogenesit doesn't get a number XD18:03
jreesethat18:03
Protogenesalrighty18:03
Protogenesi hope i didn't cross the balmer peak - level yet18:04
jreeselol18:04
Protogenesi am happy that i'm not the one who has to defend his final thesis tomorrow XD18:05
asm89also note the use of ## instead of the // that you see overall18:06
Protogenessorry.. i'm waiting for the import everything18:06
Protogenesasm89 in manbtis source?18:06
asm89in the source integration plugin if i recall correctly18:07
Protogeneshmm i used # as well18:07
Protogenescompiler ignores my comments anyway :((18:07
Protogenesor interpreter in the case of php18:08
Protogenesoh well when i have the chance to ask 2 persons here... i have a mediawiki and a mantisbt (almost) running on my web. i read smth about mantis supports mediawiki _somehow_ what can it do and how?18:09
Protogenesjreese this is not good.... APPLICATION ERROR #018:13
ProtogenesAn error occurred during this action. You may wish to report this error to your local administrator.18:13
ProtogenesPlease use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.18:13
asm89i gtg now, good luck Protogenes18:13
Protogenesi guess i will include a cut on 200 changeset like you did18:14
jreeseProtogenes: app error 0 is the generic error triggered somewhere in the plugin code18:23
*** Quits: asm89 (~asm89@unaffiliated/asm89) (Quit: bye!)18:23
Protogeneshmm18:23
jreeseif you enable detailed error display in your mantis config, you'll get a full stack trace18:23
Protogenesplease tell me where :d18:23
jreese$g_show_detailed_errors = ON;18:24
*** Quits: Paul24 (~IceChat09@2001:470:9310:aaaa:fd3d:55c8:1cc:14af) (Quit: IceChat - Its what Cool People use)18:26
ProtogenesSourceChangeset->save :)18:27
jreeseClass::static_method() or $object->method()   ;)18:28
Protogenesline 275 XD18:29
Protogenesi have no idea18:29
jreesesave() is an instance method, so you would need to run it on the object itself, like $t_changeset->save()18:30
Protogeneswww.protogenes.de/plugin.php.htm jreese18:31
*** Quits: Protogenes (~Protogene@cmnz-4db37a46.pool.mediaWays.net) (Read error: Connection reset by peer)18:31
*** Joins: Protogenes (~Protogene@cmnz-4db37a46.pool.mediaWays.net)18:31
Protogenesthat was a reconnect oO18:31
* jreese will look in a moment18:31
jreeseProtogenes: ah, you aren't setting the changeset->repo_id18:35
Protogenesi'm setting it when constructing18:35
Protogenesi would... if i had types rop instead of repi -.-18:36
Protogenes*repo18:36
jreesewell, that stack trace is triggered because the repo_id==0 :P18:36
Protogenesit worked!18:39
jreesecongrats :)18:40
Protogenesjreese what is the wiki integration? what can it dow and how and where do i get the php's for it? it's not on mantisforge :/18:42
jreeseProtogenes: most of the wiki integration is already part of mantisbt core18:43
Protogenesi have my own mediawiki running. i'm just wondering what it can do18:43
jreeseand more or less, it's just a way to automate linking from projects/bugs into associated articles on a wiki18:44
Protogenesyeah that would be okay18:44
Protogenesusing wiki markup in mantis? no i guess18:44
jreeseeg, if you look on mantisbt.org/bugs there are wiki links that take you to a url based on the projcet/bug you're looking at18:44
jreesedoesn't include special markup, and doesn't include user integration18:45
Protogenesi did userintegration for mantis myself -.-18:45
Protogenesjust copy users from forum to mantis db XD too lazy to parse the forum cookie18:45
jreeseit is possible, with some custom coding, to get Mediawiki to use Mantisbt for user auth, but that's completely separate from what mantsibt does18:45
Protogenesi have mantis, SMF and mediawiki... SMF is the userdatabase (because i forum has the most complete possiblities for user management)18:46
Protogenesmediawiki and mantis use the SMF user table18:47
Protogenesaccess levels are managed by forum groups18:47
jreeseideally, the wiki integration should add some simple markup to make links to the wiki, but that just hasn't been implemented18:48
Protogeneshm okay. so it isn't much better than normal links?18:48
jreesethe only difference is that it adds links in the menu18:49
Protogenesokay i might dig into that later :D18:49
Protogenesjreese mind to tell me your mail address. i'm going with that way :D18:51
jreeseyou should be able to do just about anything you want using a plugin and the built-in events, or maybe by getting a bit creative with some javascript loaded by your plugin :P18:51
jreesejohn@noswap.com18:51
Protogenessent18:54
*** Quits: soustruh (~Miranda@ip-86-49-121-75.net.upcbroadband.cz) (Ping timeout: 260 seconds)18:55
Protogenesdamn, forgot to remove the debug echo18:55
jreesethanks, I'll look over it when I get moved into my new apartment and get my desktop delivered18:56
Protogenes:)18:56
Protogenesmoving is fun lol18:56
Protogenesdid that quite some times...18:56
*** Quits: sdfjkljkdfsljkl (~sdfjkljkd@static.96.23.63.178.clients.your-server.de) (Remote host closed the connection)19:00
*** Joins: sdfjkljkdfsljkl (~sdfjkljkd@static.96.23.63.178.clients.your-server.de)19:00
Protogenesdone for today... movie :D19:00
ProtogenesV for Vendetta19:00
jreesecheers19:00
Protogenesgood luck with your move... 10% casualties are usual :D19:01
jreesethanks :)19:01
Protogenesand thanks for your help :)19:03
jreeseanything to help someone donating code :)19:03
Protogenesokay stupid question... how do i add categories?19:06
Protogenesahh gfound19:06
Protogenesper project XD19:06
jreeseyou can add global categories from the project management page too ;)19:06
Protogenescan i delete the "general" category?19:09
jreeseyes19:09
*** Joins: mantisbt_88803 (ca592841@gateway/web/freenode/ip.202.89.40.65)19:10
*** Quits: mantisbt_88803 (ca592841@gateway/web/freenode/ip.202.89.40.65) (Client Quit)19:10
Protogenes:) doen19:11
Protogenesdone19:11
Protogenesokay i think i'm happy so far :D19:12
Protogenesone last thing... why is the "Upload File Path" field empty for the project.19:23
jreesethat's only needed if you choose to store attachments on disk, and want to keep them outside the normal upload path19:24
Protogeneson creation it was filled in with a full filesystempath19:24
Protogenesso if it is mantis/default19:24
Protogenesit isn't filled. okay19:24
Protogenesmantis/upload -.-19:25
Protogenesballmer peak was a while ago XD19:25
jreesehehe19:25
Protogeneswhy does everyone know xkcd? XD19:27
Protogenesjreese still a problem found -.- precommit doesn't get called... but i'm going to bed now, will look into it tomorrow.21:31
*** Quits: Protogenes (~Protogene@cmnz-4db37a46.pool.mediaWays.net) (Disconnected by services)22:41
*** Joins: Protogenes (~Protogene@cmnz-4db37531.pool.mediaWays.net)22:48

Generated by irclog2html.py 2.10.0 by Marius Gedminas - find it at mg.pov.lt!