[MonoDevelop] VersionControl Questions

Paul Lange palango at gmx.de
Sun Sep 14 16:42:03 EDT 2008


Lluis Sanchez Gual schrieb:
> El dg 14 de 09 de 2008 a les 01:48 +0200, en/na Paul Lange va escriure:
>   
>> Hello,
>>
>> I'm working on a Bazaar extension to the VersionControl plugin.
>>
>> Basic file status indication works (more or less) but I have some
>> questionsregarding VC development:
>>
>>     * How is the addin notices of a changes file. I found the method
>> NotifyFileChanged(string path) in the Repository class. Anyhow I'm not
>> sure if this method is called if a file has been changed in MonoDevelop.
>>     
>
> Yes, that method is called when a file has been changed inside MD.
>   
That's odd. I've overwritten this method but it never get called.
>>     * The method GetPathToBaseText (string localFile) returns a path to
>> the last version of the file updated from the repository. This is
>> possible with subversion where such a file is stored. Accessing this
>> file is not easy/possible with bazaar. For what is this method needed?
>>     
>
> This method is used to get the differences between the working file and
> the file in the repository (the Diff command).
>   
>>     * The comments of the method void Update (string localPath, bool
>> recurse, IProgressMonitor monitor); say that it returns a list of
>> updated files. If so, how is this done.
>>     
>
> The comment is incorrect. The plugin should call
> FileService.NotifyFileChanged when a file changes.
>   
Thanks.
>   
>>     * If I open a bzr-controlled project with monodevelop and open the
>> solutionpad-context-menu the first time I get a bunch of errors like
>> this. How can I avoid that?
>>
>>     System.Reflection.TargetInvocationException: Exception has been
>>     thrown by the target of an invocation. --->
>>     System.NullReferenceException: Object reference not set to an
>>     instance of an object
>>       at MonoDevelop.VersionControl.AddinCommandHandler.RunCommand
>>     (Commands cmd, Boolean test) [0x00000]
>>       at MonoDevelop.VersionControl.AddinCommandHandler.TestCommand
>>     (Commands cmd, MonoDevelop.Components.Commands.CommandInfo item)
>>     [0x00000]
>>       at MonoDevelop.VersionControl.AddinCommandHandler.UpdatePublish
>>     (MonoDevelop.Components.Commands.CommandInfo item) [0x00000]
>>       at (wrapper managed-to-native)
>>     System.Reflection.MonoMethod:InternalInvoke (object,object[])
>>       at System.Reflection.MonoMethod.Invoke (System.Object obj,
>>     BindingFlags invokeAttr, System.Reflection.Binder binder,
>>     System.Object[] parameters, System.Globalization.CultureInfo
>>     culture) [0x00000] --- End of inner exception stack trace ---
>>
>>       at System.Reflection.MonoMethod.Invoke (System.Object obj,
>>     BindingFlags invokeAttr, System.Reflection.Binder binder,
>>     System.Object[] parameters, System.Globalization.CultureInfo
>>     culture) [0x00000]
>>       at System.Reflection.MethodBase.Invoke (System.Object obj,
>>     System.Object[] parameters) [0x00000]
>>       at MonoDevelop.Components.Commands.CommandUpdaterInfo.Run
>>     (System.Object cmdTarget,
>>     MonoDevelop.Components.Commands.CommandInfo info) [0x00000]
>>       at MonoDevelop.Components.Commands.CommandManager.GetCommandInfo
>>     (System.Object commandId, System.Object initialTarget) [0x00000]
>>     
>
> Hard to tell what's wrong without line numbers. Try running MD with the
> --debug option and post the complete stack trace.
>   
This isn't shown at the console but in error-dialogs. The message is 
"Error while updating status of command: Publish". Beneath Publish there 
are errors for Revert, Update, Status, Commit and Log.
Starting MD with --debug didn't help to get better stack traces.
The second attempt to display the context menu works always great but 
all items in VC submenu are inactive.
> Thanks,
> Lluis.
Thank you for your help!

If you want to have a look on my code (and tell me everything I do wrong 
;) ) look at 
http://bazaar.launchpad.net/~palango/monodevelop-bzr/palango/files

regards,
Paul


More information about the Monodevelop-list mailing list