monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Re: New commands (for mtn, in lua)


From: Markus Schiltknecht
Subject: Re: [Monotone-devel] Re: New commands (for mtn, in lua)
Date: Thu, 06 Sep 2007 08:57:47 +0200
User-agent: Icedove 1.5.0.12 (X11/20070607)

Hi,

William Uther wrote:
I was trying to think of the use case for update without a prior sync. It seems that this is it: if you have lots of projects/branches in a single database, then you might sync once and then need to update many workspaces from the sync'd repository. You don't want to sync for each update.

Another use case is, wanting to sync to (or pull from) multiple, different servers, before doing an update. Hard coding a sync before update doesn't help with that.

Or having already synched (i.e. at startup) just some minutes ago.

Besides, not all updates implicitly ask for a sync:

mtn update    # yes
mtn update -r 5743b359ae3f5cf114c85bd612ad7aa799a4e97d
              # we dunno, probably the rev has been taken from the db,
              # perhaps from an email. To sync or not to sync?
mtn update -r h:net.venge.monotone
              # yes, a sync could make sense, but then again, that
              # could really be confusing, because:

mtn propagate nvm nvm.my-branch
mtn update
# ...
# working on my-branch
# ...
mtn commit --branch nvm.my-branch
mtn diff -r h:net.venge.monotone
              # shows you a diff to the last rev propagated
mtn update -r h:net.venge.monotone
              # don't you expect to be updated to exactly that rev?

OTOH, there's also propagate, for which a sync could make sense.

mtn propagate net.venge.monotone \
  net.venge.monotone.cvsimport-branch-reconstruction
              # a sync for both branches, before this operation would
              # make sense

It should get clear, that an automatic sync triggering mechanism cannot be as simple as "sync before every update". Rather, it should at least have a limit on how often to sync, when triggered by read only accesses (i.e. at max. every 5 minutes or something) and it should be capable of syncing or pulling (!) from multiple different servers, if requested.

This could probably end up in a system, where you wouldn't need (to manually use) the netsync commands at all anymore. Instead the user would configure, when and how often to sync, push or pull which databases with which remote servers. Probably even automatic merging and propagating should be handled by such a system (the argument being, that whenever you update, you most probably also want a propagation before, provided you are working on a branch which is normally propagated to).

Given a choice between a truly orthogonal command set, and a command set that aligns well with the really common use cases (with commands for the rarer use cases being orthogonal), I'll take the well aligned set.

Agreed, but for the above reasons, I'm maintaining the point, that much less than 99% of the users really want a hard-coded sync before update - me included. When working on a branch, for example, most people do sync+propagate+update much more frequently.

Plus, as long as netsync can take half a minute, please optimize netsync before trying any such automatism. Everything else would be plain annoying.

Regards

Markus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]