Since I am no longer using Perforce I wanted to turn off the Windows Explorer because somethings I would accidentally select the Perforce option in the right click menu and it would hang for a long time as it tried to reach the Perforce server.
This blog article says that the simplest way to do this is to select Change/Remove Perforce P4Win Components from the Add or Remove Programs Control Panel and then select the Windows Explorer integration for uninstall. When it is done uninstalling a reboot is required.
Another possibly simpler way is to:
- right click any folder
- choose Perforce > Options
- uncheck all check boxes
Drippy by jurvetson
Subversion branching and tagging is basically copying from one repository directory to another.
This article gives great instructions on how to branch and tag with subversion. This article is also good.
This is an example of creating a branch from the trunk.
$ svn copy svn+ssh://email@example.com/home/fkim/svn/foo/trunk svn+ssh://firstname.lastname@example.org/home/fkim/svn/foo/branches/stable
This is an example of tagging the trunk.
$ svn copy svn+ssh://email@example.com/home/fkim/svn/foo/trunk svn+ssh://firstname.lastname@example.org/home/fkim/svn/foo/tags/2012-03-06
To compare branches you can simply do something like this svn diff [path] [path]. For example:
$ svn diff http://foo.com/branches/stable http://foo.com/trunk.
To merge from a branch to the trunk you can use svn merge like this. Note that you need to have the trunk checked out.
$ cd trunk
$ svn merge -r 3:4 svn+ssh://email@example.com/home/fkim/svn/foo/branches/stable/doc/html doc/html
To merge from the trunk to the branch you can try something like this.
$ cd branches/stable
$ svn merge svn+ssh://firstname.lastname@example.org/home/fkim/svn/foo/trunk
You may want to use the --dry-run option when you first run the merge to see how it will go. There might be a lot of conflicts.
Perforce has great tech notes and one of them is Perforce Reverting Submitted Changelists.
Here is how one rolls back to version N-1 .
> p4 sync …@N-1
> p4 add deleted_file
> p4 edit foo bar baz
> p4 sync …@N
> p4 resolve -ay
> p4 sync …
> p4 resolve
> p4 delete added_file
> p4 submit …
You can also do a simple rollback of a file like in this example.
> p4 sync foo#7
> p4 edit foo
> p4 sync …
> p4 resolve -ay
> p4 submit …
My laptop unexpectedly shutdown when I had Eclipse open. After rebooting I could not start Eclipse. Instead it kept crashing with the message “An error has occurred. See the log file …” Looking at the log file I saw errors related to the Perforce plugin.
org.osgi.framework.BundleException: Exception in org.eclipse.core.internal.compatibility.PluginActivator.start() of bundle com.perforce.team.ui.
Caused by: java.lang.ExceptionInInitializerError
I saw a post about this problem which referred to another post for a solution. Basically the post suggests that stale plugin cache information is causing the problem and suggests starting Eclipse with the -clean argument. After doing this I was successfully able to launch Eclipse.
The Perforce Windows GUI has a few neat tricks.
- If you click on a folder/file in the depot view of the Perforce Windows GUI and do a copy (Ctrl+C), then if you do a paste in another application it will paste the complete depot path to that folder/file.
- If you copy the Windows path to a folder/file in your work space and then do a paste in the depot view the Perforce Windows GUI will reveal where in the depot the folder/file is located.
A former colleague has a great Perforce FAQ and in it he writes a lot about how to do a merge.
If you are doing a simple merge one can do it on the code line like in this example.
> p4 integ //depot/foo/...@17,@17 //depot/bar/...
> p4 resolve -am
> p4 submit
(Some people suggest doing p4 resolve -as && p4 resolve -am. The -as is the simple resolve.)
You can also do a simple merge of a file like in this example.
> p4 integ //depot/foo/frank.java#7,#7 //depot/bar/frank.java
> p4 resolve -am
> p4 submit
Sometimes Perforce will not do the integration and say “all revision(s) already integrated.” In that case you can force the revision by using the -f flag.
> p4 integ -f //depot/foo/frank.java#7,#7 //depot/bar/frank.java
Just as you can setup the Subversion client to not prompt for a password every time you communicate with the Subversion server in a similar but not so secure way you can do this with TortoiseSVN.
The easiest way to do this is to right click in Windows Explorer, select Tortoise > Settings. Then in the Settings window select Network. Then in the SSH client set use the Tortoise SSH client, TortoisePlink, to use your username and password. For example:
D:\TortoiseSVN\bin\TortoisePlink.exe -l foo -pw bar
Currently there is a bug with Eclipse and generating the serial version UID. When attempting to generate a serial version UID you will see a dialogue window which says “Computing serial version ID….” and “Starting virtual machine…”. Unfortunately this hangs and you are forced to kill your Eclipse IDE. I started seeing this bug after installing some JDBC plugins and the GEF plugin, I’m not sure if it’s related to that. I tried disabling the plugins but I still see the problem. Before I wasn’t having this problem.
I noticed that I haven’t encountered this problem on other installations of Eclipse, even w/ the JDBC plugins, so could just be that I have a bad build of Eclipse.
I was previously using DbVisualizer to query and update my Oracle databases and was not completely satisfied with it. I actually prefer PhpMyAdmin but that only works with MySQL.
Since I use Eclipse so much for development I decided to look for a JDBC plugin that is at least as good as DbVisualizer. My goal is to have in one workspace access to my database as well as my source and configuration files.
I went to EclipsePlugins and downloaded the three highest rated JDBC plugins, all which happen to be free (in some cases just for non-commercial use).
I installed DBEdit 1.0.3_1, Quantum DB 3.0.1 (which requires GEF, I installed 3.1.1), SQLExplorer 2.2.4.
Setup was quite simple with DBEdit, just add the JDBC driver to the CLASSPATH, give it the JDBC URL and connect. Setup was almost as simple with Quantum DB though it asks you for the components of the JDBC URL instead of the URL directly. I couldn’t figure out how to setup SQLExplorer within five minutes so I gave up.
DBEdit and Quantum DB have similar interfaces and both are similar to DbVisualizer though Quantum DB’s appealed to me a little more. However Quantum DB’s interface responded much more quickly and querying of tables was much faster. DBEdit has a nice feature, which I did not completely test, of inline editing of cell values which seems quite powerful.
Because of Quantum DB’s speed and responsiveness I am going to continue to use that as my primary JDBC plugin but I will also keep DBEdit on the side to use for its inline editing but also in case I find Quantum DB does something in an unintuitive manner.
Update: Since I posted this less than a month ago I found DBEdit much more useful than Quantum DB. It’s inline editing, inserting feature, and other editing features really make it powerful. Also its filter, scrolling through result sets, etc. are great. I highly recommend DBEdit.
When I get someone’s Eclipse project I always ended up recreating the project. Now I won’t need to do that anymore since I learned about the Import feature.
- Go to File > Import…
- Select Existing Projects into Workspace
- Select the root directory of the project
- Press Finish and watch Eclipse wonderfully recreate the project.