Help: create branch outside shared-repo

Alexandru Draghina alexandrei at gmx.net
Fri Feb 27 13:26:21 GMT 2009


On Thu, 26 Feb 2009 13:37:33 -0800
Colin D Bennett <colin at gibibit.com> wrote:

> On Thu, 26 Feb 2009 21:45:43 +0200
> Alexandru Draghina <alexandrei at gmx.net> wrote:
> 
> > Hello,
> > 
> > For my first post on this mailing list, I need some help and advice
> > about how should I do a little trick - actually the trick for which
> > I started using bazaar :)
> > 
> > At work, I use a svn repo, file based, on a network share (we're
> > only two people using it, but we had to set it up on the server so
> > it's "safe") When I began using bzr, I did the following:
> > 
> > % mkdir ~/workspace
> > % cd ~/workspace
> > % bzr init-repo --rich-root-pack .
> > % bzr co //path/to/svn/repo/bla/bla/trunk project_svn_trunk
> > [.. bzr downloads the svn revisions, etc, creates a working tree in
> > "project_svn_trunk", all nice and fluffy]
> > % bzr branch project_svn_trunk src 
> > [.. work on src/ .. commit, update, merge back to project_svn_trunk,
> > commit to svn, etc]
> > 
> > At some point, I wanted to do some work at home (using a flash
> > drive to carry the stuff over). So I did:
> > 
> > cd ~/workspace
> > bzr branch project_svn_trunk /media/disk/work_for_home
> > 
> > The idea was to have a branch on the drive, that I could copy at
> > home or work directly on the flash drive, but with the possibility
> > to branch again from it, and then to merge it back at work.
> > 
> > ..it failed; i tried with "push". failed again. I created another
> > repo on the flash drive (rich-root, again), and tried to "push" to
> > it or to "pull"/"checkout" from a new branch in it. failed again.
> > 
> > The errors were about missing revisions or something (of course,
> > since they were in the shared repo, inside ~/workspace/.bzr).
> > Anyway.. is there a way to do this?
> > 
> > Basically, all I want to do is to branch from (inside) a shared repo
> > (with rich-root-pack + bzr-svn), to a different location, work
> > there, and then be able to merge back to a local branch
> > (WORK-branch-svn -> WORK-branch -> FLASHDRIVE -> HOME-newbranch+etc
> > -> merge back to WORK-branch). 
> 
> It should just work to branch out of a shared repo into a standalone
> branch::
> 
>   cdb at gamma ~/school/cscd494/repo $ bzr info version_3.0/
>   Repository branch (format: 1.9-rich-root or
> development-wt5-rich-root) Location:
>     shared repository: .
>     repository branch: version_3.0
> 
>   Related branches:
>       push branch: svn+https://[...]
>     parent branch: svn+https://[...]
>   cdb at gamma ~/school/cscd494/repo $ bzr branch
> version_3.0 /tmp/copy_of_3.0 Branched 11 revision(s).        
> 
> (URLs edited out because they're really long)
> 
> Regards,
> Colin

Hello,

You are right, it normally works. I did some tests on my PC at
home (linux+1.12), and with the same steps it was possible. So this
means that the problem is elsewhere, not with the steps I've tried.

I tried again at work, with my files, and here is what I get:

-------------------------LOG---------------------------------
[adraghina at tech-dev11-arch disco]$ bzr branch src ~/outside
[/                   ] Opening pack
0/5                                     [-                   ] Copying
content texts:Copied record
54/357
bzr: ERROR: bzrlib.errors.BzrCheckError: Internal check failed: Newly
created pack file <bzrlib.repofmt.pack_repo.NewPack object at
0x99d6aec> has delta references to items not in its repository:
0x99d6aec> {'texts':
0x99d6aec> [('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:Makefile',
0x99d6aec> 'adraghina at blabla.com-20090204145556-lx53df7jnrmis2ek'),
0x99d6aec> ('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:api%2Fdisco_dbmng_get_file.c',
0x99d6aec> 'adraghina at blabla.com-20090126102819-fdf09sbgavyul7zq'),
0x99d6aec> ('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:disco_testing.c',
0x99d6aec> 'adraghina at blabla.com-20090126142246-hl3aw8vqbqk0nw6v'),  
           ('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:disco_utils.c',
            'adraghina at blabla.com-20090225160953-glj9alzeeq2j1j9a'),
           ('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:disco_utils.h',
            'adraghina at blabla.com-20090126102819-fdf09sbgavyul7zq'),
           ('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:performance%2Feventstats.c',
            'adraghina at blabla.com-20090218155100-9nvxsk4q63n0c2tt'),
           ('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:performance%2Feventstats.h',
            'adraghina at blabla.com-20090218155100-9nvxsk4q63n0c2tt'),
           ('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:readme.txt',
            'adraghina at blabla.com-20090126075436-gi6m1zfe25vsikts'),
           ('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:readme.txt',
            'adraghina at blabla.com-20090126102819-fdf09sbgavyul7zq'),
           ('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:scenarios%2Fdisco_scenario_events.c',
            'adraghina at blabla.com-20090218155100-9nvxsk4q63n0c2tt')]}

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/bzrlib/commands.py", line 896,
in run_bzr_catch_errors return run_bzr(argv)
  File "/usr/lib/python2.6/site-packages/bzrlib/commands.py", line 842,
in run_bzr ret = run(*run_argv)
  File "/usr/lib/python2.6/site-packages/bzrlib/commands.py", line 542,
in run_argv_aliases return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/site-packages/bzrlib/builtins.py", line
1045, in run source_branch=br_from)
  File "/usr/lib/python2.6/site-packages/bzrlib/bzrdir.py", line 1116,
in sprout result_repo.fetch(source_repository, revision_id=revision_id)
  File "/usr/lib/python2.6/site-packages/bzrlib/repository.py", line
1118, in fetch find_ghosts=find_ghosts)
  File "/usr/lib/python2.6/site-packages/bzrlib/decorators.py", line
192, in write_locked result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/bzrlib/repository.py", line
2985, in fetch return self._pack(self.source, self.target, revision_ids)
  File "/usr/lib/python2.6/site-packages/bzrlib/repository.py", line
2992, in _pack revision_ids).pack()
  File "/usr/lib/python2.6/site-packages/bzrlib/repofmt/pack_repo.py",
line 655, in pack return self._create_pack_from_packs()
  File "/usr/lib/python2.6/site-packages/bzrlib/repofmt/pack_repo.py",
line 825, in _create_pack_from_packs new_pack._check_references()
  File "/usr/lib/python2.6/site-packages/bzrlib/repofmt/pack_repo.py",
line 348, in _check_references % (self, pformat(missing_items)))
BzrCheckError: Internal check failed: Newly created pack file
<bzrlib.repofmt.pack_repo.NewPack object at 0x99d6aec> has delta
references to items not in its repository: {'texts':
[('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:Makefile',
'adraghina at blabla.com-20090204145556-lx53df7jnrmis2ek'),
('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:api%2Fdisco_dbmng_get_file.c',
'adraghina at blabla.com-20090126102819-fdf09sbgavyul7zq'),
('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:disco_testing.c',
'adraghina at blabla.com-20090126142246-hl3aw8vqbqk0nw6v'),
('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:disco_utils.c',
'adraghina at blabla.com-20090225160953-glj9alzeeq2j1j9a'),
('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:disco_utils.h',
'adraghina at blabla.com-20090126102819-fdf09sbgavyul7zq'),
('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:performance%2Feventstats.c',
'adraghina at blabla.com-20090218155100-9nvxsk4q63n0c2tt'),
('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:performance%2Feventstats.h',
'adraghina at blabla.com-20090218155100-9nvxsk4q63n0c2tt'),
('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:readme.txt',
'adraghina at blabla.com-20090126075436-gi6m1zfe25vsikts'),
('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:readme.txt',
'adraghina at blabla.com-20090126102819-fdf09sbgavyul7zq'),
('360 at 604c33a4-62ab-ca40-bc18-ffcd98030108:disco_testing%2Ftrunk:scenarios%2Fdisco_scenario_events.c',
'adraghina at blabla.com-20090218155100-9nvxsk4q63n0c2tt')]}

bzr 1.12 on python 2.6.1 (linux2)
arguments: ['/usr/bin/bzr', 'branch', 'src', '/home/adraghina/outside']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.utf8'
plugins:
  gtk                  /home/adraghina/.bazaar/plugins/gtk
[0.96.0.dev.1]
launchpad            /usr/lib/python2.6/site-packages/bzrlib/plugins/launchpad
[unknown]
netrc_credential_store /usr/lib/python2.6/site-packages/bzrlib/plugins/netrc_credential_store
[unknown] qbzr                 /home/adraghina/.bazaar/plugins/qbzr
[0.9.9dev]
svn                  /usr/lib/python2.6/site-packages/bzrlib/plugins/svn
[0.5.2] *** Bazaar has encountered an internal error. Please report a
bug at https://bugs.launchpad.net/bzr/+filebug including this
traceback, and a description of what you were doing when the error
occurred.

-------------------------/LOG---------------------------------

The layout is:
~/workspace/disco <-- shared repo
~/workspace/disco/sources/disco_testing_trunk <-- svn checkout
~/workspace/disco/src <-- branch of disco_testing_trunk, the one that I
try to branch out

The problem seems to originate from the svn repo. After the first
errors, I did try to clean it up, etc, but it did not help. I'm
thinking to clear it up, and recreate it, but if possible I'd avoid
that.

Any idea of how I could fix those issues, or how to force branching and
ignore the bad revisions?

Thank you

(My appologies for the first reply, I've missed the mailing list
address - I haven't used a mailing list in some time!) 

Best regards,
Alex



More information about the bazaar mailing list