Details
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHG6ef94f24aa82: py3: make sure we open file in bytes mode
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
| indygreg |
| hg-reviewers |
| Lint Skipped |
| Unit Tests Skipped |
| raw = repo.vfs.tryread('sparse') | raw = repo.vfs.tryread('sparse') | ||||
| includes, excludes, profiles = parseconfig(repo.ui, raw) | includes, excludes, profiles = parseconfig(repo.ui, raw) | ||||
| aincludes, aexcludes, aprofiles = activeconfig(repo) | aincludes, aexcludes, aprofiles = activeconfig(repo) | ||||
| # Import rules on top; only take in rules that are not yet | # Import rules on top; only take in rules that are not yet | ||||
| # part of the active rules. | # part of the active rules. | ||||
| changed = False | changed = False | ||||
| for p in paths: | for p in paths: | ||||
| with util.posixfile(util.expandpath(p)) as fh: | with util.posixfile(util.expandpath(p), mode='rb') as fh: | ||||
| raw = fh.read() | raw = fh.read() | ||||
| iincludes, iexcludes, iprofiles = parseconfig(repo.ui, raw) | iincludes, iexcludes, iprofiles = parseconfig(repo.ui, raw) | ||||
| oldsize = len(includes) + len(excludes) + len(profiles) | oldsize = len(includes) + len(excludes) + len(profiles) | ||||
| includes.update(iincludes - aincludes) | includes.update(iincludes - aincludes) | ||||
| excludes.update(iexcludes - aexcludes) | excludes.update(iexcludes - aexcludes) | ||||
| profiles.update(iprofiles - aprofiles) | profiles.update(iprofiles - aprofiles) | ||||
| if len(includes) + len(excludes) + len(profiles) > oldsize: | if len(includes) + len(excludes) + len(profiles) > oldsize: | ||||