bzr cat --name-from revision doesn't seem to do anything
Andrew Bennetts
andrew.bennetts at canonical.com
Wed Feb 9 02:30:07 UTC 2011
Andrew King wrote:
> �bzr init .
> �touch foo
> �bzr add foo
> �bzr commit -m "added foo" foo
> �bzr mv foo bar
> �bzr commit
> �bzr cat -r1 bar
> �� �no error (finds foo has become bar)
> �bzr cat -r1 foo
> �� �no error
> �bzr cat -r1 foo --name-from-revision
> �� �no error
> bzr cat -r1 bar --name-from-revision
> �� �bzr: ERROR: u'bar' is not present in revision
> I don't understand what the point of --name from revision.
> bzr cat finds that foo has become bar anyway, so --name-from-revision just
> seems to make it less likely that you find what you are looking for?
I think it's to make it possible to address files that a) don't exist in the
current tree [or if they do, the user doesn't know the current name], and b) a
different file from that revision now exists at that filename.
For example:
bzr init .
echo 'foo version one' > foo
echo 'bar version one' > bar
bzr add foo bar
bzr ci -m "Add foo and bar"
bzr rm foo
bzr mv bar foo
bzr ci -m "Replace foo with bar"
Now compare:
bzr cat foo
bzr cat -r1 foo
bzr cat -r1 --name-from-revision foo
-Andrew.
More information about the bazaar
mailing list