[darcs-users] packages + revision control: is that possible?
Max Battcher
me at worldmaker.net
Fri Sep 14 20:52:40 UTC 2007
On 9/13/07, Mojca Miklavec <mojca.miklavec.lists at gmail.com> wrote:
> I would need n repositories for packages (say, A, B, C and D), but
> 2^n-n-1 additional ones for all the possible combinations of them (AB,
> AC, AD, BC, BD, CD, ABC, ABD, ACD, BCD, ABCD). Plus an additional
> drawback, that if someone would like to install a new package, he
> would have to switch to the other repository.
>
> All those complications because of a single simple requirement: I
> would like to update to the latest version of all "installed/selected"
> packages with a single command (even if I need to write some simple
> scripting around it, which would run "someing update packageX" n
> times).
Actually, the scenario with 2^n repositories doesn't sound all that
painful in Darcs. You could fairly easily set up cron scripts to
update your composite repositories for you (a sequence of ``darcs pull
-a {repo}`` for each composing package). Because Darcs is happy to
hard link patches on systems that support it you shouldn't even have
all that big of an overhead especially if you tell the composites to
not have a pristine directory nor a working directory (currently a
wishlist item). You just have to be especially careful that patches
never conflict and programmers never directly submit patches to
composites.
End users could update their composite with a single ``darcs pull -a``
and even add new packages with a simple ``darcs pull -a {new composite
repo}`` which would change their default repo to the new composite (so
that the next plain ``darcs pull -a`` would just work). Repository
switching to new default repositories is trivial: the default
repository automatically updates and if you need to manually change it
it is a simple text file under _darcs/prefs. Uninstalling packages
is the only thing that would be somewhat non-trivial in this scenario
because you would have to do an unpull to get rid of that package's
patches but there are a number of techniques you could use to handle
that situation. I just realized that might be a need in Darcs for an
unpull option or a separate command to unpull all patches not in the
remote repository (this would be a potentially dangerous
command/option, but certainly useful in some cases for "branch
switching").
--
--Max Battcher--
http://www.worldmaker.net/
More information about the darcs-users
mailing list