[win32] problem with parent location on another local drive

Bug #90847 reported by Alexander Belchenko
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Alexander Belchenko
Ubuntu
Confirmed
Undecided
Unassigned

Bug Description

Win32-specific:

When branch has parent on another local disk, bzr anyway store parent location in .bzr/branch/parent as relative path, and this is wrong and cause errors when such branch moved around the filesystem.

G:\work\Bazaar\sandbox\selftest.win32>bzr info
Location:
    shared repository: file:///G:/work/Bazaar/sandbox/
  repository checkout: selftest.win32

Related branches:
      parent branch: file:///H:/Bazaar/sandbox/selftest.win32/
  publish to branch: file:///H:/Bazaar/sandbox/selftest.win32/

Format:
       control: Meta directory format 1
  working tree: Working tree format 3
        branch: Branch format 5
    repository: Knit repository format 1

Working tree is out of date: missing 2 revisions.

In the working tree:
       548 unchanged
         0 modified
         0 added
         0 removed
         0 renamed
         0 unknown
         0 ignored
        45 versioned subdirectories

Branch history:
      2326 revisions
       620 days old
   first revision: Sun 2005-06-26 16:55:27 -0500
  latest revision: Wed 2007-03-07 13:40:14 +0200

Revision store:
      9409 revisions
     42491 KiB

Note that content of parent file is:

G:\work\Bazaar\sandbox\selftest.win32\.bzr\branch>type parent
../../../../../H:/Bazaar/sandbox/selftest.win32/

When I move this branch level up/down in filesystem I got error:

G:\sandbox\selftest.win32>bzr info
Location:
    shared repository: file:///G:/sandbox/
  repository checkout: selftest.win32
bzr: ERROR: Parent not accessible given base file:///G:/sandbox/selftest.win32/ and relative path ../../../../../H:/Bazaar/sandb
ox/selftest.win32/

This bug also affects pull operation, not only info.

Required fix: if parent location is on another local drive or UNC path it should be stored without relative prefix like '../'*n

Tags: win32
Revision history for this message
markus klinik (sukram) wrote :

second

Changed in bzr:
assignee: nobody → bialix
importance: Undecided → Low
status: Unconfirmed → Confirmed
Changed in bzr:
assignee: bialix → nobody
Revision history for this message
Alexander Belchenko (bialix) wrote :

I'm tired from this misfeature.

1) parent_location for branch on another drive for some reason always saved as relative path, .i.e. ../../../../../../Z:/MyCode/xxx. This is the root of problem. It should be saved as absolute path, i.e. Z:/MyCode/xxx
2) but second part of the bug is that in many operations (pull, merge, missing), when I provide branch location in the command line, bzr anyway try to read parent_location from config, even if it's not used. Is it good?

Changed in bzr:
importance: Low → Medium
Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 90847] Re: [win32] problem with parent location on another local drive

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
> 2) but second part of the bug is that in many operations (pull, merge, missing), when I provide branch location in the command line, bzr anyway try to read parent_location from config, even if it's not used. Is it good?

We automatically set the parent location to the user-supplied location
when the parent location is not already set. So we must determine
whether the parent location is already set, even when the user supplies
a location.

Aaron

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHa95w0F+nu1YWqI0RAsstAKCI7jh9pNg+Of16s1nJ6rKgegApHACdFr63
79LOp+0H+VNMUbugm9mesUM=
=kSyJ
-----END PGP SIGNATURE-----

Changed in bzr:
assignee: nobody → bialix
milestone: none → 1.1
status: Confirmed → Fix Committed
Revision history for this message
Alexander Belchenko (bialix) wrote :

bzr.dev revno.3153

Changed in bzr:
status: Fix Committed → Fix Released
Revision history for this message
Josh Brown (joshbrown) wrote :

I'm getting a similar error with Linux (Ubuntu 10.04):

~/.bzr/codemonkey/check-gmail $ bzr info
Repository tree (format: 2a)
Location:
  shared repository: /mnt/Files/Misc/Mine/Packages/Bazaar/codemonkey
  repository branch: .
bzr: ERROR: Parent not accessible given base "file:///mnt/Home/Misc/Mine/Packages/Bazaar/codemonkey/check-gmail/" and relative path "../../../../../../../../../home/josh/.bzr/codemonkey/trunk/"

Revision history for this message
Samuel Åslund (samuel-6n) wrote :

For people looking for a solution to this problem in their own repositories:

This file:
.bzr/branch/branch.conf

contains paths to parrent and default puch location.

If you edit it to contain the right path the problem goes away.
At least with:
$ bzr --version
Bazaar (bzr) 2.5.1
  Python interpreter: /usr/bin/python 2.7.3
  Python standard library: /usr/lib/python2.7
  Platform: Linux-3.2.0-32-generic-i686-with-Ubuntu-12.04-precise
  bzrlib: /usr/lib/python2.7/dist-packages/bzrlib

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.