Saturday, 2009-03-28

../irclogs/#mantishelp.2009-03-28.log
--- scribe started ---00:00
nuclear_eclipsesiebrand_alt: you there?01:38
dhx_mhi03:28
nuclear_eclipsehowdy03:28
dhx_mI was just wondering if someone could help me understand git usage a little better03:28
dhx_mI've setup a mantis fork @ http://git.mantisforge.org/w/mantisbt/dhx.git03:28
nuclear_eclipseI can try :)03:29
dhx_mwhich is set to push mode03:29
dhx_mI guess I need to clone (?) that empty repository to my local computer03:29
dhx_mas per http://docs.mantisbt.org/master/en/developers/dev.contrib.clone.html03:29
dhx_mand then checkout the mantis-git master to my local branch03:30
dhx_mand commit those changes to my own branch?03:30
nuclear_eclipseno, you need to clone the official repository, and then push to your private fork03:30
dhx_mso my "working copy" is the official repository?03:31
dhx_m(I come from an SVN background... but desperately want to get up to speed on git because the theory behind it is much superior)03:31
nuclear_eclipseyes, if you have a clone of the official repo, you can run `git remote add <name> <push_url>` to add a remote for the other repository03:32
nuclear_eclipsehttp://www.eecs.harvard.edu/~cduan/technical/git/03:33
nuclear_eclipse that will likely help explain a lot of Git for you03:33
dhx_mthanks I'll give it a read03:33
dhx_mI guess that I create a branch for each feature change I made to mantis03:33
dhx_mbut does that mean I need to have 1 git repository for each branch?03:34
dhx_mie. I'd need to fork mantis-git for each 'branch'?03:34
nuclear_eclipsefor a simple set of patches, it might be simpler to skip setting up a private fork, and just use formatted patches, but a fork repo can house multiple feature branches, so if you're working on a lot of separate contributions, a private fork on mantisforge is more useful/versatile03:34
dhx_myep that is what I'll be doing03:35
dhx_mI have a few patches that I'm trying to contribute to Mantis03:35
nuclear_eclipsewith git, it's better to have all of your branches in the same repository, rather than making a separate clone for each feature03:35
dhx_mand they're getting hard to separate within one directory03:35
dhx_mok03:35
dhx_mso the structure is something like http://git.mantisforge.org/w/mantisbt/dhx.git/branch1/03:36
dhx_mhttp://git.mantisforge.org/w/mantisbt/dhx.git/branch2/03:36
dhx_metc?03:36
dhx_mthat is what I'm used to with SVN03:36
nuclear_eclipsenot quite03:38
dhx_mactually that tutorial you sent me explains it03:39
nuclear_eclipsegit tracks branches outside of the "working directory", so when you set up other branches, it's only known about in the .git until you specifically switch to that branch, at which point it replaces your current workspace03:39
dhx_maha :)03:40
dhx_mthat makes sense now03:40
dhx_mthanks03:40
nuclear_eclipseI'd suggest using a separate branch for each feature you work on03:40
dhx_mso they're sort of 'invisible' and you switch between them within the same working directory03:40
nuclear_eclipsecorrect03:40
dhx_mrather than the SVN approach of having 1 working directory per branch03:40
nuclear_eclipsesame thing with tags, they're just a pointer to a commit, and don't really show up unless you specifically check them out in place of a branch03:41
dhx_mso if you switch to a branch, make some changes... and don't commit03:42
dhx_mthen change to another branch, you lose changes03:43
dhx_m?03:43
nuclear_eclipseactually, git will generally prevent you from doing destructive things like that unless you explicitly tell it to override the safeguards03:43
nuclear_eclipseso if you have uncommitted changes, git won't let you switch branches03:44
nuclear_eclipseunless of course you add the -f/--force option to ignore uncommitted changes03:44
dhx_mah nice :)03:45
dhx_mmy only other question is that when submitting patches, do I just tell someone to pull one of my branches?03:45
dhx_mas opposed to attaching a manual patch?03:46
nuclear_eclipsegit can generate a 'pull request' that sums up the changes in your branch, or it can generate 'formatted patches' that contain author and commit info and con be easily applied to a repository03:47
nuclear_eclipseboth methods are covered in the developer's guide03:47
dhx_mI understand now :)03:47
dhx_mthanks03:47
dhx_mI'll go out and give it a try03:47
nuclear_eclipseyou're welcome, and good luck :)03:47
vb12345nuclear_eclipse: the IRC link appears for anonymous users.  Clicking it gives access denied.  It should be hidden for users who don't have access.04:10
dhx_mjust a question about how I set this up...04:23
dhx_mI take it I clone mantis-git04:24
dhx_mand push/merge that repository into dhx-git04:24
dhx_mthen I create a new local directory from which I clone dhx-git to04:26
dhx_mand I do all my changes in dhx-git04:26
dhx_mand pull updates from mantis-git when needed?04:26
dhx_mmost of the tutorials I read assume you work on a local repository04:27
dhx_mnot a remote one04:27
--- scribe started ---17:56
siebrandgiallu: thanks. That was helpful. Now I was able to close a few issues :)18:49
nuclear_eclipsesiebrand: just as an fyi; use "fixes #xxx" in your commit message, so that the Git integration for Mantis will auto-link issue IDs to the changeset18:50
siebrandright. Thanks.18:51
bartikHello. May I ask some mantis code related questions ?18:53
siebrandbartik: yes18:54
bartikI have implemented local avatars for the 1.1.6 and I have stumbled across this two functions file_delete_attachments and file_delete_project_files18:55
bartikIs there a particular reason these are not coded as one function ?18:56
bartikI mean the difference is the bug_id and project_id in the select query.18:56
bartikWell this somewhat touches on the main reason me is here. I wanted to ask if there is interest in having the local avat feature.18:57
bartik!ping18:59
giallubartik, yes. ther is a bug open for that18:59
bartikbug ?19:00
bartikAh I understand you treat everything as bug even a feature I suppose.19:00
gialluyeah19:01
bartikWell I have an implementation but it is not the head revision. But as I browse the repository it doesnīt seem very different from what I have implemented19:01
giallulet's see19:01
bartikSo are there any particular requirements ?19:02
bartikI mean coding preferences whatever ? I have tried to reuse as much code as possible.19:02
giallubug 825719:03
mantisbotBug 8257 - mkornatzki - open - acknowledged19:03
mantisbotstore avatar local - http://www.mantisbt.org/bugs/view.php?id=825719:03
gialluhave a look there and tell me what you think about:19:03
giallu1. the patches I see there19:03
giallu2. how that compare with yours19:04
gialluthen, about your questyion before about api19:04
gialluif you find stuff in need of a clean up, feel free to propose your improvements19:05
gialluan the file api actually would need some love...19:06
bartikI have now looked over the change. I have a slightly different approach.19:09
bartikFor the avatar. For me the avatar is handled similarly to the attachments.19:09
bartikI have added a new table called mantis_avatar_file_table. Instead of a bug_id or project_id I use  the avatar_id19:10
bartikThis way I was able to reuse the download_file.php for loading avatars and those file_delete_project_files etc. (hence the question regarding these)19:11
bartikBut there is no resizing in my version. On the other hand you can store the avatar either in database, file or ftp as any other attachments.19:12
bartikThe selection of what avatar to use (gravatar or local) is of course configurable but alas not per user.19:14
giallubartik, attach your patch on 8257, I'll have a look19:15
giallubut please note we usually do not introduce new features on the stable serie19:16
gialluso it needs to apply on git master19:16
bartikI understand. Thatīs why I was asking. I didnīt know about the existing version. I could maybe save some effort :-)19:18
gialluok19:19
gialluso your implementation use a global setting to decide if avatars are local or gravatar?19:21
bartikyes. I have never thought about using this in "mixed" mode. You would need to introduce a preference setting in user profile (which I didn't) to have this but shouldn't be hard.19:23
bartikAnother question regarding the passwords. Was there any thought about checking some minimal password strength ?19:26
bartikIn the account_update.php like adding a "_default_" function which could be overwritten by a "_override_" function ?19:27
bartikMy "hack" is pretty ugly with that if (... sitting in the middle of the code.19:28
gialluanother open bug somewhere...19:31
giallubut now, dinner time :)19:31
gialluI'll be back later19:31
bartikme be here19:32
bartikwell the pages about the code checkout seem to refer to svn but your repository is git now am I right ?19:52
gialluback21:13
giallubartik, yes, we use git now21:13
bartikquite a time consuming dinner...21:13
giallueheh21:13
gialluadd 2 children in the mix21:14
bartikmine 2 are already sleeping :-)21:14
gialluhere too, but I didn't rush to pc :)21:14
gialluso21:14
gialludid you find how to get git code?21:15
bartikI have already cloned the main git but now trying to find out how to get the master for 1.1.21:17
bartikusing tortoisegit21:17
bartikok from the command line it works. freakin gui...21:29
bartikafter a short fight with setup itīs set up :-)21:48
bartikon the other hand there is a feature iīm going to explore but maybe I ask first. Do you have gnupg encryption for email ?21:52
siebrandDoes mantis allow multiple users with the same e-mail address?22:39
siebrandyes, it does.22:40
siebrand(testing proved to be quicker :P)22:40
siebrandgiallu: how about we make mb_string a requirement for 1.2?23:29
siebrandit's hard to count Cyrillic characters without it...23:30
siebrandI think we just need it for proper i18n support.23:30
nuclear_eclipsesiebrand: I'd prefer to just extend what I've done for string_lower() where we use mb_* if it's available, and fall back to regular functions otherwise; no need to penalize those of us who don't need unicode and don't/can't use mb_*23:40
siebrandnuclear_eclipse: I found another solution for the problem I was working on. utf8_decode() appears to do the trick.23:41
siebrandHmm, running into "The filter you are trying to use is too old to be upgraded. Please re-create it."23:43
siebrandThat's interesting, as I just created it.23:43

Generated by irclog2html.py