Merge lp:~jelmer/brz/diff-binary-weird into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/diff-binary-weird
Merge into: lp:brz
Diff against target: 49 lines (+16/-2)
3 files modified
breezy/diff.py (+2/-2)
breezy/tests/blackbox/test_diff.py (+11/-0)
doc/en/release-notes/brz-3.1.txt (+3/-0)
To merge this branch: bzr merge lp:~jelmer/brz/diff-binary-weird
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+369474@code.launchpad.net

Commit message

Don't include datestamps in filenames when reporting on binary files.

Description of the change

Don't include datestamps in filenames when reporting on binary files.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'breezy/diff.py'
--- breezy/diff.py 2019-06-26 20:41:57 +0000
+++ breezy/diff.py 2019-07-07 19:00:04 +0000
@@ -768,8 +768,8 @@
768 context_lines=self.context_lines)768 context_lines=self.context_lines)
769 except errors.BinaryFile:769 except errors.BinaryFile:
770 self.to_file.write(770 self.to_file.write(
771 ("Binary files %s and %s differ\n" %771 ("Binary files %s%s and %s%s differ\n" %
772 (from_label, to_label)).encode(self.path_encoding, 'replace'))772 (self.old_label, from_path, self.new_label, to_path)).encode(self.path_encoding, 'replace'))
773 return self.CHANGED773 return self.CHANGED
774774
775775
776776
=== modified file 'breezy/tests/blackbox/test_diff.py'
--- breezy/tests/blackbox/test_diff.py 2018-11-11 04:08:32 +0000
+++ breezy/tests/blackbox/test_diff.py 2019-07-07 19:00:04 +0000
@@ -325,6 +325,17 @@
325 output = self.run_bzr('diff -Fboo', retcode=1)325 output = self.run_bzr('diff -Fboo', retcode=1)
326 self.assertTrue("BOO!" in output[0])326 self.assertTrue("BOO!" in output[0])
327327
328 def test_binary_diff_remove(self):
329 tree = self.make_branch_and_tree('.')
330 self.build_tree_contents([('a', b'\x00' * 20)])
331 tree.add(['a'])
332 tree.commit('add binary file')
333 os.unlink('a')
334 output = self.run_bzr('diff', retcode=1)
335 self.assertEqual(
336 "=== removed file 'a'\nBinary files old/a and new/a differ\n",
337 output[0])
338
328339
329class TestCheckoutDiff(TestDiff):340class TestCheckoutDiff(TestDiff):
330341
331342
=== modified file 'doc/en/release-notes/brz-3.1.txt'
--- doc/en/release-notes/brz-3.1.txt 2019-07-07 18:18:20 +0000
+++ doc/en/release-notes/brz-3.1.txt 2019-07-07 19:00:04 +0000
@@ -76,6 +76,9 @@
76 (i.e. when a non-int is specified as the value for an integer76 (i.e. when a non-int is specified as the value for an integer
77 parameter) (#237844, Jelmer Vernooij)77 parameter) (#237844, Jelmer Vernooij)
7878
79* Don't include timestamps in filenames when reporting on binary
80 files in diff. (Jelmer Vernooij, #71307)
81
79* Ignore UnknownFormatErrors when scanning for control directories.82* Ignore UnknownFormatErrors when scanning for control directories.
80 (Jelmer Vernooij, #468332)83 (Jelmer Vernooij, #468332)
8184

Subscribers

People subscribed via source and target branches