[MonoDevelop] "Open for Edit" command [VersionControl]
Lluis Sanchez Gual
lluis at novell.com
Mon Jul 21 07:01:31 EDT 2008
El dv 18 de 07 de 2008 a les 17:45 -0700, en/na Casey Marshall va
> 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.
Why not properly implement RequestFileWritePermission instead? MD would
call RequestFileWritePermission when the user wants to modify a file.
It wouldn't need to explicitly use an Edit command.
> > 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.
We should change that api, so it returns a stream or the full content of
> > * 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
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
More information about the Monodevelop-list