[MonoDevelop] perforce addin for monodevelop

Ian Norton-Badrul ian.norton-badrul at thales-esecurity.com
Thu Mar 11 05:10:48 EST 2010


On Wed, 2010-03-10 at 21:10 +0000, Lluis Sanchez Gual wrote:
> 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?

The perforce server wants to know where on my machine i'll keep the
files, it will map one or file paths on the server to those on my
workstation.  You get different sets of these by using different 'client
names' but I still need to tell the server ' i will put files kept
in //perforce/foo/bar/* at /home/inb/perforce/foo-bar/ '

I think I can get around some of this using the path supplied to
Checkout, I'll see how I get on.

Ian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20100311/142b413a/attachment.bin 


More information about the Monodevelop-list mailing list