summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)Author
2012-08-29Merge branch 'ef/win32-cred-helper'Junio C Hamano
Credential helper for Win32 to allow access to the keychain of the logged-in user. * ef/win32-cred-helper: contrib: add win32 credential-helper
2012-08-27Merge branch 'da/difftool-updates'Junio C Hamano
"git difftool --dir-diff" learned to use symbolic links to prepare temporary copy of the working tree when available. * da/difftool-updates: difftool: silence warning Add Code Compare v2.80.4 as a merge / diff tool for Windows mergetool,difftool: Document --tool-help consistently difftool: Disable --symlinks on cygwin difftool: Handle compare() returning -1 difftool: Wrap long lines for readability difftool: Check all return codes from compare() difftool: Handle finding mergetools/ in a path with spaces difftool: Use symlinks when diffing against the worktree difftool: Call the temp directory "git-difftool" difftool: Move option values into a hash difftool: Eliminate global variables difftool: Simplify print_tool_help()
2012-08-24Merge branch 'maint-1.7.11' into maintJunio C Hamano
* maint-1.7.11: Prepare for 1.7.11.6 Make the ciabot scripts completely self-configuring in the normal case. Improved documentation for the ciabot scripts. man: git pull -r is a short for --rebase gitcli: describe abbreviation of long options rev-list docs: clarify --topo-order description Documentation/CodingGuidelines: spell out more shell guidelines Documentation: do not mention .git/refs/* directories tests: Introduce test_seq
2012-08-24Make the ciabot scripts completely self-configuring in the normal case.Eric S. Raymond
Signed-off-by: Eric S. Raymond <esr@thyrsus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-24Improved documentation for the ciabot scripts.Eric S. Raymond
Signed-off-by: Eric S. Raymond <esr@thyrsus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-22Merge branch 'maint-1.7.11' into maintJunio C Hamano
* maint-1.7.11: contrib/ciabot: Get ciabot configuration from git variables
2012-08-22contrib/ciabot: Get ciabot configuration from git variablesEric S. Raymond
These changes remove all need to modify the ciabot scripts for installation. Instead, per-project configuration can be dome via variables in a [ciabot] section of the config file. Also, correct for the new server address. Signed-off-by: Eric S. Raymond <esr@thyrsus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-17contrib: add win32 credential-helperErik Faye-Lund
Since the Windows port of Git expects binary pipes, we need to make sure the helper-end also sets up binary pipes. Side-step CRLF-issue in test to make it pass. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-10Add Code Compare v2.80.4 as a merge / diff tool for WindowsSebastian Schuberth
Code Compare is a commercial file comparison tool for Windows, see http://www.devart.com/codecompare/ Version 2.80.4 added support for command line arguments preceded by a dash instead of a slash. This is required for Git for Windows because slashes in command line arguments get mangled with according to these rules: http://www.mingw.org/wiki/Posix_path_conversion Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-06Merge branch 'lm/git-blame-el' into maintJunio C Hamano
* lm/git-blame-el: git-blame.el: Do not use bare 0 to mean (point-min) git-blame.el: Use with-current-buffer where appropriate git-blame.el: Do not use goto-line in lisp code
2012-08-06Merge branch 'rs/git-blame-mapcar-mapc' into maintJunio C Hamano
* rs/git-blame-mapcar-mapc: git-blame.el: use mapc instead of mapcar
2012-08-03git-remote-mediawiki: replace TODO-list in comment by appropriate linkMatthieu Moy
My account on Github is now used as wiki and issue tracking. This will be more flexible than in-tree management of a TODO-list. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-24Merge branch 'jk/mediawiki-credential'Junio C Hamano
* jk/mediawiki-credential: mw-to-git: use git-credential's URL parser credential: convert "url" attribute into its parsed subparts mw-to-git: check blank credential attributes via length docs/credential: minor clarity fixups
2012-07-18mw-to-git: use git-credential's URL parserJeff King
We can just feed our URL straight to git-credential and it will parse it for us, saving us some code. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-18mw-to-git: check blank credential attributes via lengthJeff King
When writing a credential to git-credential, we omit fields that do not have a true value. This will skip empty or undefined fields (which we want), but will also accidentally skip usernames or passwords which happen to have a non-true value (e.g., "0"). Be more careful by checking for non-zero length. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-17git-remote-mediawiki: allow page names with a ':'Matthieu Moy
Traditionnally, pages named Foo:Bar are page 'Bar' in namespace 'Foo'. However, it is also possible to call a page Foo:Bar if 'Foo' is not a namespace. In this case, the actual name of the page is 'Foo:Bar', in the main namespace. Since we can't tell with only the filename, query the wiki for a namespace 'Foo' in these cases, but deal with the case where no such namespace is found. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-17git-remote-mediawiki: fix incorrect test usage in testMatthieu Moy
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-16git-remote-mediawiki: properly deal with invalid remote revisionsMatthieu Moy
Some wiki, including https://git.wiki.kernel.org/ have invalid revision numbers (i.e. the actual revision numbers are non-contiguous). Don't die when encountering one. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-16git-remote-mediawiki: show progress information when getting last remote ↵Matthieu Moy
revision Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-16git-remote-mediawiki: show progress information when listing pagesMatthieu Moy
Initial phases of push and pull with git-remote-mediawiki can be long on a large wiki. Let the user know what's going on. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-16git-remote-mediawiki: use --force when adding notesMatthieu Moy
When notes are created to record a push, it normally doesn't exist yet. However, when a push is interrupted and then restarted, it may happen that a commit already has notes attached, and we want to reflect the newly created remote revision, hence use 'git notes add -f' to override the existing one Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-16git-remote-mediawiki: get rid of O(N^2) loopMatthieu Moy
The algorithm to find a path from the local revision to the remote one was calling "git rev-list" and parsing its output N times. Run rev-list only once, and fill a hashtable with the result to optimize the body of the loop. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-16git-remote-mediawiki: make mediafiles export optionalMatthieu Moy
It is possible to use git-remote-mediawiki on a tree with both .mw files and other files. Before git-remote-mediawiki learnt how to export mediafiles, such mixed trees allowed the user to maintain both the wiki and other files for the same project in the same repository. With the newly added support for exporting mediafiles, pushing such mixed trees would upload unrelated files as mediafiles, which may not be desired. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-16git-remote-mediawiki: actually send empty comment when they're emptyMatthieu Moy
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-16git-remote-mediawiki: don't split namespaces with spacesMatthieu Moy
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-13Merge branch 'mm/mediawiki-tests'Junio C Hamano
* mm/mediawiki-tests: git-remote-mediawiki: be more defensive when requests fail git-remote-mediawiki: more efficient 'pull' in the best case git-remote-mediawiki: extract revision-importing loop to a function git-remote-mediawiki: refactor loop over revision ids git-remote-mediawiki: change return type of get_mw_pages git-remote-mediawiki (t9363): test 'File:' import and export git-remote-mediawiki: support for uploading file in test environment git-remote-mediawiki (t9362): test git-remote-mediawiki with UTF8 characters git-remote-mediawiki (t9361): test git-remote-mediawiki pull and push git-remote-mediawiki (t9360): test git-remote-mediawiki clone git-remote-mediawiki: test environment of git-remote-mediawiki git-remote-mediawiki: scripts to install, delete and clear a MediaWiki
2012-07-13Merge branch 'mm/mediawiki-file-attachments'Junio C Hamano
"mediawiki" remote helper (in contrib/) learned to handle file attachments. * mm/mediawiki-file-attachments: git-remote-mediawiki: improve support for non-English Wikis git-remote-mediawiki: import "File:" attachments git-remote-mediawiki: split get_mw_pages into smaller functions git-remote-mediawiki: send "File:" attachments to a remote wiki git-remote-mediawiki: don't "use encoding 'utf8';" git-remote-mediawiki: don't compute the diff when getting commit message
2012-07-09Merge branch 'mm/credential-plumbing'Junio C Hamano
Expose the credential API to scripted Porcelain writers. * mm/credential-plumbing: git-remote-mediawiki: update comments to reflect credential support git-remote-mediawiki: add credential support git credential fill: output the whole 'struct credential' add 'git credential' plumbing command
2012-07-09git-remote-mediawiki: update comments to reflect credential supportMatthieu Moy
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-06git-remote-mediawiki: be more defensive when requests failMatthieu Moy
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-06git-remote-mediawiki: more efficient 'pull' in the best caseMatthieu Moy
The only way to fetch new revisions from a wiki before this patch was to query each page for new revisions. This is good when tracking a small set of pages on a large wiki, but very inefficient when tracking many pages on a wiki with little activity. Implement a new strategy that queries the wiki for its last global revision, queries each new revision, and filter out pages that are not tracked. Signed-off-by: Simon Perrat <simon.perrat@ensimag.imag.fr> Signed-off-by: Simon CATHEBRAS <Simon.Cathebras@ensimag.imag.fr> Signed-off-by: Julien KHAYAT <Julien.Khayat@ensimag.imag.fr> Signed-off-by: Charles ROUSSEL <Charles.Roussel@ensimag.imag.fr> Signed-off-by: Guillaume SASDY <Guillaume.Sasdy@ensimag.imag.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-06git-remote-mediawiki: extract revision-importing loop to a functionMatthieu Moy
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-06git-remote-mediawiki: refactor loop over revision idsMatthieu Moy
Without changing the behavior, we turn the foreach loop on an array of revisions into a loop on an array of integer. It will be easier to implement other strategies as they will only need to produce an array of integer instead of a more complex data-structure. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-06git-remote-mediawiki: change return type of get_mw_pagesMatthieu Moy
The previous version was returning the list of pages to be fetched, but we are going to need an efficient membership test (i.e. is the page $title tracked), hence exposing a hash will be more convenient. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-06git-remote-mediawiki (t9363): test 'File:' import and exportNGUYEN Kim Thuat
Signed-off-by: Pavel Volek <Pavel.Volek@ensimag.imag.fr> Signed-off-by: NGUYEN Kim Thuat <Kim-Thuat.Nguyen@ensimag.imag.fr> Signed-off-by: ROUCHER IGLESIAS Javier <roucherj@ensimag.imag.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-06git-remote-mediawiki: support for uploading file in test environmentMatthieu Moy
This will be used for testing git-remote-mediawiki's import feature on a wiki containing media files. Signed-off-by: Simon CATHEBRAS <Simon.Cathebras@ensimag.imag.fr> Signed-off-by: Julien KHAYAT <Julien.Khayat@ensimag.imag.fr> Signed-off-by: Simon Perrat <simon.perrat@ensimag.imag.fr> Signed-off-by: Charles ROUSSEL <Charles.Roussel@ensimag.imag.fr> Signed-off-by: Guillaume SASDY <Guillaume.Sasdy@ensimag.imag.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-06git-remote-mediawiki (t9362): test git-remote-mediawiki with UTF8 charactersSimon Cathebras
Non-ascii encoding create many particular cases when used in page content, name, and edit/commit message. Test these cases. Signed-off-by: Simon CATHEBRAS <Simon.Cathebras@ensimag.imag.fr> Signed-off-by: Julien KHAYAT <Julien.Khayat@ensimag.imag.fr> Signed-off-by: Simon Perrat <simon.perrat@ensimag.imag.fr> Signed-off-by: Charles ROUSSEL <Charles.Roussel@ensimag.imag.fr> Signed-off-by: Guillaume SASDY <Guillaume.Sasdy@ensimag.imag.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-06git-remote-mediawiki (t9361): test git-remote-mediawiki pull and pushGuillaume Sasdy
This patch provides a set of tests for the pull and push fonctionnality of git-remote-mediawiki. The actual tests are kept in a separate function to allow further tests to re-run the same set of commands with different push and pull strategies. Signed-off-by: Simon CATHEBRAS <Simon.Cathebras@ensimag.imag.fr> Signed-off-by: Julien KHAYAT <Julien.Khayat@ensimag.imag.fr> Signed-off-by: Simon Perrat <simon.perrat@ensimag.imag.fr> Signed-off-by: Charles ROUSSEL <Charles.Roussel@ensimag.imag.fr> Signed-off-by: Guillaume SASDY <Guillaume.Sasdy@ensimag.imag.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-06git-remote-mediawiki (t9360): test git-remote-mediawiki cloneGuillaume Sasdy
Signed-off-by: Simon CATHEBRAS <Simon.Cathebras@ensimag.imag.fr> Signed-off-by: Julien KHAYAT <Julien.Khayat@ensimag.imag.fr> Signed-off-by: Simon Perrat <simon.perrat@ensimag.imag.fr> Signed-off-by: Charles ROUSSEL <Charles.Roussel@ensimag.imag.fr> Signed-off-by: Guillaume SASDY <Guillaume.Sasdy@ensimag.imag.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-06git-remote-mediawiki: test environment of git-remote-mediawikiGuillaume Sasdy
In order to test git-remote-mediawiki, a set of functions is needed to manage a MediaWiki: edit a page, remove a page, fetch a page, fetch all pages on a given wiki. A few helper function are also provided to check the content of directories. In addition, this patch provides Makefiles to execute tests. See the README file for more details. Signed-off-by: Simon CATHEBRAS <Simon.Cathebras@ensimag.imag.fr> Signed-off-by: Julien KHAYAT <Julien.Khayat@ensimag.imag.fr> Signed-off-by: Simon Perrat <simon.perrat@ensimag.imag.fr> Signed-off-by: Charles ROUSSEL <Charles.Roussel@ensimag.imag.fr> Signed-off-by: Guillaume SASDY <Guillaume.Sasdy@ensimag.imag.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-06git-remote-mediawiki: scripts to install, delete and clear a MediaWikiGuillaume Sasdy
install_wiki.sh allows the user to install a MediaWiki instance in a single shell command. Like "git instaweb", it configures and launches lighttpd without requiring root priviledges. To simplify database management, it uses SQLite, which doesn't require a running daemon, and allows reseting the database by simply replacing a single file. This allows install_wiki to also defines a function wiki_reset which clear all content of the previously created wiki, which will be very useful to run several indepenant tests on the same wiki. Note those functionnalities are made to be used from the user command line in the directory git/contrib/mw-to-git/t/ Signed-off-by: Simon CATHEBRAS <Simon.Cathebras@ensimag.imag.fr> Signed-off-by: Julien KHAYAT <Julien.Khayat@ensimag.imag.fr> Signed-off-by: Simon Perrat <simon.perrat@ensimag.imag.fr> Signed-off-by: Charles ROUSSEL <Charles.Roussel@ensimag.imag.fr> Signed-off-by: Guillaume SASDY <Guillaume.Sasdy@ensimag.imag.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-05git-remote-mediawiki: improve support for non-English WikisMatthieu Moy
Mediafiles can live in namespaces with names different from Image and File. While at it, rework the code to make it simpler and easier to read. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-28Merge branch 'fc/git-prompt-script'Junio C Hamano
Split a rather heavy-ish "git completion" script out to create a separate "git prompting" script, to help lazy-autoloading of the completion part while making prompting part always available.
2012-06-27git-remote-mediawiki: import "File:" attachmentsPavel Volek
Add the symmetrical feature to the "File:" export support in the previous patch. Download files from the wiki as needed, and feed them into the fast-import stream. Import both the file itself, and the corresponding description page. Signed-off-by: Pavel Volek <Pavel.Volek@ensimag.imag.fr> Signed-off-by: NGUYEN Kim Thuat <Kim-Thuat.Nguyen@ensimag.imag.fr> Signed-off-by: ROUCHER IGLESIAS Javier <roucherj@ensimag.imag.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-27git-remote-mediawiki: split get_mw_pages into smaller functionsMatthieu Moy
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-27git-remote-mediawiki: send "File:" attachments to a remote wikiNGUYEN Kim Thuat
The current version of the git-remote-mediawiki supports only import and export of plain wiki pages. This patch adds the functionality to export file attachments (i.e. the content of the File: MediaWiki namespace), which are also exposed by MediaWiki API. This requires a recent version of MediaWiki::API (Version 0.37 works. Version 0.34 doesn't). Signed-off-by: Pavel Volek <Pavel.Volek@ensimag.imag.fr> Signed-off-by: NGUYEN Kim Thuat <Kim-Thuat.Nguyen@ensimag.imag.fr> Signed-off-by: ROUCHER IGLESIAS Javier <roucherj@ensimag.imag.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-27git-remote-mediawiki: don't "use encoding 'utf8';"Matthieu Moy
The use of this statement is generally discouraged, and is too intrusive for us: it forces the HTTP requests made by the API to contain only valid UTF-8 characters. This would break the upload of binary files. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-27git-remote-mediawiki: don't compute the diff when getting commit messageMatthieu Moy
While we're there, simplify the code a bit: since log --format=%s anyway shows the subject line as a single line, no need to split to take the first line. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-25git-remote-mediawiki: add credential supportMatthieu Moy
The previous version implemented the possibility to log in a wiki, but the username and password had to be provided as configuration variables. We add the possibility to use the Git credential system to prompt the password. The support if implemented with generic functions that mimic the C API, designed to be usable from other contexts in the future (i.e. they may migrate to Git.pm if someone is interested). While we're there, do a bit of refactoring in mw_connect_maybe. Based on patch by: Javier Roucher Iglesias <Javier.Roucher-Iglesias@ensimag.imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-25Merge branch 'lm/git-blame-el'Junio C Hamano
eLisp fixes for a contrib/ script. * lm/git-blame-el: git-blame.el: Do not use bare 0 to mean (point-min) git-blame.el: Use with-current-buffer where appropriate git-blame.el: Do not use goto-line in lisp code