summaryrefslogtreecommitdiff
path: root/contrib/remote-helpers/test-hg.sh
AgeCommit message (Collapse)Author
2013-05-28remote-hg: add support for --dry-runFelipe Contreras
This needs a specific patch from Git not applied yet. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-hg: check if a fetch is neededFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-hg: add check_push() helperFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-hg: add setup_big_push() helperFelipe Contreras
So we don't duplicate these commands. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-hg: use remote 'default' not local oneFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-hg: check diverged bookmarksFelipe Contreras
So that we can report a proper error. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-hg: pass around revision refsFelipe Contreras
So that when a diverge is detected, we know which ref to report an error for. Also, since we are not throwing an exception, return a proper error code. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-hg: add test for failed double pushFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-hg: add test for big pushFelipe Contreras
With lots branches and bookmarks, non-ff, updated and new. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-hg: add test for new bookmark specialFelipe Contreras
From the point of view of Mercurial, this creates a new branch head, and requires a forced push. Ideally, however, we would want it to work just like in git; new branches can be pushed without problems. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-hg: add test for bookmark divergeFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-hg: add test for diverged pushFelipe Contreras
Neither mercurial nor git allows pushing to a remote when it's a non-fast-forward push. We should be able to detect these errors and report them properly, as opposed to throwing an exception stack-trace. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-hg: add test to push new bookmarkFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-hg: add remote testsFelipe Contreras
The logic when working with a local repository is totally different from the one where we work with a remote repository; we need to pull and push from it. All this logic is currently not tested at all, so let's introduce a variable to force the remote behavior. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-hg: add check_bookmark() test helperFelipe Contreras
And check in a more proper way. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-hg: add tests for 'master' bookmarkFelipe Contreras
We want to make sure everything works correctly, even if there's a 'master' bookmark in Mercurial. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-hg: always point HEAD to masterFelipe Contreras
Mercurial always checks out the 'default' branch, so there's no point in complicating our lives trying to do something fancier, which causes different behavior depending on whether the repository is local or remote. So let's always use 'default' (which we translate to 'master'), unless we are in hg-git mode, which expects us to use the 'master' bookmark instead. Also, update the tests that used to check for different checkout behaviors to simply check that the refs are there, remove unnecessary ones, and fix the ones that expect something different. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-hg: ensure remote rebasing worksFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-helpers: test: simplify remote URLsFelipe Contreras
No need to specify $PWD any more. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-helpers: tests: general improvementsFelipe Contreras
So that we don't need a temporary directory. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-helpers: test: cleanup styleFelipe Contreras
So it's more standardized between all the tests. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-helpers: test: cleanup white-spacesFelipe Contreras
We prefer tabs to spaces. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28remote-hg: test: be a little more quietFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-21remote-helpers: tests: use python directlyFelipe Contreras
These remote helpers use 'env python', not PYTHON_PATH, so that's where we should check for the extensions. Otherwise, if 'python' is not PYTHON_PATH (e.g. /usr/bin/python: Makefile's default), there will be a mismatch between the python libraries actually accessible to the remote helpers. Suggested by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-22remote-hg: improve email sanitationFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-22Merge branch 'fc/remote-hg'Junio C Hamano
Updates remote-hg helper (in contrib/). * fc/remote-hg: (21 commits) remote-hg: activate graphlog extension for hg_log() remote-hg: fix bad file paths remote-hg: document location of stored hg repository remote-hg: fix bad state issue remote-hg: add 'insecure' option remote-hg: add simple mail test remote-hg: add basic author tests remote-hg: show more proper errors remote-hg: force remote push remote-hg: push to the appropriate branch remote-hg: update tags globally remote-hg: update remote bookmarks remote-hg: refactor export remote-hg: split bookmark handling remote-hg: redirect buggy mercurial output remote-hg: trivial test cleanups remote-hg: make sure fake bookmarks are updated remote-hg: fix for files with spaces remote-hg: properly report errors on bookmark pushes remote-hg: add missing config variable in doc ...
2013-04-11remote-hg: add simple mail testFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-11remote-hg: add basic author testsFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-07remote-helpers/test-bzr.sh: do not use "grep '\s'"Torsten Bögershausen
Using grep "devel\s\+3:" to find at least one whitspace is not portable on all grep versions; not all grep versions understand "\s" as a "whitespace". Use a literal TAB followed by SPACE. The + as a qualifier for "one or more" is not a basic regular expression; use egrep instead of grep. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-12remote-hg: add missing config for basic testsRamkumar Ramachandra
'hg commit' fails otherwise in some versions of mercurial because of the missing user information. Other versions simply throw a warning and guess though. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
2012-11-04remote-hg: add basic testsFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>