HG problem: abort: decoding near '9: error: ‘sse2::l': 'ascii' codec can't decode byte 0xe2 in position 213: ordinal not in range(128)

2018-12-01 Thread ISHIKAWA,chiaki

Hi,

I am developing mozilla patches locally under my local PC running linux.

I often include the GCC's error/warning message in the mercurial
commit message (in the second and subsequent lines, the first line is
for usage by mozilla's bugzilla procedure.) when my local patch is
created to address build error or suppress compiler warning.

It worked just fine for months/years.

After an upgrade of local tools under Debian GNU/Linux last month or
so, I just noticed that such a patch with GCC warning line could not
be re-applied after it was qpopped. (I use mercurial mqueue
extension.)

This happened yesterday. This is the error message.

note: commit message saved in .hg/last-message.txt
transaction abort!
rollback completed
abort: decoding near '9: error: ‘sse2::l': 'ascii' codec can't decode 
byte 0xe2 in position 213: ordinal not in range(128)!


I was puzzled. After looking at the patch and the message above, I
finally figured out that that hg barfed on the proper quote character
just before "sse2::l" above. Can you spot the slightly tilted OPENING 
quote character?


So I removed the GCC warning line from the commit message and the
patch could be applied. This is problematic because I have about a few
dozen patches (actually more) and some patches could not be re-applied
due to the error above. I had to temporarily removed the offending
patch(es). Luckily the offending patches are relatively independent
and taken out for the moment.
But this could not be done if the patches are interdependent and
must be applied in a certain order.

Either
- GCC began producing such a non-ascii character lately (it is v7 on
my linux PC)
  [but I think I must have seen such characters long time before that],
- the "ascii" codec or whatever used by python has become very strict
  (But why ascii? Should we not use utf-8 after all?)
  [this could be an issue with setup of hg under my Debian GNU/Linux 
distribution?] , or

- something in my locale/character setting under Debian GNU/Linux
  broke lately due to the upgrade of local packages.

My point is that I have NOT changed in my personal setting at all 
(unless |./mach bootstrap| I occasionally run to make sure that I have 
the latest rust and other tools did something funny to my .hgrc).
Only the tools and system-wide setting could have changed mysteriously 
from my point of view.


I found a similar bug report in the following open source project:
https://github.com/schacon/hg-git/issues/27

I have not tried the HGENCODING=utf-8 fix mentioned in the above URL
for fear of breaking existing patches against my local copy of the
mozilla-central and comm-central source tree.

I wonder what would be the ultimate correct fix or
procedure to avoid/suppress this error.

I am posting this to warn developers who *MAY* see similar issues,
and to figure out where I should contact and report the issue:
- mercurial developers?
- python developers?
- who else?

I understand that mozilla is a big user of mercurial and so it should have
some clout to figure out the correct answer is quickly.  :-)

TIA

Happy Hacking in the good old sense of the phrase...

from a very perplexed linux user.

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: The tree has been reformatted now!

2018-12-01 Thread Masatoshi Kimura
Unfortunately, the ‘format-source’ extension did not work for me. Please
see .

On 2018/11/30 23:46, Andi-Bogdan Postelnicu wrote:
> Hello all
> 
> Starting with revision 6f3709b3878117466168c40affa7bca0b60cf75b 
> 
>  mozilla-central has been formatted using ./mach clang-format following the 
> Google coding style. 
> In order to diminish as much as possible the effort of merging pre-format 
> patches into our newly formatted repo we devised the following plan for the 
> two SCMs that we use:
> 
> Mercurial
> 
> Please make sure you run ‘mach bootstrap’ and allow the install of the 
> ‘format-source’ extension before pulling the reformat changeset. This 
> extension provides a simple and behind-the-curtains way on how you can 
> integrate un-formatted code into a formatted repo. 
> 
> Example
> Let’s assume the patch that need rebasing is at rev: 1000 and mozilla-central 
> is at rev: 2000.
> 
> hg rebase -b 1000 -d 2000
> 
> Or in case you want to have a more verbose output:
> 
> hg rebase -b 1000 -d 2000 -debug
> 
> The extension registers at the merge level and it will format both sides and 
> after that uses the original merge tool to combine for the final result.
> 
> For more detailed information on the process please also see this 
> 
>  document.
> 
>  Git
> Courtesy of Ehsan and Emilio there are two ways that help with the merge:
> Ehsan’s implementation 
> 
> Emilio’s implementation 
> For your convenience, the parent changeset of the reformat changeset has been 
> tagged in Mercurial as “PRE_TREEWIDE_CLANG_FORMAT”.  This will allow easily 
> updating to that version using the following command for example when 
> rebasing local changes:
> 
> hg up -r PRE_TREEWIDE_CLANG_FORMAT
> 
> 
> Hope this transition goes smooth as possible but if something comes up and 
> you need assistance please ping Andi on IRC.
> 
> Many thanks,
> Ehsan, Sylvestre and Andi 
> 
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
> 
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform