bzr copy (Re: Weekly 0.10 release status)

Stefan (metze) Metzmacher metze at samba.org
Tue Aug 15 12:40:02 BST 2006


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

Andrew Bennetts schrieb:
> On Tue, Aug 15, 2006 at 10:22:17AM +0200, Stefan (metze) Metzmacher wrote:
>> Hi *,
>>
>> I think 'bzr copy' or at least the storing format for it should go into
>> the final 1.0 release. I'm not sure howmany releases will happen before 1.0.
>>
>> See http://bazaar-vcs.org/BzrFileCopies.
> 
> It's not clear to me what exactly this is proposing -- the semantics of the "bzr
> copy" command are far from clear.  Is it purely recording that NEWFILE started
> as a copy of ORIGINAL, so that annotate and log can give slightly richer
> reports, or something more fundamental?  Is bzr merge affected or not (and if
> so, how?)?
> 
> So, I don't actually know what you're asking to include in bzr 1.0.

The minimum requirement is "copy a b" has no effect on a and b is a copy
of it and knows about this fact. (bzr log would say "copied: a => b",
simular to "renamed: a => b" for bzr rename). Also bzr log displays
the history which was copied from a and bzr annotate also knows
in what revision of a lines have changed.

This is what I would like to see in bzr 1.0. as we used "svn copy"
a lot in the samba repository and it would be bad if bzr-svn can't
represent this 1-to-1 into the bzr frontend.

Also this would be very useful in a bzr only environment.

Nice to have things:

Merging of changes are only merged to the copied file when the changes
to the source file happened at a time where the source branch didn't
know about the copied file. Like in the following example:

#dir1>bzr init
#dir1>date >date1
#dir1>bzr add;bzr ci -m "date1"
#dir1>cd ..
#>bzr branch dir1 dir2
#>bzr branch dir1 dir3
#>cd dir1
#dir1>bzr copy date1 date2;bzr ci -m "copy date1 date2"
#dir1>cd ../dir2
#dir2>date >>date1
#dir2>bzr ci -m "change date1 before branch knows about the copy"
#dir2>cd ../dir3
#dir3>bzr pull
#dir3>date >>date1
#dir3>bzr ci -m "change date1 after the branch knows about the copy"
#dir3>cd ../dir1
#dir1>bzr merge ../dir2     (this will apply the changes from date1 to
                             date1 and date2)
#dir1>bzr status
modified:
  date1
  date2
#dir1>bzr revert            (revert the merge)
#dir1>bzr merge ../dir3     (this will apply the changes from date1
                             only to date1 and not to date2)
#dir1>bzr status
modified:
  date1
#dir1>bzr ci -m "merge from dir3"
#dir1>bzr merge ../dir2     (this will apply the changes from date1 to
                             date1 (resulting in a conflict here) and to
                             date2 (cleanly))

I'm not sure what technicaly is needed for all this...
Maybe someone has better ideas about the merging?
For me merging is not strictly required, but would be a nice addon.

The bzr log and annotate are the key features for me.

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

iD8DBQFE4bJPm70gjA5TCD8RAvheAJ47Ixy39nabAv+IwY64b+3altV43ACfaz/5
xZ+rLW9g8QDbkO7//0UI/wY=
=jvxZ
-----END PGP SIGNATURE-----




More information about the bazaar mailing list