aboutsummaryrefslogtreecommitdiff
path: root/t/t9807-git-p4-submit.sh
Commit message (Collapse)AuthorAge
* tests: fix negated test_i18ngrep callsJohannes Sixt2014-08-13
| | | | | | | | | | | | | | | | | | The helper function test_i18ngrep pretends that it found the expected results when it is running under GETTEXT_POISON. For this reason, it must not be used negated like so ! test_i18ngrep foo bar because the test case would fail under GETTEXT_POISON. The function offers a special syntax to test that a pattern is *not* found: test_i18ngrep ! foo bar Convert incorrect uses to this syntax. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-p4: Do not include diff in spec file when just preparing p4Maxime Coste2014-05-27
| | | | | | | | | | | | | | | | | | The diff information render the spec file unusable as is by p4, do not include it when run with --prepare-p4-only so that the given file can be directly passed to p4. With --prepare-p4-only, git-p4 already tells the user it can use p4 submit with the generated spec file. This fails because of the diff being present in the file. Not including the diff fixes that. Without --prepare-p4-only, keeping the diff makes sense for a quick review of the patch before submitting it. And does not cause problems with p4 as we remove it programmatically. Signed-off-by: Maxime Coste <frrrwww@gmail.com> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4 test: is_cli_file_writeable succeedsPete Wyckoff2014-01-22
| | | | | | | | | Commit e9df0f9 (git p4: cygwin p4 client does not mark read-only, 2013-01-26) fixed a problem with "test -w" on cygwin, but mistakenly marked the new test as failing. Fix this. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4: cygwin p4 client does not mark read-onlyPete Wyckoff2013-01-26
| | | | | | | | | | | | | | | | There are some old versions of p4, compiled for cygwin, that treat read-only files differently. Normally, a file that is not open is read-only, meaning that "test -w" on the file is false. This works on unix, and it works on windows using the NT version of p4. The cygwin version of p4, though, changes the permissions, but does not set the windows read-only attribute, so "test -w" returns false. Notice this oddity and make the tests work, even on cygiwn. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4: add submit --prepare-p4-only optionPete Wyckoff2012-09-16
| | | | | | | | | | | This option can be used to prepare the client workspace for submission, only. It does not invoke the final "p4 submit". A message describes how to proceed, either submitting the changes or reverting. Signed-off-by: Pete Wyckoff <pw@padd.com> Acked-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4: add submit --dry-run optionPete Wyckoff2012-09-16
| | | | | | | | | A new option, "git p4 submit --dry-run" can be used to verify what commits and labels would be moved into p4. Signed-off-by: Pete Wyckoff <pw@padd.com> Acked-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4: notice Jobs lines in git commit messagesPete Wyckoff2012-07-05
| | | | | | | | | | | | | | P4 has a feature called "jobs" that allows linking changes to a bug tracking system or other tasks. When submitting code, a job name can be specified to mark that this change is associated with a particular job. Teach git-p4 to find an optional "Jobs:" line in git commit messages and use them to make a Jobs section in the p4 change specifitation. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4: fix writable file after rename or copyPete Wyckoff2012-04-30
| | | | | | | | | | | | | The way rename works is with a "p4 integrate", optionally followed by a "p4 edit" if the change is not a 100% rename. Contents are generated by applying a patch, not doing a file system rename. Copy is similar. In this case, p4 does not fix the permissions back to read-only. Make sure this happens by calling "p4 sync -f". Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4: test submitPete Wyckoff2012-04-30
| | | | | | | Try each of the five diff patterns that might happen during submit. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4: bring back files in deleted client directoryPete Wyckoff2012-04-30
| | | | | | | | | | | | | | The code to auto-create the client directory, added in 0591cfa (git-p4: ensure submit clientPath exists before chdir, 2011-12-09), works when the client directory never existed. But if the directory is summarily removed without telling p4, the sync operation will not bring back all the files. Always do "sync -f" if the client directory is newly created. Reported-by: Gary Gibbons <ggibbons@perforce.com> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4: use "git p4" directly in testsPete Wyckoff2012-04-09
| | | | | | | | | | | | Drop the $GITP4 variable that was used to specify the script in contrib/fast-import/. The command is called "git p4" now, not "git-p4". Note that configuration variables will remain in a section called "git-p4". Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-p4: document and test submit optionsPete Wyckoff2011-12-27
| | | | | | | | | | | | | | | | | Clarify there is a -M option, but no -C. These are both configurable through variables. Explain that the allowSubmit variable takes a comma-separated list of branch names. Catch earlier an invalid branch name given as an argument to "git p4 clone". Test option --origin, variable allowSubmit, and explicit master branch name. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rename git-p4 testsPete Wyckoff2011-12-27
Use consistent naming for all tests: "t98<num>-git-p4-<topic>.sh" Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>