Dear Ariel,
I submitted the patches upstream.
0) Review
The changes may be found at https://gerrit.wikimedia.org/r/64343/.
1) Git
In the hope that others may find it useful, I am posting the sequence of Git commands used, organized as a Makefile.
#-----------------------------------------------------------------------------+ # Makefile for submitting patches to the Wikimedia Foundation | # Copyright (C) 2013 Dr. Kent L. Miller. All rights reserved. | # | # This program is free software: you can redistribute it and/or modify | # it under the terms of the GNU General Public License as published by | # the Free Software Foundation, either version 3 of the License, or (at | # your option) any later version. | # | # This program is distributed in the hope that it will be useful, but | # WITHOUT ANY WARRANTY; without even the implied warranty of | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | # General Public License for more details. | # | # You should have received a copy of the GNU General Public License | # along with this program. If not, see http://www.gnu.org/licenses/") | #-----------------------------------------------------------------------------+ GERRIT = wpmirrordev@gerrit.wikimedia.org PORT = 29418 WMFLABS = wpmirrordev@bastion.wmflabs.org
all: clone hooks pull checkout branch edit diff add commit rebase review
clone: # create directory `dumps' and initialize a repository in it # copy all commit objects and head references (from remote to local) # add `remote repository reference' named `origin' (saves typing) # add `remote heads' named `origin/[head-name]' # add `HEAD' to track `origin/master' git clone ssh://$(GERRIT):$(PORT)/operations/dumps
hooks: # get `pre-commit-hook' to add `change id' to commit summary scp -p -P $(PORT) $(GERRIT):hooks/commit-msg ~/dumps/.git/hooks/. cd dumps; git review -s
pull: # list `remote heads' cd dumps; git branch -r # setup tracking branch `ariel' cd dumps; git branch --track ariel origin/ariel # add new commit objects (if any) # update `remote heads' cd dumps; git fetch origin # update `local heads' (`master' and `ariel') to `remote-heads' # merge `origin/HEAD' into `HEAD' cd dumps; git pull origin
checkout: # point `HEAD' to `ariel's commit object cd dumps; git checkout ariel cd dumps; git status
branch: # create head `wpmirrordev' # point `wpmirrordev' to `ariel's commit object cd dumps; git branch wpmirrordev ariel # point `HEAD' to `wpmirrordev's commit object cd dumps; git checkout wpmirrordev cd dumps; git status
edit: # apply patched files cp temp/* dumps/xmlfileutils/.
diff: # diff files (but not added files) against `HEAD' cd dumps; git diff # list changed files against `HEAD' cd dumps; git status
add: # stage the files to be committed cd dumps/xmlfileutils; git add mwxml2sql.c sql2txt.c sqlfilter.c cd dumps/xmlfileutils; git add Makefile # diff added files against `HEAD' cd dumps; git diff --cached # list changed files against `HEAD' cd dumps; git status
commit: # create `commit object' # point `HEAD' to the new `commit object' cd dumps; git commit -m "Fix for compatibility with help2man and Debian Policy" # list all commits from `HEAD' back to initial commit cd dumps; git log
rebase: # add new commit objects (if any) # update `remote head' `origin/ariel' # merge `origin/ariel' into `ariel' # point `ariel' to `origin/ariel's commit object cd dumps; git pull origin ariel # rebase `wpmirrordev' branch on updated `ariel' head cd dumps; git rebase ariel
review: # push changes to Gerrit cd dumps; git review -R ariel
#-----------------------------------------------------------------------------+
shell: ssh -A $(WMFLABS)
purge: rm -r dumps
clean: rm -f *~
Sincerely Yours, Kent
Thanks for all this, and I will look at the patch(es) shortly.
My steps look a lot shorter than your list:
git clone ssh://ariel@gerrit.wikimedia.org:29418/operations/dumps cd dumps/.git/hooks/ wget https://gerrit.wikimedia.org/r/tools/hooks/commit-msg cd ../../ git checkout ariel hack hack hack git add piles-of-stuff git commit woops, didn't like that, hack hack hack, git add more-stuff git commit --amend
and then finally
git push origin HEAD:refs/for/ariel
I usually have git push-for-review-branch-of-my-choice aliased in .git/config to "push origin HEAD:refs/for/branch-of-my-choice"
If gerrit insistes on a rebase and it's "simple" then clicking the rebase button (near the review button) will take care of it. If it's more complex then you will want to git pull, git rebase -i and do the necessary grunge work by hand.
Note that I don't use gerrit-review; note also that these steps assume you are working directly on the branch you want to commit to, rather than a separate topic branch.
Ah also I make a lot of use of git diff, git diff --cached and git status to make sure my commit has just what I want, no more and no less.
Hope any of that is useful.
Ariel
Στις 17-05-2013, ημέρα Παρ, και ώρα 14:36 -0400, ο/η wp mirror έγραψε:
Dear Ariel,
I submitted the patches upstream.
- Review
The changes may be found at https://gerrit.wikimedia.org/r/64343/.
- Git
In the hope that others may find it useful, I am posting the sequence of Git commands used, organized as a Makefile.
#-----------------------------------------------------------------------------+ # Makefile for submitting patches to the Wikimedia Foundation | # Copyright (C) 2013 Dr. Kent L. Miller. All rights reserved. | # | # This program is free software: you can redistribute it and/or modify | # it under the terms of the GNU General Public License as published by | # the Free Software Foundation, either version 3 of the License, or (at | # your option) any later version. | # | # This program is distributed in the hope that it will be useful, but | # WITHOUT ANY WARRANTY; without even the implied warranty of | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | # General Public License for more details. | # | # You should have received a copy of the GNU General Public License | # along with this program. If not, see http://www.gnu.org/licenses/") | #-----------------------------------------------------------------------------+ GERRIT = wpmirrordev@gerrit.wikimedia.org PORT = 29418 WMFLABS = wpmirrordev@bastion.wmflabs.org
all: clone hooks pull checkout branch edit diff add commit rebase review
clone: # create directory `dumps' and initialize a repository in it # copy all commit objects and head references (from remote to local) # add `remote repository reference' named `origin' (saves typing) # add `remote heads' named `origin/[head-name]' # add `HEAD' to track `origin/master' git clone ssh://$(GERRIT):$(PORT)/operations/dumps
hooks: # get `pre-commit-hook' to add `change id' to commit summary scp -p -P $(PORT) $(GERRIT):hooks/commit-msg ~/dumps/.git/hooks/. cd dumps; git review -s
pull: # list `remote heads' cd dumps; git branch -r # setup tracking branch `ariel' cd dumps; git branch --track ariel origin/ariel # add new commit objects (if any) # update `remote heads' cd dumps; git fetch origin # update `local heads' (`master' and `ariel') to `remote-heads' # merge `origin/HEAD' into `HEAD' cd dumps; git pull origin
checkout: # point `HEAD' to `ariel's commit object cd dumps; git checkout ariel cd dumps; git status
branch: # create head `wpmirrordev' # point `wpmirrordev' to `ariel's commit object cd dumps; git branch wpmirrordev ariel # point `HEAD' to `wpmirrordev's commit object cd dumps; git checkout wpmirrordev cd dumps; git status
edit: # apply patched files cp temp/* dumps/xmlfileutils/.
diff: # diff files (but not added files) against `HEAD' cd dumps; git diff # list changed files against `HEAD' cd dumps; git status
add: # stage the files to be committed cd dumps/xmlfileutils; git add mwxml2sql.c sql2txt.c sqlfilter.c cd dumps/xmlfileutils; git add Makefile # diff added files against `HEAD' cd dumps; git diff --cached # list changed files against `HEAD' cd dumps; git status
commit: # create `commit object' # point `HEAD' to the new `commit object' cd dumps; git commit -m "Fix for compatibility with help2man and Debian Policy" # list all commits from `HEAD' back to initial commit cd dumps; git log
rebase: # add new commit objects (if any) # update `remote head' `origin/ariel' # merge `origin/ariel' into `ariel' # point `ariel' to `origin/ariel's commit object cd dumps; git pull origin ariel # rebase `wpmirrordev' branch on updated `ariel' head cd dumps; git rebase ariel
review: # push changes to Gerrit cd dumps; git review -R ariel
#-----------------------------------------------------------------------------+
shell: ssh -A $(WMFLABS)
purge: rm -r dumps
clean: rm -f *~
Sincerely Yours, Kent
Στις 17-05-2013, ημέρα Παρ, και ώρα 14:36 -0400, ο/η wp mirror έγραψε:
Dear Ariel,
I submitted the patches upstream.
- Review
The changes may be found at https://gerrit.wikimedia.org/r/64343/.
I've added a few comments, see the above url. Thanks!
Ariel
Στις 21-05-2013, ημέρα Τρι, και ώρα 11:22 +0300, ο/η Ariel T. Glenn έγραψε:
Στις 17-05-2013, ημέρα Παρ, και ώρα 14:36 -0400, ο/η wp mirror έγραψε:
Dear Ariel,
I submitted the patches upstream.
Note that you'll need to rebase; I just pushed an (urgent) fix to revision timestamp formatting, which paradoxically did not impact the display of wikipages.
Ariel
xmldatadumps-l@lists.wikimedia.org