[MonoDevelop] "Open for Edit" command [VersionControl]
cmarshall at pacificbiosciences.com
Tue Jul 8 20:50:00 EDT 2008
Attached is a patch I'm using locally to better support my Perforce
VersionControl add-in, which I've had some good success with. This
change adds an "Open for Edit" command to the contextual menu, and adds
some new methods/properties to Repository to let version control systems
tell whether or not they need to support an edit command, and adds the
edit command itself. I don't know if the command appears for the SVN
addin, and don't know how these commands appear or not in the menu.
This change also adds a `RepositoryPath' property to ChangeSet, which is
hugely useful for generating perforce changelists.
I'll note a couple of things that were less than helpful in the
* GetPathToBaseText. Perforce doesn't keep local copies of the base
version (at least, I don't think it does), so I need to write a
temporary file to implement this. That's not too bad, but I don't know
how to get notified when that file isn't being used any more, and can be
* Incomplete (?) support for the RequestFileWritePermission part,
which makes opening and using a project a pain. I would settle for a way
to run the "open for edit" command on the project or solution, by
right-clicking on the project or solution entry in the solution browser.
Those are, I think, the only things you can't interact with in that
* (not related to MD, I'm just mentioning this) The Perforce C++ API
seems to dump the output of the "diff" command to the console, with no
way to intercept it. This makes implementing PathDiff more work than it
Also, on an entirely unrelated topic, I see that for MSBuild files, MD
considers a TargetFrameworkVersion of 3.5 to mean 2.0, which means that
when it writes out these files again, it will replace 3.5 with 2.0,
which is very undesirable.
Changelog for this patch:
2008-07-08 Casey Marshall <cmarshall at pacificbiosciences.com>
* Makefile.am (FILES): add
* MonoDevelop.VersionControl.mdp: add
(RepositoryPath): new property.
* MonoDevelop.VersionControl/Commands.cs (Edit): new enum value.
* MonoDevelop.VersionControl/EditCommand.cs: new file.
(CanEdit, EditFile): new methods.
(EditCommandRequired): new property.
(OnEdit, UpdateEdit): new methods.
(RunCommand): handle Commands.Edit.
* VersionControl.addin.xml: add "Open for Edit" command.
These changes are released under the MIT/X11 license.
Comments or suggested changes are appreciated!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 9902 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20080708/3411d728/attachment-0001.bin
More information about the Monodevelop-list