darcs

Issue 1976 darcs get could handle missing pristine files more graciously

Title darcs get could handle missing pristine files more graciously
Priority feature Status needs-implementation
Milestone Resolved in
Superseder Nosy List dmitry.kurochkin, gh
Assigned To
Topics Hashed, UI

Created on 2010-10-17.09:18:32 by gh, last changed 2010-11-15.14:44:04 by kowey.

Messages
msg12735 (view) Author: gh Date: 2010-10-17.09:18:30
This is the error I'm having when I try to get a repository who lacks 
some pristine files:

  darcs failed:  Couldn't fetch 
`a47617d9701a159d4709727ec501880a9c4178942dfa53004fb82f0fbe6c0ad0'
  in subdir pristine.hashed from sources:

  thisrepo:/tmp/t2
  cache:/home/guillaume/.darcs/cache
  repo:/tmp/these
  repo:gh@patch-tag.com:/r/gh/ongoing

There are two problems with that:

-  this is really unfriendly, the user does not know what is a pristine 
file and why it is useful. The hash is scary.
-  this suggests that getting the repository is impossible, but that's 
not true! darcs get *could* work around it by proposing the user to get 
the patches and reconstruct the pristine tree afterwards.

So I propose this interface when a "missing pristine file" problem 
happens:


-------8<--------

  Darcs tried to fetch a file from the _darcs/pristine.hashed/ remote 
directory of could not find it.
  This file is called: 
a47617d9701a159d4709727ec501880a9c4178942dfa53004fb82f0fbe6c0ad0
  Maybe you should report this problem to the repository owner, and tell 
them to run ``darcs repair`` on their repository. Also, check for file 
permissions, maybe the file is here but is just unreadable.
  This makes lazy getting impossible, so getting the repository is going 
to be slower but still possible. Do you want to do that? [Y/n]

------->8--------

Or maybe darcs should try to read again the ``hashed_inventory`` file 
and detect whether a ``record`` has been made in the meantine, and start 
getting again if yes. If not, go back to "failsafe get" as proposed 
above.
History
Date User Action Args
2010-10-17 09:18:32ghcreate
2010-11-15 14:44:04koweysetpriority: feature
status: unknown -> needs-implementation