It's easier to conditionalize some of the environment variables per Mercurial
version once there is only one value per line.
Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG73da729ccfef: test: introduce a new flag to display env variable line per line
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
+parser.add_argument(
+ "--line",
+ action="store_const",
+ const=True,
+ default=False,
Nit: can be action="store_true"
vars = [b"%s=%s" % (k.encode('ascii'), filter(v).encode('ascii'))
for k, v in env]-out.write(b" ".join(vars))
+
+# Print variables on out
+if args.line is False:
Nit: not args.line
+ vars = ["%s=%s" % (k, filter(v)) for k, v in env]
Why not reuse the vars constructed above? It's carefully written to be
Python3 safe.
Comment Actions
Will update for the Nits
+ vars = ["%s=%s" % (k, filter(v)) for k, v in env]
Why not reuse the vars constructed above? It's carefully written to be
Python3 safe.
It's a bad resolution of a merge conflict, I will remote the line, nice catch