##// 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 363 test-parseindex2.py
364 364 test-patch-offset.t
365 365 test-patch.t
366 test-patchbomb-bookmark.t
366 367 test-patchbomb-tls.t
367 368 test-pathconflicts-merge.t
368 369 test-pathconflicts-update.t
@@ -789,12 +789,19 b' def email(ui, repo, *revs, **opts):'
789 789 # TODO(durin42): this should probably be cleaned up above in the future.
790 790 if pycompat.ispy3:
791 791 for hdr, val in list(m.items()):
792 change = False
792 793 if isinstance(hdr, bytes):
793 794 del m[hdr]
794 795 hdr = pycompat.strurl(hdr)
796 change = True
795 797 if isinstance(val, bytes):
796 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 805 if opts.get('test'):
799 806 ui.status(_('displaying '), subj, ' ...\n')
800 807 ui.pager('email')
General Comments 0
You need to be logged in to leave comments. Login now