Post review request of committed files in CVS to Review Board - diff

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.

Related

GIT errors during Yocto build by Bitbake

I'm trying to build a image for IMX8MP SolidRun board (Hummingboard Mate board) but I'm going crazy with this. I'm using this git page:
https://github.com/SolidRun/meta-solidrun-arm-imx8
With this repo:
repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-hardknott -m imx-5.10.72-2.2.0.xml
But I have tried with this repo too:
repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-hardknott -m imx-5.10.72-2.2.2.xml
These are the errors I get with different configurations:
FIRST ONE:
ERROR: tinycompress-1.1.6-r0 do_fetch: Fetcher failure for URL:
'git://git.alsa-project.org/tinycompress.git;protocol=git;branch=master'.
Unable to fetch URL from any source. ERROR: Logfile of failure stored
in:
/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/cortexa53-crypto-poky-linux/tinycompress/1.1.6-r0/temp/log.do_fetch.21811
ERROR: Task
(/home/holoh/yocto/sources/meta-imx/meta-sdk/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb:do_fetch)
failed with exit code '1'
CHANGING URL configuration on yocto/sources/meta-imx/meta-sdk/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb because firewall could be acting.( to https://github.com/alsa-project/tinycompress.git adding protocol=https), the error I have received is this:
ERROR: tinycompress-1.1.6-r0 do_fetch: Fetcher failure for URL:
'https://github.com/alsa-project/tinycompress.git;protocol=https;branch=master'.
Missing SRC_URI checksum ERROR: Logfile of failure stored in:
/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/cortexa53-crypto-poky-linux/tinycompress/1.1.6-r0/temp/log.do_fetch.10927
ERROR: Task
(/home/holoh/yocto/sources/meta-imx/meta-sdk/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb:do_fetch)
failed with exit code '1'
I add checksum line as I can read here (Turn off Source Checksum Check Yocto). Two solutions tried, same result:
ERROR: tinycompress-1.1.6-r0 do_patch: Command Error: 'quilt --quiltrc
/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/cortexa53-crypto-poky-linux/tinycompress/1.1.6-r0/recipe-sysroot-native/etc/quiltrc
push' exited with 0 Output: stdout: Applying patch
0001-tinycompress-Add-id3-decoding.patch patching file
include/tinycompress/id3_tag_decode.h can't find file to patch at
input line 224 Perhaps you used the wrong -p or --strip option? The
text leading up to this was:
-------------------------- |diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am |index 1b996d4..e813689 100644 |---
a/src/utils/Makefile.am |+++ b/src/utils/Makefile.am
-------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 236 Perhaps you
used the wrong -p or --strip option? The text leading up to this was:
-------------------------- |diff --git a/src/utils/cplay.c b/src/utils/cplay.c |index 87863a3..2a52b52 100644 |---
a/src/utils/cplay.c |+++ b/src/utils/cplay.c
-------------------------- No file to patch. Skipping patch. 3 out of 3 hunks ignored patching file src/utils/id3_tag_decode.c Patch
0001-tinycompress-Add-id3-decoding.patch does not apply (enforce with
-f)
stderr: ERROR: Logfile of failure stored in:
/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/cortexa53-crypto-poky-linux/tinycompress/1.1.6-r0/temp/log.do_patch.22146
ERROR: Task
(/home/holoh/yocto/sources/meta-imx/meta-sdk/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb:do_patch)
failed with exit code '1'
What is going on here? I don't understand why It doesn't work, I'm following only the steps and this sh*t is impossible.
You have a proxy i guess. Try to disable it.
I tested it works fine.

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.

Pytest "Error: could not load path/to/conftest.py"

I get the following error when I try to run pytest repo/tests/test_file.py:
$ pytest repo/tests/test_file.py
Traceback (most recent call last):
File "/Users/marlo/anaconda3/envs/venv/lib/python3.6/site-packages/_pytest/config.py", line 329, in _getconftestmodules
return self._path2confmods[path]
KeyError: local('/Users/marlo/repo/tests/test_file.py')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/marlo/anaconda3/envs/venv/lib/python3.6/site-packages/_pytest/config.py", line 329, in _getconftestmodules
return self._path2confmods[path]
KeyError: local('/Users/marlo/repo/tests')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/marlo/anaconda3/envs/venv/lib/python3.6/site-packages/_pytest/config.py", line 362, in _importconftest
return self._conftestpath2mod[conftestpath]
KeyError: local('/Users/marlo/repo/conftest.py')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/marlo/anaconda3/envs/venv/lib/python3.6/site-packages/_pytest/config.py", line 368, in _importconftest
mod = conftestpath.pyimport()
File "/Users/marlo/anaconda3/envs/venv/lib/python3.6/site-packages/py/_path/local.py", line 686, in pyimport
raise self.ImportMismatchError(modname, modfile, self)
py._path.local.LocalPath.ImportMismatchError: ('conftest', '/home/venvuser/venv/conftest.py', local('/Users/marlo/repo/conftest.py'))
ERROR: could not load /Users/marlo/repo/conftest.py
My repo structure is
lib/
-tests/
-test_file.py
app/
-test_settings.py
pytest.ini
conftest.py
...
Other people have run this code fine, and according to this question (and this one), my structure is good and I am not missing any files. I can only conclude that something about my computer or project set-up is not right. If you have any suggestions or insights that I may be missing, please send them my way!
-------------------------------MORE DETAILS------------------------------
test_file.py:
def func(x):
return x + 1
def test_answer():
assert func(3) == 5
pytest.ini:
[pytest]
DJANGO_SETTINGS_MODULE = app.test_settings
python_files = tests.py test_* *_tests.py *test.py
I have docker as well as running pytest outside of docker too, and for me a much lower-impact fix whenever this crops up is to delete all the compiled python files
find . -name \*.pyc -delete
I figured it out and I'll answer in case others have the same issue:
I didn't even take into consideration that I had a docker container (of the same app) in the repo directory and, although I was not running the docker container, it was influencing the filepaths somehow.
To fix this:
I re-cloned the repo from the remote source into a new folder so that nothing from the old repo could "contaminate" it.
Updated my virtual environment with the .yml specifications of the clean repo
$ conda env update --name project --file project.yml
My project uses a postgres database, so I dropped it and created a new one
$ dropdb projectdb
$ createdb projectdb
Since my project uses mongo, I also dropped that database
$ mongo projectdb --eval "db.dropDatabase()"
Installed a clean pytest
$ pip uninstall pytest
$ pip install pytest
...and voilĂ ! I could run pytest.
Many thanks to #hoefling and others who helped me debug.
I was running docker as well, but it seems my problem was different.
I was using an old version of pytest:
platform linux -- Python 3.9.7, pytest-3.7.2, py-1.10.0, pluggy-1.0.0
which stopped working after my ubuntu image was pulling python 3.10 by default.
my solution was to update (and fix) the dockerfile image to use:
FROM python:3.10
instead of python:latest, and update the pytest version as well.

Mercurial ValueError: overflow in dirstate

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