[darcs-devel] [issue324] sftp complains about "~" in path, maybe darcs should complain first

Eric Y. Kow eric.kow at gmail.com
Wed Oct 25 10:25:08 PDT 2006


On Wed, Oct 25, 2006 at 16:17:51 +0000, roumier wrote:
> darcs failed:  user error (Error applying patch to recorded.
> Running 'darcs repair' on the target repository may help.
> ./these.aux: openBinaryFile: does not exist (No such file or directory))
> Your repository is now in an inconsistent state.
> This must be fixed by running darcs repair.

I sat down with Joseph to figure out how on earth this came about, and
we have about 80% of an explanation (see below)

What next...
------------
Joseph: could you please send the sftp error message as a reply to this
ticket?

Somebody with free time: please make darcs get more robust wrt to IO
errors.  I make some suggestions below.

The story
---------
# foo at bar
cd ~/myrepo
darcs init
# make some changes
# record some patches

# local machine
darcs get foo at bar:~/myrepo
# overlook the sftp error!

# foo at bar
cd ~/myrepo
# make some more changes
# record some more patches

# local machine
darcs pull
# WHAM! (error)

Observations
------------
1) darcs get does not work with '~' in ssh paths:
   something like darcs get foo at bar:~/myStuff
   will fail with an error message from sftp

   This is because sftp does not interpret '~' in ssh paths.  Fair
   enough, but maybe darcs should disallow tildes in such paths.
   Or maybe that's too ad-hoc a solution...

2) darcs get does not detect errors from sftp.

   At the very least, the get should say something scary like
   darcs failed: (blah blah blah)

3) darcs get does not clean up after itself when something goes
   wrong, leaving the user to use an inconsistent repository.

   Perhaps it should move _darcs to something like _darcs-broken 
   so that darcs doesn't let the user do stuff in it.

   In Joseph's case, what went wrong is that darcs get managed to get
   the inventory file (via scp?), but not the actual patches (via sftp,
   which doesn't like ~)

The mystery
-----------
What bothers me about this is that it's only 80% of an explanation.
If our explanation was completely true, Joseph's working directory
would be empty, but strangely, it is not empty, and contains a
recent looking version of his files.  How on earth did those get there?
He does not use Unison, rsync or anything like that.

-- 
Eric Kow                     http://www.loria.fr/~kow
PGP Key ID: 08AC04F9         Merci de corriger mon français.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-devel/attachments/20061025/c6c27674/attachment.pgp


More information about the darcs-devel mailing list