Merge lp://staging/~baztian/bzr/recursive-diff into lp://staging/bzr/2.5

Proposed by Bastian
Status: Rejected
Rejected by: Martin Packman
Proposed branch: lp://staging/~baztian/bzr/recursive-diff
Merge into: lp://staging/bzr/2.5
Diff against target: 402 lines (+278/-10)
5 files modified
bzrlib/builtins.py (+6/-0)
bzrlib/diff.py (+44/-9)
bzrlib/tests/blackbox/test_diff.py (+122/-0)
bzrlib/tests/test_diff.py (+102/-0)
doc/en/release-notes/bzr-2.5.txt (+4/-1)
To merge this branch: bzr merge lp://staging/~baztian/bzr/recursive-diff
Reviewer Review Type Date Requested Status
Vincent Ladeuil Needs Resubmitting
Review via email: mp+97265@code.staging.launchpad.net

Description of the change

Support recursive diff: Show the differences using a custom diff program that supports directory based diff. I would love to have this in 2.5 and 2.6...

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

This seems like a new feature, so it's too late for 2.5 really.

I'm not sure about using the template-like @recursive to trigger this, it seems instead like it should happen at the command level. Why did you go for that over a flag on the diff command?

Revision history for this message
Vincent Ladeuil (vila) wrote :

/me nods@mgz about 2.5 being closed for new features.

As 'meld' can already be used without the @recursive flag, I understand why
you put it in the --diff-options, but I too feel it weird. I think it would
be better to have a dedicated option that can be used *only* when --using is
also used, not sure about which name to use but since diff is already
recursive, may be --tree ?

Overall this is a nice feature to have and I'm glad you're working on it. I
wish we have a way to test it better than a review alone allows as I
suspect ignoring stuff you can't diff (in _write_recursive_files) is likely
to break without more testing. That's just a gut feeling though :-/

By the way, are you sure 'meld' can't display symlinks ?

_write_recursive_file, as a name, sounds funny and does not seem to match
the design.

It seems to me that you want to change DiffTree (or rather subclass it or
something) instead of DiffPath. I.e. really diff trees rather than hacking
how one file is diff'ed.

138 + def assert_diff(self, cmd_args, old_files, new_files):
139 + """Assert the correct files have been extracted for the
140 + revisions to the temp folders.

assertExtractedFiles would be more idiomatic.

150 + def assert_files(self, base_path, files):

Wow, this does a lot ! Worth a docstring and comments ;)

Should it be named assertProducedFiles or something ?

This seems to be a nice set of tests, but they are a bit hard too read. For
one, they seem to duplicate some setup that could go into a ... setUp()
method ;)

You may also want to add tests for symlinks (requiring features.Symlink) if only to check and document how your change behaves.

161 + if os.path.islink(filepath):

Someone knowing windows better than me can comment about whether this will
work or fail there ?

314 + def test_finish(self):

test_finish_cleans_up_temp_files ?

332 + def test_finish(self):

'Eager Test' (http://xunitpatterns.com/Obscure%20Test.html) is bad, you shouldn't do that :) 'Defect Localization' (http://xunitpatterns.com/Goals%20of%20Test%20Automation.html#Defect%20Localization) is good, do it !

Can you split it up with meaningful names ?

Please re-target to 2.6 and let's keep the discussion going, this really
sounds like a very cool feature ;)

review: Needs Resubmitting
Revision history for this message
Martin Packman (gz) wrote :

Rejecting for now, please resubmit against lp:bzr if you get the chance.

Unmerged revisions

6261. By Bastian

Show diffs using a custom diff program that supports directory based diff

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches