[MERGE REVIEW] Tweaks to bundle merging

Michael Ellerman michael at ellerman.id.au
Thu Jun 15 06:11:52 BST 2006


On 6/15/06, Martin Pool <mbp at canonical.com> wrote:
>
> On 07/06/2006, at 7:36 AM, Aaron Bentley wrote:
>
> > BundleReadder
> >> expect to see LF-only line-endings but instead got CRLF. During merge
> >> there is MailformedBundle error raised and after then merge switch to
> >> interpret bundle filepath as merge-branch location.
> >
> > We've been talking about this.  The solution we're leading toward is
> > forcing the output to contain LF only.
>
> My suggestion is this:
>
> Line endings have to be carried correctly to generate the right sha1,
> and in any case they constitute user data that we should not lose.
> However, it's probably unrealistic to expect they can be passed
> around in email without getting lost.  It is common for files to
> consistently use all one type of ending but not the only possibility.
>
> Therefore I suggest we add a field to the diff header saying what
> kind of newline is used in lines added by that diff.  This should be
> reasonably straightforward to add as an option to the method that
> produces this from a SequenceMatcher.
>
> --- a   2006-06-15 06:36:02.000000000 +1000
> +++ b   2006-06-15 06:36:03.000000000 +1000
> ~~~ line-endings: CRLF
> @@ -1 +1 @@
> -Thu Jun 15 06:36:02 EST 2006
> +Thu Jun 15 06:36:03 EST 2006
> zsh: exit 1     diff -u a b

I'm luke warm on the idea because it doesn't deal with trailing
whitespace, which I think will be an equally annoying problem.

And this particular format "--- line-endings" is liable to break every
patch parsing script on the planet. :)

cheers




More information about the bazaar mailing list