[MERGE] Cope with ghosts in mainline history

Tom Cato Amundsen tca at tcamundsen.net
Thu Apr 9 09:44:04 BST 2009


Yes, this works fine for me. Both branching with "-r" and "bzr check"
works fine. So I am very happy if this can be merged.

If you want to fix more ghost issues, "bzr reconcile" give this
output, with this patch applied:

tom at tomsin-laptop:~/tmp/solfege.dev$ ~/tmp/bzr/b.dev/bzr reconcile
Reconciling branch file:///home/tom/tmp/solfege.dev/
bzr: ERROR: Revision {tca at gnu.org-20090311184736-dg1w9bdk5l6lsupi} not
present in "CHKInventoryRepository('file:///home/tom/tmp/solfege.dev/.bzr/repository/')".

"bzr check" works ok:
tom at tomsin-laptop:~/tmp/solfege.dev$ ~/tmp/bzr/b.dev/bzr check
Checking working tree at 'file:///home/tom/tmp/solfege.dev/'.
Checking repository at 'file:///home/tom/tmp/solfege.dev/'.
checked repository <bzrlib.transport.local.LocalTransport
url=file:///home/tom/tmp/solfege.dev/> format
<RepositoryFormatKnitPack1>
  1250 revisions
  1435 file-ids
  6614 unique file texts
1240183 repeated file texts
     0 unreferenced text versions
     3 ghost revisions
     3 revisions missing parents in ancestry
   272 inconsistent parents
Checking branch at 'file:///home/tom/tmp/solfege.dev/'.
checked branch file:///home/tom/tmp/solfege.dev/ format Branch format 6
branch contains ghosts in mainline

bzr upgrade --1.14 works fine:
tom at tomsin-laptop:~/tmp/solfege.dev$ ~/tmp/bzr/b.dev/bzr upgrade --1.14
starting upgrade of file:///home/tom/tmp/solfege.dev/
making backup of file:///home/tom/tmp/solfege.dev/.bzr
  to file:///home/tom/tmp/solfege.dev/backup.bzr
starting repository conversion
repository converted
finished

bzr upgrade --development-rich-root fails:
tom at tomsin-laptop:~/tmp/solfege.dev$ ~/tmp/bzr/b.dev/bzr upgrade
--development-rich-root
starting upgrade of file:///home/tom/tmp/solfege.dev/
making backup of file:///home/tom/tmp/solfege.dev/.bzr
  to file:///home/tom/tmp/solfege.dev/backup.bzr
starting repository conversion
bzr: ERROR: Revision
{('x_Tom_Cato_Amundsen_<tca at gnu.org>_Sat_Apr_10_17:26:21_2004_25928.425',
'tca at gnu.org-20071205220454-drsd2pleopbcxjt0')} not present in
"<bzrlib.groupcompress.GroupCompressVersionedFiles object at
0x9ccb1ac>".
tom at tomsin-laptop:~/tmp/solfege.dev$

Tom Cato

On Wed, Apr 8, 2009 at 2:29 AM, Jelmer Vernooij <jelmer at vernstok.nl> wrote:
> The updated (attached) patch should fix this.
>
> Cheers,
>
> Jelmer
>
> Tom Cato Amundsen wrote:
>> Branching with the -r options works. B "bzr check" display an error
>> message. See below.
>>
>> Tom Cato
>>
>> tom at tomsin-laptop:~/tmp$ ./bzr/b.dev/bzr branch -r 1037
>> ~/src/solfege.dev solfege.dev
>> Branched 1037 revision(s).
>> tom at tomsin-laptop:~/tmp$ cd solfege.dev
>> tom at tomsin-laptop:~/tmp/solfege.dev$ ../bzr/b.dev/bzr check
>> Checking working tree at 'file:///home/tom/tmp/solfege.dev/'.
>> Checking repository at 'file:///home/tom/tmp/solfege.dev/'.
>> checked repository <bzrlib.transport.local.LocalTransport
>> url=file:///home/tom/tmp/solfege.dev/> format
>> <RepositoryFormatKnitPack1>
>>   1302 revisions
>>   1442 file-ids
>>   6693 unique file texts
>> 1299153 repeated file texts
>>      0 unreferenced text versions
>>      3 ghost revisions
>>      3 revisions missing parents in ancestry
>>    272 inconsistent parents
>> Checking branch at 'file:///home/tom/tmp/solfege.dev/'.
>> bzr: ERROR: Revision
>> {Arch-1:tca at gnu.org--solfege-2005%solfege--unstable--3.1--version-0}
>> not present in "KnitPackRepository('file:///home/tom/tmp/solfege.dev/.bzr/repository/')".
>>
>>
>> On Tue, Apr 7, 2009 at 10:35 PM, Jelmer Vernooij <jelmer at vernstok.nl> wrote:
>>> Tom Cato Amundsen wrote:
>>>>> Isn't that just a specific bug in Bazaar related to ghosts? This sort of
>>>>> thing shouldn't be a problem in general with ghosts AFAIU. It also seems
>>>>> somewhat specific to your situation; I have several branches with
>>>>> ghosts, and none of them has had this problem.
>>>>>
>>>> https://bugs.launchpad.net/bzr/+bug/248540
>>>>
>>>> Yes, I guess this would have been fixed if more people had the
>>>> problem. There is a workaround for my repo mentioned in the bug
>>>> report, but there is a performance issue. So if I could get my repo
>>>> fixed without changing bzr, I guess that would be the best solution.
>>> Any chance you can try with the attached patch ? Unfortunately it
>>> doesn't include any tests but it seems to at least fix the last case you
>>> mentioned in your bug report.
>>>
>>> Cheers,
>>>
>>> Jelmer
>>>
>>>
>>
>>
>>
>
>



-- 
Tom Cato Amundsen <tca at gnu.org>                 http://www.solfege.org/
GNU Solfege - free ear training    http://www.gnu.org/software/solfege/



More information about the bazaar mailing list