Mirroring support within NuGet

Topics: General
Jun 26, 2012 at 9:27 PM

I'd like to add support for repo 2 repro partial mirroring within NuGet (I'm aware of external scripts that do full repo to folder mirroring by parsing the feed - that's not what I'm looking for).

Scenario example: automatically pull down latest versions of selected subset of approved packages from nuget.org (ex: Microsoft.AspNet.Mvc) along with their dependencies and push them to an private NuGet repository.

Reason for built-in support: by adding support within NuGet I can ensure the same engine is used for dependencies resolution and push to repository, maximizing the chances that NuGet clients will be able to find the correct packages when pointing to private repository and that mirroring will work on newer versions/types of repositories.

Proposal: add a new command "mirror" to NuGet.exe that behaves similarly to an aggregate of list, install (for picking up packages to mirror) and push.

I'm willing to make the code change.

Jul 3, 2012 at 2:48 AM

pull request: http://nuget.codeplex.com/SourceControl/network/forks/vdbg/Mirroring/contribution/3056

Jul 3, 2012 at 9:51 AM

You might also want to take a look at the "clone" command we have here: http://github.com/BenPhegan/NuGet.Extensions

Supports similar functionality, but you can clone from one repo to another using:

1) Full clone of the entire repo

2) Partial clone based on a package

3) Partial clone based on tags (i.e. all "external" or "nunit" tagged packages)

4) A "refresh" mode which gets any new package versions for versions already on the feed (useful for "mirroring" other feeds)

Might be some things that you could use as well.