[darcs-users] non-dependent tags confuse optimize --checkpoint and get --partial

Tuomo Valkonen tuomov at jolt.modeemi.cs.tut.fi
Sat Feb 19 11:32:24 UTC 2005



There's something strange going on with tags, optimize and partial 
repositories. Here's a case to cause get --partial fail when it should
to my knowledge work:

~/test$ mkdir a
~/test$ cd a
~/test/a$ darcs init
~/test/a$ joe foo
~/test/a$ darcs record -l -a -m 'added foo'
Finished recording patch 'added foo'
~/test/a$ cd ..
~/test$ darcs get a b
Copying patch 1 of 1... done!
Finished getting.
~/test$ cd a
~/test/a$ darcs tag -m yksi  
Finished tagging patch 'TAG yksi'
~/test/a$ cd ../b
~/test/b$ darcs tag -m kaksi
Finished tagging patch 'TAG kaksi'
~/test/b$ cd ..
~/test$ darcs get a c
Copying patch 2 of 2... done!
Finished getting.
~/test$ cd c
~/test/c$ darcs pull -a ../b
Finished pulling.
~/test/c$ darcs optimize --checkpoint
Checkpointing tag:
Sat Feb 19 13:07:30 EET 2005  tuomov
  tagged kaksi
Done optimizing!
~/test/c$ cd ..
~/test$ darcs get --partial c d
Copying patch 1 of 1... done!
Applying patches to the "working" directory...

Fail: failed to read patch in get_extra:
Sat Feb 19 13:07:23 EET 2005  tuomov
  tagged yksi
Perhaps this is a 'partial' repository?


I've also managed darcs to refuse to optimize a repository. E.g. it won't
optimize the experimental Ion3 repository at http://iki.fi/tuomov/repos/ion-3.
It just says 'There is no tag to checkpoint! Done optimizing!' although
there are lots of tags.

Darcs version: 1.0.2/Debian. I noticed there's the patch 2005-01-21 patch

* fix bug in get --partial when checkpointed tag is preceded by patch not in tag.
  This fix would be more thorough if I made optimize reorder the patches so
  that this didn't happen.  However, that's potentially a slow and dangerous
  optimization, so I'm leaving it for future implementation.

that is probably related. This remaining bug is the "thorough fix" part?

-- 
Tuomo





More information about the darcs-users mailing list