Re: bzr and conflicts



Both are not nice of course, but v2 to me seems the better option - it doesn't require an extra os call, and works with what status has already given us.

Works for me too, thanks.
--
Louis



On 11 December 2012 07:36, Kai Willadsen <kai willadsen gmail com> wrote:
On 10 December 2012 14:08, louis <louis obsidian com au> wrote:
> I've just noticed  (and really surprised that it took me this long) that
> when using bzr, meld *never* recognizes text conflicts.
>
> Looking at the code, it looks like it never has. An example of status output
> when there's a conflict:
>
> $ bzr st -S
>  M  file.py
> C   Text conflict in file.py
>
> As you can see, the file is listed twice, and the line with the conflict
> message actually won't match when _get_dirsandfiles is called, because it
> has the extra 'Text conflict in' stuff there.

Oh bzr...

> A nicer way to do this might be to do the current status bit, then call $
> bzr conflicts --text and if any of those files are already in the tree,
> update their status to conflicted?
> Unfortunately this option might still do funny stuff with non text
> conflicts... but given it's broken already.
>
> Is anyone else looking at this? Or should I take it and run with it?

I had some spare time this morning, so had a quick look, and I can see
two options.

The first is to do as you say and check with bzr conflicts --text;
this has nice clean output, but won't catch binary conflicts. Yes, we
could run a regex over the full conflicts output, but then we may as
well go with option two...

Option two is to split out conflict lines in the current processing,
process them to pull out the actual file names (probably fragile) and
use those to overwrite the faux statuses.

Patches for both are attached. Both work for me, but I don't use bzr,
and don't really know which is likely to be the better option.

cheers,
Kai



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]