Jump to content

User:Wikinaut

From Wikitech

My SOS page for my instances

how to set up a new node

scp

scp file.tgz wikinaut@openid-wiki.pmtpa.wmflabs:/tmp

rebooting instances

disable puppet

You can disable puppet temporarily with

sudo puppetd --disable

that will prevent it from clobbering your file, but also prevent it from pushing any other kind of updates

sudo puppetd --enable

git

What was the exact command with which you created your x.patch ?

# when in another branch that has the change
git format-patch master --stdout > filename.patch

permanent storage

(quota: 300 GB), auto-mount

first access mounts it

ls -l /data/project

check with

 mount; df -h

gerrit project group admins

git review

Setup:

sudo apt-get install python-pip ; sudo pip install git-review
gerrit question: Your change could not be merged due to a path conflict. 
Please merge (or rebase) the change locally and upload the resolution for review.
What's the correct way to solve this?

 git fetch origin
 git checkout origin/master ( => detached HEAD)
 (create your feature patch)
 git add -A
 git commit
 git review -D (creates a draft)

 ( sometimes you may need this to check out your features into a new_feature_branch
   git commit 
   git checkout -b new_feature_branch from_branch (create a new branch based on from_branch)
 )

 git checkout (that draft, using the clipboard feature on gerrit)
 git rebase origin master (!!)
 (fix merge conflicts)
 git add (all the fixed files)
 git rebase --continue

 git review -D (update the draft)

 answer a possible gerrit question: Your change could not be merged due to a path conflict. 
 Please merge (or rebase) the change locally and upload the resolution for review.
 What's the correct way to solve this?

 with

 yes


gerrit

Using a "gerrit" remote consistently

Before starting with git-review you should double-check how git refers to repositories. When you clone a repository, by default git gives the remote repository the nickname origin (unless you override this with -o gerrit as the sample commands on this page do), thus most git how-tos on the web use "origin". But the git-review tool prefers to use a remote called gerrit. If you're pulling code from gerrit.wikimedia.org then "origin" and "gerrit" are equivalent, yet if you fetch or pull from one but log/show/commit to the other you'll get different results!

Here's how to fix it:

Double check the git remotes (nicknames) available
git remote -v

If it shows something like

origin	ssh://username@gerrit.wikimedia.org:29418/mediawiki/core.git (fetch)
origin	ssh://username@gerrit.wikimedia.org:29418/mediawiki/core.git (push)

then follow these steps.

Rename "origin" to "gerrit"
git remote rename origin gerrit

If you already try git-review, the above won't work since you will probably have "gerrit" remote already. So just remove origin:

git remote rm origin
Change the tracking branch for "git pull"

In order for "git fetch" and "git pull" to show a helpful

Your branch is behind 'gerrit/master' by 63 commits, and can be fast-forwarded.

, you need to tell your local branch (for example "master") to track "gerrit/master" instead of "origin/master":

git branch --set-upstream master gerrit/master

After this you don't need "origin" anymore and you can safely use shortcuts like "git pull" to update your working copy.

Unfortunately you must perform these steps for every project checked out, i.e. core and extensions.

Checking if everything is OK

After changes the configuration should look like:

git remote -v
gerrit	ssh://username@gerrit.wikimedia.org:29418/mediawiki/core.git (fetch)
gerrit	ssh://username@gerrit.wikimedia.org:29418/mediawiki/core.git (push)

git branch -vv
*master                                  abad0ee [gerrit/master: behind 53] Some comment

Should we let this section removed or should I add it again?

Permission denied (publickey)