darcs

Issue 1232 darcs convert forgets _darcs/prefs/prefs

Title darcs convert forgets _darcs/prefs/prefs
Priority bug Status resolved
Milestone 2.5.0 Resolved in 2.5.0
Superseder Nosy List ckeen, darcs-devel, dino, dmitry.kurochkin, gh, jaredj, jcpetruzza, kowey, thorkilnaur
Assigned To dino
Topics ProbablyEasy

Created on 2008-11-19.17:16:09 by gh, last changed 2010-06-15.22:32:18 by dino.

Messages
msg6697 (view) Author: gh Date: 2008-11-19.17:16:06
I've attached the darcs1 repos that you can convert with darcs2 into the darcs2
format, and see the post-record test is no longer here (the file
_darcs/prefs/prefs is removed).

The test preference in  _darcs/prefs/prefs was well recorded by a patch that you
can see in the history of the repository.

It means the patches and pristine of the created repository are inconsistent.
Attachments
msg6698 (view) Author: gh Date: 2008-11-19.20:10:31
The darcs version is : 2.1.0 (+ 333 patches)
msg6699 (view) Author: ckeen Date: 2008-11-19.20:49:45
the patch gets created and copied but not applied.

Easier test case:
mkdir /tmp/test && cd /tmp/test
darcs init --old-fashioned-repo
darcs setpref–– test 'echo TESTED'
darcs record -a -m 'setpref'
darcs convert . ../test2

If you look into ../test2/_darcs/patches and zcat the only file you will see the patch.
Applying patches that are not located inside the working copy seems to be the problem.

I have still too little knowledge of darcs internals to point my finger at it though. Who wants to help?
msg6700 (view) Author: ckeen Date: 2008-11-19.20:53:07
[ckeen@hermes:/tmp/test3/_darcs/patches]$ zcat 0000000115-407e49678d2e10a2968e689205548a0a3d76f7f4112beec04c59a637735317fc
[setpref
foo@example.com**20081119202331
 Ignore-this: 3833165100f19d7dbbc1b177e962dfaf
] changepref test
msg6711 (view) Author: jcpetruzza Date: 2008-11-21.17:40:37
We run onto this issue while converting our main repo and after everybody pulled 
a fresh copy of it. Since the repo seems to be in a not-as-consistent-as-one-
would-like state, we haven't pushed any new patches to it. However, we can't 
keep it on hold indefinitely.

So my question for the darcs developers is: what should we do now? Is it safe 
enough to push new patches? Is there some manual fixing we can run on the repo? 
Should we wait a little while?

Thanks!
msg6712 (view) Author: kowey Date: 2008-11-21.17:52:36
David: may I ask you to comment?

One workaround I might suggest is to do a darcs changes -v and grep for setpref
test (in order to recreate the latest prefs file by hand).  I think that should
be a fairly safe operation, but I'd wait to see if David has any thoughts on the
matter.

If somebody could boil down Guillaume's example into a minimal test case for our
bugs/ directory, and submit a patch, it'd be great (and it would help us fix
things faster!)
msg6713 (view) Author: droundy Date: 2008-11-21.18:00:49
On Fri, Nov 21, 2008 at 05:52:39PM -0000, Eric Kow wrote:
> David: may I ask you to comment?
> 
> One workaround I might suggest is to do a darcs changes -v and grep for setpref
> test (in order to recreate the latest prefs file by hand).  I think that should
> be a fairly safe operation, but I'd wait to see if David has any thoughts on the
> matter.

They can just copy the prefs file over from the old repository, or set
it to whatever you like.  And no, this has no consistency-related
issues, as _darcs/prefs/prefs isn't actually versioned.  It's stupid,
but that's the way it is (and yes, it's my fault).

It does sound like a bug in convert worth fixing.  It's pretty much
harmless, but definitely confusing.  And setpref is enough of a pain
as it is, without this extra trouble.

David
msg8233 (view) Author: kowey Date: 2009-08-18.09:31:40
We still need a test case for this (pending dust settling on our testing
infrastructure).

http://wiki.darcs.net/RegressionTests
msg10725 (view) Author: kowey Date: 2010-04-14.09:07:46
Dino, last time I checked, you were working on this bug (and hopefully
test case as well).  Is that correct?
msg10728 (view) Author: dino Date: 2010-04-14.12:17:14
Unfortunately I've been unable to test changes to the convert
functionality because of issue 1760: Very slow darcs convert with 2.4
(fine with 2.3.0)
msg10729 (view) Author: kowey Date: 2010-04-14.12:40:16
On Wed, Apr 14, 2010 at 12:17:16 +0000, Dino Morelli wrote:
> Unfortunately I've been unable to test changes to the convert
> functionality because of issue 1760: Very slow darcs convert with 2.4
> (fine with 2.3.0)

Couldn't you use a toy repo?

We're also quite keen on having regression tests:
http://wiki.darcs.net/Development/RegressionTests

See also
http://wiki.darcs.net/Development/GettingStarted

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
msg10731 (view) Author: dino Date: 2010-04-14.12:59:59
I used the repo attached to this issue, HTab (131 patches), which I
thought was pretty small. I can try an extremely tiny one, yes.
msg10819 (view) Author: dino Date: 2010-04-26.16:05:43
The following patch updated the status of issue1232 to be resolved:

* Resolve issue1232: darcs convert forgets _darcs/prefs/prefs 
Ignore-this: 3973731c4c3c5297546570ebe3662f06

Added code to copy the _darcs/prefs/prefs file into the newly created
darcs2 repository during a convert. A dumb copy is possibly not the best
solution, but is better than nothing.
msg11439 (view) Author: dino Date: 2010-06-15.22:30:54
The following patch updated issue issue1232 with status=resolved;resolvedin=2.5.0 (current)

* Resolve issue1232: darcs convert forgets _darcs/prefs/prefs 
Ignore-this: 3973731c4c3c5297546570ebe3662f06

Added code to copy the _darcs/prefs/prefs file into the newly created
darcs2 repository during a convert. A dumb copy is possibly not the best
solution, but is better than nothing.
msg11441 (view) Author: dino Date: 2010-06-15.22:32:18
The following patch updated issue issue1232 with status=resolved;resolvedin=2.5.0 (current)

* Resolve issue1232: darcs convert forgets _darcs/prefs/prefs 
Ignore-this: 3973731c4c3c5297546570ebe3662f06

Added code to copy the _darcs/prefs/prefs file into the newly created
darcs2 repository during a convert. A dumb copy is possibly not the best
solution, but is better than nothing.
History
Date User Action Args
2008-11-19 17:16:09ghcreate
2008-11-19 20:10:33ghsetstatus: unread -> unknown
nosy: kowey, dagit, simon, thorkilnaur, dmitry.kurochkin, gh
messages: + msg6698
2008-11-19 20:49:48ckeensetnosy: + ckeen
messages: + msg6699
2008-11-19 20:53:10ckeensetnosy: kowey, dagit, simon, thorkilnaur, dmitry.kurochkin, ckeen, gh
messages: + msg6700
2008-11-21 17:40:41jcpetruzzasetnosy: + jcpetruzza
messages: + msg6711
2008-11-21 17:52:39koweysetnosy: + droundy
messages: + msg6712
2008-11-21 18:00:52droundysetnosy: droundy, kowey, dagit, simon, thorkilnaur, dmitry.kurochkin, ckeen, jcpetruzza, gh
messages: + msg6713
2009-01-15 10:00:39ghsetfiles: - htab.tar.gz
nosy: droundy, kowey, dagit, simon, thorkilnaur, dmitry.kurochkin, ckeen, jcpetruzza, gh
2009-08-06 18:01:47adminsetnosy: + markstos, jast, Serware, darcs-devel, zooko, mornfall, tommy, beschmi, - droundy, ckeen, jcpetruzza, gh
2009-08-06 21:14:04adminsetnosy: - beschmi
2009-08-10 21:50:45adminsetnosy: + ckeen, gh, jcpetruzza, - tommy, markstos, darcs-devel, zooko, jast, Serware, mornfall
2009-08-10 23:51:52adminsetnosy: - dagit
2009-08-18 09:31:46koweysetstatus: unknown -> needs-reproduction
nosy: + jaredj
topic: + ProbablyEasy, Target-2.4
messages: + msg8233
2009-08-25 17:34:44adminsetnosy: + darcs-devel, - simon
2009-08-27 14:26:21adminsetnosy: kowey, darcs-devel, thorkilnaur, jaredj, dmitry.kurochkin, ckeen, jcpetruzza, gh
2009-09-14 10:45:49koweysettopic: + Target-2.5, - Target-2.4
nosy: kowey, darcs-devel, thorkilnaur, jaredj, dmitry.kurochkin, ckeen, jcpetruzza, gh
2010-04-14 09:07:48koweysetnosy: + dino
messages: + msg10725
assignedto: dino
2010-04-14 12:17:16dinosetmessages: + msg10728
2010-04-14 12:40:17koweysetmessages: + msg10729
2010-04-14 13:00:01dinosetmessages: + msg10731
2010-04-26 16:05:44dinosetstatus: needs-reproduction -> resolved
messages: + msg10819
2010-06-15 20:51:49adminsetmilestone: 2.5.0
2010-06-15 20:59:04adminsettopic: - Target-2.5
2010-06-15 22:30:54dinosetmessages: + msg11439
resolvedin: 2.5.0
2010-06-15 22:32:18dinosetmessages: + msg11441