darcs

Issue 2284 darcs changes --repo http://darcs.net --last 1 tries to build patch index

Title darcs changes --repo http://darcs.net --last 1 tries to build patch index
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List bsrkaditya, gh, jaredj, kowey
Assigned To
Topics PatchIndex, ProbablyEasy

Created on 2012-12-20.19:12:44 by gh, last changed 2014-03-17.00:07:59 by gh.

Messages
msg16446 (view) Author: gh Date: 2012-12-20.19:12:40
1. Summarise the issue (what were doing, what went wrong?)

Typing: "darcs changes --repo http://darcs.net/reviewed"

After seeing the history I get the message:

Creating a patch index, please wait. To stop press Ctrl-C
darcs: http://darcs.net/reviewed/_darcs/hashed_inventory:
openBinaryFile: does not exist (No such file or directory)

2. What behaviour were you expecting instead?

No attempt to create the patch index for the remote, read-only repository.

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

Darcs from HEAD (screened):

$ darcs --exact-version
darcs compiled on Dec 20 2012, at 13:21:24

Context:

[need to treat paths in prefs/binaries as Posix, even on Windows
Ganesh Sittampalam <ganesh@earth.li>**20121220064600
 Ignore-this: afaa13178a5daf724582760312de9f92
] 

[resolve issue2247: move patch index creation into the job running code
Ganesh Sittampalam <ganesh@earth.li>**20121218223622
 Ignore-this: 495687566cc9d138f4ab97bd2a4283f6
] 

[test that patch index is re-created if not present
Ganesh Sittampalam <ganesh@earth.li>**20121218065605
 Ignore-this: 501fe2db0f6e5c1ceebc485b8095e35d
] 

...

[TAG 2.9.6
Ganesh Sittampalam <ganesh@earth.li>**20121111101529
 Ignore-this: 915d1ac317a74b05887004cd181d0294
] 

4. What operating system are you running?

Ubuntu 12.10
msg16603 (view) Author: gh Date: 2013-02-15.16:42:37
A couple of remarks:

1) also happens with a ssh remote repository
2) will probably happen also with any local read-only repository

Two options:

a) Make Darcs.Repository.FileMod.createPIWithInterrupt check if the 
given Repository has an url that is an HTTP or SSH url, and do nothing 
in that case. It will be correct but only catch case 1).

b) Modify Darcs.Repository.Job.withRepositoryDirectory so that it no 
longer tries to build the patch index. withRepositoryDirectory is only 
used by two commands: changes and show tags. These commands are read-
only. Shall we restrict automatic patch index creation to the commands 
that work on writeable repositories? This would solve a) and b).

I think it's a good thing to have automatic patch index creation only 
with commands that actually write inside a repository, then you have a 
guarantee that you can actually create it.
msg17212 (view) Author: gh Date: 2014-03-17.00:07:58
This bug was closed by the (mistakenly named) patch:

Fri Feb 15 13:30:50 ART 2013  Guillaume Hoffmann <guillaumh@gmail.com>
      * Resolve issue2274: create patch index only with commands that
take a lock
History
Date User Action Args
2012-12-20 19:12:44ghcreate
2013-02-15 14:31:31ghsettitle: darcs changes --repo http://darcs.net/reviewed tries to build patch index -> darcs changes --repo http://darcs.net/ --last 1 tries to build patch index
2013-02-15 14:31:58ghsettitle: darcs changes --repo http://darcs.net/ --last 1 tries to build patch index -> darcs changes --repo http://darcs.net --last 1 tries to build patch index
2013-02-15 16:42:39ghsetnosy: + kowey, bsrkaditya
messages: + msg16603
2014-03-17 00:07:59ghsetstatus: unknown -> resolved
messages: + msg17212