Integrating Mercurial with PHPEd |
Veteran
|
This is a very basic integration, but should make your life MUCH easier if you are using Mercurial (Hg). This is a work in progress and I anticipate better things when TortoiseHG 0.4 or 0.5 come out.
Background Mercurial is a great DVCS (Distributed Version Control System) that is mostly a command line tool, with windows integration using the excellent TortoiseHg tool. I've gotten VERY USED to using keyboard shortcuts within PHPEd to commit single file commits into CVS (I hit CTL-SHIFT-M to open up a CVS commit dialog within PHPEd) and wanted to do the same thing for Mercurial, which we're considering switching to. This tutorial should save you some time since I figured out the commands necessary. Also, previously it was impossible to to integrate Mercurial with PHPEd due to a bug in Mercurial, which was very promptly fixed by the Mercurial devs when I reported it to their mailing list. Keep in mind that using TortoiseHg already gives you tortoise functionality in PHPEd's file browser, but my problem is that I like keyboard shortcuts. Requirements:
What to do: Creating a Commit Shortcut
Now if you are editing a file all you have to do is type your shortcut to commit it. It will open up Notepad, which you type your commit message into, and save/close, and it will commit. Commit results and errors are output into PHPEd's Log. Pretty handy! To setup nifty Annotate and Log features you do exactly as above except the command lines are:
and
For the annotate I used some options so it would include the name of the author for each line (by default Hg doesn't show this, while CVS does). After using the above Make the following changes:
The above steps opens up the log entry results in PHPEd. Very handy for me! Hope this helps. When TortoiseHg 0.4 or 0.5 is working fine we can create integration with its handy "visual log" and, more importantly, QCT based visual commits which will let you open up a commit dialog to commit multiple files in one go. |
||||||||||||||||
|
|
Thanks a lot for posting the steps. Ill try and follow it and see it if works.
Are there any updates, im using TortoiseHg 0.8 |
||||||||||||
|
Guru master
|
You need to put the D:\Program Files\TortoiseHg\hg.exe between quotes:
"D:\Program Files\TortoiseHg\hg.exe" commit @Name@ --cwd @Path@ As stated in the error the shell attempts to execute D:\Program, which is an invalid command |
||||||||||||
|
|
That was the problem. It works fine now. Now, is it possible to use Notepad++ or TortoiseHg's own Commit window instead of using Notepad |
||||||||||||||
|
Guru master
|
That would be a TortoiseHG option and not something I can help you with as I don't know the program.
|
||||||||||||
|
|
Presently, the above integration for Mercurial, brings up Notepad when Committing changes. It asks for summary of the commit. What i like is that instead of opening notepad, it should open some other program. |
||||||||||||||
|
Guru master
|
Yes and I understood what you were asking but as I said, IF it is possible you'd have to configure that in TortoiseHG and not in PhpED.
|
||||||||||||
|
|
Ok Thanks. Can PHPed integrate Mercurial support such as they have to CVS. Netbeans has a good integration. |
||||||||||||||
|
|
Hi guys,
For those who want to use the Mercurial's graphical client to commit (TortoiseHg) within their favorite PHP IDE, here's a simple workaround for Windows plateforms : You need to download and install a small program : SlickRun (a command line using a list of personnal keywords) Look here : Here's an example (with the default keybord shortcuts) Call SlickRun : WIN+Q Type : setup Click : New MagicWord Create something like this : MagicWord : hgProjectName Filename : C:\Program Files\TortoiseHg\thgw.exe Start Mode : Default windows Startup Path : D:\projects\myProject\www <-- Here's the path to your project's root Parameters : commit Then all you have to do to commit is : Call SlickRun : WIN+Q Type : hgProjectName Enjoy |
||||||||||||
|
Integrating Mercurial with PHPEd |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by