comparison mercurial/utils/stringutil.py @ 51700:7f0cb9ee0534

Backout accidental publication of a large range of revisions I accidentally published 25e7f9dcad0f::bd1483fd7088, this is the inverse.
author Raphaël Gomès <rgomes@octobus.net>
date Tue, 23 Jul 2024 10:02:46 +0200
parents 493034cc3265
children ca7bde5dbafb
comparison
equal deleted inserted replaced
51699:bd1483fd7088 51700:7f0cb9ee0534
572 572
573 if mailmapcontent is None: 573 if mailmapcontent is None:
574 return mailmap 574 return mailmap
575 575
576 for line in mailmapcontent.splitlines(): 576 for line in mailmapcontent.splitlines():
577
577 # Don't bother checking the line if it is a comment or 578 # Don't bother checking the line if it is a comment or
578 # is an improperly formed author field 579 # is an improperly formed author field
579 if line.lstrip().startswith(b'#'): 580 if line.lstrip().startswith(b'#'):
580 continue 581 continue
581 582
798 # Arrange in reverse order so items can be efficiently popped 799 # Arrange in reverse order so items can be efficiently popped
799 # from a stack of chucks. 800 # from a stack of chucks.
800 chunks.reverse() 801 chunks.reverse()
801 802
802 while chunks: 803 while chunks:
804
803 # Start the list of chunks that will make up the current line. 805 # Start the list of chunks that will make up the current line.
804 # cur_len is just the length of all the chunks in cur_line. 806 # cur_len is just the length of all the chunks in cur_line.
805 cur_line = [] 807 cur_line = []
806 cur_len = 0 808 cur_len = 0
807 809