Zon
Zon

Reputation: 19880

Netbeans Project Files Browser Colors

GIVEN: I have HTML5 Application with Existing Sources and files tree in Projects Tab. Files are from a remote server, mounted with a local path. Mounted path is used in Project and Site Root Folder parameters. So I work with files as local user, not as server user.

PROBLEM: Some file names in Projects Tab and File Tabs I have worked with are marked green, some blue. Green is commented as locally copied, blue as locally modified. But all these files were opened, modified and saved. Changes are applied as follows from browser tests.

QUESTION: What do these marks mean? Will it affect saving files to server or distributing using mercurial? Why doing the same on different files (open, edit, save) results in different colors?

Upvotes: 1

Views: 7430

Answers (2)

Zon
Zon

Reputation: 19880

I found exact Netbeans setting for this sort of indication. It can be found at Tools - Options - Fonts & Colors - Versioning - Versioning systems - Mercurial/Subversion/Git - Highlighting:

  • green:

    • Locally New (Mercurial, Subversion);
    • Locally Added (Mercurial, Subversion);
    • Locally Copied (Mercurial, Subversion);
    • Added in Working Tree (Git);
    • Added to Index (Git);
  • blue:

    • Locally Modified (Mercurial, Subversion);
    • LocallyRemotely Modified (Subversion);
    • Modified in Wrong Tree (Git),
  • red:

    • Merge Conflict (Mercurial);
    • Local Conflict (Subversion);
    • Conflict (Git);
  • grey:

    • Locally deleted (Mercurial, Subversion);
    • Locally removed (Mercurial);
    • Additional text annotation (Mercurial, Subversion, Git);
    • Ignored (Mercurial, Subversion, Git);
    • Removed in Working Tree (Git);
  • black:

    • Remotely deleted (Subversion);
    • Remotely New (Subversion);
    • Remotely Modified (Subversion);

Understanding versioning colors is clearer when you consider three levels of files storage:

  1. Working files you edit.
  2. Local storage where you commit-copy your working files.
  3. Remote versioning storage to push-copy files from local versioning storage or pull-copy it vice versa.

Upvotes: 3

Jean Waghetti
Jean Waghetti

Reputation: 4727

Let's make sure I understood your use case:

  • you mounted a remote directory in your computer (samba, NFS, sshfs or anything like that);
  • the directory is a "local copy" of a Mercurial project (or any other SCM);

ANSWER

If my assumptions are correct, the green and blue marks are for the state of the file relative to the SCM point of view. They are uncommited files that were modified, removed, added etc.

Even if you are "seeing" local files, they are files on the server. Any change on them will be made to the files on the server. Mounting a remote shared directory is just a way to remote files be acessible as if they were local.

So:

  • the colors are for SCM tools;
  • the files are already saved on the server and
  • if you commit the changes, it will be commited on the server's copy (what you're seeing locally is just a mirror of a server's directory).

The colors on NetBeans are:

  • green: new files;
  • red: files that have errors (like merge conflicts);
  • blue: modified files;
  • grey: ignored file;
  • plain black: "normal files" - none of the cases above.

If the filename is bold, the file is unsaved.

Upvotes: 4

Related Questions