1
0
Fork 0
Commit Graph

128 Commits (7dfe4a38c86233eeb8420e701c715270dbe99d8b)

Author SHA1 Message Date
Jordi Boggiano c917865fe9 Fix handling of dev versions and consolidate logic, refs #7119 2018-04-13 13:55:02 +02:00
Jordi Boggiano 24ad6307a7 Merge remote-tracking branch 'austris-argalis/issue-7085' 2018-04-13 13:11:46 +02:00
Jordi Boggiano 066351c5b9 Remove use of deprecated getMock method 2018-04-12 10:24:56 +02:00
austris argalis 8a5645ffda Wording: Downgrading instead of Updating #7085 2018-02-16 00:38:41 +02:00
Jordi Boggiano 50665aa18d Simplify check for current revision, refs #6684 2017-12-19 17:50:02 +01:00
Robert Lu 3ce71a55bf fix unittest 2017-11-07 13:54:52 +08:00
Jordi Boggiano 122e422682 CS fixes 2017-03-08 15:16:44 +01:00
AnrDaemon 1d2a949e3e Properly fix git excludes.
Mindless copy-paste never gets old. Sorry. This is fixed proper this time.
2016-12-24 03:19:50 +03:00
AnrDaemon ab70601700 Skip git-related tests if no git found. 2016-12-22 20:14:57 +03:00
Richard Heelin c2f6c61f56 Updated the tests to match the new command that is executed 2016-10-21 15:49:27 +01:00
Jordi Boggiano 334d0cce6b Make sure we do not clone from local mirror if mirroring failed 2016-07-02 23:52:10 +01:00
Jordi Boggiano 4998ee27b3 Re-use mirror code from the git driver, refs #5384 2016-07-02 17:20:51 +01:00
Marco Villegas 869b3ef954 New test to check git download behavior with cache. 2016-06-18 19:39:09 -05:00
Marco Villegas cb6cfa9635 Isolate config setup to make it reusable at GitDownloaderTest. 2016-06-18 19:39:09 -05:00
Marco Villegas b5c55d5167 Adjust GitDownloaderTest to include for the new getVersion() method in Git. 2016-05-30 11:58:25 -05:00
Luis Faceira 1d733ba21a GitDownloaderTest uses temp dir as composer home config
When creating a DownloaderMock a home config dir is
ensured to exist, so that no test fails for lack of it
that on a regular run would be set by the Factory
2016-05-29 12:36:19 -05:00
Jordi Boggiano 73139a59bf Update origin remote URL when package URL changed and origin still uses the same url as the composer remote, fixes #3874 2016-04-18 10:10:12 +01:00
Jordi Boggiano b93b73e836 Rewrite git unpushed status checks, fixes #4987 2016-03-02 13:00:20 +00:00
Jordi Boggiano fea99bcb1b Clarify the fetch/push URL selection for github repos and various protocols, fix regression 2016-03-01 13:43:59 +00:00
Jordi Boggiano b080a73840 Fix broken test on windows, fixes #4973 2016-03-01 13:25:39 +00:00
Jordi Boggiano 6f42b9c865 Disable git, svn, http protocols for VCS downloaders, fixes #4968 2016-03-01 13:20:35 +00:00
Niels Keurentjes a409e158b8 Disabled unit test breaking on some platforms. Ref #4973 2016-02-28 01:08:25 +01:00
Jordi Boggiano 2f638c7d96 Fix test 2016-02-25 21:16:48 +00:00
Jordi Boggiano be4d385942 Fix uncommitted change detection, refs #3633 2016-02-25 20:59:26 +00:00
Jordi Boggiano 9f4f8a9578 Merge remote-tracking branch 'greg0ire/improve-status-for-unpushed-branches' 2016-02-25 19:43:20 +00:00
Magnus Nordlander 4689d836fe Fixed (and added a test for) a regression introduced in a77e2fb, which causes package Git package updates to fail when the package has two or more URLs and the last URL is the only one that actually works. 2016-02-17 17:42:48 +01:00
Niels Keurentjes 0dab63e050 Unified all Windows tests throughout the code. 2016-02-03 22:39:16 +01:00
Rob Bast adf3b956d0 try to use unique test directories
any tests that use the filesystem should have their own unique directory, as we run our test suite in parallel and
cleanup of tests (removing directories) should not interfere with currently running tests
2016-01-26 09:41:21 +01:00
Alexander Loutsenko 397ae2d7c8 review fixes 2015-12-14 18:50:04 +03:00
Alexander Loutsenko fa5de786ff clean garbage dirs in tmp after composer tests #4694 2015-12-14 17:52:37 +03:00
James Titcumb d85bad29d6 Warn about unpushed changes
`composer status` now prevents overwriting Git package if changes have not been pushed.
2015-08-30 00:30:16 +02:00
Jordi Boggiano 0081964428 Merge remote-tracking branch 'colinodell/fix-tag-ambiguity'
Conflicts:
	src/Composer/Downloader/GitDownloader.php
	tests/Composer/Test/Downloader/GitDownloaderTest.php
2015-05-31 12:52:27 +01:00
hakre 7077803aa4 Git Checkout Branch / File Differentiation
This fixes a minor inaccuracy issue when creating git checkout commands
for branches.

The git checkout command used within `GitDownloader::updateToCommit()`
does not use the "`--`" sequence to separate branch from file parameters.

This leads to an inaccuary as git tries as well the branch name as file
name. If the non-existent branch is actually the name of a file, the file
is checked out. If the non-existent branch is not the name of a file, an
error message is given:

> error: pathspec 'non-existent-branch' did not match any file(s) known to
git.

Both cases are not expected for the program flow in
`GitDownloader::updateToCommit()`.

The only thing that is expected is a non-existent branch to fail to
checkout - but with a different error message:

> // reference was not found (prints "fatal: reference is not a tree:
 $ref")

This can be easily fixed by adding the missing separator when constructing
the command which is applied with this commit.
2015-03-19 12:50:06 +01:00
Colin O'Dell f304611014 Fix Git failures due to tag ambiguity (issue #3417) 2014-11-14 10:31:52 -05:00
Jordi Boggiano a309e1d89d Fix tests and run it before the push url updater 2014-10-20 20:16:14 +01:00
Jordi Boggiano 77163f66fc Add support for mirrors in composer repos 2014-05-07 19:34:35 +02:00
Jordi Boggiano 5d4900e79d Add --no-checkout flag to avoid checking out the default branch first, fixes #2717 2014-02-18 13:28:46 +01:00
Jordi Boggiano 7148b22414 Add github-domains config value for GitHub Enterprise setups, fixes #728
Signed-off-by: Gennady Feldman <gena01@gmail.com>
2013-10-28 12:40:20 -04:00
Jordi Boggiano 7252078508 Attempt to fix travis build 2013-07-26 15:44:52 +02:00
Jordi Boggiano 771233a5a0 Make it clear what is going on when a vcs folder is missing, fixes #2108 2013-07-26 12:25:05 +02:00
Jordi Boggiano 0822683706 Fix tests 2013-06-28 20:42:06 +02:00
Jordi Boggiano 6b876958b9 Fix tests 2013-06-18 14:23:51 +02:00
Stéphane Klein 42119dde6b Use github protocols setting for push urls 2013-06-16 04:50:16 +02:00
Jordi Boggiano c479a26d71 Add workaround for msysgit failing to handle symlinks on windows, fixes #1048, fixes #1418 2013-06-08 17:51:30 +02:00
Jordi Boggiano 4cac2caf70 Make sure cd call allows switching drives on windows, fixes #1971 2013-06-08 16:41:34 +02:00
Jordi Boggiano 3fd883a489 Set cwd instead of using cd in GitDownloader, refs #1832 2013-04-28 11:12:09 +02:00
Jordi Boggiano b641f9ea68 Fix tests 2012-11-22 20:03:26 +01:00
Jordi Boggiano ed9fcc5074 Fix tests 2012-10-19 12:25:53 +02:00
Jordi Boggiano f752b29fc6 Always make sure we are on the right branch 2012-10-17 17:15:49 +02:00
Jordi Boggiano 3068f29b4f Checkout branch by name when the current reference matches the branch tip, fixes #1164 2012-10-17 10:49:54 +02:00
Jordi Boggiano 056dc5d690 Move config to all VcsDownloaders, enforce array for github-protocols 2012-09-08 00:45:25 +02:00
Martin Hasoň 3b6bd761ec Set protocols for github in composer config file 2012-09-07 15:08:34 +02:00
Jordi Boggiano 354b82bb8c Fix git checkouts of custom branches, fixes #889 2012-07-15 21:31:29 +02:00
Jordi Boggiano eb283b34e4 Revert "Fix git checkouts of custom branches, fixes #889"
This reverts commit cbf27bb422.
2012-07-10 19:27:17 +02:00
Jordi Boggiano cbf27bb422 Fix git checkouts of custom branches, fixes #889 2012-07-10 19:02:36 +02:00
Jordi Boggiano 73a865bf2a Fix tests 2012-06-20 12:05:18 +02:00
Jordi Boggiano 4bbb168d44 Remove BC code 2012-06-19 23:06:40 +02:00
Martin Hasoň c8d110aa72 Imporoved exception message for GitDownloader (various protocols for github) 2012-05-18 14:41:57 +02:00
Jordi Boggiano a9fe883827 Use https fallback for github private repos if ssh protocol fails and we can ask the user's password 2012-05-06 17:19:30 +02:00
Jordi Boggiano ed8aa8322a Do not prevent updates if untracked files are present 2012-04-27 11:23:34 +02:00
Jordi Boggiano 5ceae7fb1f Fix tests 2012-04-18 18:46:26 +02:00
Jordi Boggiano 047fa0b553 Add a composer remote that is used by composer so it does not take over the origin one anymore 2012-04-17 20:02:19 +02:00
Jordi Boggiano 6f8031ac90 Fix error reporting for missing git process 2012-04-06 13:28:47 +02:00
Jordi Boggiano 6aaa523c0d Fix tests 2012-04-05 23:03:02 +02:00
Jordi Boggiano a3fa19a716 Avoid escaping too early to prevent issues 2012-04-04 17:13:57 +02:00
Jordi Boggiano 13a2bc6ff0 Revert "Fix push url hack"
This reverts commit 269537e466.
2012-04-04 17:11:10 +02:00
Jordi Boggiano 269537e466 Fix push url hack 2012-04-04 16:57:18 +02:00
Jordi Boggiano 1cdae66f8f Fix up git downloader and git driver commands 2012-04-04 09:09:27 +02:00
Jordi Boggiano afa14124f3 Make sure we fetch origin with tags before checking out a new version 2012-04-03 19:50:25 +02:00
Jordi Boggiano e763af7412 Set push url correctly for github clones 2012-03-11 21:01:41 +01:00
Jordi Boggiano 5696b44a4f Fix tests 2012-03-11 15:56:47 +01:00
Jordi Boggiano ada9c20db1 Update Git/Hg downloaders tests, making sure they never use a live filesystem instance 2012-03-08 00:11:52 +01:00
Frank Kleine 025f6066ff fix file permissions 2012-02-21 00:40:43 +01:00
mikey179 0e5a4e07ba add tests to make sure a runtime exception is thrown if return code from git command line call is not 0 2012-02-21 00:12:39 +01:00
mikey179 895d901bf9 better error handling when git command runs into a failure, fixes #340 2012-02-21 00:02:34 +01:00
Jordi Boggiano 230e145053 Fix downloader tests on windows and mock Filesystem properly 2012-02-18 17:00:07 +01:00
Leszek Prabucki 19878c2dc1 Fixed tests after update and merge of changes from upstream/master 2012-01-24 18:44:55 +01:00
Leszek Prabucki de7f666118 Added and extended some unit tests 2012-01-24 18:44:54 +01:00