Comment 1 for bug 533152

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 533152] [NEW] Cannot tell Bazaar that a file has moved after the fact

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

Nicholas Allen wrote:
> Public bug reported:
>
> I moved a file in my file manager and then went to the terminal to tell
> Bazaar that the file had been moved. When I did this I got an error:
>
> bzr: ERROR: File id {test.txt-20100306081700-27rpkfg2xoqgtgku-1} already
> exists in inventory as
> InventoryFile('test.txt-20100306081700-27rpkfg2xoqgtgku-1', u'test.txt',
> parent_id='dir-20100306081647-mc3jstj6biyq8tka-1', sha1=None, len=None,
> revision=None)
>
> This bug can be reproduced in 2.1 using the following commands:
>
> $ bzr init bzr-bug
> # cd bzr-bug
> $ mkdir dir
> $ bzr add
> adding dir
> $ echo text >> dir/test.txt
> $ bzr add
> adding dir/test.txt
> $ bzr ci -m "Add files"
> Committing to: /home/nick/tmp/bzr-bug/
> added dir
> added dir/test.txt
> Committed revision 1.
> $ mv dir dir2
> $ mv dir2/test.txt dir2/test2.txt
> $ bzr st
> removed:
> dir/
> dir/test.txt
> unknown:
> dir2/
> $ bzr mv dir dir2
> dir => dir2
> $ bzr st
> removed:
> dir/test.txt
> renamed:
> dir/ => dir2/
> unknown:
> dir2/test2.txt
> $ bzr mv dir/test.txt dir2/test2.txt
> bzr: ERROR: File id {test.txt-20100306081700-27rpkfg2xoqgtgku-1} already exists in inventory as InventoryFile('test.txt-20100306081700-27rpkfg2xoqgtgku-1', u'test.txt', parent_id='dir-20100306081647-mc3jstj6biyq8tka-1', sha1=None, len=None, revision=None)
>
> Here is the output of bzr version:
>
> Bazaar (bzr) 2.1.0
> Python interpreter: /usr/bin/python 2.6.4
> Python standard library: /usr/lib/python2.6
> Platform: Linux-2.6.31-19-generic-x86_64-with-Ubuntu-9.10-karmic
> bzrlib: /usr/lib/python2.6/dist-packages/bzrlib
> Bazaar configuration: /home/nick/.bazaar
> Bazaar log file: /home/nick/.bzr.log
>
> ** Affects: bzr
> Importance: Undecided
> Status: New

 status: confirmed
 importance: medium

I think there is something wrong here, but you probably should be able
to do:

bzr mv dir2/test.txt dir2/test2.txt --after

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuSW/UACgkQJdeBCYSNAANt0ACfQ8oFYVayeXsZCwdsDEjKsr7k
01gAoMWMbtggpQCzpF1dY8w92KQruQ77
=JAZ8
-----END PGP SIGNATURE-----