[MERGE] remerge doesn't clobber unrelated conflicts

Aaron Bentley aaron.bentley at utoronto.ca
Sun Jul 2 03:11:59 BST 2006


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

John Arbash Meinel wrote:
>>> There was a second bug: cmd_remerge wasn't clearing the conflicts lists
>>> of files it was remerging.  Now, it does that too.
> 
> Is it better to clear them, and then set them again? Or to leave them
> alone and fix them only if they actually go away?

But when would we do that?  We don't even know what conflicted.  Only
Merger knows that.  At this level, we only know how many conflicts there
were.

> If you're sure it is better to clean out the conflict list, then +1 from
> me. I'm just concerned that we might end up in the same situation. Where
> part 1 succeeds, but part 2 doesn't, and then it looks like we have no
> conflicts.

When we invoke transform_tree, those files return to their original,
unconflicted state.  So clearing the conflicts on those files seems
reasonable to me.

If we were interrupted after set_conflicts, we'd have pristine files,
and no conflicts listed for them.  The only problem with that is that we
might assume they were fully-merged, when in fact they're unmerged.

> I think we should keep the ability to have multiple similar conflicts on
> a file. I'm not sure what exact conflicts you have, but if any of them
> take a parameter, it would be possible to have multiple values for that
> parameter and the same conflict type.

I'd just use __eq__, which is implemented pretty sanely on all these
Conflict objects.  i.e. [c for c in new_conflicts if c not in
old_conflicts_set]

> But certainly we wouldn't like to see:
> 
> Text conflict in foo.py
> Text conflict in foo.py
> Text conflict in foo.py

Definitely not pretty, but I considered it a corner case.

> After doing something like remerge.

Remerge is not capable of doing that.  merge, maybe.

> The rest I'm perfectly happy with.

Okay.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEpytv0F+nu1YWqI0RAndwAJ0eHvcpAaaSgey6VPkbsxbDl+/aMwCgg3Zd
WOxvnmimQbwhf4L2EVV6BdE=
=OBMN
-----END PGP SIGNATURE-----




More information about the bazaar mailing list