I'd like to bring SVN and file pane behaviour up again. I've been using both extensively, and run into this situation frequently: Working in file A, press cmd-Y, 5 to commit, realise after hitting commit that in fact file B was selected in file viewer and the wrong file with the wrong commit message was committed.
As for the heuristics which file to apply cmd-Y to: 1) If the file browser has focus, take its selection, if the editor has focus, take that. 2) In the commit window, show all uncommitted changes in (the parent folder of the file browser or root of working copy, whichever is lower) and below, but only select the items from 1)
Would that cause any side-effects?
If we cannot agree on how this should behave, can the precedence behaviour of file viewer be somehow customized?
Best, Jonas
On Sep 24, 2012, at 11:39 PM, Jonas Zimmermann listen@jonaszimmermann.de wrote:
I'd like to bring SVN and file pane behaviour up again. I've been using both extensively, and run into this situation frequently: Working in file A, press cmd-Y, 5 to commit, realise after hitting commit that in fact file B was selected in file viewer and the wrong file with the wrong commit message was committed.
I always review my local changes before comitting, thus noticing if the wrong file is selected :)
I’m also in the habbit of pressing ⌃⌘R to select current file, when I wish to execute a command that should apply to the current file.
As for the heuristics which file to apply cmd-Y to:
- If the file browser has focus, take its selection, if the editor has focus, take that.
This is how Find in Folder works and I don’t think such behavior works well — it’s hard to discover this “feature” and leads to seemingly random behavior and needless moving of focus away from text editor.
- In the commit window, show all uncommitted changes in (the parent folder of the file browser or root of working copy, whichever is lower) and below, but only select the items from 1)
Would that cause any side-effects?
The latter should be fine to change, the former though I dislike.
If we cannot agree on how this should behave, can the precedence behaviour of file viewer be somehow customized?
The Subversion → Commit command can’t obtain info about selected element, but you can always hardcode it to always select only current file (in the commit window).
On 25 Sep 2012, at 00:49, Allan Odgaard wrote:
On Sep 24, 2012, at 11:39 PM, Jonas Zimmermann listen@jonaszimmermann.de wrote:
I'd like to bring SVN and file pane behaviour up again. I've been using both extensively, and run into this situation frequently: Working in file A, press cmd-Y, 5 to commit, realise after hitting commit that in fact file B was selected in file viewer and the wrong file with the wrong commit message was committed.
I always review my local changes before comitting, thus noticing if the wrong file is selected :)
I’m also in the habbit of pressing ⌃⌘R to select current file, when I wish to execute a command that should apply to the current file.
Well, it seems it ought to be as simple as the interface suggests. Learning to having to press more key combinations is less intuitive.
As for the heuristics which file to apply cmd-Y to:
- If the file browser has focus, take its selection, if the editor has focus, take that.
This is how Find in Folder works and I don’t think such behavior works well — it’s hard to discover this “feature” and leads to seemingly random behavior and needless moving of focus away from text editor.
Hm. I could argue the same for the current way it works. Had to ask on this list to understand the current behaviour. And other than cmd-ctrl-R, can you navigate to a specific file/folder in the file browser without the editor losing focus? OK, you can, by clicking on files, but I'd argue that by clicking on something you made the cognitive step of changing your attention (I cannot click on files blindly) – but that behaviour is not consistent, either, because when you select multiple files, the file browser gets focus.
- In the commit window, show all uncommitted changes in (the parent folder of the file browser or root of working copy, whichever is lower) and below, but only select the items from 1)
Would that cause any side-effects?
The latter should be fine to change, the former though I dislike.
If we cannot agree on how this should behave, can the precedence behaviour of file viewer be somehow customized?
The Subversion → Commit command can’t obtain info about selected element, but you can always hardcode it to always select only current file (in the commit window).
Well, it seems hardcoding is a way we wouldn't want to go down for a thing like this ...
On 25 Sep 2012, at 10:03, Jonas Zimmermann wrote:
Hm. I could argue the same for the current way it works. Had to ask on this list to understand the current behaviour. And other than cmd-ctrl-R, can you navigate to a specific file/folder in the file browser without the editor losing focus? OK, you can, by clicking on files, but I'd argue that by clicking on something you made the cognitive step of changing your attention (I cannot click on files blindly) – but that behaviour is not consistent, either, because when you select multiple files, the file browser gets focus.
I think I struggled with the way Textmate does SCM until I spent more time using the SCM view of the file browser (⌘⇧Y). Now I'm generally in that view most of the time (disclaimer I'm a git user so can't vouch for it's effectiveness for SVN).
That being said, it's a bundle so it's not hard to change the behaviour if you need it to work differently (or add a new command if you don't want to change the default). I did something similar (in reverse) by changing $TM_FILEPATH to $TM_SELECTED_FILES in the add command for git. Do something like that for SVN commit and you'll have it working exactly the way you want.