NuGet sub repository within GalleryServer

Developer
Nov 17, 2010 at 1:16 AM

You mentioned the repository in the morning, but I'm not sure I understand how that works.  What I see is that NuGet.Core.dll is checked in into GalleryServer\src\Gallery.Server\plugins.  Can you explain the sub-repo mechanism, and how NuGet.Core.dll gets updated?

thanks,
David 

Coordinator
Nov 17, 2010 at 1:37 AM
Edited Nov 17, 2010 at 1:37 AM

Here is how it works:

The current repository adds a .hgsub file, which defines the sub repos remote and local locations. When you clone the main repository, the hg client will find this file, and automatically clone the sub repositories defined in this file. Additionaly, there is a .hgstate file which contains the id of the changeset to be used for each sub repos. Thus the compatible changesets are shared by all users. When someone updates a sub repos to another changeset, then the number is updated in this file, and the main repos will create a changeset for that modifiation, propagating the new main changes with the new compatible sub repos changeset (hope it is clear :/ ).

The sub repository still needs to be updated to the desired changeset. But this technique makes it easier, and we can also use those dependencies as source code (debugging, moifying, ...). The only difficulty is to also configure Team City with that configuration, though I assume Kevin and Scott have found how to do it.

When the sub repos are in a stable state, they should be switched to their binary version, because if lighter.

Developer
Nov 17, 2010 at 1:54 AM

Thanks Sebastien, that's a cool hg feature.

Bu the missing piece is that there doesn't appear to be any automated process that copies the resulting binaries into the plugins folder, and that appears to be a manual step now.  Until that happens, having the sub repo doesn't seem to provide a lot of value since it still comes down to checked in binaries.  Or am I looking at this the wrong way?

Coordinator
Nov 17, 2010 at 1:57 AM

The galler server references the source code project, and I assume this binary file is not used. Or if it's not the case, if has to be done like this, it might be temporary dur to the CI platform issues.

Developer
Nov 17, 2010 at 2:00 AM

That does not appear to be the case.  Look under GalleryServer\src\Gallery.Server\plugins.  The binaries are checked in there, and don't come from the build process.  Also, the gallery server solution doesn't appear to reference the NuGet project.

Coordinator
Nov 17, 2010 at 2:08 AM

Ok, I'll discuss it with Scott and Kevin tomorrow morning. Should be fine then. I'll post an update to the discussion when it is done.

Developer
Nov 17, 2010 at 1:17 PM

We've added a ClickToBuild at the root of the Gallery Server repository. This does three things:

1) Builds the latest version of the plugins project (which includes the latest NuGet stuff)

2) Copies the DLLs to the Plugins directory in Gallery Server

3) Builds Gallery Server (with the new DLLs in Plugins)

Currently, this has to be clicked manually and checked in. We are working towards not having to have the DLLs checked in / getting TeamCity to use this ClickToBuild instead of the current one (which just does step 3).