monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] new ssh branch, success!


From: Nathaniel Smith
Subject: Re: [Monotone-devel] new ssh branch, success!
Date: Sat, 20 Nov 2004 02:00:22 -0800
User-agent: Mutt/1.5.6i

On Wed, Nov 17, 2004 at 06:06:03PM +0100, Christof Petig wrote:
> I created a new net.venge.monotone.ssh checkin which merges the
> changesets branch and the ssh branch and fixes the remaining issues.
> 
> See yourself:
[...]

Cool!

Why did you do it by creating an independent fork of .changesets and
leaving .ssh with two unrelated heads?  Is there some reason that
  $ monotone propagate net.venge.monotone.changesets net.venge.monotone.ssh
didn't/wouldn't work, or?

> Prerequisites:
> server's database has client's public key
> server's monotonerc contains passphrase (I was not able enter the
> passphrase on the remote machine [and every legitimate ssh user also
> remembering the server key's passphrase is overkill IMHO])
>  function get_passphrase (KEYPAIR_ID)
>     return "foo"
>  end
> get_netsync_write/read_permitted on the appropriate ends
>
> The syntax is file:/path/monotone.db for replicating locally (pipe) and
> ssh:address@hidden/path/monotone.db for replicating over ssh.

Hmm, might be some tweaking possible with these, but more important to
get something working and in use.

In netsync.cc:
-  virtual ~session() {}
+  virtual ~session() {} //  if (str_p) delete str_p; }
^^ eh?

+// TODO: we should check for errors
^^ eh?

+       execvp(newargv[0],(char*const*)newargv);
^^ I don't know if we have a standard convention on this, but _I_ like
new templatey cast operators.  (BTW, what's this cast doing anyway?)

Generally, your added code has somewhat odd formatting?  In things like:

+      while (sess->arm())
+      {  if (!sess->process())

do we really need the 'if' tucked up on the same line as the '{'?
And overall, if you could put spaces in appropriate places, that would
be nice; it feel pretty crammed to see things like:

+     newargv[newargc++]="-";
+     for (unsigned i=0; i<newsize-newargc-2 && i<collections.size(); ++i)
+       newargv[newargc++]=collections[i]().c_str();
+       newargv[newargc]=0;

all over the place.

> If you specify --debug the stderr from the server call (also with 
> --debug) will go into monotone-server.log .

What does this mean, exactly?  Where does this file end up?  On the
server or the client?  It seems like it would be more polite to have
the local monotone report the errors in some clearly marked way,
rather than randomly littering files in the cwd?  And usually we want
to see error messages even if we aren't using --debug, --debug is very
very chatty.

How about if the remote server is always run with --quiet, and the
local monotone always prints any remaining output like
  monotone: remote server said: ...
or somesuch?

What happens with this patch on Windows?  Will it compile?  Will it
run?  (Maybe someone else with a Windows dev environment and/or a
stake in the outcome should look into this?)

-- Nathaniel

-- 
Details are all that matters; God dwells there, and you never get to
see Him if you don't struggle to get them right. -- Stephen Jay Gould




reply via email to

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