I have less experience with mercurial. i am having this problem:
I push everytime from my windows pc in tortoiseHG-Workbench to repo. works fine.
I pull to my server from repo with hg pull .... works fine.
then it asks me to run hg update. i will do it. but then it says, there is something to merge in my views.py and automatically opens a 3-way merge window in shell. I am using ssh tunnel - PuTTy.
in this 3way merge window, no hg commands are available. what i always do is:
> views.py #emptying the file
then i copy paste the views.py from my local pc to server and save it.
this works. but thru this, there will be always conflict because i am changing the same views.py in both sides. how do i solve this so that i dont have to merge everytime? i desperately need some help!
the problem is, there is no hg commands available in 3-way merge window
If you don't have any differences between your production and development script that should be merged, it is safe to always do update clean with update -C. This will replace all local changes you made with the latest version that you pulled from the repository. So the workflow would be:
hg pull
hg update -C
Related
Im trying to run this CoAP server from https://github.com/Tanganelli/CoAPthon on a raspberry pi. i cant seem to find much instructions. This was one of the CoAP that my instructor wanted us to use, my instructor pretty much left us hanging with no help at all but this link.
i followed the install instructions on the github page, the only thing that wouldnt install is the section
Install instructions for CoRE Resource Directory. Mongod wouldnt install for this section so i gave up. so i dont know if this section is important or not
What are the commands for the terminal to get it running and doing something.
it says to type in to run the server coapserver.py.
cd CoAPthon
python coapserver.py
and from what it looks like its running
but nothing happens, so im not sure if its just not working or if theres just nothing there for it to do, or if there is another file i need to run with the coapserver.py.
Im very new to using CoAP and will eventually need to add a sensor to it do record temp but i want to make sure i know the server is running properly before i add that part in
any input would be great
For future individuals that might need help with this, use aioCoAP, its much easier then CoAPthon
get it from here https://aiocoap.readthedocs.io/en/latest/installation.htmlg
all you need to do is mess with three files labeled server.py, clientPUT.py and clientGET.py
Add resources and classes for sensors and what not to server.py
ClientPUT.py is where you would add your code for the sensors or whatever you need.
ClinetGET.py you alter the uri
run it by type in the command in the terminal (go to directory first that has the server) type in python server.py
in another terminal do the same thing but instead run python clientPUT.py
and the server should be running
then all you need is a client for the get request. If you were like me and needed to use Copper go here to install it for chrome https://github.com/mkovatsc/Copper4Cr
I deployed odoo 10 CE on my local Ubuntu server 16.04 LTS with nginx reverse proxy. Now i installed Ubuntu 16.04, Odoo 10 CE with nginx as reverse proxy on another server. I restored the database from old server to new server.
If i access my new server like http://x.x.x.x:8069 , it works fine.
But access like http://x.x.x.x , the login page shows with out css styling. After login can't see any menus, company logo only.
If i try with Private browsing it works fine.
How can i resolve this.
EDIT
I ran the odoo server in two ways, first ran directly from the terminal like :
` sudo su - odoo -s /bin/bash
/odoo/odoo-server/./odoo-bin`
then i access like <ip_address>:8069, it works fine.
But when i try to run as demon ( sudo /etc/init.d/odoo-server start) , i face the same problem.
My system user is: odooadmin
odoo user is : odoo
And if i access via debug mode with assets it woks fine.
<ip_address>:8069/web?debug=assets
Any solution?
Sometimes you can get an Internal Server Error 500. In other cases you can get what you got. There are a few things you can try:
Remove Browser Cache. You can press Shift + Ctrl + Supr. Or reload without cache with Ctrl + F5
Remove Cookies. If you are using chrome or chromium you can delete the cookies stored for the domain you are using as you can see in the images:
web.base.url Parameter. Activate deleloper mode. Go to Settings > Parameters > System Parameters and check that the parameter web.base.url is correctly set. This parameter is updated each time you log in with the Administrator user, the value of the url bar is assigned to the parameter. But if you can get it to work with the private mode I assume this is well assigned.
If you moved to another machine there might be issue with loading some assets cached at the level of odoo server, such as transpiled js code for instance.
In order to solve this issue, you should (after restoring the database) connect to your database and run the following command :
DELETE FROM ir_attachment WHERE url LIKE '/web/content/%';.
More information here : https://github.com/odoo/odoo/issues/13808
Did you compile your CSS?
If it looks funnyou may need lessc CSS compiling (from https://www.odoo.com/documentation/8.0/setup/install.html )
We symlink node because some versions of debian/ubuntu don't agree on the bin name
Install Node
sudo apt install -y nodejs npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
Compiling CSS
If you install less, odoo will automatically compile the CSS
sudo npm install -g less less-plugin-clean-css
Consider blowing away the file cache:
If the compilation had failed, sometimes you need to blow away the postgres cache,
(thanks to sebalix for this tip):
You can run this SQL query in postgres to let Odoo rebuild its CSS+JS assets + reload icons via dbeaver:
DELETE FROM ir_attachment WHERE datas_fname SIMILAR TO '%.(js|css)';
DELETE FROM ir_attachment WHERE name='web_icon_data';
Then restart the server (assuming it was installed via ansible)
sudo service odoo restart
There's also files in ~/.local/share/Odoo/filestore you may want to temporarily move/rename
Check postgres version
Some versions of postgres are not supported, check psql --version and that you can download a backup of your database
Check odoo version
I've seen installs where odoo-bin --version returns 10 but the logs show odoo11 before every log line
I think your browser has some files on cache. Can you try after delete cache files on your browser ?
So i've run a heroku create command on my django repo, and currently it is living on Heroku. What I didnt do prior was create my own local git repo. I run git init, create a .gitignore to filter out my pycharm ide files, all the fun stuff.
I go to run git add . to add everything to the initial commit. Odd...it returns:
[1] 4270 killed git add.
So i run git add . again and get back this:
fatal: Unable to create /Users/thefromanguard/thefromanguard/app/.git/index.lock': File exists.
"Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue."
So I go and destroy the file, run it again; same error. Removed the whole repo, repeated the process, still got the same message.
Is Heroku running in the background where ps can't see it?
I would start over.
Destroy the heroku app
heroku apps:destroy --app YOURAPPNAME
Remove the whole repo (I would even remove the directory)
Create new directory, copy files over (do NOT copy old git repo artifacts that may be left over, anything starting with .git)
Initialize your git repo, add files, and commit, then push upstream to your remote (like github, if you're using one) git init && git add . && git commit -m 'initial commit' and optionally git push origin master
Then perform the heroku create
That should remove the conflict.
I need this command to run automatically on boot or when told to. At the moment i need to run the command in SSH and leave the session open, otherwise it stops.
python CouchPotatoServer/CouchPotato.py
This is on a ReadyNAS (Debian 7)
One easy way to do this would be to create it as a service. Take a look in /etc/init.d and you will find scripts that run as services. Copy one and modify it so that it calls your python script. An good example could be the init script used for starting the avahi daemon. Now, you can use 'service couchPotato start/stop/status', etc. It will also start the service automatically at boot time if the server ever reboots. Find a simple file to use as your template and google init scripts for further assistance. Good luck.
From this page:
To run on boot copy the init script. sudo cp CouchPotatoServer/init/ubuntu /etc/init.d/couchpotato
Change the paths inside the init script. sudo nano /etc/init.d/couchpotato
Make it executable. sudo chmod +x /etc/init.d/couchpotato
Add it to defaults. sudo update-rc.d couchpotato defaults
CouchPotatoServer/init/ubuntu can be found here
sudo update-rc.d <service> <runlevels> is the official Debian way of inserting a service at startup. Its manpage can be read there.
my 2 cents,
Use chkconfig to add the service and specify the run level. Google will give you all you need for examples of how to do this. Good luck.
I have a Atlassian Stash server for git.
I am looking to write a script that will run java code formatter as a pre-receive hook (before it pushes the changes to the repository).
So, what I am looking to do is NOT to do the work on the stash server itself rather perform the work on another server and send the status back (0 or 1) to the Stash server.
I have written the script in Python where it calls a cgi (python) script on the remote server with "ref oldrev newrev" as HTTP GET Method. Once I have the STDIN values (ref oldrev newrev) on a remote server, I created a dir, git init, git remote add origin URL, and git fetch (i even tried git pull) to get the latest contents/objects of a reporsitory in hoping to get the object that has not been pushed to the repository but its in a pre-pushed stage environment.
The hash or SHA key or "newrev" key of the object that is in the pre-pushed stage: 36ac63fe7b15049c132c310e1ee153e044b236b7
Now, when I run 'git ls-tree 36ac63fe7b15049c132c310e1ee153e044b236b7 Test.java' inside the directory I created above, it gives me error.
'fatal: not a tree object'
Now, My questions are:
How to get that object on a remote server?
What might be the git command that I run that will give me that object in that stage?
Is there any other way of doing this?
Does it make any sense of what I've asked above. Let me know if I am not clear and I will try to clear things up more.
Thanks very much in advanced for any/all the help?
java code formatter as a pre-receive hook
Don't do it. You're trying to run the equivalent of git filter-branch behind your developer's back. Don't do it.
Is there any other way of doing this?
If you want inbound code formatted in a particular way, validate the inbound files. If any aren't done right list them and reject the push.
How to get that object on a remote server?
You can't fetch arbitrary objects, you can only fetch by ref (branch or tag) name. The pre-receive hook runs before any refs have been updated, so no ref names the inbound commits.