I use Netbeans (7.3), Mercurial, and BitBucket (BB) for personal version control and backup, and also as a way to switch between my work laptop and home desktop. I'm still learning Mercurial, so I created a C++ test project in Netbeans on my desktop and created the BB repository. On my desktop, I init the Mercurial project, commit, and push to my default BB repo, all using Netbeans's GUI commands (no command line Hg commands). My project consists of main.cpp, Person.h, and Person.cpp, where I do some trivial object creation and "cout" to print some strings (print name of Person, "Dave").
On my laptop, I clone the repo from BB to a local directory and open the project in Netbeans. I get the three files as part of my Netbeans project. Now I create a new object, Computer.h and Computer.cpp, and I commit/push to BB... five .h/.cpp files all total in my Netbeans project now.
Back to the desktop: inside Netbeans, I "Pull from Default" and then "Update". When I do this, I can see (Windows explorer) that the new Computer.h/.cpp files were pulled down into the directory, and my main file now shows the changes using the Computer object (print name of Person, "Dave", and name of Computer, "Hal"). The problem is, even though my main file is up-to-date and my project compiles and behaves like it should with the new code, my Netbeans project tree does not show the new Computer.h/.cpp files. I have to "Add Existing Files..." manually to get the new files into the project tree. It's fine when I only add one or two files at a time, but I have a bigger project with a lot more source files, and I can't keep up with how the project tree changes. How can I get the Netbeans project tree to update and reflect the actual file changes that have taken place (additions and deletions to project)? Thanks in advance!
Ensure that your netbeans is configured to store the project file membership under the source directory for your project, (probably in a nbprojects sub-directory), and add some or all of the files in that to your project, (I would look for the file that lists the project members only).
N.B. you will either have to ensure that netbeans is using relative paths or that you have the same paths on both machines, (preferably the former).
Related
I want to make copy of an existing eclipse project A and customize it and check it in CVS as a second project B. So I manually copied the entire project A directory into another workspace and opened the project in eclipse. Made changes (removed bunch of files), now when I try to check it in CVS, it somehow recognize it as project A and not a new project B. Seems like I copied some file that tracks the root. How can I remove it so I can check in as project B in CVS?
Even if I try to import the projectB in a different workspace in eclipse, I get the message, project already existsand identifies it as projectA.
See if you can unshare the project through the UI. You likely have the original CVS directories that point back to the existing location.
I want to clone my Git repo into NetBeans (which only contains a Unix shell script).
When I'm asked by NetBeans if I would like to create a project for this repo, I only find Java, PHP, Web, C/C++, etc.. projects groups, but I want an bare-bone group, it's just a shell script file, what to do?
I don't want Ant or building anything, I just want to use NetBeans as an editor and commit changes to Git.
Ok, here goes, after cloning the project from GitHub, I was asked by NetBeans if would like to create a project, so I chose yes, then:
1) I chose "Java" under Categories and "Java Free-Form Project" under Projects
2) I created an Ant build file "build.xml" from sample on https://ant.apache.org/manual/using.html
3) After creating the project I moved the "build.xml" to directory "nbproject" and updated "nbproject/project.xml" to point to the new build file destination
4) I updated the "build.xml" tasks to copy source files and license file in case of build and zip the build files in case of distribution
5) Finally I had to add a ".gitignore" fie to the root directory to ignore the "build" and "dist" directories from Git
After this I commited and pushed the whole NB project to GitHub you can find the final files here https://github.com/asaeles/sql_runner
for such simple projects, netbeans would be kind of an overkill, I believe notepad++ and normal git shell would suffice
I'm new with Xcode SCM tool. I would like to ask one question to you guys in detail.
We (Guy-A and Guy-B) working on the same SVN repository project through Xcode SCM tool.
We checked out the code and Guy-A added a folder to the project as SampleFileAdded to his local mapped version (please refer Figure1) and he added & committed to the SVN repository fine.
After that Guy-B updated / got latest version from SVN .
Here is the issue.Guy-B's project local mapped folder now contains the latest folder that Guy-A is added. However it didn't link with his Xcode folder structure.Guy-B need to drag the folder to his Xcode to link it with project.
May I know how can I avoid this step. Any help on this is appreciated.
Figure1:
Guy-A Local Machine
Guy-B Local Machine After Updated
On adding the folder to the project the project file will have been modified. It looks like somehow this was not committed, hence the problem.
Did you use File > Source Control > Commit… or select the (apparently) modified set of files and commit those? The former method will catch everything - sometimes Xcode fails to mark files as modified in the project window, and sometimes you'll even notice the count of files in the commit dialog is greater than the number listed in the dialog...
File > Source Control > Commit… should catch everything, even if it is not immediately apparent that it has. (Use an svn client, such as svnX, or svn in a terminal window to determine exactly what was/needs to be committed.)
Have Guy-A committed the project file too ? that is .xcodeproj . Please try to commit project file too then you need not to drag the folder after update.
In Eclipse I was successfully pulled my Code from Git, but I could See ">" without making any changes to my Local directory..Is it I am making some error in pulling the code?
Would you describe which specific files are marked as locally changed (">")?
Depending on your repository contents and view settings, I imagine they are files that Eclipse or its plugins generate, such as ".project".
Eclipse IDE uses certain files to record your project settings (".project") and other information about your project such as its Java classpath (".classpath"). By default these files are filtered out and not displayed by Eclipse views such as the Package Explorer. But those filter settings can be changed.
If these same files are stored in your git repository, and if there are any further modifications to those settings within the Eclipse IDE, then the files may become marked as modified since the last commit (">").
Because you did not directly change their contents in a text editing window, and may not even have been aware that they were present at all, you could perhaps be surprised when they show up as locally modified files in a view such as the Package Explorer or the Synchronize View.
It's funny, I've been working with SVN (Tortoise on Windows) for a relatively long time, but I've never used other actions than checkout, commit and merge since the projects I worked on already existed.
Now I want to put an Eclipse project under version control by my own and realize that I am too stupid to do that. There is already a new SVN server with emtpy branches/tags/trunk folders, it was created by another person.
1.)
My intention is to add three subfolders to the trunk folder - these three folders are just for a better structure, they should not have anything to to with version control or my eclipse project (apart from the fact that I want to put my Eclipse project in one of those three folders in the second step).
But how can I do that? I created those three folders on my hard drive via Windows Explorer and tried to put them in the SVN's trunk folder by using the import function of Tortoise. This failed with the following log message:
Command: Import C:\New Folder to https://<SVN-Adress>/trunk
Adding C:\New Folder\folderA
Adding C:\New Folder\folderB
Adding C:\New Folder\folderC
Commit blocked by pre-commit hook
svn: URL file '<SVN-Adress>/trunk/folderA' non-existent in that revision
svn: URL file '<SVN-Adress>/trunk/folderB' non-existent in that revision
svn: URL file '<SVN-Adress>/trunk/folderC' non-existent in that revision
2.)
In the second step, I want to add my eclipse project to folderA and another eclipse project to folderB. Since there is already content in the eclise project folders, the "Create Repository here" command of Tortoise SVN doesn't seem the way to go. Apart from the question how to do that properly, is there something to be aware of? E.g. are the two eclipse projects independet and isolated later on or does a commit of the one project also increase the version of the other project?
Thank you
Checkout https://<SVN-Adress>/trunk to your root folder (c:\New Folder), then SVN-add all the files and folders you want to be in source control, and commit.