Mercurial > public > mercurial-scm > hg
comparison mercurial/scmutil.py @ 34460:910adadf08e8
extdata: just use iterator to read lines one by one
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 01 Oct 2017 11:58:27 +0100 |
parents | d5c5cc767b7e |
children | c67db5dc131d |
comparison
equal
deleted
inserted
replaced
34459:d5c5cc767b7e | 34460:910adadf08e8 |
---|---|
1050 else: | 1050 else: |
1051 # treat as a URL or file | 1051 # treat as a URL or file |
1052 src = url.open(repo.ui, spec) | 1052 src = url.open(repo.ui, spec) |
1053 | 1053 |
1054 try: | 1054 try: |
1055 for l in src.readlines(): | 1055 for l in src: |
1056 if " " in l: | 1056 if " " in l: |
1057 k, v = l.strip().split(" ", 1) | 1057 k, v = l.strip().split(" ", 1) |
1058 else: | 1058 else: |
1059 k, v = l.strip(), "" | 1059 k, v = l.strip(), "" |
1060 | 1060 |