Page MenuHomePhabricator

obsolete: resolved ValueError for var containing 2 ':' chars(issue-5783)
Needs RevisionPublic

Authored by abhyudaypratap on Jul 14 2018, 2:43 PM.

Details

Reviewers
baymax
Group Reviewers
hg-reviewers
Summary

feature Note accepts ':' chars
So metadata of obsmarker consists of more then 1 ':' char,
The content of the variable 'data' in this function is:
'date:1518013344.878793 -3600\x00ef1:0\x00note:6c95ca::a1e17f\x00p1:ed7673f73387b36521da58a87f08e02e4a795ded\x00user:Denis Laxalde <xxx@yyy.zz>'

resulting in giving a error ValueError (too many values to unpack) because we are trying to store multiple values into two variables key and value

Resolving this error by splitting the variable 'l' from the first occurence of ':'
key, value = l.split("", 1)

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

abhyudaypratap created this revision.Jul 14 2018, 2:43 PM
yuja added a subscriber: yuja.Jul 15 2018, 9:27 AM

Looks good. Can you add a test?

https://www.mercurial-scm.org/wiki/ContributingChanges#Coding_style_and_testing

The version 0 format can be enforced by --config format.obsstore-version=0.

baymax requested changes to this revision.Jan 24 2020, 12:32 PM

There seems to have been no activities on this Diff for the past 3 Months.

By policy, we are automatically moving it out of the need-review state.

Please, move it back to need-review without hesitation if this diff should still be discussed.

:baymax:need-review-idle:

This revision now requires changes to proceed.Jan 24 2020, 12:32 PM