bzr copy (Re: Weekly 0.10 release status)

Jelmer Vernooij jelmer at samba.org
Wed Aug 16 03:33:51 BST 2006


On Wed, 2006-08-16 at 00:43 +1000, Andrew Bennetts wrote:
> Jelmer Vernooij wrote:
> > On Tue, 2006-08-15 at 23:00 +1000, Andrew Bennetts wrote:
> [...]
> > 
> > > (I don't have a strong opinion on this feature; it'd be nice I guess, but I
> > > doubt I'd ever actually use it, so I don't care if it's in 1.0 or not.  I know I
> > > haven't seen "svn copy" used except for branching before, but I'm curious to
> > > hear about people who have and found it useful.)
> > The main use case (at least for me) is tracking history when splitting
> > large files. 
> By "tracking history", you just mean you want better output from log and
> annotate, or are you also thinking of merges?
Mainly log and annotate. Merge would be very nice to have, but I
understand it's not really possible to do. The main problem with only
supporting log and annotate is, as Aaron indicated, that it gives the
false impression that merge across copy _is_ supported.

> Also, if it's really about "splitting" files, I wonder if "bzr split" would be a
> better name.
Yeah, that'd make sense, at least for me. What are others using copies
for?

> For that matter, I wonder if there's a better way to represent that than by
> recording "THIS-FILE is a copy of THAT-FILE"?
> 
> <begin handwaving>
> 
> If there's a file ORIGINAL like this:
> 
>     AAAAAA
>     AAAAAA
>     AAAAAA
>     BBBBBB
>     BBBBBB
>     BBBBBB
> 
> That I want to split like this:
> 
> NEW_A:
> 
>     AAAAAA
>     AAAAAA
>     AAAAAA
> 
> NEW_B:
> 
>     BBBBBB
>     BBBBBB
>     BBBBBB

I think the best way to represent this is as NEW_B being split out of
ORIGINAL and ORIGINAL losing those lines rather than ORIGINAL being
split into two new files. Optionally, ORIGINAL can be renamed to NEW_A.

[...]

> So rather than recording that "NEW is a copy of ORIGINAL", it would be recording
> "these lines were split out of ORIGINAL and into NEW".
> 
> Then if there's a merge like my example above, then bzr could, in principle, put
> the new and modified lines in the right places automatically.
> 
> Implementing this efficiently and correctly is left as an exercise for the
> reader...
Yeah, that sounds rather complicated, I'm not sure if it's worth the
trouble.

Cheers,

Jelmer

-- 
Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060816/aa348126/attachment.pgp 


More information about the bazaar mailing list