bzr copy (Re: Weekly 0.10 release status)

Stefan (metze) Metzmacher metze at samba.org
Tue Aug 15 22:41:34 BST 2006


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

Andrew Bennetts schrieb:
> <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
> 
> Then it'd be really cool if I could merge from a branch where ORIGINAL has been
> changed like this:
> 
>     AAAAAA
>     NEW A STUFF
>     AAAAAA
>     AAAAAA
>     BBBBBB
>     MODIFIED B STUFF
>     BBBBBB
> 
> And have the new and modified lines merge into the right files.  I don't think a
> simple "THIS-FILE is a copy of THAT-FILE" is a rich enough way to express what's
> needed to make this happen.
> 
> In principle I suppose bzr could have smarts so that if you do:
> 
>     bzr copy ORIGINAL NEW
>     # user edits ORIGINAL and NEW
>     bzr commit
> 
> It would then compare the ORIGINAL and NEW you're commiting with the ORIGINAL in
> the previous revision, and categorise each line as:
> 
>     * kept in ORIGINAL
>     * new in ORIGINAL in this revision
>     * new in NEW in this revision
>     * copied from ORIGINAL to NEW in this revision (like "new in NEW", except
>       for log and annotate)
>     * moved from ORIGINAL to NEW
> 
> (and also take note of the lines in the previous revision of ORIGINAL no longer
> present anywhere, I suppose).
> 
> 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.

this sounds very nice! And is basicly what I was thinking of...

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

iD8DBQFE4j8hm70gjA5TCD8RAs1cAKC0//k6wSZDyNHfdN3BfTNr6T8BmACggTvT
JKbWE9aIEQA0sqIKCcLo+M0=
=BrGj
-----END PGP SIGNATURE-----




More information about the bazaar mailing list