9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Russ Cox" <rsc@swtch.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] bell-labs website and plan9
Date: Mon,  9 Apr 2007 11:50:41 -0400	[thread overview]
Message-ID: <20070409155043.6EC651E8C1F@holo.morphisms.net> (raw)
In-Reply-To: <9ab217670704090750h19fd808dw171a046d088df5f@mail.gmail.com>

devon:
> One thing that this will need is support for a '*' target for -s (and
> I guess for -c, too, just for consistency) to replica/applylog. I have
> a patch for this, and I'll submit it shortly. This flag would make
> applylog ignore all client-side (or server-side) changes, though I
> suppose the latter is already possible.

Since the arguments to -c and -s are just string prefixes, you 
can use -c '' or -s '' already.  I admit it is non-standard.

However, you'd be better off not using replica/pull as
the input to a differ, but instead using replica's change file
/n/sources/plan9/dist/replica/plan9.log.  Replica(8) describes
the format:

   A replica is further described on the server by a textual
   log listing creation and deletion of files and changes to
   file contents and metadata.  Each line is of the form:

      time gen verb path serverpath mode uid gid mtime length

   The time and gen fields are both decimal numbers, providing
   an ordering for log entries so that incremental tools need
   not process the whole log each time they are run.  The verb,
   a single character, describes the event: addition of a file
   (a), deletion of a file (d), a change to a file's contents
   (c), or a change to a file's metadata (m).  Path is the file
   path on the client; serverpath the path on the server (these
   are different when the optional fifth field in a proto file
   line is given; see proto(2)). Mode, uid, gid, and mtime are
   the files metadata as in the Dir structure (see stat(5)).
   For deletion events, the metadata is that of the deleted
   file.  For other events, the metadata is that after the
   event.

It would be easiest to pick the two most recent dumps in
/n/sourcesdump, diff the plan9.log files to pick out the
new lines, and then run diffs between the two different
dump roots.  This is what we used to do when we (I) annotated
all the changes to produce /n/sources/extra/changes.
But it was far too much work to do the annotations and
not enough people cared, so we stopped that particular
experiment.

erik:
> i have also noticed that replica/applylog has a problem.  when i started
> experimenting with copying history from our old fileserver to the new
> one, i started using replica/updatedb and replica/applylog.  updatedb
> worked very well, but applylog hung for me pretty consistantly.

Did you ever use acid to get a stack trace from the `hung' applylogs?
The only threading in applylog is an implementation of something
like fcp to copy files using multiple outstanding 9P read requests.
Since no one else seems to have had problems, I would guess that
there were just some requests that made your file server thrash.
But stack traces would make the answer very clear.

ron:
> My take is that bringing in mercurial, and then using mercurial with
> mounted file systems, instead of ssh, would be quite neat. And, we are
> close to having it. We've got python, almost. We've just about got
> python modules -- actually, I've had them for months. Lots of bits
> work that did not used to. We really are pretty close.

Echoing Ron, I think having Mercurial would be great and doable.
If someone makes a Mercurial client work, I will be happy to make
a Mercurial repository that mirrors sources automatically.

Also echoing Ron, a venti-based SCM sounds similar to git,
which is an SCM built on top of a hash-addressed object store
(that happens not to be named venti).  It would be nice to know
you're not reinventing git, especially since in my experience
the fact that git is hash-addressed makes many things a lot
harder and slower (although I am sure it has advantages).

devon:
> In fact, I seem to recall the last time Uriel was yelling about this
> on the list, Russ offered to do exactly this. Is this offer still
> available? It'd save me some time and effort trying to figure out how
> to revert a replica/pull.

I put a copy of the script we used to use in
/n/sources/contrib/rsc/makemail.  Use at your own risk.
It probably deserves to be rewritten in a better language.

devon again:
> So maybe to go further down that path (and I would
> _love_ to get input from Bell Labs people because they're really the
> ones that have the power to yay or nay any of this), is replica/*
> still an ideal manner for getting updates? Are there potentially
> better ways to do this?

There are things that replica doesn't do very well.  I wish you
could tell it to back up, or to back out local changes, and so on,
but the core functionality works well, and I would be wary of
falling into the CADT Model trap (ask Google).

devon again:
> The scenario being, I want to test my hypothetical replica/applylog
> action parser / diff generator. I run pull, which grabs stuff, but
> I've made changes to xyz.c and that file doesn't get modified because
> of local changes. So I want to roll back my log so I can run pull
> again with -s /sys/src/cmd/xyz.c

Your thinking is stuck in the maze of twisty little passages
that is modern Unix and its version control systems.
Replica is a file distribution mechanism, not a version 
control system.

On Plan 9, one would do this with the dump file system.
9fs sourcesdump and look around -- you've got all the info
there you could possibly want to produce diffs.  You don't
even need to copy anything to your local machine.

Russ



  parent reply	other threads:[~2007-04-09 15:50 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-05 19:45 pedro henrique antunes de oliveira
2007-04-05 21:15 ` John Floren
2007-04-05 21:56   ` W B Hacker
2007-04-05 21:57   ` geoff
2007-04-09 14:24     ` Benn Newman
2007-04-09 14:50       ` Devon H. O'Dell
2007-04-09 14:55         ` erik quanstrom
2007-04-09 15:08           ` Devon H. O'Dell
2007-04-09 15:24             ` erik quanstrom
2007-04-09 15:40               ` Devon H. O'Dell
2007-04-09 15:01         ` Devon H. O'Dell
2007-04-09 15:22         ` ron minnich
2007-04-09 15:30           ` Devon H. O'Dell
2007-04-09 18:02             ` ron minnich
2007-04-09 18:11               ` geoff
2007-04-09 18:14                 ` andrey mirtchovski
2007-04-09 21:04                   ` ron minnich
2007-04-09 22:01               ` Paweł Lasek
2007-04-09 23:26           ` Kris Maglione
2007-04-10  0:14             ` ron minnich
2007-04-10  0:15             ` erik quanstrom
2007-04-10  0:41               ` Uriel
2007-04-10  7:57                 ` Francisco J Ballesteros
2007-04-10  1:08               ` Kris Maglione
2007-04-09 15:50         ` Russ Cox [this message]
2007-04-09 16:18           ` Devon H. O'Dell
2007-04-09 16:46             ` matt
2007-04-09 17:51             ` Russ Cox
2007-04-09 17:07           ` Uriel
2007-04-09 17:11             ` Devon H. O'Dell
2007-04-09 17:32               ` Uriel
2007-04-09 18:03                 ` ron minnich
2007-04-09 18:07                   ` Devon H. O'Dell
2007-04-09 23:03                   ` Christopher Nielsen
2007-04-09 23:41                     ` [9fans] CA Bay Area Plan9 users group Lawrence E. Bakst
     [not found]                     ` <p0624081ec2407f2acfe8@192.168.0.7>
2007-04-10  0:12                       ` ron minnich
2007-04-10 21:31                         ` Roman Shaposhnick
2007-04-10 22:23                           ` Micah Stetson
2007-04-10 23:32                             ` ron minnich
2007-04-11  8:52                               ` Lawrence E. Bakst
     [not found]                               ` <p06240831c241dbdd8043@192.168.0.7>
2007-04-11 11:56                                 ` Eric Van Hensbergen
2007-04-11 15:20                                   ` ron minnich
2007-04-12  4:56                                     ` Joel Franusic
2007-04-12 15:31                                       ` ron minnich
2007-04-13 22:34                                         ` David Hendricks
2007-04-13 23:36                                           ` ron minnich
2007-04-14 22:48                                           ` Roman Shaposhnik
2007-04-15  0:16                                             ` Devon H. O'Dell
2007-04-15  1:37                                               ` Joel C. Salomon
2007-04-15  1:51                                                 ` Devon H. O'Dell
2007-04-15  1:52                                           ` Christopher Nielsen
2007-04-16  9:23                                       ` [9fans] " David Hendricks
2007-04-16 17:08                                         ` Joel Franusic
2007-04-17  7:21                                           ` David Hendricks
2007-04-17  8:40                                             ` Uriel
2007-04-17  9:08                                               ` Christopher Nielsen
2007-04-17  9:08                                                 ` Christopher Nielsen
2007-04-17  9:27                                                 ` Uriel
2007-04-25  0:12                                             ` David Hendricks
2007-04-30  0:01                                               ` David Hendricks
2007-04-30 13:34                                                 ` Uriel
2007-04-30 18:05                                                   ` David Hendricks
2007-04-30 19:43                                                     ` Devon H. O'Dell
2007-04-30 23:04                                                     ` David Hendricks
2007-04-30 23:45                                                       ` David Leimbach
2007-05-10  3:07                                                       ` David Hendricks
2007-05-11 15:17                                                         ` Skip Tavakkolian
2007-05-11 16:06                                                           ` David Hendricks
2007-05-11 16:09                                                             ` Tim Wiess
2007-05-11 16:17                                                               ` Skip Tavakkolian
2007-05-11 16:40                                                                 ` Joel C. Salomon
2007-05-11 18:24                                                                   ` David Hendricks
2007-04-17  4:20                                         ` Vester Thacker
2007-04-17  4:46                                         ` ron minnich
2007-04-17  5:54                                           ` Christopher Nielsen
2007-04-17 21:19                                           ` Roman Shaposhnick
2007-04-10  1:17                       ` [9fans] " Tharaneedharan Vilwanathan
2007-04-10  2:56                         ` Anthony Sorace
2007-04-05 21:27 ` [9fans] bell-labs website and plan9 W B Hacker
2007-04-05 21:33   ` pedro henrique antunes de oliveira
2007-04-05 21:49     ` Fazlul Shahriar
2007-04-05 21:51       ` pedro henrique antunes de oliveira
2007-04-09 15:32 erik quanstrom
2007-04-09 15:44 ` Devon H. O'Dell
2007-04-09 16:15   ` Martin Neubauer
2007-04-09 16:23 erik quanstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070409155043.6EC651E8C1F@holo.morphisms.net \
    --to=rsc@swtch.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).