darcs

Issue 2266 darcs get with patch argument fails on Mac OSX: bad error message

Title darcs get with patch argument fails on Mac OSX: bad error message
Priority invalid Status given-up
Milestone Resolved in
Superseder Nosy List rpg
Assigned To
Topics

Created on 2012-11-05.14:51:31 by rpg, last changed 2022-05-05.20:02:30 by bfrk.

Files
File name Uploaded Type Edit Remove
cl-json-after.tgz rpg, 2012-11-08.00:56:09 application/octet-stream
cl-json.zip rpg, 2012-11-08.03:41:09 application/empty
Messages
msg16289 (view) Author: rpg Date: 2012-11-05.14:51:29
1. Summarise the issue (what were doing, what went wrong?)

I tried to roll back to a previous version of my repository per
instructions in the FAQ.  The operation failed, with a cryptic error
message, destroying my working copy in the process.

Also not sure why darcs was trying to create a new subdirectory of the
working copy, instead of doing rollback in place as I expected from
reading the FAQ.

Error message:
darcs get --to-match 'exact "reverse attempt to get project-members into
html"' .
Directory '/Users/rpg/lisp/cl-json/cl-json' already exists, creating
repository as '/Users/rpg/lisp/cl-json/cl-json_0'

Warning: CRC errors found. These are probably harmless but should be
repaired.
See 'darcs gzcrcs --help' for more information.

darcs: _darcs/tentative_pristine: openBinaryFile: does not exist (No
such file or directory)

2. What behaviour were you expecting instead?

Rollback to an earlier state of the repository.

3. What darcs version are you using? (Try: darcs --exact-version)

darcs compiled on Oct 31 2010, at 14:40:05

Context:

[TAG 2.5
Reinier Lamers <tux_rocker@reinier.de>**20101024151805
 Ignore-this: 1561ce30bfb1950a440c03371e0e2f20
] 

Compiled with:

HTTP-4000.0.8
array-0.3.0.1
base-4.2.0.2
bytestring-0.9.1.7
containers-0.3.0.0
directory-1.0.1.1
extensible-exceptions-0.1.1.1
filepath-1.1.0.4
hashed-storage-0.5.2
haskeline-0.6.2.2
html-1.0.1.2
mmap-0.5.6
mtl-1.1.0.2
network-2.2.1.5
old-time-1.0.0.5
parsec-2.1.0.1
process-1.0.1.3
random-1.0.0.2
regex-compat-0.93.1
tar-0.3.1.0
terminfo-0.3.1.2
text-0.7.2.1
unix-2.4.0.2
zlib-0.5.2.0
HUnit-1.2.2.1
QuickCheck-2.1.1.1
test-framework-0.3.2
test-framework-hunit-0.2.6
test-framework-quickcheck2-0.2.7

4. What operating system are you running?
  
Mac OSX: 10.7.5 (Lion)
msg16297 (view) Author: owst Date: 2012-11-06.11:08:41
Hi,

Thanks for the bug report, let's see what I can determine:

> I tried to roll back to a previous version of my repository per
> instructions in the FAQ.  The operation failed, with a cryptic error
> message, destroying my working copy in the process.

What does "destroyed" mean here? Looking at the output, darcs is
creating a new
subdir/repo inside cl-json (called cl-json_0), it shouldn't have touched any
other files. Does `darcs cha` show anything relevant?

> Also not sure why darcs was trying to create a new subdirectory of the
> working copy, instead of doing rollback in place as I expected from
> reading the FAQ.

This isn't clear in the FAQ, but `darcs get` gets a new copy of the
repository
- if this command is performed inside the repo (with no extra
arguments), darcs
will create a new subdirectory containing the copy of the "current" repo.

> Error message:
> darcs get --to-match 'exact "reverse attempt to get project-members into
> html"' .
> Directory '/Users/rpg/lisp/cl-json/cl-json' already exists, creating
> repository as '/Users/rpg/lisp/cl-json/cl-json_0'
> 
> Warning: CRC errors found. These are probably harmless but should be
> repaired.
> See 'darcs gzcrcs --help' for more information.
> 
> darcs: _darcs/tentative_pristine: openBinaryFile: does not exist (No
> such file or directory)

Can you give us the output of running `darcs show repo` in
/Users/rpg/lisp/cl-json. 

I'm not sure what's going on here, so we'll need to try and reproduce it. Is
the repository publicly sharable?

Cheers,
Owen.
msg16298 (view) Author: owst Date: 2012-11-06.11:16:37
I've tweaked the FAQ
http://darcs.net/FAQ#how-do-i-go-back-to-an-older-version-of-my-repository
to mention obliterate, which is probably what you wanted to use.
msg16304 (view) Author: rpg Date: 2012-11-06.14:39:29
On 11/6/12 Nov 6 -5:08 AM, Owen Stephens wrote:
> 
> Owen Stephens <darcs@owenstephens.co.uk> added the comment:
> 
> Hi,
> 
> Thanks for the bug report, let's see what I can determine:
> 
>> I tried to roll back to a previous version of my repository per
>> instructions in the FAQ.  The operation failed, with a cryptic error
>> message, destroying my working copy in the process.
> 
> What does "destroyed" mean here? Looking at the output, darcs is
> creating a new
> subdir/repo inside cl-json (called cl-json_0), it shouldn't have touched any
> other files. Does `darcs cha` show anything relevant?

I had cl-json_0 (which really wasn't what I wanted --- the loading
instructions have a symlink to the location of the working copy --- I
expected a rollback in place).

But somehow all the other files were gone.

They came back when I did a darcs get

I also note that I now have this structure

cl-json/ <-- working directory
  ...the files that should be there...
  cl-json/ <-- I don't know what this is
    _darcs <-- not sure how this got there
> 
>> Also not sure why darcs was trying to create a new subdirectory of the
>> working copy, instead of doing rollback in place as I expected from
>> reading the FAQ.
> 
> This isn't clear in the FAQ, but `darcs get` gets a new copy of the
> repository
> - if this command is performed inside the repo (with no extra
> arguments), darcs
> will create a new subdirectory containing the copy of the "current" repo.
> 
>> Error message:
>> darcs get --to-match 'exact "reverse attempt to get project-members into
>> html"' .
>> Directory '/Users/rpg/lisp/cl-json/cl-json' already exists, creating
>> repository as '/Users/rpg/lisp/cl-json/cl-json_0'
>>
>> Warning: CRC errors found. These are probably harmless but should be
>> repaired.
>> See 'darcs gzcrcs --help' for more information.
>>
>> darcs: _darcs/tentative_pristine: openBinaryFile: does not exist (No
>> such file or directory)
> 
> Can you give us the output of running `darcs show repo` in
> /Users/rpg/lisp/cl-json. 

Yes.  BTW, I am now using 2.8 instead of 2.5.  Much of this oddness
happened when I tried to do the darcs get under 2.5.

It seems possible to me that the 2.5 which I got when I was running Mac
OSX 10.6.x was not happy on 10.7.x  I wouldn't know how to confirm or
disconfirm this.
> 
> I'm not sure what's going on here, so we'll need to try and reproduce it. Is
> the repository publicly sharable?

It's open source software and has no private information in it.  If
you'd like, I could probably tar it up and push it onto the bug tracker.
 Let me know if that's what I should do.

Best,
r
msg16305 (view) Author: owst Date: 2012-11-06.14:59:01
On 06/11/12 at 02:39pm, Robert Goldman wrote:
> Robert Goldman <rpgoldman@sift.info> added the comment:
>
> I had cl-json_0 (which really wasn't what I wanted --- the loading
> instructions have a symlink to the location of the working copy --- I
> expected a rollback in place).

What are "the loading instructions"? I'm not sure what you mean here.

cl-json_0 would be created when you did a `darcs get` in the repository, when a
file/directory named cl-json already existed (did you try the get multiple
times?).

> But somehow all the other files were gone.
>
> They came back when I did a darcs get

This doesn't make sense - darcs get would create a new repo, not pull in
changes/files to an existing repo... Or do you mean that you were able to
recover your files by re-getting the repo?

> I also note that I now have this structure
>
> cl-json/ <-- working directory
>   ...the files that should be there...
>   cl-json/ <-- I don't know what this is
>     _darcs <-- not sure how this got there

The first cl-json is the original working dir. The cl-json sub-directory is
likely created by a darcs get.

What differences do you see in the output of `darcs whatsnew` and `darcs
changes` if you set your cwd as the two cl-json folders in turn?

> Yes.  BTW, I am now using 2.8 instead of 2.5.  Much of this oddness
> happened when I tried to do the darcs get under 2.5.

Ok, that's good, it means things are probably better in 2.8. Would you mind
clarifying what the behaviours are in 2.5 and 2.8, and what, if any, issues
remain in 2.8.

> It seems possible to me that the 2.5 which I got when I was running Mac
> OSX 10.6.x was not happy on 10.7.x  I wouldn't know how to confirm or
> disconfirm this.

I can't think of anything that should cause this to be the case.

> It's open source software and has no private information in it.  If
> you'd like, I could probably tar it up and push it onto the bug tracker.
>  Let me know if that's what I should do.

Yes, that'd be good. Can you create a tar of the repo in a state of being
broken/destroyed, and upload it to the bug tracker? A list of which commands
you ran could probably help too - the trimmed output of history, would be fine.

Cheers,

--
Owen.
msg16306 (view) Author: o.a.stephens Date: 2012-11-06.15:00:03
On 06/11/12 at 02:39pm, Robert Goldman wrote:
> Robert Goldman <rpgoldman@sift.info> added the comment:
>
> I had cl-json_0 (which really wasn't what I wanted --- the loading
> instructions have a symlink to the location of the working copy --- I
> expected a rollback in place).

What are "the loading instructions"? I'm not sure what you mean here.

cl-json_0 would be created when you did a `darcs get` in the repository, when a
file/directory named cl-json already existed (did you try the get multiple
times?).

> But somehow all the other files were gone.
> 
> They came back when I did a darcs get

This doesn't make sense - darcs get would create a new repo, not pull in
changes/files to an existing repo... Or do you mean that you were able to
recover your files by re-getting the repo?

> I also note that I now have this structure
> 
> cl-json/ <-- working directory
>   ...the files that should be there...
>   cl-json/ <-- I don't know what this is
>     _darcs <-- not sure how this got there

The first cl-json is the original working dir. The cl-json sub-directory is
likely created by a darcs get. 

What differences do you see in the output of `darcs whatsnew` and `darcs
changes` if you set your cwd as the two cl-json folders in turn?

> Yes.  BTW, I am now using 2.8 instead of 2.5.  Much of this oddness
> happened when I tried to do the darcs get under 2.5.

Ok, that's good, it means things are probably better in 2.8. Would you mind
clarifying what the behaviours are in 2.5 and 2.8, and what, if any, issues
remain in 2.8.

> It seems possible to me that the 2.5 which I got when I was running Mac
> OSX 10.6.x was not happy on 10.7.x  I wouldn't know how to confirm or
> disconfirm this.

I can't think of anything that should cause this to be the case.

> It's open source software and has no private information in it.  If
> you'd like, I could probably tar it up and push it onto the bug tracker.
>  Let me know if that's what I should do.

Yes, that'd be good. Can you create a tar of the repo in a state of being
broken/destroyed, and upload it to the bug tracker? A list of which commands
you ran could probably help too - the trimmed output of history, would be fine.

Cheers,

--
Owen.
msg16308 (view) Author: rpg Date: 2012-11-08.00:52:17
On 11/6/12 Nov 6 -8:54 AM, Owen Stephens wrote:
> On 06/11/12 at 02:39pm, Robert Goldman wrote:
>> Robert Goldman <rpgoldman@sift.info> added the comment:
>>
>> I had cl-json_0 (which really wasn't what I wanted --- the loading
>> instructions have a symlink to the location of the working copy --- I
>> expected a rollback in place).
> 
> What are "the loading instructions"? I'm not sure what you mean here.

This is a lisp library.  The lisp environment will load the library
based on a pathname spec.  So if the darcs get puts the old version of
my library in a new location, I have to reconfigure my lisp environment.

darcs obliterate is probably what I want (assuming that I can roll
forward again).

What I wanted was to roll back, run a test, and then roll forward again.
 So I didn't want the copy to go into a new location, as you point out.

> 
> cl-json_0 would be created when you did a `darcs get` in the repository, when a
> file/directory named cl-json already existed (did you try the get multiple
> times?).
> 
>> But somehow all the other files were gone.
>>
>> They came back when I did a darcs get
> 
> This doesn't make sense - darcs get would create a new repo, not pull in
> changes/files to an existing repo... Or do you mean that you were able to
> recover your files by re-getting the repo?

I was able to recover my files by doing "darcs get" in what had been my
working directory.

> 
>> I also note that I now have this structure
>>
>> cl-json/ <-- working directory
>>   ...the files that should be there...
>>   cl-json/ <-- I don't know what this is
>>     _darcs <-- not sure how this got there
> 
> The first cl-json is the original working dir. The cl-json sub-directory is
> likely created by a darcs get. 
> 
> What differences do you see in the output of `darcs whatsnew` and `darcs
> changes` if you set your cwd as the two cl-json folders in turn?

The subdirectory has nothing in it.

rpg% darcs whatsnew
hunk ./src/encoder.lisp 62
-(defmethod encode-json ((s string) &optional (stream *json-output*)) $
+(defmethod encode-json ((s string) &optional (stream *json-output*))
hunk ./src/encoder.lisp 222
-to a value (:true) that creates a json true value when used in the $
+to a value (:true) that creates a json true value when used in the
hunk ./src/encoder.lisp 278
-*JSON-OUTPUT*), using one of the two rules specified by $
+*JSON-OUTPUT*), using one of the two rules specified by
hunk ./src/encoder.lisp 283
-the encoding: $
+the encoding:
hunk ./src/encoder.lisp 289
-If (car S) is 'OBJECT encode (cdr S) as A JSON Object, $
+If (car S) is 'OBJECT encode (cdr S) as A JSON Object,
hunk ./t/testencoder.lisp 57
-;;        (format t "Encoded:~a" encoded)    $
+;;        (format t "Encoded:~a" encoded)
hunk ./t/testencoder.lisp 71
- $
+
hunk ./t/testencoder.lisp 153
-; $
+;
hunk ./t/testencoder.lisp 175
-;; Test inspired by the file pass1. $
+;; Test inspired by the file pass1.
hunk ./t/testencoder.lisp 280
-  (with-objects-as-hashtables      $
+  (with-objects-as-hashtables
hunk ./t/testencoder.lisp 287
-       (dotimes (x count) $
+       (dotimes (x count)
hunk ./t/testencoder.lisp 352
-  $
+
hunk ./t/testencoder.lisp 357
-  $
+
hunk ./t/testencoder.lisp 420
-    (setf sample-1-json $
+    (setf sample-1-json
hunk ./t/testencoder.lisp 423
-    (setf sample-2-json $
+    (setf sample-2-json

There are 686 lines of output in 'darcs changes', which look like a good
full history.

for the subdirectory:

[rpgoldman-3:~/lisp/cl-json/cl-json] rpg% darcs whatsnew
No changes!
[rpgoldman-3:~/lisp/cl-json/cl-json] rpg% darcs changes

> 
>> Yes.  BTW, I am now using 2.8 instead of 2.5.  Much of this oddness
>> happened when I tried to do the darcs get under 2.5.
> 
> Ok, that's good, it means things are probably better in 2.8. Would you mind
> clarifying what the behaviours are in 2.5 and 2.8, and what, if any, issues
> remain in 2.8.

I don't really know what issues there are --- I'm not enough of a power
user to answer that question.

> 
>> It seems possible to me that the 2.5 which I got when I was running Mac
>> OSX 10.6.x was not happy on 10.7.x  I wouldn't know how to confirm or
>> disconfirm this.
> 
> I can't think of anything that should cause this to be the case.

So darcs should be independent of changes to the underlying APIs
provided by Mac OSX?
> 
>> It's open source software and has no private information in it.  If
>> you'd like, I could probably tar it up and push it onto the bug tracker.
>>  Let me know if that's what I should do.
> 
> Yes, that'd be good. Can you create a tar of the repo in a state of being
> broken/destroyed, and upload it to the bug tracker? A list of which commands
> you ran could probably help too - the trimmed output of history, would be fine.

I will see if I can dig a bad copy out of my snapshot, and the current
state (pretty good), too.

Best,
r

P.S. Computer crashed hard yesterday, which is why I didn't answer
earlier....
msg16309 (view) Author: rpg Date: 2012-11-08.00:56:09
attached file after (successful?) recovery.  Will try to find a copy in 
bad state.
Attachments
msg16310 (view) Author: owst Date: 2012-11-08.01:34:28
Just a quick note to say that what you probably want is to use `darcs
obliterate -o obliterated_patches.dpatch` since you want to be able to roll
forwards" again. That command will create a .dpatch file, which can be
re-applied using `darcs apply obliterated_patches.dpatch`, so that you don't
irrevocably delete your patches before testing. 

I recently created a `git stash` recipe for darcs, here
http://pastebin.com/J04Hw2uB, which may be of some use...

> I was able to recover my files by doing "darcs get" in what had been my
> working directory.

I'm still not certain how this worked... `darcs get FOO` will always
create a
new subdirectory FOO in the cwd! What exact command did you run?

>> Yes.  BTW, I am now using 2.8 instead of 2.5.  Much of this oddness
>> happened when I tried to do the darcs get under 2.5.
> 
> Ok, that's good, it means things are probably better in 2.8. Would you
mind
> clarifying what the behaviours are in 2.5 and 2.8, and what, if any,
issues
> remain in 2.8.

Yeah, that's ok. I was just trying to clarify what "much of this oddness"
meant.

Oh, and I've just looked at your repo you sent. It's using an old
repo-format,
which I'm sure is going to be a cause of these issues. It would be wise
to have
a look at http://darcs.net/OF and consider running `darcs optimize
--upgrade`
if everyone who accesses the repo is using darcs > 2.4.
msg16311 (view) Author: rpg Date: 2012-11-08.03:41:09
Version of cl-json in a bad state.

Has subdirectories that I believe correspond to my attempt to get an
earlier state, but that has empty subdirectories instead of good working
copies.
Attachments
History
Date User Action Args
2012-11-05 14:51:31rpgcreate
2012-11-06 11:08:42owstsetstatus: unknown -> (no value)
messages: + msg16297
2012-11-06 11:16:38owstsetstatus: unknown
messages: + msg16298
2012-11-06 14:39:31rpgsetmessages: + msg16304
2012-11-06 14:59:03owstsetmessages: + msg16305
2012-11-06 15:00:05o.a.stephenssetmessages: + msg16306
title: darcs get with patch argument fails on Mac OSX: bad error message -> darcs get with patch argument fails on Mac OSX: bad error message
2012-11-08 00:52:19rpgsetmessages: + msg16308
2012-11-08 00:56:11rpgsetfiles: + cl-json-after.tgz
messages: + msg16309
2012-11-08 01:34:31owstsetmessages: + msg16310
2012-11-08 03:41:10rpgsetfiles: + cl-json.zip
messages: + msg16311
2017-07-31 00:49:51ghsetstatus: unknown -> given-up
2022-05-05 20:02:30bfrksetpriority: invalid