what does the error message from hg convert mean? - mercurial

i am trying to use hg convert to delete specific public files and create new repo.
the commands throws an error at a particular revision. this is the error message. please let me know what this is about and how can i resolve this.
#!python
** Mercurial version (4.6.1). TortoiseHg version (4.6.1)
** Command:
** CWD: C:\WINDOWS\system32
** Encoding: cp1252
** Extensions loaded: fetch, keyword, strip, mq, purge, rebase, shelve, split, convert, tortoisehg.util.configitems
** Python version: 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)]
** Windows version: sys.getwindowsversion(major=6, minor=2, build=9200, platform=2, service_pack='')
** Processor architecture: x64
** Qt-5.9.2 PyQt-5.9.1 QScintilla-2.10.2.dev1711012104
Traceback (most recent call last):
File "tortoisehg\hgqt\repowidget.pyo", line 889, in onRevisionSelected
File "tortoisehg\hgqt\revdetails.pyo", line 307, in onRevisionSelected
File "tortoisehg\hgqt\revdetails.pyo", line 328, in _setContextToFileList
File "tortoisehg\hgqt\manifestmodel.pyo", line 289, in setRev
File "tortoisehg\hgqt\manifestmodel.pyo", line 403, in _repopulateNodes
File "tortoisehg\hgqt\manifestmodel.pyo", line 431, in _populateNodes
File "tortoisehg\hgqt\manifestmodel.pyo", line 604, in _populaterepo
File "tortoisehg\hgqt\manifestmodel.pyo", line 634, in _populatesubrepos
File "mercurial\util.pyo", line 1437, in __get__
File "mercurial\context.pyo", line 166, in substate
File "mercurial\subrepoutil.pyo", line 61, in state
File "mercurial\context.pyo", line 1088, in data
File "mercurial\util.pyo", line 1437, in __get__
File "mercurial\context.pyo", line 702, in _filenode
File "mercurial\filelog.pyo", line 54, in lookup
File "mercurial\revlog.pyo", line 1494, in lookup
File "mercurial\revlog.pyo", line 1416, in _match
File "mercurial\revlog.pyo", line 812, in rev
WdirUnsupported

Related

MkDocs RuntimeError: StopIteration on mkdocs serve

I'm trying to run MkDocs and getting a StopIteration error when running mkdocs serve. This is on a fresh MkDocs project. I've installed MkDocs, ran mkdocs new my-project and then mkdocs serve.
It appears the file_match variable is empty on line 345 of config_options.py but I can't figure out what populates file_match. Is there an additional step between installing MkDocs and then using it that I'm missing?
Thanks for any help. My full stack trace is below.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/mkdocs/config/config_options.py", line 345, in walk_docs_dir
raise StopIteration
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/mkdocs", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/mkdocs/__main__.py", line 110, in serve_command
serve.serve(
File "/usr/local/lib/python3.8/site-packages/mkdocs/commands/serve.py", line 78, in serve
config = builder()
File "/usr/local/lib/python3.8/site-packages/mkdocs/commands/serve.py", line 67, in builder
config = load_config(
File "/usr/local/lib/python3.8/site-packages/mkdocs/config/base.py", line 151, in load_config
errors, warnings = cfg.validate()
File "/usr/local/lib/python3.8/site-packages/mkdocs/config/base.py", line 84, in validate
self._post_validate()
File "/usr/local/lib/python3.8/site-packages/mkdocs/config/base.py", line 73, in _post_validate
config_option.post_validation(self, key_name=key)
File "/usr/local/lib/python3.8/site-packages/mkdocs/config/config_options.py", line 370, in post_validation
for filename in self.walk_docs_dir(config['docs_dir']):
RuntimeError: generator raised StopIteration

Getting "NotImplementedError" from Mkdocs serve command [duplicate]

This question already has answers here:
Jupyter Notebook with Python 3.8 - NotImplementedError
(4 answers)
Closed 3 years ago.
I am setting up a documentation using mkdocs but I am getting "NotImplementedError" when runing the "mkdocs serve" command
Note that I am working on windows 10 and installed the Python 3.8.0a3 version
INFO - Building documentation...
INFO - Cleaning site directory
[I 190419 16:50:46 server:298] Serving on http://127.0.0.1:8000
Traceback (most recent call last):
File "c:\python38\lib\runpy.py", line 192, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python38\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python38\Scripts\mkdocs.exe\__main__.py", line 9, in <module>
File "c:\python38\lib\site-packages\click\core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "c:\python38\lib\site-packages\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "c:\python38\lib\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\python38\lib\site-packages\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\python38\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\python38\lib\site-packages\mkdocs\__main__.py", line 128, in serve_command
serve.serve(
File "c:\python38\lib\site-packages\mkdocs\commands\serve.py", line 124, in serve
_livereload(host, port, config, builder, site_dir)
File "c:\python38\lib\site-packages\mkdocs\commands\serve.py", line 58, in _livereload
server.serve(root=site_dir, host=host, port=port, restart_delay=0)
File "c:\python38\lib\site-packages\livereload\server.py", line 300, in serve
self.application(
File "c:\python38\lib\site-packages\livereload\server.py", line 255, in application
app.listen(port, address=host)
File "c:\python38\lib\site-packages\tornado\web.py", line 2112, in listen
server.listen(port, address)
File "c:\python38\lib\site-packages\tornado\tcpserver.py", line 152, in listen
self.add_sockets(sockets)
File "c:\python38\lib\site-packages\tornado\tcpserver.py", line 165, in add_sockets
self._handlers[sock.fileno()] = add_accept_handler(
File "c:\python38\lib\site-packages\tornado\netutil.py", line 279, in add_accept_handler
io_loop.add_handler(sock, accept_handler, IOLoop.READ)
File "c:\python38\lib\site-packages\tornado\platform\asyncio.py", line 99, in add_handler
self.asyncio_loop.add_reader(fd, self._handle_events, fd, IOLoop.READ)
File "c:\python38\lib\asyncio\events.py", line 498, in add_reader
raise NotImplementedError
NotImplementedError
I would like to get where the error come from and fix it
It seems like mkdocs does not the support the latest version of python which is 3.8.0a3.
In my case I fixed it by downgrading to 3.7

Django Unittest fails when run parallel on CircleCI

I am running Django Unit tests on CircleCI with 1 container setup. The tests run fine when I do not add Django's --parallel argument. However, when I add --parallel=2 to the test run, it fails with this cryptic error below.
I've tried both versions: with and without --keepdb - both fail with exactly the same error. The code for _clode_test_db appears to suggest that passing --keepdb=True should fail fast and return. See django/db/backends/mysql/creation.py line: 29 here [https://github.com/django/django/pull/4761/files]
Would appreciate any ideas on what is going on here
Using existing clone for alias 'default' ('test_django_learned')...
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/core/management/commands/test.py", line 30, in run_from_argv
super(Command, self).run_from_argv(argv)
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/core/management/commands/test.py", line 74, in execute
super(Command, self).execute(*args, **options)
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
output = self.handle(*args, **options)
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/core/management/commands/test.py", line 90, in handle
failures = test_runner.run_tests(test_labels)
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/test/runner.py", line 532, in run_tests
old_config = self.setup_databases()
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/test/runner.py", line 482, in setup_databases
self.parallel, **kwargs
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/test/runner.py", line 733, in setup_databases
keepdb=keepdb,
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/db/backends/base/creation.py", line 219, in clone_test_db
self._clone_test_db(number, verbosity, keepdb)
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/db/backends/mysql/creation.py", line 48, in _clone_test_db
dump_proc = subprocess.Popen(dump_cmd, stdout=subprocess.PIPE)
File "/usr/local/lib/python2.7/subprocess.py", line 390, in __init__
errread, errwrite)
File "/usr/local/lib/python2.7/subprocess.py", line 1024, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Exited with code 1
I could reproduce it and debugged the problem in my ubuntu container by adding
sys.stderr.write("dump_cmd: %r" % dump_cmd)
to site-packages/django/db/backends/mysql/creation.py and it gave me
dump_cmd: ['mysqldump', '--user=root', '--password=pass', '--host=db', '--port=3306', 'test']
So probably your container is also missing mysqldump which I fixed with a simple sudo apt-get install mysql-client.

Mercurial Log Templates

I have created a log alias in .hgrc file
nlog = glog --style=${HOME}/.hg-ext/templates.lg
Now in the templates.lg I use label function to colorize output
changeset = "{label('red',rev)} {label('c.author', author|person)} {desc|firstline|strip} {label('green', date|age)} {label('yellow', branches)}{label('yellow',bookmarks)}{label('yellow', tags)}\n\n"
changeset_verbose = "{label('red',rev)}:{node|short} {label('c.author',author|person)} {desc|firstline|strip} {label('green',date|age)} {label('yellow', branches)}{label('yellow',bookmarks)}{label('yellow', tags)}\n\n"
start_branches = " "
branch = "{label('yellow', branch)}"
start_bookmarks = " "
bookmark = "{label('yellow', bookmark)}, "
last_bookmark = "{label('yellow', bookmark}"
start_tags = " "
tag = "{label('yellow', tag)}, "
last_tag = "{label('yellow', tag)}"
When I run hg nlog it works ok on some repositories, but fails on others with follwing trace
C:\Users\esharapov\Repos\Composer.Hg>hg -v --traceback nlog
Traceback (most recent call last):
File "mercurial\dispatch.pyo", line 191, in _runcatch
File "mercurial\dispatch.pyo", line 924, in _dispatch
File "mercurial\dispatch.pyo", line 681, in runcommand
File "mercurial\extensions.pyo", line 195, in closure
File "hgext\color.pyo", line 518, in colorcmd
File "mercurial\extensions.pyo", line 195, in closure
File "hgext\pager.pyo", line 143, in pagecmd
File "mercurial\dispatch.pyo", line 1055, in _runcommand
File "mercurial\dispatch.pyo", line 1015, in checkargs
File "mercurial\dispatch.pyo", line 921, in <lambda>
File "mercurial\util.pyo", line 991, in check
File "mercurial\dispatch.pyo", line 537, in __call__
File "mercurial\util.pyo", line 991, in check
File "mercurial\extensions.pyo", line 195, in closure
File "mercurial\util.pyo", line 991, in check
File "hgext\mq.pyo", line 3516, in mqcommand
File "mercurial\util.pyo", line 991, in check
File "hgext\graphlog.pyo", line 64, in glog
File "mercurial\commands.pyo", line 5076, in log
File "mercurial\cmdutil.pyo", line 2219, in graphlog
File "mercurial\cmdutil.pyo", line 2196, in displaygraph
File "mercurial\cmdutil.pyo", line 1184, in show
File "mercurial\cmdutil.pyo", line 1489, in _show
File "mercurial\templatefilters.pyo", line 340, in stringify
File "mercurial\util.pyo", line 802, in increasingchunks
File "mercurial\templater.pyo", line 783, in _flatten
File "mercurial\templater.pyo", line 262, in runtemplate
File "hgext\color.pyo", line 501, in templatelabel
File "mercurial\templatefilters.pyo", line 340, in stringify
File "mercurial\templatekw.pyo", line 115, in _showlist
File "mercurial\templatekw.pyo", line 106, in one
File "mercurial\templater.pyo", line 938, in __call__
File "mercurial\templater.pyo", line 845, in process
File "mercurial\templater.pyo", line 835, in _load
File "mercurial\templater.pyo", line 181, in compiletemplate
File "mercurial\templater.pyo", line 173, in _parsetemplate
File "mercurial\parser.pyo", line 78, in parse
File "mercurial\parser.pyo", line 70, in _parse
File "mercurial\parser.pyo", line 50, in _parseoperand
File "mercurial\parser.pyo", line 41, in _match
ParseError: ('unexpected token: end', 26)
hg: parse error at 26: unexpected token: end
What could be the reason ?
I can't show you your mistake, but I performed some additional tests with strict correlations between condition and result
Preparation
Created $TortoiseHg\templates\map-cmdline.colorglog with content, identical to your templates.lg (I'm too lazy to write your long command on every test)
Found command-line in my 3.7.1, equivalent to your nlog (because hg: unknown command 'glog'): it's
hg log -G --style=colorglog
log -G and style without path, because style-file in default map-location with good name
Enabled Color Extension
Testing
Repo without tags (except mandatory tip) or bookmarks
>hg paths
default = https://bitbucket.org/albert_brand/hgexportfiles
>hg tags
tip 10:ee40a7b06166
>hg book
no bookmarks set
hg log - OK
Repo with tags and bookmarks
>hg paths
default = http://bitbucket.org/durin42/hg-git/
>hg book
master 987:be0d1413a06f
next 490:ac644c0e16d4
>hg tags
tip 987:be0d1413a06f
0.8.5 985:53d514c9c7e6
0.8.4 976:22a12bf143a3
0.8.3 946:d7ad67f850b2
0.8.2 926:e183fdc198f0
0.8.1 902:e6489cf3fe8c
0.8.0 857:cf3dafce0611
0.7.0 827:fc63d0e2653d
...
hg log - FAIL ("hg: parse error at 26: unexpected token: end")
Repo with tags and without bookmarks
>hg paths
default = http://bitbucket.org/durin42/hgsubversion/
>hg book
no bookmarks set
>hg tags
tip 1378:e1619c051788
1.8.5 1370:bd979667611d
1.8.4 1365:89997a5fc181
1.8.3 1347:759cafce6bec
1.8.2 1344:38be7a6b6def
1.8.1 1324:dde1ade36a49
...
hg log - OK
Additional tests with single tagged|bookmarked revisions in hg-git gepo
>hg log -r 985 --style=colorglog
985 Siddharth Agarwal init: mark Mercurial 3.7 as supported and prepare for 0.8.5 6 weeks ago 0.8.5
Tagged revision - OK
>hg log -r 490 --style=colorglog
hg: parse error at 26: unexpected token: end
Bookmarked revision - FAIL
ADDITION
OK, I catched it. As usual, obvious typo in obvious place. Instead of
last_bookmark = "{label('yellow', bookmark}"
it must be
last_bookmark = "{label('yellow', bookmark)}"
for obvious reason: label(), not label(
and bookmarked revision will not generate error anymore

Question regarding Mercurial 1.8.2

i have a big problem with Mercurial 1.8.2 on Mac OSX 10.6
I used for long time with a lot of projects. Now i haven't used for about 4 weeks. Today i tried and OSX crashed with "hg add" command.
So i googled a little bit and found out, that there was a bug in OSX 10.5 where i have to deactive the SET LOCAL in Terminal Preferences.
I've done so - now
hg add
hg commit -m "message"
works, but when i run
hg push
i get the following error message where i find no information about
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)]
** Mercurial Distributed SCM (version 1.8.2+20110401)
** Extensions loaded:
Traceback (most recent call last):
File "/usr/local/bin/hg", line 38, in <module>
mercurial.dispatch.run()
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 16, in run
sys.exit(dispatch(sys.argv[1:]))
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 36, in dispatch
return _runcatch(u, args)
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 58, in _runcatch
return _dispatch(ui, args)
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 601, in _dispatch
cmdpats, cmdoptions)
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 406, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 655, in _runcommand
return checkargs()
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 609, in checkargs
return cmdfunc()
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 598, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/Library/Python/2.6/site-packages/mercurial/util.py", line 433, in check
return func(*args, **kwargs)
File "/Library/Python/2.6/site-packages/mercurial/commands.py", line 3002, in push
ui.status(_('pushing to %s\n') % url.hidepassword(dest))
File "/Library/Python/2.6/site-packages/mercurial/demandimport.py", line 75, in __getattribute__
self._load()
File "/Library/Python/2.6/site-packages/mercurial/demandimport.py", line 47, in _load
mod = _origimport(head, globals, locals)
File "/Library/Python/2.6/site-packages/mercurial/url.py", line 354, in <module>
class httpconnection(keepalive.HTTPConnection):
File "/Library/Python/2.6/site-packages/mercurial/demandimport.py", line 75, in __getattribute__
self._load()
File "/Library/Python/2.6/site-packages/mercurial/demandimport.py", line 47, in _load
mod = _origimport(head, globals, locals)
File "/Library/Python/2.6/site-packages/mercurial/keepalive.py", line 361, in <module>
class HTTPResponse(httplib.HTTPResponse):
File "/Library/Python/2.6/site-packages/mercurial/demandimport.py", line 76, in __getattribute__
return getattr(self._module, attr)
AttributeError: 'module' object has no attribute 'HTTPResponse'
Do you have any ideas?
Thanks,
Sascha
I think you should do exactly as said in the error message :
** unknown exception encountered, please report by visiting
** https://www.mercurial-scm.org/wiki/BugTracker