Mercurial > public > mercurial-scm > hg
comparison mercurial/utils/stringutil.py @ 51686:493034cc3265
black: format the codebase with 23.3.0
The CI has moved to 23.3.0, which is the last version that supports 3.7
at runtime, so we should honor this change.
# skip-blame mass-reformating only
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Thu, 18 Jul 2024 12:36:12 +0200 |
parents | 9be765b82a90 |
children | 7f0cb9ee0534 |
comparison
equal
deleted
inserted
replaced
51685:39e2b2d062c1 | 51686:493034cc3265 |
---|---|
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 | |
578 # Don't bother checking the line if it is a comment or | 577 # Don't bother checking the line if it is a comment or |
579 # is an improperly formed author field | 578 # is an improperly formed author field |
580 if line.lstrip().startswith(b'#'): | 579 if line.lstrip().startswith(b'#'): |
581 continue | 580 continue |
582 | 581 |
799 # Arrange in reverse order so items can be efficiently popped | 798 # Arrange in reverse order so items can be efficiently popped |
800 # from a stack of chucks. | 799 # from a stack of chucks. |
801 chunks.reverse() | 800 chunks.reverse() |
802 | 801 |
803 while chunks: | 802 while chunks: |
804 | |
805 # Start the list of chunks that will make up the current line. | 803 # Start the list of chunks that will make up the current line. |
806 # cur_len is just the length of all the chunks in cur_line. | 804 # cur_len is just the length of all the chunks in cur_line. |
807 cur_line = [] | 805 cur_line = [] |
808 cur_len = 0 | 806 cur_len = 0 |
809 | 807 |