Eclipse svn move/rename doesn't work on all-lowercase filenames? - eclipse

I am renaming a series of .js files using Refactor -> Rename.
They all work except when I rename a file to an all-lowercase name (i.e. rename Calendar.js to calendar.js). I get this error:
move C:/Users/JohnDeer/workspace/MyApp/WebContent/scripts/ui/Calendar.js C:/Users/JohnDeer/workspace/MyApp/WebContent/scripts/ui/calendar.js
Path is not a working copy directory
svn: Path 'C:\Users\JohnDeer\workspace\MyApp\WebContent\scripts\ui\calendar.js' is not a directory
I checked the ui folder and there is a .svn folder in it.

I think the problem is that file names are not case sensitive in Windows. So the lowercase name registers as the original name and maybe when the source file is the same as the destination, the latter is understood as a directory.
As a workaround you can try to use a temporary intermediate file:
rename Calendar.js to tmp.js
then rename tmp.js to calendar.js
Another possibility is to rename the file in the repository by hand (this can be done using Eclipse's Repository Browsing View as well as from the command line) and then update the project.

Related

.gitignore not ignoring a folder within a directory

It seems a straightforward one, but having researched multiple ways to do it, I can't gitignore a folder within a directory.
I have a root directory which contains all of my code in it. Because it has some back-end NodeJS stuff in it, it has a 'node_modules' folder which contains hundreds of files. As a result, when I try to upload the entire parent folder, GitHub says there's too many files to upload and tells me to reduce the number I'm uploading.
The crucial part is though, the folder has to be uploaded as a whole, as it itself is within a GitHub repository with other files with different folders in.
That means when I go onto my repository, I need this folder's files to display within the folder, and not separately within the repository. I need all of the files to be within this folder, within the parent repository, excluding the node_modules folder.
For example ->
Parent repository -> Child Directory (what I'm uploading) -> Individual files
I've tried to add the node_modules folder to my gitignore through the following methods:
Adding: node_modules/ to my gitignore file
Writing: echo node_modules >> .gitignore through my terminal
Adding a separate gitignore file within my node_modules file with a * in it
None of them have worked and I can't find any other solutions. For reference I'm using a Mac.
Does anyone have any idea what I'm doing wrong, or how it'd be best to do it?
By default, you do not need to include the node_modules folder in your repositories because the package.json file contains all of your project's dependency information. This means that anyone who clones your repository can run npm install and have the entire node_modules folder without problems.
To solve this you can create your own .gitignore file, creating a new file at the root of your project and renaming it to .gitignore (writing exactly that way). Then you can open it with any text editor and add */node_modules to one of the lines.
This will likely solve your problem.

Why does eGit create an extra directory in the remote repo when I do the first commit/push?

Using eGit...
When I perform the initial Commit and Push from Eclipse, a new directory appears in the remote repo. Inside that directory is the root of the project directory. It makes a big mess because when someone clones it (again using eGit) the src folder is munged into a name containing then project folder name, which mucks up the package references in the class files.
eGit assumes you don't want an entire git repository for a single workspace project. Doing so would be wasteful and cumbersome for almost anything nontrivial. https://wiki.eclipse.org/EGit/User_Guide#Implications
You also didn't commit the .classpath file, which would have indicated what the source folders were.

How to exclude path on the deployment in PhpStorm from .gitignore

I always need to exclude all the path defined in the .gitignore file when I synchronize the server with the deployment feature of PhpStorm.
There is a way to copy these path and exclude them without manually exclude them one by one?
I'm searching like a configuration file or somewhere to put a list of directory and files like in the .gitignore file

can't commit code after renaming a file

What I did:
renamed a file
tried to commit
cvs fails with error message
file should be removed and is still there (or back again)
What is the problem and how do I solve it so that I can commit?
Additional information:
I'm using Eclipse with the CVS plugin.
doing an ls in the directory where the file was shows that it is not there
All the other Google hits for this problem (including this question) seem to be asking what to do when a file has been removed with cvs, and then restored outside of cvs' scope. My problem is different: I just need to rename a file.
It means that the file was flagged for deletion by CVS but then appeared again. Renaming for CVS is just a deletion of the file with old name and adding the file with new name. The file must be appeared again with its old name.
You can do 2 things:
1) If you don't need this file then just delete it. (Use cvs -n update command to find its name.) Then you will be able to commit.
1) if you need this file to stay, go to the .CVS subfolder of the folder where the file is located and edit Entries file. Find a line with your file and delete it. Then rename you file (give it a temporary name), call cvs update, rename your file back overriding the new one appeared after cvs update.

Eclipse, SVN trouble

A have copied a folder from one project, which is generated by system to another. Now I want to commit all stuff from the project, the folder was copied to.
What I get is (that copied folder is in folder /webapp):
org.tigris.subversion.javahl.ClientException: Attempted to lock an already-locked dir
svn: Working copy '/home/user/webshop/webshop-impl/src/main/webapp' locked
Ok, I tried to Team->Cleanup and got:
org.tigris.subversion.javahl.ClientException: Path is not a working copy directory
svn: '/home/user/webshop/webshop-impl/src/main/webapp/gwtmodules' is not a working copy directory
org.tigris.subversion.javahl.ClientException: Path is not a working copy directory
svn: '/home/user/webshop/webshop-impl/src/main/webapp/gwtmodules' is not a working copy directory
This eclipse SVN client is messing with me long time with this darn tigris exceptions =)
Please, help with advice :) What am I doing wrong?
This had me baffled as well when I got this error. This happens if we have some pending sessions on committing our changes so we’ll need to do some clean up before we’ll have another try on a commit.
This is the fix:
In STS or eclipse, right click on the offending project, click Team and then select Refresh/Cleanup. SVN gets the offending .lock files and deletes them. You can also do this from the command line.
You should delete .svn folders which contains repo info after you copy a directory to another place.
You are probably seeing it because the copied directory has some svn file which points to some place that does not match to the new location.
I would do an svn export from the first project. This will give you a clean copy of the code without any of the associated svn metadata. You can then add the exported code into the second repository.
It is very likely that your folder is lack of svn info(my case). To fix it, you can copy svn info from other folders, and then modify the snv file(all-wcpropc,entries) to the correct one.
I am not sure it is the recommended way, but it works for me!