#76 ✓resolved
Benoit Cerrina

enhancement request per file history

Reported by Benoit Cerrina | January 28th, 2009 @ 12:54 PM | in 0.7

similar to what is available in qgit

Comments and changes to this ticket

  • Johannes Gilger

    Johannes Gilger January 28th, 2009 @ 02:44 PM

    You probably mean "show me all the commits that touched file xy", right? Although I don't know if Pieter is planning to make it an UI-option as well, you can have that behaviour right now with:

     gitx -- filexy
    
    

    (from your terminal).

  • Benoit Cerrina

    Benoit Cerrina January 28th, 2009 @ 06:21 PM

    in qgit you can select a file in the tree and see the list of commits and their relationships which are involving the file, you can then go back to the complete history. I will try the command line option but having this available in the gui is much more helpfull than having to go back to the command line (I am pretty sure this can also be done on the command line using git by itself)

  • Pieter de Bie

    Pieter de Bie January 28th, 2009 @ 09:19 PM

    • Milestone set to 0.7
    • State changed from “new” to “open”

    A context menu option in the tree view shouldn't hurt, I guess.

  • Benoit Cerrina

    Benoit Cerrina June 1st, 2009 @ 07:18 PM

    And I confirm that the result that gitx -- filexy shows is what I had in mind so it is really a question of the contextual menu to call this from the tree view

  • Pieter de Bie

    Pieter de Bie June 1st, 2009 @ 09:28 PM

    I've worked on this a while ago -- the results can be seen here: http://github.com/pieter/gitx/commit/c91dddcb99df6b825aa71a998bc1da...

    I'm not sure what the state of that is anymore. My (bad) memory tells me I wasn't completely happy with this.

  • Benoit Cerrina

    Benoit Cerrina June 2nd, 2009 @ 12:56 PM

    I tried it and I had two problems. First I tried to merge it back to my local branch which contains the changes I sent you for the bug regarding the opening of a directory with a large number of files and subdirectories, I couldn't manage to merge the xib changes.
    Then I tried to use directly that branch but when I use the new contextual menu I keep getting exceptions and I haven't found their cause.

  • Pieter de Bie

    Pieter de Bie June 2nd, 2009 @ 01:08 PM

    Well, that's probably why I didn't merge it in yet ;)

    I tried it and I had two problems. First I tried to merge it back to my local branch which contains the changes I sent you for the bug regarding the opening of a directory with a large number of files and subdirectories

    Do you mean in bug #154, or something else?

  • Johannes Gilger

    Johannes Gilger June 11th, 2009 @ 10:36 PM

    Phew, this stupid .xib-files really fight against being merged successfully. So after about 3 unsuccessfull tries, I just threw away the .xib changes from this tree_context-branch, rebased the rest onto master, and then recreated the menu/connections by hand.

    The result can be seen here: http://github.com/heipei/gitx/commits/pb/tree_context (last 3 commits).

    One last thing one might do is clean up the branch-selector when selecting a different file, by grepping for "HEAD --" entries. But that is not urgent, and might not even be wanted at all.

  • Pieter de Bie

    Pieter de Bie June 12th, 2009 @ 12:00 AM

    Phew, this stupid .xib-files really fight against being merged successfully. So after about 3 unsuccessfull tries, I just threw away the .xib changes from this tree_context-branch, rebased the rest onto master, and then recreated the menu/connections by hand.

    The result can be seen here: http://github.com/heipei/gitx/commits/pb/tree_context (last 3 commits).

    I haven't taken a look at this yet, but thanks for working on it. One
    thing about this is that it would be nice to be able to use the menu
    for within the webview too. I'm not sure how to do that yet, but
    perhaps you can add a comment related to that in the code? You should
    also squash the last two commits in one.

    One last thing one might do is clean up the branch-selector when selecting a different file, by grepping for "HEAD --" entries. But that is not urgent, and might not even be wanted at all.

    I'd prefer creating a new kind of PBGitRef -- subclass it to
    PBGitFileLimitingRef or something. That, or just extend PBGitReft to
    understand file limiters. That would also work nicely with my work on
    incremental log loading. I'd just keep it like it is right now, and
    let's worry about that later :)

  • Johannes Gilger

    Johannes Gilger June 12th, 2009 @ 12:47 AM

    Done, squashed the last one, added a comment (I agree that using that from the WebView is even more crucial).

    The PBGitRef subclass sounds like a good idea, but I thought that's what PBGitRevSpecifier is good for (that's the whole difference between a "ref" and a "rev", isn't it?)

    Commits are still at the same place at http://github.com/heipei/gitx/commits/pb/tree_context

  • Pieter de Bie

    Pieter de Bie June 12th, 2009 @ 01:02 AM

    Done, squashed the last one, added a comment (I agree that using that from the WebView is even more crucial).

    OK, this looks good. I haven't tested it yet though, so it'll stay in
    my pu until next week.

    The PBGitRef subclass sounds like a good idea, but I thought that's what PBGitRevSpecifier is good for (that's the whole difference between a "ref" and a "rev", isn't it?)

    Oops, I completely confused the two. I meant subclassing / extending
    PBGitRevSpecifier :)

  • Benoit Cerrina

    Benoit Cerrina June 12th, 2009 @ 01:57 AM

    thanks for the work I'll try it.
    Somehow the fact that I am not the only one to have trouble merging those xib is reassuring to me

  • Pieter de Bie

    Pieter de Bie June 12th, 2009 @ 09:07 AM

    OK, I've thought a bit about this, and I think the following changes
    would be nice:

    1) add a "Show in Finder" option to the menu
    2) rename "Commits touching paths" to something like "Show history (of files)"

    and, a bit more difficult:

    3) create a method in the HistoryController, something like
    contextMenuForFiles:(NSArray *)files. This method should get an array
    of PBGitFiles, as is done now in the showCommitsFromTree: thingie.

    This array should be set as the representedObject for the menu. We can
    then return the menu

    4) change the showCommitsFromTree: to read the representedObjects,
    rather than reading the treeController

    Once that's done, it should be easy to add support for the webview,
    just by calling the contextMenuForFiles: from another method.

    I can do this when I'm back, or you can have a shot at it if you want
    in the meantime :). I think having context menu's in the webview
    available is a really nice feature, so we should try to get it in for
    0.7!

  • Pieter de Bie

    Pieter de Bie June 12th, 2009 @ 09:10 AM

    (For reference, adding the context menu to the webview would require changing PBWebHistoryController: we need to extend

    • (NSArray ) webView:(WebView )sender contextMenuItemsForElement:(NSDictionary *)element
          defaultMenuItems:(NSArray *)defaultMenuItems
      

    , by doing something similar to what's already done there for refs)

    On Fri, Jun 12, 2009 at 8:07 AM, Pieter de
    Biefrimmirf+lighthouse@gmail.com wrote:

    OK, I've thought a bit about this, and I think the following changes would be nice:

    1) add a "Show in Finder" option to the menu 2) rename "Commits touching paths" to something like "Show history (of files)"

    and, a bit more difficult:

    3) create a method in the HistoryController, something like contextMenuForFiles:(NSArray *)files. This method should get an array of PBGitFiles, as is done now in the showCommitsFromTree: thingie.

    This array should be set as the representedObject for the menu. We can then return the menu

    4) change the showCommitsFromTree: to read the representedObjects, rather than reading the treeController

    Once that's done, it should be easy to add support for the webview, just by calling the contextMenuForFiles: from another method.

    I can do this when I'm back, or you can have a shot at it if you want in the meantime :). I think having context menu's in the webview available is a really nice feature, so we should try to get it in for 0.7!

  • Johannes Gilger

    Johannes Gilger June 13th, 2009 @ 01:12 PM

    After rebasing again against the current master, I already completed tasks 1. and 2., but not the rest. The result can be seen here:

    http://github.com/heipei/gitx/commits/pb/tree_context (last 3 commits)

  • Pieter de Bie

    Pieter de Bie January 28th, 2009 @ 12:54 PM

    I've worked on this a bit, and the result is here:
    http://github.com/pieter/gitx/tree/jg/tree_context

    Though it does work, I'm really not happy with how it's done (as
    explained in the last commit message). I'm not sure how to fix it, I
    think we need to create the menu items programatically.

  • Pieter de Bie

    Pieter de Bie January 28th, 2009 @ 12:54 PM

    OK, I've reworked it a bit, and the result is now much better (still
    the same URL, http://github.com/pieter/gitx/tree/jg/tree_context).

    Con you take a look and see if you notice any problems? I took it
    throught the stresstest repo, and it still shows the files OK, so I
    guess I didn't break anything obvious in the javascript :)

  • Pieter de Bie

    Pieter de Bie June 20th, 2009 @ 10:22 PM

    Johannes, any thoughts? otherwise I'll just merge this in

  • Johannes Gilger

    Johannes Gilger June 20th, 2009 @ 11:02 PM

    Hm, I certainly works well. So the patches are something I say "Let's just go with it!"

    One thing that's still bothering me (in general) is the function of the WebView:

    One necesseraly notices that this is a webview, something people know from Safari et al. So you're not surprised when right-clicking and getting the standard context menu "Search in splotlight" "Search in google" etc. But then you click on a file and lo and behold, a completely custom menu appears (you might not even have thought this was possible). I don't know how to make it more obvious that there really is functionality for GitX hidden beneath the right-click though ;)

  • Pieter de Bie

    Pieter de Bie June 20th, 2009 @ 11:04 PM

    One necesseraly notices that this is a webview, something people know from Safari et al. So you're not surprised when right-clicking and getting the standard context menu "Search in splotlight" "Search in google" etc. But then you click on a file and lo and behold, a completely custom menu appears (you might not even have thought this was possible). I don't know how to make it more obvious that there really is functionality for GitX hidden beneath the right-click though ;)

    Yes, I thought about that as well. One thing I thought about was
    adding one of those gear buttons, which then shows a drop-down menu. I
    think you see that in other apps as well. I'm not sure where to get
    the icon, or how to put it in the webview (within the "button",
    floating right?

    what do you think?

  • Johannes Gilger

    Johannes Gilger June 20th, 2009 @ 11:13 PM

    Hm, I don't know gear buttons. You mean adding a button next to the possible spots for custom menus? Like next to every file to indicate "you can execute an action here"? Sounds intuitive, since not only files are action-spots in the WebView. But the question is always how this will look and work when done. I think we should push this issue further down the rope, open a new ticket and close the pending one #76 first ;)

    As for icons: http://www.iconfinder.net/icondetails/5592/16 for files and http://www.iconfinder.net/icondetails/11938/16 for general ones. Both are CCed, but equivalent GPLed icons exist as well.

  • Pieter de Bie

    Pieter de Bie June 20th, 2009 @ 11:22 PM

    I mean the gear icon like Mail.app has in the sidebar (with a
    down-arrow next to it). That one also shows a drop-down menu, so it
    should be intuitive. I think Transmission for instance also displays
    it in one of their (table) views

  • Pieter de Bie

    Pieter de Bie June 21st, 2009 @ 12:08 AM

    • State changed from “open” to “resolved”

    Let's continue this in #177, this one is fixed

  • abigailcorkett (at gmail)

    abigailcorkett (at gmail) December 4th, 2019 @ 08:53 PM

    We are Fix My issue technical support team Which provides ESPn Activation, roku Activation, Cbs Activation support On call or via chat support

    Espn Activation

    Espn.com/activate

    Espn.com/activation

    Espn Activate

    ROku Activation

    ROku.com/links

  • skywebppc (at gmail)

    skywebppc (at gmail) December 30th, 2019 @ 11:51 AM

    • Tag set to online loans, personal loans

    i-LEND is an online marketplace connecting borrowers and lenders for loans. Although i-LEND verifies credentials of registered users on the site, it does not guarantee any loan offers by lenders nor does it guarantee any repayments by borrowers. Users make offers/loan requests at their own discretion with the understanding of the risks involved in such transactions including loss of entire capital and/or no guarantee of recovery. Please read our Legal agreements to understand more.

    online loans Personal Loans Online Money Invest P2P

  • skywebppc (at gmail)

    skywebppc (at gmail) December 30th, 2019 @ 11:52 AM

    • Tag changed from online loans, personal loans to online loans

    i-LEND is an online marketplace connecting borrowers and lenders for loans. Although i-LEND verifies credentials of registered users on the site, it does not guarantee any loan offers by lenders nor does it guarantee any repayments by borrowers. Users make offers/loan requests at their own discretion with the understanding of the risks involved in such transactions including loss of entire capital and/or no guarantee of recovery. Please read our Legal agreements to understand more.

    online loans Personal Loans Online Money Invest P2P

  • GEOspatial

    GEOspatial June 30th, 2020 @ 08:08 AM

    We at Marvel Geospatial, provide you with an ultimate Geospatial Solution with our accurate data mapping and management services. Marvel brings horizontal and vertical integration of Satellite/Aerial Remote Sensing, Positioning Applications, Photogrammetry, GIS Databases and Applications, GIS Web-services and Networking of GIS Databases.Marvel offers expert advice and reliable data for all geospatial needs. Discover what’s possible with Marvel. Give us a call today for a free consultation!
    Our services :
    GIS Engineer BIM Services

    Scan to BIM Modelling services

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

GitX is the nice-looking gitk clone for OS X

Referenced by

Pages