Author Topic: [SOLVED in 25.0.0.9]File not found when adding to version control after creation  (Read 7751 times)

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Re: File not found when adding to version control after creation.
« Reply #15 on: August 23, 2020, 06:57:21 PM »
What happens if you use Compare Directory with Git and use " /home/patrick/Projects/course/" as the directory?

patrickkox

  • Senior Community Member
  • Posts: 136
  • Hero Points: 6
  • Debian GNU/Linux user
Re: File not found when adding to version control after creation.
« Reply #16 on: August 24, 2020, 08:22:08 AM »
Absolutely nothing. No pop-up (like with Compare Workspace with Git), no error dialog message or anything like that.

When I do this from the CLI I get the same result (at least if the correct command is git diff)

I've also did a git add -A and a git commit -a -m "Example 4.16 added to project" and checked with git diff after each command and every time I do this the result of git diff is just a blank screen.

Now after doing this and pushing the code to GitHub and editing the file git diff shows the following output:
Code: [Select]
diff --git a/Chapter 04/Example 4.16/main.cpp b/Chapter 04/Example 4.16/main.cpp
index ea0f202..317350b 100644
--- a/Chapter 04/Example 4.16/main.cpp     
+++ b/Chapter 04/Example 4.16/main.cpp     
@@ -4,4 +4,11 @@
 #include <iostream>
 using namespace std;
 
+// typedef
+typedef int (*functiepointer)(int, int);
+
+// prototypen
+int som(int x, int y);
+int product(int p, int q);
+int bereken(int a, int b, functiepointer fp);

patrickkox

  • Senior Community Member
  • Posts: 136
  • Hero Points: 6
  • Debian GNU/Linux user
Re: File not found when adding to version control after creation.
« Reply #17 on: August 24, 2020, 08:40:34 AM »
I don't know if this is related by when I select Tools -> Version Control (Git) -> Browse Repository...  I get the following dialog box:
Quote
You don't have a repository set up for the current file's
path (/home/patrick/Projects/Course/Exercise 4.01).

Would you like to add '/home/patrick/Projets/Course/
Exercise 4.01' to the repository list?

However this does not seem to solve anything.
Also, when I do git status from the CLI, I get the following output:
On branch master
Your branch is up to date with 'origin/master'.

Quote
Untracked files:
  (use "git add <file>..." to include in what will be committed)
    Chapter 04/Exercise 4.01/

nothing added to commit but untracked files present (use "git add" to track)
there is a file called main.cpp in that directory, but Git only reports the directory not the file.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Re: File not found when adding to version control after creation.
« Reply #18 on: August 24, 2020, 11:48:28 AM »
Absolutely nothing. No pop-up (like with Compare Workspace with Git), no error dialog message or anything like that.

When I do this from the CLI I get the same result (at least if the correct command is git diff)

I've also did a git add -A and a git commit -a -m "Example 4.16 added to project" and checked with git diff after each command and every time I do this the result of git diff is just a blank screen.

Now after doing this and pushing the code to GitHub and editing the file git diff shows the following output:
Code: [Select]
diff --git a/Chapter 04/Example 4.16/main.cpp b/Chapter 04/Example 4.16/main.cpp
index ea0f202..317350b 100644
--- a/Chapter 04/Example 4.16/main.cpp     
+++ b/Chapter 04/Example 4.16/main.cpp     
@@ -4,4 +4,11 @@
 #include <iostream>
 using namespace std;
 
+// typedef
+typedef int (*functiepointer)(int, int);
+
+// prototypen
+int som(int x, int y);
+int product(int p, int q);
+int bereken(int a, int b, functiepointer fp);

Was "recursive" checked?

patrickkox

  • Senior Community Member
  • Posts: 136
  • Hero Points: 6
  • Debian GNU/Linux user
Re: File not found when adding to version control after creation.
« Reply #19 on: August 24, 2020, 02:18:14 PM »
Yes, IIRC the default option has recursive checked.
However I didn't give a recursive option  in the cli, just git diff



patrickkox

  • Senior Community Member
  • Posts: 136
  • Hero Points: 6
  • Debian GNU/Linux user
Re: File not found when adding to version control after creation.
« Reply #20 on: August 26, 2020, 10:37:25 AM »
Just to inform that the problems are still present in Beta 3

This includes the Slack-C stack error that was being worked on for Beta 3

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Re: File not found when adding to version control after creation.
« Reply #21 on: August 26, 2020, 01:09:33 PM »
I was not able to address the one in time (I've been off on another Git feature).  I could not reproduce the stack, but I will try some more things.

patrickkox

  • Senior Community Member
  • Posts: 136
  • Hero Points: 6
  • Debian GNU/Linux user
Re: File not found when adding to version control after creation.
« Reply #22 on: September 18, 2020, 02:55:30 PM »
Another FYI for Beta 4
Creating a new file still triggers a dialog box asking to add the new file to version control (since this option is set in the configuration). After answering yes there is still a "File not found" error, but I didn't get any other Slick-C errors (and now that I think of it, I also think the Slick-C Stack error was already fixed in Beta 3).


Wouldn't it be possible to save the new buffer to an empty file right after creation so there actually is a file to add to version control?This would also fix a "file not found" error when a new file is created but not edited/saved before SlickEdit is closed.

to reproduce that you just add a new file (like test.cpp for example) and after it's created you close SlickEdit.
When you re-open SlickEdit the file is listed in the sources directory of the project, but it doesn't exist
When you double-click that file to open and edit it, there is a dialog box with various options:

'"~/file path/test.cpp"' does not exist
do you wish to
- Check out the latest version
- Get the latest version
- Create the file
- Save a new file


with 3 buttons
OK
CANCEL
Version Control Setup ...


This is off course only a minor annoyance.
There are a few more occasions where this causes SlickEdit to display a "File not found" error

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Re: File not found when adding to version control after creation.
« Reply #23 on: September 23, 2020, 05:20:17 PM »
What kind of project do you have open?  I started tracking this down and if the file is being added to a project we do save it initially, and it gets saved before you would be prompted to add it to version control.

patrickkox

  • Senior Community Member
  • Posts: 136
  • Hero Points: 6
  • Debian GNU/Linux user
Re: File not found when adding to version control after creation.
« Reply #24 on: September 24, 2020, 10:39:22 AM »
It's a GNU C/C++ Project with SE Running on Debian GNU/Linux.

The settings for the new project are:
- GNU C/C++
- Create directory from project name checked
- radio button set to "Add to current workspace" (it's a workspace with several short (1 file) C++ projects).


I answer yes to the create directory question and set the following settings:
- Project Type : Executable
- Source Type : C++
- Application type : an empty project
- Build without makefile (dependencies automatically checked)
- no exising file added since there are none ;-)

Then I add the new file by right-clicking on source Files -> Add -> New File -> Document Mode = Automatic -> Filename : main.cpp
After this the question to add the file to version control appears and answering Yes gives the file not found error
Also, if I don't edit/save the new file, and select "Remove" by right-clicking the filename and also selecting the delete file from disk, there is also a file not found error.

patrickkox

  • Senior Community Member
  • Posts: 136
  • Hero Points: 6
  • Debian GNU/Linux user
Re: File not found when adding to version control after creation.
« Reply #25 on: September 26, 2020, 11:18:20 AM »
Dan,
I don't know if you have had the time between my previous reply and the release of RC1. but I'm still getting the "file not found" error when working with a GNU C/C++ project. And to add, this is not only happening with .cpp files, but also with header files (.h) when they are added to the project.

patrickkox

  • Senior Community Member
  • Posts: 136
  • Hero Points: 6
  • Debian GNU/Linux user
Re: File not found when adding to version control after creation.
« Reply #26 on: September 30, 2020, 02:50:46 PM »
Unfortunately I'm still getting this error with version 25.0.0.6  :(

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Re: File not found when adding to version control after creation.
« Reply #27 on: September 30, 2020, 05:40:14 PM »
I have not been able to reproduce this.  It should be hotfixable so it will not have to wait until 25.0.1.

patrickkox

  • Senior Community Member
  • Posts: 136
  • Hero Points: 6
  • Debian GNU/Linux user
Re: File not found when adding to version control after creation.
« Reply #28 on: September 30, 2020, 08:47:32 PM »
I have not been able to reproduce this.  It should be hotfixable so it will not have to wait until 25.0.1.


This is what I've done on my Debian Testing system to get the error message:


This is with a brand new installation (remove the previous slickedit-pro2020 directory and the hidden .slickedit directory.)


I"ve also started with a new configuration file


I did some modifications to the defaults configuration:
- Appearance -> Tool Window & Toolbar Options : Color icons instead of the default LowColor


- Tools -> Version Control -> Version Control Setup:


Git is setup as Version Control and All checkboxes are checked:


- Auto check-out on edit
- Autodetect Git and Subversion files
- Prompt when files are removed from project
- Set files to read-only on check in
- Prompt when files are added to project


Next I added a new Test workspace and started a new GNU C/C++ Project.


When adding a new file (right-click Source Code directory) and selecting: Add -> New File -> Automatic -> main.cpp


There is a question to add the file to version control and after choosing "Yes" there is the File not Found error message.


I Hope this helps to reproduce it.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Re: File not found when adding to version control after creation.
« Reply #29 on: September 30, 2020, 08:50:31 PM »
That is a different place than I was trying it form (although it is the same dialog).  I thought I tested this on Linux, but I will re-test it.