darcs

Issue 2056 WANT: optimize --http should convert pristine before creating packs

Title WANT: optimize --http should convert pristine before creating packs
Priority wishlist Status wont-fix
Milestone Resolved in
Superseder Nosy List gh, mornfall
Assigned To
Topics Hashed, UI

Created on 2011-04-02.09:27:59 by gh, last changed 2022-12-11.08:21:17 by bfrk.

Messages
msg13865 (view) Author: gh Date: 2011-04-02.09:27:56
When optimize --http is run on a repository whose pristine files are in
the "old" format (the kind of repo that issue a "one-time conversion"
warning message with recent darcses), the conversion is not done before
packs are created.
As a consequence, users see this "one-time conversion" message during
the "get".

optimize --http should rather run this conversion before building the packs.

This probably requires a refactor to the function
Darcs.Repository.HashedRepo.applyHashed so that the conversion can be
done on demand.
msg13874 (view) Author: gh Date: 2011-04-03.09:05:03
I have a patch that makes "darcs optimize --http" systematically run the
pristine upgrade before creating the basic pack (see
http://wiki.darcs.net/Internals/OptimizeHTTP), and I'm not sure this is
worth it.

With this patch, users will systematically see the warning message.

Without (current situation), the warning only happens during "darcs get"
from a packed repos who didn't have the pristine conversion. Since
"optimize --http" is only in recent darcses, which do this conversion as
soon as a patch is applied on a repo, it should only happen very seldom.

So, the cure is worse than the disease. I suggest we don't fix this.
msg13875 (view) Author: ganesh Date: 2011-04-03.09:07:06
On 03/04/2011 10:05, Guillaume Hoffmann wrote:
> 
> Guillaume Hoffmann <guillaumh@gmail.com> added the comment:
> 
> I have a patch that makes "darcs optimize --http" systematically run the
> pristine upgrade before creating the basic pack (see
> http://wiki.darcs.net/Internals/OptimizeHTTP), and I'm not sure this is
> worth it.
> 
> With this patch, users will systematically see the warning message.

Can't you first check if it's converted, using the same code that
already does that check?

> 
> Without (current situation), the warning only happens during "darcs get"
> from a packed repos who didn't have the pristine conversion. Since
> "optimize --http" is only in recent darcses, which do this conversion as
> soon as a patch is applied on a repo, it should only happen very seldom.

Given this it may not actually be worth the effort, of course.

Ganesh
msg13881 (view) Author: gh Date: 2011-04-03.16:34:37
> Can't you first check if it's converted, using the same code that
> already does that check?

There is no such directly usable code. This check is done by catching
an exception provoked by a pattern matching failure in
Darcs.Repository.Hashed , functions applyHashed and applyHashed'.
msg16634 (view) Author: kowey Date: 2013-02-16.14:36:54
Is it just the error message that's the problem, or the fact that doing 
the conversion/check on an already pristine-optimised repo is slow?  If 
it's fast in practice, could we silently do it for optimize?
History
Date User Action Args
2011-04-02 09:27:59ghcreate
2011-04-03 09:05:04ghsetmessages: + msg13874
2011-04-03 09:07:07ganeshsetmessages: + msg13875
title: optimize --http does not convert pristine before creating packs -> optimize --http does not convert pristine before creating packs
2011-04-03 16:34:38ghsetmessages: + msg13881
title: optimize --http does not convert pristine before creating packs -> optimize --http does not convert pristine before creating packs
2013-02-16 14:36:55koweysetpriority: feature
status: unknown -> needs-diagnosis/design
messages: + msg16634
title: optimize --http does not convert pristine before creating packs -> WANT: optimize --http should convert pristine before creating packs
2013-02-16 14:37:07koweysetpriority: feature -> wishlist
2022-12-11 08:21:17bfrksetstatus: needs-diagnosis/design -> wont-fix