[MonoDevelop] perforce addin for monodevelop

Lluis Sanchez Gual slluis.devel at gmail.com
Wed Mar 10 16:10:00 EST 2010


El dc 10 de 03 de 2010 a les 13:49 +0000, en/na Ian Norton va escriure:
> On Fri, 2010-03-05 at 13:42 +0000, Lluis Sanchez Gual wrote:
> > El dv 05 de 03 de 2010 a les 07:15 +0000, en/na Ian Norton va escriure:
> > > Hello Everyone,
> > > 
> > > I've been making good progress on my perforce support addin, but have
> > > hit a bit of a wall.
> > > 
> > > Basically, perforce differs from other VCS in a number of ways, the most
> > > significant is that you have to tell the perforce server what your local
> > > working directory is. In perforce this is called the workspace root.
> > > 
> > > I am treating each perforce workspace as a single repository.
> > > 
> > > The best way to think of a perforce "workspace" is a set of mount points
> > > on your local workstation that map to places (and points in time) on the
> > > perforce server.
> > > 
> > > You might have:
> > > 
> > >  Client:  monodevelop
> > >  Root:    /home/inb/Projects/p4/monodevelop
> > >  View:
> > >    //path/to/depot/stuff/monodevelop/... //monodevelop/...
> > > 
> > > This means that the local folder path becomes significant for a given
> > > perforce repository. For this workspace (perforce uses "Client" and
> > > "Workspace" to mean the same thing) /home/inb/Projects/p4/monodevelop is
> > > where perforce maps the content of //path/to/depot/stuff/monodevelop/
> > > 
> > > My repository needs to know what the user has chosen for the local
> > > directory or be able to set this itself. My PerfroceRepositoryEditor
> > > cannot do this partly due to SelectRepositoryDialog being an internal
> > > class.
> > > 
> > > I cannot get access to set the contents of the parent
> > > SelectRepositoryDialog.entryFolder entry box based on the chosen
> > > perforce workspace. If I could, then I can use this to tell perforce. 
> > 
> > When MD needs to get a repository for a specific local directory, it
> > always calls VersionControlSystem.GetRepositoryReference (path,someId).
> > You can override that method and do any initialization you need on the
> > repository instance.
> 
> Thanks Lluis.
> 
> I'm still a bit confused, how does MD tell a repository what the top
> level local directory it checks out into is? If I could get this then I
> can setup a new perforce workspace, But I'd want to do this while the
> user is still in the RepositoryEditor

The directory on which to checkout is provided when calling the Checkout
method on the repository. Why do you need that path in the
RepositoryEditor?

Lluis.




More information about the Monodevelop-list mailing list