From: Patrick W. <pat...@ny...> - 2008-07-31 20:00:05
|
Hey everyone, I think it a good idea to modify GitStatusAdapter a bit. We need to be able to get the status of files and directories individually. We should have GitStatusAdapter instantiate a GitStatus object on construction, and have methods to get IProject/IFile/IFolder status. When we import external projects into Eclipse (which I started testing but haven't committed), the IResource paths are relative to the project root. To get the absolute file, we have to do some magic. Having a GitStatusAdapter automatically translate from relative to absolute is a big time saver. Is everyone game or should I branch and do a code review? -- Patrick |
From: Paul M. B. <pm...@ny...> - 2008-07-31 20:07:49
|
Already done... look at GitStatusAdapter.getStatus -PB ----- Original Message ----- From: Patrick Winters <pat...@ny...> Date: Thursday, July 31, 2008 4:00 pm Subject: [Gitclipse-devel] Modifying GitStatusAdapter To: git...@li... > Hey everyone, > I think it a good idea to modify GitStatusAdapter a bit. We need to > be able to get the status of files and directories individually. We > should have GitStatusAdapter instantiate a GitStatus object on > construction, and have methods to get IProject/IFile/IFolder status. > When we import external projects into Eclipse (which I started testing > but haven't committed), the IResource paths are relative to the project > root. To get the absolute file, we have to do some magic. Having a > GitStatusAdapter automatically translate from relative to absolute is > a > big time saver. > Is everyone game or should I branch and do a code review? > -- > Patrick > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Gitclipse-devel mailing list > Git...@li... > https://lists.sourceforge.net/lists/listinfo/gitclipse-devel |
From: Patrick W. <pat...@ny...> - 2008-07-31 20:10:55
|
Ok cool, sorry I missed that. But this still isn't dealing with external projects right? On Thu, 2008-07-31 at 16:07 -0400, Paul Munson Bethe wrote: > Already done... > > look at GitStatusAdapter.getStatus > > -PB > > ----- Original Message ----- > From: Patrick Winters <pat...@ny...> > Date: Thursday, July 31, 2008 4:00 pm > Subject: [Gitclipse-devel] Modifying GitStatusAdapter > To: git...@li... > > > > Hey everyone, > > I think it a good idea to modify GitStatusAdapter a bit. We need to > > be able to get the status of files and directories individually. We > > should have GitStatusAdapter instantiate a GitStatus object on > > construction, and have methods to get IProject/IFile/IFolder status. > > When we import external projects into Eclipse (which I started testing > > but haven't committed), the IResource paths are relative to the project > > root. To get the absolute file, we have to do some magic. Having a > > GitStatusAdapter automatically translate from relative to absolute is > > a > > big time saver. > > Is everyone game or should I branch and do a code review? > > -- > > Patrick > > > > > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > > Build the coolest Linux based applications with Moblin SDK & win great > > prizes > > Grand prize is a trip for two to an Open Source event anywhere in the > > world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > Gitclipse-devel mailing list > > Git...@li... > > https://lists.sourceforge.net/lists/listinfo/gitclipse-devel |
From: Paul M. B. <pm...@ny...> - 2008-07-31 20:17:49
|
Hmmm.... probably true. Have a look then and try to improve it! ----- Original Message ----- From: Patrick Winters <pat...@ny...> Date: Thursday, July 31, 2008 4:11 pm Subject: Re: [Gitclipse-devel] Modifying GitStatusAdapter To: Paul Munson Bethe <pm...@ny...> Cc: git...@li... > Ok cool, sorry I missed that. But this still isn't dealing with > external projects right? > > On Thu, 2008-07-31 at 16:07 -0400, Paul Munson Bethe wrote: > > Already done... > > > > look at GitStatusAdapter.getStatus > > > > -PB > > > > ----- Original Message ----- > > From: Patrick Winters <pat...@ny...> > > Date: Thursday, July 31, 2008 4:00 pm > > Subject: [Gitclipse-devel] Modifying GitStatusAdapter > > To: git...@li... > > > > > > > Hey everyone, > > > I think it a good idea to modify GitStatusAdapter a bit. We > need to > > > be able to get the status of files and directories individually. > We > > > should have GitStatusAdapter instantiate a GitStatus object on > > > construction, and have methods to get IProject/IFile/IFolder status. > > > When we import external projects into Eclipse (which I started testing > > > but haven't committed), the IResource paths are relative to the project > > > root. To get the absolute file, we have to do some magic. Having > a > > > GitStatusAdapter automatically translate from relative to absolute > is > > > a > > > big time saver. > > > Is everyone game or should I branch and do a code review? > > > -- > > > Patrick > > > > > > > > > > > > ------------------------------------------------------------------------- > > > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > > > Build the coolest Linux based applications with Moblin SDK & win > great > > > prizes > > > Grand prize is a trip for two to an Open Source event anywhere in > the > > > world > > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > _______________________________________________ > > > Gitclipse-devel mailing list > > > Git...@li... > > > https://lists.sourceforge.net/lists/listinfo/gitclipse-devel > |
From: Patrick W. <pat...@ny...> - 2008-07-31 21:13:52
|
Okay. External projects that are somewhere down the repository tree are auto-associating. I make a call to GitStatus to determine their eligibility. But our commands aren't working because of the way we use IResource and javagit requires absolute paths. I'll try and take a look at it. Are we going to stick with only a project status cache? I feel like we need two classes. GitStatusAdapter and GitStatusAdapterResponse. We should construct the adapter on a project, which will handle absolute/relative problems with projects and accept IResources; and then the adapter response should spit back only project relative IResources. If you wanted a full project cache you should do something like: status = new GitStatusAdapter(IProject project); status.getProjectStatus() and have this available as well. status.getStatus(IResource); We're going to run into problems, like what I'm seeing in commit now unless we provide adapters for all javagit commands to seamlessly handle externally resolved projects and files. We can hack it for now, but it requires a lot of annoyance. The short term option is employing some utility to extract absolute java.io.File from all IResources and using this exclusively. On Thu, 2008-07-31 at 16:17 -0400, Paul Munson Bethe wrote: > Hmmm.... probably true. > > Have a look then and try to improve it! > > > ----- Original Message ----- > From: Patrick Winters <pat...@ny...> > Date: Thursday, July 31, 2008 4:11 pm > Subject: Re: [Gitclipse-devel] Modifying GitStatusAdapter > To: Paul Munson Bethe <pm...@ny...> > Cc: git...@li... > > > > Ok cool, sorry I missed that. But this still isn't dealing with > > external projects right? > > > > On Thu, 2008-07-31 at 16:07 -0400, Paul Munson Bethe wrote: > > > Already done... > > > > > > look at GitStatusAdapter.getStatus > > > > > > -PB > > > > > > ----- Original Message ----- > > > From: Patrick Winters <pat...@ny...> > > > Date: Thursday, July 31, 2008 4:00 pm > > > Subject: [Gitclipse-devel] Modifying GitStatusAdapter > > > To: git...@li... > > > > > > > > > > Hey everyone, > > > > I think it a good idea to modify GitStatusAdapter a bit. We > > need to > > > > be able to get the status of files and directories individually. > > We > > > > should have GitStatusAdapter instantiate a GitStatus object on > > > > construction, and have methods to get IProject/IFile/IFolder status. > > > > When we import external projects into Eclipse (which I started testing > > > > but haven't committed), the IResource paths are relative to the project > > > > root. To get the absolute file, we have to do some magic. Having > > a > > > > GitStatusAdapter automatically translate from relative to absolute > > is > > > > a > > > > big time saver. > > > > Is everyone game or should I branch and do a code review? > > > > -- > > > > Patrick > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > This SF.Net email is sponsored by the Moblin Your Move Developer's > > challenge > > > > Build the coolest Linux based applications with Moblin SDK & win > > great > > > > prizes > > > > Grand prize is a trip for two to an Open Source event anywhere in > > the > > > > world > > > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > > _______________________________________________ > > > > Gitclipse-devel mailing list > > > > Git...@li... > > > > https://lists.sourceforge.net/lists/listinfo/gitclipse-devel > > |
From: Paul M. B. <pm...@ny...> - 2008-07-31 20:51:42
|
Folks, I have added a very crude monitor thread which checks for changes to the .git environment. * It is clunky, and does not use much of the framework, as 2 days of work did not yield how to put it inside * So I run a thread every 5 seconds and check the timestamps of the .git/HEAD and .git/objects for changes ** This is b/c every time you run git-status, it modifies the .git/index file. (so simply checking for changes to .git/ does not work) * If I detect a change -- which will occur if you do a git operation both inside AND outside the framework -- I touch all of the project IResources and force a refresh. I wish I could touch fewer, but I am not aware of an easy way to detect what to touch. FYI - that touch is only to the eclipse IResource (not the File in the system). The refresh handles redecoration and the branch name on the project. * This works for both projects with .git in root and projects whose .git file is up some # of levels > 0 * currently, there is a thread for each project. That could get ugly if a user had hundreds of projects open, but I am trying to do the simplest thing that works correctly for Tuesday's alpha. I have added a code-review Gitclipse-15 -Paul |