[MonoDevelop] "Open for Edit" command [VersionControl]
Casey Marshall
cmarshall at pacificbiosciences.com
Fri Jul 18 20:45:35 EDT 2008
No comments on this?
On Tue, 2008-07-08 at 17:50 -0700, Casey Marshall wrote:
> 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
> implementation:
>
> * 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
> deleted.
>
> * 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
> view.
>
> * (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
> should be.
>
> 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/EditCommand.cs'.
> * MonoDevelop.VersionControl.mdp: add
> `MonoDevelop.VersionControl/EditCommand'.
> * MonoDevelop.VersionControl/ChangeSet.cs
> (RepositoryPath): new property.
> * MonoDevelop.VersionControl/Commands.cs (Edit): new enum value.
> * MonoDevelop.VersionControl/EditCommand.cs: new file.
> * MonoDevelop.VersionControl/Repository.cs
> (CanEdit, EditFile): new methods.
> (EditCommandRequired): new property.
> * MonoDevelop.VersionControl/VersionControlNodeExtension.cs
> (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!
>
> Thanks.
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list
More information about the Monodevelop-list
mailing list