monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Packets or Packet I/O no longer works?


From: c . hintze
Subject: Re: [Monotone-devel] Packets or Packet I/O no longer works?
Date: Tue, 10 May 2005 20:19:41 +0200 (CEST)


On  3 Mai, Will Robertson wrote:
> Thanks, Clemens,

You're welcome,

first let me beg pardon for answering you so late, but I was very
busy!

>   Yes, I would be interested in seeing the TCL script, if only to
> avoid having to work it all out myself!!

Okay, I have attached them to this mail. They are:

  monotone.tcl - The module for accessing the repository via monotone
                 executable, and
  export-tree.tcl - The proggy that is able to export in packet I/O format.

Both files have to be put together into the same dir (export-tree.tcl
will try to find monotone.tcl in its directory).

Perhaps you have to adapt export-tree.tcl a bit (e.g. name of monotone
executable, path & name of tclsh, ...)

You may use it like this:

  $ export-tree.tcl -delta current af2d > delta.packets
  $ export-tree.tcl 768d > full-dump-of-single-rev.packets

You have to stay in the checked out working directory. 'current' is a
pseudo revision that matches the checked-out revision in that working
directory.

You can dump a revision range (1st example) or a single revision only
(2nd one). Using the switch -delta export delta dumps between
revisions (makes the dump much smaller). Without -delta the dumps are
whole content ones.

Today as Monotone does not support to import single revisions only if
the parent revision does not exists in importing database, the absence
of the -delta switch makes no sense anymore. In the past when Monotone
had no revisions but only manifests, you could import every single
manifest you like. To be sure you could import a full dump of a
manifest and it would be available in the target database regardless
if the ancestor manifest exists or not. But as mentioned, this is
impossible today! So do not use the full dump mechanism, it is
senseless.

Sorry that the scripts are a bit lacking in comments and docu, but I
hope they are still useful for you.

>   Being able to send "patches" this way, that incorporate history,
> is one of the main reason for me sticking with darcs (and I don't
> really feel like debating any other pros or cons just at the
> moment);

Yeah! But with the scripts you get some of the features back. But do
not forget what revision you dumped last to be imported. If you forgot
one of the ancestors and import you packets, they will not be
available to you until the revision chain is complete.

That means: suppose you have that revision chain in your source
repository:

   A -> B -> C -> D -> E -> F

and an empty target database. Then you dumped that chain in three
packets containing:

  1. A -> B -> C
  2. D
  3. D -> E -> F

You could /not/ first importing 2, then 1. But you could import

  a) 1 + 2 + 3
  b) 1 + 3

to get the whole revision chain into your target database. Again,
regardless if those dumps were delta or full one.

>  I'm afraid having to rely on full network access for
> sync'ing multiple repositories is a bit of a show-stopper for me.
>   Even Git seems promising in this regard, in-as-much as it's just a
> bunch of files, and rsync is just a file-transfer mechanism.

Exactly. I hope they will reintroduce that feature again. If not, I am
currently planning to implement some further Tcl scripts, that will
use more logic to produce those packets and remembering what ones
already produces for what targets to avoid unnecessary revisions.

(...)


Best regards,
Clemens.
-- 
Clemens Hintze  mailto: c.hintze (at) gmx.net

Attachment: export-tree.tcl
Description: Text document

Attachment: monotone.tcl
Description: Text document


reply via email to

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