9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Bakul Shah <bakul@bitblocks.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] hgfs?
Date: Fri, 27 May 2011 01:12:52 -0700	[thread overview]
Message-ID: <20110527081252.CA6F2B827@mail.bitblocks.com> (raw)
In-Reply-To: Your message of "Thu, 26 May 2011 20:16:11 EDT." <c3e3fcb4a013d191146aa46f1e895b5a@ladd.quanstro.net>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2777 bytes --]

On Thu, 26 May 2011 20:16:11 EDT erik quanstrom <quanstro@quanstro.net>  wrote:
> > > A project idea: murkyfs -- browse not just your own mercurial
> > > repo and also the one you cloned from! Extra points for
> > > mapping hg commands like push/pull/merge/diff in a useful way.
> > >
> > > Another idea is a better integration of acem + hg.  [One side
> > > effect using Eclipse is I have been thinking about how one
> > > might build a simple IDE around acme or something similar.]
> > >
> > >
> > http://ueber.net/code/r/hgfs
>
> file servers are great, but hg concepts aren't really file-system oriented.
> it might be nice to be able to
> 	diff -c (default mybranch)^/sys/src/9/pc/mp.c
> but hg diff figures out all the alloying stuff, like the top-level of the
> repo anyway.  also, ideas like push, pull, update, etc., don't map very well.
> so a hg file server seems to me a bit like, "have hammer, see nail".

May be the filesystem model is more like an electric motor
that powers all sorts of things given the right attachment!

> if i'm missing why this is an interesting idea, i'd love to know what
> i don't see.

I partially agree with you; hence the suggestion about editor
integration. But I am wondering just how far this model can be
pushed or extended seamlessly.

Features such as atomic commits, changesets, branches, push,
pull, merge etc. can be useful in multiple contexts so it
would be nice if they can integrated smoothly in an FS.

Example uses:
- A backup is nothing but a previous commit. A nightly
  backup cron job to do "echo `{date} > .commit"
- Initial system install is like a clone.
- An OS upgrade is like a pull.
- Installing a package is like a pull (or if you built it
  locally, a commit)
- Uinstall is reverting the change.
- Each machine's config can be in its own branch.
- You can use clone to create sandboxes.
- A commit makes your private temp view permanent and
  potentially visible to others.
- Conversely old commits can be spilled to a backup
  media (current SCMs want the entire history online).

Now we can map a specific file version to one specific path --
this is what hgfs above does.  But what about push/pull/commit
etc.? One idea is to to map them to operations on "magic"
files.

For example,
- local file copies appear as normal files.
- cat .status  == hg status
- cat > .commit == hg commit
- cat .log == hg log
- echo -a > .revert == hg revert -a
- echo $url > .push == hg push $url
- echo $url > .pull == hg push -u $url

In fact the backend SCM doesn't have to be mercurial; it can
also git or even venti etc. Can we come up with a minimal set?

Do we gain anything by mapping $SCM commands to special files?
What about name clashes?



  reply	other threads:[~2011-05-27  8:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26  3:27 [9fans] 9vx bootimage build instructions? EBo
2011-05-26  3:37 ` erik quanstrom
2011-05-26  3:58   ` EBo
2011-05-26  4:05     ` EBo
2011-05-26  4:18       ` Devon H. O'Dell
2011-05-26  4:24       ` Bakul Shah
2011-05-26  7:40   ` yy
2011-05-26 14:06     ` [9fans] 9vx patches [was: 9vx bootimage build instructions?] EBo
2011-05-26 14:26       ` Devon H. O'Dell
2011-05-26 16:39         ` [9fans] hgfs? Bakul Shah
2011-05-26 22:12           ` simon softnet
2011-05-26 23:24           ` Iruatã Souza
2011-05-27  0:16             ` erik quanstrom
2011-05-27  8:12               ` Bakul Shah [this message]
2011-05-27 12:21                 ` erik quanstrom
2011-05-27 14:45                   ` Lucio De Re
2011-05-27 17:18                   ` Bakul Shah
2011-05-27 17:30                     ` erik quanstrom
2011-05-26 15:34       ` [9fans] 9vx patches [was: 9vx bootimage build instructions?] erik quanstrom
2011-05-26 18:17         ` EBo
2011-05-26 18:58           ` erik quanstrom
2011-05-26 19:17             ` EBo

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=20110527081252.CA6F2B827@mail.bitblocks.com \
    --to=bakul@bitblocks.com \
    --cc=9fans@9fans.net \
    /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).