SCM Diff Gutter

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

SCM Diff Gutter

Caio Fernando Bertoldi Paes de Andrade
I’m not sure this is the proper place to ask this, but:

SCM Diff Gutter bundle doesn’t show anything to me in the gutter.

I'm on the 2.0-beta.6.5, installed the bundle in Preferences, working on a project versioned with Git.

Is there anything else I should have done?

Caio

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: SCM Diff Gutter

Ronald Wampler
On Wed, Dec 3, 2014 at 3:02 PM, Caio Fernando Bertoldi Paes de Andrade
<[hidden email]> wrote:
> I’m not sure this is the proper place to ask this, but:
>
> SCM Diff Gutter bundle doesn’t show anything to me in the gutter.
>
> I'm on the 2.0-beta.6.5, installed the bundle in Preferences, working on a project versioned with Git.
>
> Is there anything else I should have done?

You shouldn't have to do anything else; however, if the SCM status is
not enable (which is the default for projects on a network drive) it
will not show the diff in the gutter.

 Does the file browser show the SCM statuses for the files in that project?

>
> Caio
>
> _______________________________________________
> textmate mailing list
> [hidden email]
> http://lists.macromates.com/listinfo/textmate

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: SCM Diff Gutter

Caio Fernando Bertoldi Paes de Andrade
I was working on a project inside a locally mounted encrypted volume, which may cause the same behaviour as a network drive.

But now even trying it out in a repo inside my home folder, the gutter stays empty even though the file browser shows the blue circle indicating the file has uncommitted changes.


I’ve just reinstalled Yosemite on my Mac, so I don’t have any defaults from TM’s previous versions, if that influences anything.

Caio

On 3 Dec 2014, at 19:26, Ronald Wampler <[hidden email]> wrote:

On Wed, Dec 3, 2014 at 3:02 PM, Caio Fernando Bertoldi Paes de Andrade
<[hidden email]> wrote:
I’m not sure this is the proper place to ask this, but:

SCM Diff Gutter bundle doesn’t show anything to me in the gutter.

I'm on the 2.0-beta.6.5, installed the bundle in Preferences, working on a project versioned with Git.

Is there anything else I should have done?

You shouldn't have to do anything else; however, if the SCM status is
not enable (which is the default for projects on a network drive) it
will not show the diff in the gutter.

Does the file browser show the SCM statuses for the files in that project?


Caio

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate



_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: SCM Diff Gutter

Ronald Wampler
On Thu, Dec 4, 2014 at 6:36 AM, Caio Fernando Bertoldi Paes de Andrade
<[hidden email]> wrote:
>
> I was working on a project inside a locally mounted encrypted volume, which may cause the same behaviour as a network drive.
>
> But now even trying it out in a repo inside my home folder, the gutter stays empty even though the file browser shows the blue circle indicating the file has uncommitted changes.
>
>
> I’ve just reinstalled Yosemite on my Mac, so I don’t have any defaults from TM’s previous versions, if that influences anything.

Check to see if TM_SCM_NAME and TM_MATE are set (⇧⌃⌘P then select
'Show TextMate Variables')?

The only other thing I can think of is if your version of mate does
not support marks. I recall someone else had that problem, but if you
reinstalled, you should have the latest version. Try opening a blank
document and type "$TM_MATE" --help followed by ⌃R and see if it has
the --set-mark option.

>
> Caio
>
> On 3 Dec 2014, at 19:26, Ronald Wampler <[hidden email]> wrote:
>
> On Wed, Dec 3, 2014 at 3:02 PM, Caio Fernando Bertoldi Paes de Andrade
> <[hidden email]> wrote:
>
> I’m not sure this is the proper place to ask this, but:
>
> SCM Diff Gutter bundle doesn’t show anything to me in the gutter.
>
> I'm on the 2.0-beta.6.5, installed the bundle in Preferences, working on a project versioned with Git.
>
> Is there anything else I should have done?
>
>
> You shouldn't have to do anything else; however, if the SCM status is
> not enable (which is the default for projects on a network drive) it
> will not show the diff in the gutter.
>
> Does the file browser show the SCM statuses for the files in that project?
>
>
> Caio
>
> _______________________________________________
> textmate mailing list
> [hidden email]
> http://lists.macromates.com/listinfo/textmate
>
>
> _______________________________________________
> textmate mailing list
> [hidden email]
> http://lists.macromates.com/listinfo/textmate
>
>
>
>
> _______________________________________________
> textmate mailing list
> [hidden email]
> http://lists.macromates.com/listinfo/textmate

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: SCM Diff Gutter

Koen Punt
Just noticed that my gutter shows changes, but there are no changes.. 






On Thu, Dec 4, 2014 at 4:50 PM, Ronald Wampler <[hidden email]> wrote:

On Thu, Dec 4, 2014 at 6:36 AM, Caio Fernando Bertoldi Paes de Andrade
<[hidden email]> wrote:
>
> I was working on a project inside a locally mounted encrypted volume, which may cause the same behaviour as a network drive.
>
> But now even trying it out in a repo inside my home folder, the gutter stays empty even though the file browser shows the blue circle indicating the file has uncommitted changes.
>
>
> I’ve just reinstalled Yosemite on my Mac, so I don’t have any defaults from TM’s previous versions, if that influences anything.

Check to see if TM_SCM_NAME and TM_MATE are set (⇧⌃⌘P then select
'Show TextMate Variables')?

The only other thing I can think of is if your version of mate does
not support marks. I recall someone else had that problem, but if you
reinstalled, you should have the latest version. Try opening a blank
document and type "$TM_MATE" --help followed by ⌃R and see if it has
the --set-mark option.


>
> Caio
>
> On 3 Dec 2014, at 19:26, Ronald Wampler <[hidden email]> wrote:
>
> On Wed, Dec 3, 2014 at 3:02 PM, Caio Fernando Bertoldi Paes de Andrade
> <[hidden email]> wrote:
>
> I’m not sure this is the proper place to ask this, but:
>
> SCM Diff Gutter bundle doesn’t show anything to me in the gutter.
>
> I'm on the 2.0-beta.6.5, installed the bundle in Preferences, working on a project versioned with Git.
>
> Is there anything else I should have done?
>
>
> You shouldn't have to do anything else; however, if the SCM status is
> not enable (which is the default for projects on a network drive) it
> will not show the diff in the gutter.
>
> Does the file browser show the SCM statuses for the files in that project?
>
>
> Caio
>
> _______________________________________________
> textmate mailing list
> [hidden email]
> http://lists.macromates.com/listinfo/textmate
>
>
> _______________________________________________
> textmate mailing list
> [hidden email]
> http://lists.macromates.com/listinfo/textmate
>
>
>
>
> _______________________________________________
> textmate mailing list
> [hidden email]
> http://lists.macromates.com/listinfo/textmate

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate




_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: SCM Diff Gutter

Caio Fernando Bertoldi Paes de Andrade
In reply to this post by Ronald Wampler
Ronald,

Here are the results:

TM_SCM_NAME=git
TM_MATE=/Applications/TextMate.app/Contents/Resources/mate

mate 2.10 (2014-12-02)
Usage: mate [-wl<selection>t<filetype>m<name>rehv] [-u<identifier> | file ...]
[…]
 -s, --set-mark <mark>:<value> Set a mark containing <value> (requires --line).
 -c, --clear-mark <mark>       Clear a mark (clears all marks without --line).
[…]

Everything seems to be OK, but the gutter continues to be empty.

Caio

On 4 Dec 2014, at 13:50, Ronald Wampler <[hidden email]> wrote:

On Thu, Dec 4, 2014 at 6:36 AM, Caio Fernando Bertoldi Paes de Andrade
<[hidden email]> wrote:

I was working on a project inside a locally mounted encrypted volume, which may cause the same behaviour as a network drive.

But now even trying it out in a repo inside my home folder, the gutter stays empty even though the file browser shows the blue circle indicating the file has uncommitted changes.


I’ve just reinstalled Yosemite on my Mac, so I don’t have any defaults from TM’s previous versions, if that influences anything.

Check to see if TM_SCM_NAME and TM_MATE are set (⇧⌃⌘P then select
'Show TextMate Variables')?

The only other thing I can think of is if your version of mate does
not support marks. I recall someone else had that problem, but if you
reinstalled, you should have the latest version. Try opening a blank
document and type "$TM_MATE" --help followed by ⌃R and see if it has
the --set-mark option.


Caio

On 3 Dec 2014, at 19:26, Ronald Wampler <[hidden email]> wrote:

On Wed, Dec 3, 2014 at 3:02 PM, Caio Fernando Bertoldi Paes de Andrade
<[hidden email]> wrote:

I’m not sure this is the proper place to ask this, but:

SCM Diff Gutter bundle doesn’t show anything to me in the gutter.

I'm on the 2.0-beta.6.5, installed the bundle in Preferences, working on a project versioned with Git.

Is there anything else I should have done?


You shouldn't have to do anything else; however, if the SCM status is
not enable (which is the default for projects on a network drive) it
will not show the diff in the gutter.

Does the file browser show the SCM statuses for the files in that project?


Caio

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate




_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate



_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: SCM Diff Gutter

Ronald Wampler
On Thu, Dec 4, 2014 at 11:28 AM, Caio Fernando Bertoldi Paes de
Andrade <[hidden email]> wrote:

> Ronald,
>
> Here are the results:
>
> TM_SCM_NAME=git
> TM_MATE=/Applications/TextMate.app/Contents/Resources/mate
>
> mate 2.10 (2014-12-02)
> Usage: mate [-wl<selection>t<filetype>m<name>rehv] [-u<identifier> | file
> ...]
> […]
>  -s, --set-mark <mark>:<value> Set a mark containing <value> (requires
> --line).
>  -c, --clear-mark <mark>       Clear a mark (clears all marks without
> --line).
> […]
>
> Everything seems to be OK, but the gutter continues to be empty.

Umm... Maybe your project folder (TM_PROJECT_DIRECTORY) is not set to
the git root directory. At the top file browser click the drop-down
and select “Use «folder» as Project Folder”.

>
> Caio
>
> On 4 Dec 2014, at 13:50, Ronald Wampler <[hidden email]> wrote:
>
> On Thu, Dec 4, 2014 at 6:36 AM, Caio Fernando Bertoldi Paes de Andrade
> <[hidden email]> wrote:
>
>
> I was working on a project inside a locally mounted encrypted volume, which
> may cause the same behaviour as a network drive.
>
> But now even trying it out in a repo inside my home folder, the gutter stays
> empty even though the file browser shows the blue circle indicating the file
> has uncommitted changes.
>
>
> I’ve just reinstalled Yosemite on my Mac, so I don’t have any defaults from
> TM’s previous versions, if that influences anything.
>
>
> Check to see if TM_SCM_NAME and TM_MATE are set (⇧⌃⌘P then select
> 'Show TextMate Variables')?
>
> The only other thing I can think of is if your version of mate does
> not support marks. I recall someone else had that problem, but if you
> reinstalled, you should have the latest version. Try opening a blank
> document and type "$TM_MATE" --help followed by ⌃R and see if it has
> the --set-mark option.
>
>
> Caio
>
> On 3 Dec 2014, at 19:26, Ronald Wampler <[hidden email]> wrote:
>
> On Wed, Dec 3, 2014 at 3:02 PM, Caio Fernando Bertoldi Paes de Andrade
> <[hidden email]> wrote:
>
> I’m not sure this is the proper place to ask this, but:
>
> SCM Diff Gutter bundle doesn’t show anything to me in the gutter.
>
> I'm on the 2.0-beta.6.5, installed the bundle in Preferences, working on a
> project versioned with Git.
>
> Is there anything else I should have done?
>
>
> You shouldn't have to do anything else; however, if the SCM status is
> not enable (which is the default for projects on a network drive) it
> will not show the diff in the gutter.
>
> Does the file browser show the SCM statuses for the files in that project?
>
>
> Caio
>
> _______________________________________________
> textmate mailing list
> [hidden email]
> http://lists.macromates.com/listinfo/textmate
>
>
> _______________________________________________
> textmate mailing list
> [hidden email]
> http://lists.macromates.com/listinfo/textmate
>
>
>
>
> _______________________________________________
> textmate mailing list
> [hidden email]
> http://lists.macromates.com/listinfo/textmate
>
>
> _______________________________________________
> textmate mailing list
> [hidden email]
> http://lists.macromates.com/listinfo/textmate
>
>
>
>
> _______________________________________________
> textmate mailing list
> [hidden email]
> http://lists.macromates.com/listinfo/textmate

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: SCM Diff Gutter

Caio Fernando Bertoldi Paes de Andrade
The “Use <folder> as Project Folder” option was already selected, but even after selecting it to another folder, reselecting it to the git root and making more changes to the file, nothing changed in the gutter.
I inspected the TM_PROJECT_DIRECTORY and it points at the git root directory as it should.

Caio

On 4 Dec 2014, at 14:52, Ronald Wampler <[hidden email]> wrote:

On Thu, Dec 4, 2014 at 11:28 AM, Caio Fernando Bertoldi Paes de
Andrade <[hidden email]> wrote:
Ronald,

Here are the results:

TM_SCM_NAME=git
TM_MATE=/Applications/TextMate.app/Contents/Resources/mate

mate 2.10 (2014-12-02)
Usage: mate [-wl<selection>t<filetype>m<name>rehv] [-u<identifier> | file
...]
[…]
-s, --set-mark <mark>:<value> Set a mark containing <value> (requires
--line).
-c, --clear-mark <mark>       Clear a mark (clears all marks without
--line).
[…]

Everything seems to be OK, but the gutter continues to be empty.

Umm... Maybe your project folder (TM_PROJECT_DIRECTORY) is not set to
the git root directory. At the top file browser click the drop-down
and select “Use «folder» as Project Folder”.

Caio

On 4 Dec 2014, at 13:50, Ronald Wampler <[hidden email]> wrote:

On Thu, Dec 4, 2014 at 6:36 AM, Caio Fernando Bertoldi Paes de Andrade
<[hidden email]> wrote:


I was working on a project inside a locally mounted encrypted volume, which
may cause the same behaviour as a network drive.

But now even trying it out in a repo inside my home folder, the gutter stays
empty even though the file browser shows the blue circle indicating the file
has uncommitted changes.


I’ve just reinstalled Yosemite on my Mac, so I don’t have any defaults from
TM’s previous versions, if that influences anything.


Check to see if TM_SCM_NAME and TM_MATE are set (⇧⌃⌘P then select
'Show TextMate Variables')?

The only other thing I can think of is if your version of mate does
not support marks. I recall someone else had that problem, but if you
reinstalled, you should have the latest version. Try opening a blank
document and type "$TM_MATE" --help followed by ⌃R and see if it has
the --set-mark option.


Caio

On 3 Dec 2014, at 19:26, Ronald Wampler <[hidden email]> wrote:

On Wed, Dec 3, 2014 at 3:02 PM, Caio Fernando Bertoldi Paes de Andrade
<[hidden email]> wrote:

I’m not sure this is the proper place to ask this, but:

SCM Diff Gutter bundle doesn’t show anything to me in the gutter.

I'm on the 2.0-beta.6.5, installed the bundle in Preferences, working on a
project versioned with Git.

Is there anything else I should have done?


You shouldn't have to do anything else; however, if the SCM status is
not enable (which is the default for projects on a network drive) it
will not show the diff in the gutter.

Does the file browser show the SCM statuses for the files in that project?


Caio

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate




_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate




_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate



_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: SCM Diff Gutter

Allan Odgaard-4
In reply to this post by Caio Fernando Bertoldi Paes de Andrade
On 4 Dec 2014, at 18:36, Caio Fernando Bertoldi Paes de Andrade wrote:

> […] even trying it out in a repo inside my home folder, the gutter
> stays empty even though the file browser shows the blue circle
> indicating the file has uncommitted changes.

The gutter is currently only updated on save, so if you just opened the
file without saving, the gutter is empty.

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: SCM Diff Gutter

Allan Odgaard-4
In reply to this post by Koen Punt
On 4 Dec 2014, at 22:57, Koen Punt wrote:

> Just noticed that my gutter shows changes, but there are no changes..

This could happen if you had changes and committed them, since gutter is
currently only updated on save, not after a commit or similiar.

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: SCM Diff Gutter

Caio Fernando Bertoldi Paes de Andrade
In reply to this post by Allan Odgaard-4
Every test I made I opened a file, added a new line of code and saved the file. No changes in the gutter happened in any test case.

Caio

Sent from my iPhone

> On Dec 4, 2014, at 20:43, Allan Odgaard <[hidden email]> wrote:
>
>> On 4 Dec 2014, at 18:36, Caio Fernando Bertoldi Paes de Andrade wrote:
>>
>> […] even trying it out in a repo inside my home folder, the gutter stays empty even though the file browser shows the blue circle indicating the file has uncommitted changes.
>
> The gutter is currently only updated on save, so if you just opened the file without saving, the gutter is empty.
>
> _______________________________________________
> textmate mailing list
> [hidden email]
> http://lists.macromates.com/listinfo/textmate

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: SCM Diff Gutter

Allan Odgaard-4
On 5 Dec 2014, at 7:50, Caio Fernando Paes de Andrade wrote:

> Every test I made I opened a file, added a new line of code and saved
> the file. No changes in the gutter happened in any test case.

You can find the source of the command via the bundle editor: SCM Diff
Gutter → Other Actions → Update Gutter on Save.

I suggest you insert some debug statements in this command to figure out
why it does not work for you.

For example insert this on last line to get a dialog on save that show
added/changed line numbers, as parsed by the command:

        abort "Added: #{added.join(', ')}\nChanged: #{changed.join(', ')}"

If you do not get such dialog, then it doesn’t run the command or
exits at the top, because TM_SCM_NAME is unset.

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: SCM Diff Gutter

Caio Fernando Bertoldi Paes de Andrade
Allan, thanks for the guidance, I found the problem.

I had configured my git to globally show colour in its output, by setting color.ui to always.
This added color code characters before the + or - the bundle's command matches the output against, making it think no changes were made.
I solved it by setting color.ui to auto, which still gives me coloured output when I’m on terminal, but doesn’t pollute the output when TM executes it.

Since color.ui auto is the default since git 1.8.4, I don’t think many others will run into the same issue, but you could consider adding a —no-color flag to the git diff invocation inside the bundle’s command, which would make sure no one has the same problem ever again.

Caio

> On 4 Dec 2014, at 23:41, Allan Odgaard <[hidden email]> wrote:
>
> On 5 Dec 2014, at 7:50, Caio Fernando Paes de Andrade wrote:
>
>> Every test I made I opened a file, added a new line of code and saved the file. No changes in the gutter happened in any test case.
>
> You can find the source of the command via the bundle editor: SCM Diff Gutter → Other Actions → Update Gutter on Save.
>
> I suggest you insert some debug statements in this command to figure out why it does not work for you.
>
> For example insert this on last line to get a dialog on save that show added/changed line numbers, as parsed by the command:
>
> abort "Added: #{added.join(', ')}\nChanged: #{changed.join(', ')}"
>
> If you do not get such dialog, then it doesn’t run the command or exits at the top, because TM_SCM_NAME is unset.
>
> _______________________________________________
> textmate mailing list
> [hidden email]
> http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: SCM Diff Gutter

Allan Odgaard-4
On 5 Dec 2014, at 23:09, Caio Fernando Bertoldi Paes de Andrade wrote:

> I had configured my git to globally show colour […] consider adding
> a —no-color flag to the git diff invocation inside the bundle’s
> command

Done:
https://github.com/textmate/scm-diff-gutter.tmbundle/commit/151aa99f8851cc929d9b94bace9d1f23218c6d70

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate