Bug? Symlink between repos.

Forest Bond forest at alittletooquiet.net
Mon Jan 7 14:40:23 GMT 2008


Hi,

This is something of an edge case, but I've run into it many times due to the
fact that I keep parts of my home directory in a bzr repository.  Basically, the
situation is this:

* Create repository A with file a.  bzr init in B; bzr add a; bzr commit.
* Create directory B with symlink b linked to file Z.  bzr init in B; bzr add b;
  bzr commit.
* Remove symlink b and replace it with a symlink to file a.
* bzr commit b fails.

Changes can be committed to b's parent directory (B) instead, but this is not
convenient if there are other changes in that directory that should not yet be
committed.

Here's a real-world example:

--------------------------------------------------------------------------------
[~/bzr-test]
09:24 fab at storm$ mkdir foo
[~/bzr-test]
09:24 fab at storm$ cd foo
[~/bzr-test/foo]
09:24 fab at storm$ ls
[~/bzr-test/foo]
09:24 fab at storm$ bzr init
[~/bzr-test/foo]
09:24 fab at storm$ mkdir bar
[~/bzr-test/foo]
09:24 fab at storm$ cd bar
[~/bzr-test/foo/bar]
09:24 fab at storm$ bzr init
[~/bzr-test/foo/bar]
09:24 fab at storm$ touch baz
[~/bzr-test/foo/bar]
09:24 fab at storm$ bzr add baz
added baz
[~/bzr-test/foo/bar]
09:24 fab at storm$ bzr commit -m 'Initial commit.'
Committing revision 1 to "/home/fab/bzr-test/foo/bar/".
added baz
Committed revision 1.
[~/bzr-test/foo/bar]
09:24 fab at storm$ cd ..
[~/bzr-test/foo]
09:24 fab at storm$ bzr stat
unknown:
  bar/
[~/bzr-test/foo]
09:25 fab at storm$ mkdir biz
[~/bzr-test/foo]
09:25 fab at storm$ touch biz/buz
[~/bzr-test/foo]
09:25 fab at storm$ ln -s biz/buz boink
[~/bzr-test/foo]
09:25 fab at storm$ ls -lh
total 8.0K
drwxr-xr-x 3 fab fab 4.0K 2008-01-07 09:24 bar
drwxr-xr-x 2 fab fab 4.0K 2008-01-07 09:25 biz
lrwxrwxrwx 1 fab fab    7 2008-01-07 09:25 boink -> biz/buz
[~/bzr-test/foo]
09:25 fab at storm$ bzr add boink
added boink
[~/bzr-test/foo]
09:25 fab at storm$ bzr commit -m 'Initial commit.'
Committing revision 1 to "/home/fab/bzr-test/foo/".
added boink
Committed revision 1.
[~/bzr-test/foo]
09:25 fab at storm$ rm boink
[~/bzr-test/foo]
09:26 fab at storm$ ln -s bar/baz boink
[~/bzr-test/foo]
09:26 fab at storm$ bzr stat
modified:
  boink@
unknown:
  bar/
  biz/
[~/bzr-test/foo]
09:26 fab at storm$ bzr commit boink
bzr: ERROR: boink is not in the same branch as boink
--------------------------------------------------------------------------------

Is this a bug, or is my use case outlandish?

-Forest

P.S. The shell above is pretty heavily edited.  Hope I didn't botch it.
-- 
Forest Bond
http://www.alittletooquiet.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080107/c07ba023/attachment.pgp 


More information about the bazaar mailing list