##// END OF EJS Templates
patchbomb: don't unintentionally duplicate headers...
Augie Fackler -
r39070:cecb05c3 default
parent child Browse files
Show More
@@ -363,6 +363,7 b' test-parents.t'
363 test-parseindex2.py
363 test-parseindex2.py
364 test-patch-offset.t
364 test-patch-offset.t
365 test-patch.t
365 test-patch.t
366 test-patchbomb-bookmark.t
366 test-patchbomb-tls.t
367 test-patchbomb-tls.t
367 test-pathconflicts-merge.t
368 test-pathconflicts-merge.t
368 test-pathconflicts-update.t
369 test-pathconflicts-update.t
@@ -789,12 +789,19 b' def email(ui, repo, *revs, **opts):'
789 # TODO(durin42): this should probably be cleaned up above in the future.
789 # TODO(durin42): this should probably be cleaned up above in the future.
790 if pycompat.ispy3:
790 if pycompat.ispy3:
791 for hdr, val in list(m.items()):
791 for hdr, val in list(m.items()):
792 change = False
792 if isinstance(hdr, bytes):
793 if isinstance(hdr, bytes):
793 del m[hdr]
794 del m[hdr]
794 hdr = pycompat.strurl(hdr)
795 hdr = pycompat.strurl(hdr)
796 change = True
795 if isinstance(val, bytes):
797 if isinstance(val, bytes):
796 val = pycompat.strurl(val)
798 val = pycompat.strurl(val)
797 m[hdr] = val
799 if not change:
800 # prevent duplicate headers
801 del m[hdr]
802 change = True
803 if change:
804 m[hdr] = val
798 if opts.get('test'):
805 if opts.get('test'):
799 ui.status(_('displaying '), subj, ' ...\n')
806 ui.status(_('displaying '), subj, ' ...\n')
800 ui.pager('email')
807 ui.pager('email')
General Comments 0
You need to be logged in to leave comments. Login now