format-source issueshttps://foss.heptapod.net/mercurial/format-source/-/issues2020-02-08T11:21:34Zhttps://foss.heptapod.net/mercurial/format-source/-/issues/8track tool version2020-02-08T11:21:34ZGeorges Racinettrack tool version*Created originally on Bitbucket by [marmoute (Pierre-Yves David)](https://bitbucket.org/%7B44ceb89a-1cda-4c13-bf87-294dddcd719b%7D/)*
Formatting can varies a bit between version, so tracking the tool version is useful to understand wha...*Created originally on Bitbucket by [marmoute (Pierre-Yves David)](https://bitbucket.org/%7B44ceb89a-1cda-4c13-bf87-294dddcd719b%7D/)*
Formatting can varies a bit between version, so tracking the tool version is useful to understand what is going on (and potentially detect change in the future).https://foss.heptapod.net/mercurial/format-source/-/issues/6add an option to record extra config file during `hg format-source call`2020-02-08T11:21:35ZGeorges Racinetadd an option to record extra config file during `hg format-source call`*Created originally on Bitbucket by [marmoute (Pierre-Yves David)](https://bitbucket.org/%7B44ceb89a-1cda-4c13-bf87-294dddcd719b%7D/)*
Some users configuration depends on non standard file that might not be part of the tool configuratio...*Created originally on Bitbucket by [marmoute (Pierre-Yves David)](https://bitbucket.org/%7B44ceb89a-1cda-4c13-bf87-294dddcd719b%7D/)*
Some users configuration depends on non standard file that might not be part of the tool configuration. We should make it easier to keep track of them. for example a `--extra-config-file FILE` optionhttps://foss.heptapod.net/mercurial/format-source/-/issues/4Default config for known tools2020-02-08T11:21:35ZGeorges RacinetDefault config for known tools*Created originally on Bitbucket by [marmoute (Pierre-Yves David)](https://bitbucket.org/%7B44ceb89a-1cda-4c13-bf87-294dddcd719b%7D/)*
It would be nice to have some default configuration for the tools we know about:
* black
* clang
...*Created originally on Bitbucket by [marmoute (Pierre-Yves David)](https://bitbucket.org/%7B44ceb89a-1cda-4c13-bf87-294dddcd719b%7D/)*
It would be nice to have some default configuration for the tools we know about:
* black
* clang
* yapfhttps://foss.heptapod.net/mercurial/format-source/-/issues/3detect mode configuration issue and warn about them2020-02-08T11:21:35ZGeorges Racinetdetect mode configuration issue and warn about them*Created originally on Bitbucket by [marmoute (Pierre-Yves David)](https://bitbucket.org/%7B44ceb89a-1cda-4c13-bf87-294dddcd719b%7D/)*
A common error mode, is to have a tool configured as "pipe" output while actually performing an inpla...*Created originally on Bitbucket by [marmoute (Pierre-Yves David)](https://bitbucket.org/%7B44ceb89a-1cda-4c13-bf87-294dddcd719b%7D/)*
A common error mode, is to have a tool configured as "pipe" output while actually performing an inplace update.
Currently, the formatter runs fine, and format source read an empty file. Since is pretty bad the merge mechanism will see an empty "base" and "other", picking "local" as is.
I'm pretty sure there is not formatting tools that will return "Nothing" when passed something. So we can detect this to detect the error and warn the user about it.https://foss.heptapod.net/mercurial/format-source/-/issues/2Fault tolerance2020-02-08T11:21:35ZGeorges RacinetFault tolerance*Created originally on Bitbucket by [marmoute (Pierre-Yves David)](https://bitbucket.org/%7B44ceb89a-1cda-4c13-bf87-294dddcd719b%7D/)*
Right now, during merge, issues with the formatter result in an abort. Format-source is an helper ext...*Created originally on Bitbucket by [marmoute (Pierre-Yves David)](https://bitbucket.org/%7B44ceb89a-1cda-4c13-bf87-294dddcd719b%7D/)*
Right now, during merge, issues with the formatter result in an abort. Format-source is an helper extension, it should not get in the way.
We should keep merging in case of trouble, only issuing warning so that user can figure out what's wrong in case of actual trouble.
For explicite formatting (hg format-source call) error should still result in aborting.https://foss.heptapod.net/mercurial/format-source/-/issues/1Extension crashes when doing a merge2020-02-08T11:21:35ZGeorges RacinetExtension crashes when doing a merge*Created originally on Bitbucket by Anonymous*
When doing a merge I get this error:
```
File "/usr/local/lib/python2.7/dist-packages/mercurial/util.py", line 1553, in check
return func(*args, **kwargs)
File "/home/pehrso...*Created originally on Bitbucket by Anonymous*
When doing a merge I get this error:
```
File "/usr/local/lib/python2.7/dist-packages/mercurial/util.py", line 1553, in check
return func(*args, **kwargs)
File "/home/pehrsons/.mozbuild/evolve/hgext3rd/evolve/__init__.py", line 797, in warnobserrors
return orig(ui, repo, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/mercurial/util.py", line 1553, in check
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/hgext/rebase.py", line 830, in rebase
return _origrebase(ui, repo, **opts)
File "/usr/local/lib/python2.7/dist-packages/hgext/rebase.py", line 904, in _origrebase
rbsrt._performrebase(tr)
File "/usr/local/lib/python2.7/dist-packages/hgext/rebase.py", line 454, in _performrebase
self._rebasenode(tr, rev, allowdivergence, progress)
File "/usr/local/lib/python2.7/dist-packages/hgext/rebase.py", line 545, in _rebasenode
dest, wctx=self.wctx)
File "/usr/local/lib/python2.7/dist-packages/hgext/rebase.py", line 1124, in rebasenode
labels=['dest', 'source'], wc=wctx)
File "/usr/local/lib/python2.7/dist-packages/hgext/fsmonitor/__init__.py", line 751, in wrapupdate
labels, matcher, **kwargs)
File "/home/pehrsons/.local/lib/python2.7/site-packages/hgext3rd/formatsource.py", line 271, in wrap_update
return orig(repo, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/mercurial/merge.py", line 2160, in update
stats = applyupdates(repo, actions, wc, p2, overwrite, labels=labels)
File "/usr/local/lib/python2.7/dist-packages/mercurial/merge.py", line 1718, in applyupdates
complete, r = ms.preresolve(f, wctx)
File "/usr/local/lib/python2.7/dist-packages/mercurial/merge.py", line 635, in preresolve
return self._resolve(True, dfile, wctx)
File "/usr/local/lib/python2.7/dist-packages/mercurial/merge.py", line 588, in _resolve
labels=self._labels)
File "/usr/local/lib/python2.7/dist-packages/mercurial/filemerge.py", line 909, in premerge
labels=labels)
File "/home/pehrsons/.local/lib/python2.7/site-packages/hgext3rd/formatsource.py", line 250, in wrap_filemerge
local = fcd._changectx
AttributeError: 'str' object has no attribute '_changectx'
```
The hg version that I'm using is: 4.6.1 and I've installed the extension through 'pip'