Mercurial ValueError: overflow in dirstate - version-control

When I try to do an hg status command, Mercurial raise me ValueError: overflow in dirstate error.
hg log and hg diff commands works fine.
Do you have a way to fix my repo ?
Output of hg status command
12:12 user#host ~/projects/nsr% hg st
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.9 (default, Jun 29 2016, 13:08:31) [GCC 4.9.2]
** Mercurial Distributed SCM (version 3.9.1)
** Extensions loaded: extdiff, color, graphlog, rebase, strip, mq, shelve, churn, purge, record
Traceback (most recent call last):
File "/usr/bin/hg", line 45, in <module>
mercurial.dispatch.run()
.....
File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 888, in wrapper
return func(*args, **kwargs)
ValueError: overflow in dirstate
zsh: exit 1 hg st

Finally,
I found solution and fix my repository by using this command :
hg debugrebuildstate -r tip

Related

Unable to use pip to install github repo

I am not able to use anymore the pip install command to install from a github branch. I was using this line of code for the last 2 years but suddenly it stoped working:
/home/training/bin/pip install git+https://github.com/org/project#my_branch
My git version is 1.7.10 and my operating system is Red Hat Enterprise Linux Server release 6.4
The error I get is:
Cloning https://github.com/wfp-ose/django-geoexplorer.git (to wfp_migration_training) to /tmp/pip-jDnC_j-build
error: while accessing https://github.com/wfp-ose/django-geoexplorer.git/info/refs
fatal: HTTP request failed
Complete output from command /usr/bin/git clone -q https://github.com/wfp-ose/django-geoexplorer.git /tmp/pip-jDnC_j-build:
When I check in the pip log I get:
Command /usr/bin/git clone -q https://github.com/wfp-ose/django-
geoexplorer.git /tmp/pip-jDnC_j-build failed with error code 128 in None
Exception information:
Traceback (most recent call last):
File "/home/training/lib/python2.7/site-packages/pip/basecommand.py", line
122, in main
status = self.run(options, args)
File "/home/training/lib/python2.7/site-packages/pip/commands/install.py",
line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle,
bundle=self.bundle)
File "/home/training/lib/python2.7/site-packages/pip/req.py", line 1197, in
prepare_files
do_download,
File "/home/training/lib/python2.7/site-packages/pip/req.py", line 1360, in
unpack_url
unpack_vcs_link(link, loc, only_download)
File "/home/training/lib/python2.7/site-packages/pip/download.py", line 344,
in unpack_vcs_link
vcs_backend.unpack(location)
File "/home/training/lib/python2.7/site-packages/pip/vcs/__init__.py", line
240, in unpack
self.obtain(location)
File "/home/training/lib/python2.7/site-packages/pip/vcs/git.py", line 111,
in obtain
call_subprocess([self.cmd, 'clone', '-q', url, dest])
File "/home/training/lib/python2.7/site-packages/pip/util.py", line 697, in
call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command /usr/bin/git clone -q https://github.com/wfp-
ose/django-geoexplorer.git /tmp/pip-jDnC_j-build failed with error code 128
in
None
I haven't changed anything in my .config file for git and I am logged in properly in my github account.
EDIT
I think this is related to this:
https://githubengineering.com/crypto-removal-notice/
See the text at https://github.com/wfp-ose/django-geoexplorer.git/info/refs:
Please upgrade your git client.
GitHub.com no longer supports git over dumb-http

bitbake fails at the simplest recipe

Just installed Yocto. On a morty branch. Executed the following commands:
cd poky
source oe-init-build-env build-qemuarm
In conf/local.conf changed the name of the machine to MACHINE ?= "qemuarm"
Then executed the following:
$ bitbake core-image-minimal
Loading cache: 100% |##########################################################################################################| Time: 0:00:00
Loaded 1320 entries from dependency cache.
ERROR: Execution of event handler 'sstate_eventhandler2' failed
Traceback (most recent call last):
File "/home/some-user/projects/melp/poky/meta/classes/sstate.bbclass", line 1015, in sstate_eventhandler2(e=<bb.event.ReachableStamps object at 0x7fbc17f2e0f0>):
for l in lines:
> (stamp, manifest, workdir) = l.split()
if stamp not in stamps:
ValueError: not enough values to unpack (expected 3, got 1)
ERROR: Command execution failed: Traceback (most recent call last):
File "/home/some-user/projects/melp/poky/bitbake/lib/bb/command.py", line 101, in runAsyncCommand
self.cooker.updateCache()
File "/home/some-user/projects/melp/poky/bitbake/lib/bb/cooker.py", line 1658, in updateCache
bb.event.fire(event, self.databuilder.mcdata[mc])
File "/home/some-user/projects/melp/poky/bitbake/lib/bb/event.py", line 201, in fire
fire_class_handlers(event, d)
File "/home/some-user/projects/melp/poky/bitbake/lib/bb/event.py", line 124, in fire_class_handlers
execute_handler(name, handler, event, d)
File "/home/some-user/projects/melp/poky/bitbake/lib/bb/event.py", line 96, in execute_handler
ret = handler(event)
File "/home/some-user/projects/melp/poky/meta/classes/sstate.bbclass", line 1015, in sstate_eventhandler2
(stamp, manifest, workdir) = l.split()
ValueError: not enough values to unpack (expected 3, got 1)
It looks like it is a python error. Does anyone know what is the issue? Am I using the wrong version?
Here is the output of python --version
$ python --version
Python 2.7.12
What am I doing wrong?
You realise that Morty is 18 months old and in a few weeks will be longer supported right?
Anyway, looks like the sstate-cache/ somehow is corrupted. Delete your tmp/ and sstate-cache/ directories and try again.

tortoisehg ImportError: DLL load failed: Access is denied

The code is as follows:
#!python
** Mercurial version (4.4.2). TortoiseHg version (4.4.2)
** Command:
** CWD: C:\Windows\system32
** Encoding: cp1252
** Extensions loaded:
** 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: unknown (failed to import win32api)
** Qt-5.9.2 PyQt-5.9.1 QScintilla-2.10.2.dev1711012104
Traceback (most recent call last):
File "tortoisehg\hgqt\workbench.pyo", line 717, in openRepo
File "tortoisehg\hgqt\repotab.pyo", line 117, in openRepo
File "tortoisehg\hgqt\repotab.pyo", line 383, in _createRepoWidget
File "tortoisehg\hgqt\thgrepo.pyo", line 670, in openRepoAgent
File "tortoisehg\hgqt\thgrepo.pyo", line 397, in startMonitoringIfEnabled
File "tortoisehg\util\paths.pyo", line 130, in is_on_fixed_drive
File "hgdemandimport\demandimportpy2.pyo", line 145, in __getattr__
File "hgdemandimport\demandimportpy2.pyo", line 90, in _load
File "hgdemandimport\demandimportpy2.pyo", line 41, in _hgextimport
File "win32file.pyo", line 12, in <module>
File "win32file.pyo", line 10, in __load
ImportError: DLL load failed: Access is denied.
Hi. I got this error when I tried to access my repository. (It didn't even proceed to the push/pull window that lists previous commits). Why did this happen and how do I resolve it?
Thanks all.
I fixed it but i dont know which one of the steps that I did that fix it. so let me know if some else had this issue and please respond which one of the steps that i did that fixed it.. or if you got other ways of fixing it post your answers as well.
Revert back my version of TortoiseHG from 4.4.2 to 4.2.0
Move ".hg" folder from local directory to somewhere else(desktop) then put it back to your original directory.
Note: I did a restart as this seems to cause the windows explorer to hang
On your ".hg" folder you'll have a hgrc file open that file and
comment [tortoisehg] block of the file.
Working again for me :)

Post review request of committed files in CVS to Review Board

I am trying to post review request of files i committed in CVS, currently i have two file with their revisions. I have tried almost all possible combinations mentioned # https://www.reviewboard.org/docs/rbtools/0.7/rbt/commands/post/#posting-paths
but none of them worked. Samples are below:
rbt post -d src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java##1.1.4.27.4.2.12.8.2.3.4.1.4.1:src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java##1.1.4.27.4.2.12.8.2.3.4.1.4.2 ui/Accounting/AP/Reports/rptCheckReconciliation.jsp##1.1.4.6.32.1.34.1:ui/Accounting/AP/Reports/rptCheckReconciliation.jsp##1.1.4.6.32.1.34.1.2.1
rbt post -d src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java#1.1.4.27.4.2.12.8.2.3.4.1.4.1,#1.1.4.27.4.2.12.8.2.3.4.1.4.2 ui/Accounting/AP/Reports/rptCheckReconciliation.jsp#1.1.4.6.32.1.34.1,#1.1.4.6.32.1.34.1.2.1
rbt post -d -I src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java##1.1.4.27.4.2.12.8.2.3.4.1.4.1,##1.1.4.27.4.2.12.8.2.3.4.1.4.2 -I ui/Accounting/AP/Reports/rptCheckReconciliation.jsp##1.1.4.6.32.1.34.1,##1.1.4.6.32.1.34.1.2.1
rbt post -d src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java##1.1.4.27.4.2.12.8.2.3.4.1.4.1 src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java##1.1.4.27.4.2.12.8.2.3.4.1.4.2 ui/Accounting/AP/Reports/rptCheckReconciliation.jsp##1.1.4.6.32.1.34.1 ui/Accounting/AP/Reports/rptCheckReconciliation.jsp##1.1.4.6.32.1.34.1.2.1
rbt post -d src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java##1.1.4.27.4.2.12.8.2.3.4.1.4.1,##1.1.4.27.4.2.12.8.2.3.4.1.4.2 ui/Accounting/AP/Reports/rptCheckReconciliation.jsp##1.1.4.6.32.1.34.1,##1.1.4.6.32.1.34.1.2.1
I am getting either
rbtools.clients.errors.TooManyRevisionsError: Too many revisions specified
error or
rbtools.commands.CommandError: Error validating diff
The specified diff file is empty. (HTTP 400, API Error 219)
I have 2 files, their traces are below:
/home/cvs/src/ns/src/com/sibisoft/northstar/acc/ap/reports/Attic/ApReportUtil.java,v <-- src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java
new revision: 1.1.4.27.4.2.12.8.2.3.4.1.4.2; previous revision: 1.1.4.27.4.2.12.8.2.3.4.1.4.1
/home/cvs/src/ns/ui/Accounting/AP/Reports/Attic/rptCheckReconciliation.jsp,v <-- ui/Accounting/AP/Reports/rptCheckReconciliation.jsp
new revision: 1.1.4.6.32.1.34.1.2.1; previous revision: 1.1.4.6.32.1.34.1
Any help would be really appreciated.
UPDATE:
#unreturnedURL: I tried but getting following error.
D:\IntelliJ_workspace\52B7>rbt post -d -I src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java##1.1.4.27.4.2.12.8.2.3.4.1.4.1:src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java##1.1.4.27.4.2.12.8.2.3.4.1.4.2
>>> RBTools 0.7.5 alpha 0 (dev)
>>> Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
>>> Running on Windows-8-6.2.9200
>>> Home = C:\Users\Waqar Ali Khan\AppData\Roaming
>>> Current directory = D:\IntelliJ_workspace\52B7
>>> Checking for a Subversion repository...
>>> Unable to execute "svn help": skipping SVN
>>> Checking for a Git repository...
>>> Running: git rev-parse --git-dir
>>> Command exited with rc 128: ['git', 'rev-parse', '--git-dir']
fatal: Not a git repository (or any of the parent directories): .git
---
>>> Checking for a Mercurial repository...
>>> Unable to execute "hg --help": skipping Mercurial
>>> Checking for a CVS repository...
>>> repository info: Path: CVS-SERVER:/home/cvs/src, Base path: None, Supports changesets: False
>>> Making HTTP GET request to http://example.com/api/
>>> Running: cvs diff -uN src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java##1.1.4.27.4.2.12.8.2.3.4.1.4.1:src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java##1.1.4.27.4.2.12.8.2.3.4.1.4.2
>>> Command exited with rc 1: ['cvs', 'diff', '-uN', 'src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java##1.1.4.27.4.2.12.8.2.3.4.1.4.1:src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java##1.1.4.27.4.2.12.8.2.3.4.1.4.2']
>>> Making HTTP GET request to http://example.com/api/validation/diffs/
>>> Cached response for HTTP GET http://example.com/api/validation/diffs/ expired and was modified
>>> Making HTTP POST request to http://example.com/api/validation/diffs/
>>> Got API Error 219 (HTTP code 400): The specified diff file is empty.
>>> Error data: {u'stat': u'fail', u'err': {u'msg': u'The specified diff file is empty.', u'code': 219}}
Traceback (most recent call last):
File "C:\Program Files (x86)\RBTools\bin\..\Python27\Scripts\rbt-script.py", line 8, in <module>
load_entry_point('RBTools==0.7.5alpha0', 'console_scripts', 'rbt')()
File "C:\Program Files (x86)\RBTools\Python27\lib\site-packages\rbtools-0.7.5alpha0-py2.7.egg\rbtools\commands\main.py", line 133, in main
command.run_from_argv([RB_MAIN, command_name] + args)
File "C:\Program Files (x86)\RBTools\Python27\lib\site-packages\rbtools-0.7.5alpha0-py2.7.egg\rbtools\commands\__init__.py", line 622, in run_from_argv
exit_code = self.main(*args) or 0
File "C:\Program Files (x86)\RBTools\Python27\lib\site-packages\rbtools-0.7.5alpha0-py2.7.egg\rbtools\commands\post.py", line 754, in main
(msg_prefix, e))
rbtools.commands.CommandError: Error validating diff
The specified diff file is empty. (HTTP 400, API Error 219)
The link you mentioned is for posting diff for uncommited code for Perforce. Instead try this: https://www.reviewboard.org/docs/rbtools/0.7/rbt/commands/post/#posting-committed-code.
Try posting for a single file with -I option e.g.
rbt post -d -I src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java##1.1.4.27.4.2.12.8.2.3.4.1.4.1:src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java##1.1.4.27.4.2.12.8.2.3.4.1.4.2
If it does not work, pls post the complete debug log. If it works, try for both files with -I before each revision range.

Mercurial hg recover ValueError: need more than 1 value to unpack

I attempted to push to a mercurial repo and got a message that it was waiting for a lock from a co-worker who had already left for the day. This has happened multiple times as for some reason pushes across the vpn don't always get their locks cleaned up. I delete the lock and go to recover the repo but this doesn't go as normal.
>hg recover
rolling back interrupted transaction
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)]
** Mercurial Distributed SCM (version 3.1.1)
** Extensions loaded: eol
Traceback (most recent call last):
File "hg", line 42, in <module>
File "mercurial\dispatch.pyo", line 28, in run
File "mercurial\dispatch.pyo", line 69, in dispatch
File "mercurial\dispatch.pyo", line 138, in _runcatch
File "mercurial\dispatch.pyo", line 820, in _dispatch
File "mercurial\dispatch.pyo", line 600, in runcommand
File "mercurial\dispatch.pyo", line 911, in _runcommand
File "mercurial\dispatch.pyo", line 882, in checkargs
File "mercurial\dispatch.pyo", line 817, in <lambda>
File "mercurial\util.pyo", line 550, in check
File "mercurial\commands.pyo", line 4835, in recover
File "mercurial\localrepo.pyo", line 914, in recover
File "mercurial\transaction.pyo", line 304, in rollback
ValueError: need more than 1 value to unpack
Connecting to a repo over a VPN is a bad idea and can generally lead to corruption during operations where the vpn drops out: see this bug.
This was resolved by cloning the repo on the server at the latest successful pushed commit hg clone -r <#>
Then I had to do a fresh clone on my end from the new repository that got cloned. Then I was able to push successfully from the new repo.