summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* t9801: do not overuse test_must_failva/git-p4-branchJunio C Hamano2012-01-261-4/+4
| | | | | | | | | | | | | | test_must_fail is to make sure a program we can potentially break during the course of updating git itself exits with a non-zero status in a clean and controlled way. When we expect a non-zero exit status from the commands we use from the underlying platform in tests, e.g. making sure a string "error: " does not appear in the output by running "grep 'error: '", just use "! grep" for readability. It is not like we will try to update Git and suddenly 'grep' we use from the system starts segfaulting. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-p4: Change p4 command invocationPete Wyckoff2012-01-261-1/+1
| | | | | | | | | Change p4 command invocation to avoid going through the shell. This allows names with spaces and wildcards to work. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Vitor Antunes <vitor.hda@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-p4: Add test case for complex branch importVitor Antunes2012-01-261-7/+87
| | | | | | | | | | Check if branches created from old changelists are correctly imported. Also included some updates to simple branch test so that both are coherent in respect to each other. Signed-off-by: Vitor Antunes <vitor.hda@gmail.com> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-p4: Search for parent commit on branch creationVitor Antunes2012-01-261-1/+45
| | | | | | | | | | | | | | | | | | To find out which is its parent the commit of the new branch is compared sequentially to each blob of the parent branch from the newest to the oldest. The first blob which results in a zero diff is considered the parent commit. If none is found, then the commit is applied to the top of the parent branch. A fast-import "checkpoint" call is required because diff-tree is only able to work with blobs on disk. But most of these commits will not be part of the final imported tree, making fast-import fail. To avoid this, the temporary branches are tracked and then removed at the end of the import process. Signed-off-by: Vitor Antunes <vitor.hda@gmail.com> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-p4: label import fails with multiple labels at the same changelistld/git-p4-branches-and-labelsLuke Diamand2012-01-201-0/+41
| | | | | | | | | | | | git-p4 has an array of changelists with one label per changelist. But you can have multiple labels on a single changelist and so this code fails. Add a test case demonstrating the problem. Signed-off-by: Luke Diamand <luke@diamand.org> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-p4: add test for p4 labelsLuke Diamand2012-01-201-0/+72
| | | | | | | | | | Add basic test of p4 label import. Checks label import and import with shell metachars; labels with different length descriptions. Signed-off-by: Luke Diamand <luke@diamand.org> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-p4: importing labels should cope with missing ownerLuke Diamand2012-01-201-28/+35
| | | | | | | | | In p4, the Owner field is optional. If it is missing, construct something sensible rather than crashing. Signed-off-by: Luke Diamand <luke@diamand.org> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-p4: cope with labels with empty descriptionsLuke Diamand2012-01-201-3/+5
| | | | | | | | | | Use an explicit length for the data in a label, rather than EOT, so that labels with empty descriptions are passed through correctly. Signed-off-by: Luke Diamand <luke@diamand.org> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-p4: handle p4 branches and labels containing shell charsLuke Diamand2012-01-202-4/+52
| | | | | | | | | | | | Don't use shell expansion when detecting branches, as it will fail if the branch name contains a shell metachar. Similarly for labels. Add additional test for branches with shell metachars. Signed-off-by: Luke Diamand <luke@diamand.org> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'pw/p4-view-updates'Junio C Hamano2012-01-063-82/+564
|\ | | | | | | | | | | | | | | | | | | * pw/p4-view-updates: git-p4: view spec documentation git-p4: rewrite view handling git-p4: support single file p4 client view maps git-p4: sort client views by reverse View number git-p4: fix test for unsupported P4 Client Views git-p4: test client view handling
| * git-p4: view spec documentationPete Wyckoff2012-01-031-13/+27
| | | | | | | | | | Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git-p4: rewrite view handlingPete Wyckoff2012-01-032-101/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code was not very complete or robust. Redo it. This new code should be useful for a few possible additions in the future: - support for * and %%n wildcards - allowing ... inside paths - representing branch specs (not just client specs) - tracking changes to views Mark the remaining 12 tests in t9809 as fixed. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git-p4: support single file p4 client view mapsGary Gibbons2012-01-032-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Perforce client views can map individual files, mapping one //depot file path to one //client file path. These mappings contain no meta/masking characters. This patch add support for these file maps to the currently supported '...' view mappings. [pw: one test now suceeds] Signed-off-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: sort client views by reverse View numberGary Gibbons2012-01-032-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | Correct view sorting to support the Perforce order, where client views are ordered and later views override earlier view mappings. [pw: one test now succeeds] Signed-off-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: fix test for unsupported P4 Client ViewsGary Gibbons2012-01-032-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | Change re method in test for unsupported Client View types (containing %% or *) anywhere in the string rather than at the begining. [pw: two tests now succeed] Signed-off-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: test client view handlingPete Wyckoff2012-01-031-0/+290
| | | | | | | | | | | | | | | | | | Test many aspects of processing p4 client views with the git-p4 option --use-client-spec. 16 out of 22 tests are currently broken. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Sync with 1.7.8.3Junio C Hamano2012-01-063-5/+24
|\ \
| * | Git 1.7.8.3v1.7.8.3Junio C Hamano2012-01-064-3/+22
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Merge branch 'jn/maint-gitweb-utf8-fix' into maintJunio C Hamano2012-01-061-4/+8
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jn/maint-gitweb-utf8-fix: gitweb: Fix fallback mode of to_utf8 subroutine gitweb: Output valid utf8 in git_blame_common('data') gitweb: esc_html() site name for title in OPML gitweb: Call to_utf8() on input string in chop_and_escape_str()
| * \ \ Merge branch 'maint-1.7.7' into maintJunio C Hamano2012-01-061-4/+4
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * maint-1.7.7: Documentation: rerere.enabled is the primary way to configure rerere
| | * \ \ Merge branch 'maint-1.7.6' into maint-1.7.7Junio C Hamano2012-01-061-4/+4
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * maint-1.7.6: Documentation: rerere.enabled is the primary way to configure rerere
| | | * | | Documentation: rerere.enabled is the primary way to configure rerereThomas Rast2012-01-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The wording seems to suggest that creating the directory is needed and the setting of rerere.enabled is only for disabling the feature by setting it to 'false'. But the configuration is meant to be the primary control and setting it to 'true' will enable it; the rr-cache directory will be created as necessary and the user does not have to create it. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'maint'Junio C Hamano2012-01-042-4/+7
|\ \ \ \ \ \ | |/ / / / / | | | | | / | |_|_|_|/ |/| | | | | | | | | * maint: t5550: repack everything into one file Catch invalid --depth option passed to clone or fetch
| * | | | t5550: repack everything into one fileClemens Buchacher2012-01-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Subsequently we assume that there is only one pack. Currently this is true only by accident. Pass '-a -d' to repack in order to guarantee that assumption to hold true. The prune-packed command is now redundant since repack -d already calls it. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Merge branch 'nd/maint-parse-depth' into maintJunio C Hamano2012-01-041-2/+6
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * nd/maint-parse-depth: Catch invalid --depth option passed to clone or fetch
| | * | | | Catch invalid --depth option passed to clone or fetchnd/maint-parse-depthNguyễn Thái Ngọc Duy2012-01-041-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'pw/p4-docs-and-tests'Junio C Hamano2012-01-0310-343/+830
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pw/p4-docs-and-tests: git-p4: document and test submit options git-p4: test and document --use-client-spec git-p4: test --keep-path git-p4: test --max-changes git-p4: document and test --import-local git-p4: honor --changesfile option and test git-p4: document and test clone --branch git-p4: test cloning with two dirs, clarify doc git-p4: clone does not use --git-dir git-p4: introduce asciidoc documentation rename git-p4 tests
| * | | | | | git-p4: document and test submit optionspw/p4-docs-and-testsPete Wyckoff2011-12-273-2/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | git-p4: test and document --use-client-specPete Wyckoff2011-12-273-2/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The depot path is required, even with this option. Make sure git-p4 fails and exits with non-zero. Contents in the specified depot path will be rearranged according to the client spec. Test this and add a note in the docs. Leave an XXX suggesting that this is somewhat confusing behavior that might be good to fix later. Function stripRepoPath() looks at self.useClientSpec. Make sure this is set both for command-line option --use-client-spec and for configuration variable git-p4.useClientSpec. Test this. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | git-p4: test --keep-pathPete Wyckoff2011-12-271-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure it leaves the path, below //depot, in git. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | git-p4: test --max-changesPete Wyckoff2011-12-271-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | git-p4: document and test --import-localPete Wyckoff2011-12-272-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explain that it is needed on future syncs to find p4 branches in refs/heads. Test this behavior. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | git-p4: honor --changesfile option and testPete Wyckoff2011-12-272-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an explicit list of changes is given, it makes no sense to use @all or @3,5 or any of the other p4 revision specifiers. Make the code notice when this happens, instead of just ignoring --changesfile. Test it. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | git-p4: document and test clone --branchPete Wyckoff2011-12-272-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clone with --branch will not checkout HEAD, unless the branch happens to be called the default refs/remotes/p4/master. The --branch option is most useful with sync; give an example of that. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | git-p4: test cloning with two dirs, clarify docPete Wyckoff2011-12-272-2/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document how git-p4 currently works when specifying multiple depot paths: 1. No branches or directories are named. 2. Conflicting files are silently ignored---the last change wins. 2. Option --destination is required, else the last path is construed to be a directory. 3. Revision specifiers must be the same on all paths for them to take effect. Test this behavior. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | git-p4: clone does not use --git-dirPete Wyckoff2011-12-272-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Complain if --git-dir is given during a clone. It has no effect. Only --destination and --bare can change where the newly cloned git dir will be. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | git-p4: introduce asciidoc documentationPete Wyckoff2011-12-272-302/+455
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add proper documentation for git-p4. Delete the old .txt documentation from contrib/fast-import. Cc: Frans Klaver <fransklaver@gmail.com> Cc: Luke Diamand <luke@diamand.org> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | rename git-p4 testsPete Wyckoff2011-12-275-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | Merge branch 'maint'Junio C Hamano2012-01-035-8/+19
|\ \ \ \ \ \ \ | | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: docs: describe behavior of relative submodule URLs fix hang in git fetch if pointed at a 0 length bundle Documentation: read-tree --prefix works with existing subtrees Add MYMETA.json to perl/.gitignore
| * | | | | | Merge branch 'maint-1.7.7' into maintJunio C Hamano2012-01-033-6/+11
| |\ \ \ \ \ \ | | | |_|/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint-1.7.7: docs: describe behavior of relative submodule URLs Documentation: read-tree --prefix works with existing subtrees Add MYMETA.json to perl/.gitignore
| | * | | | | Merge branch 'maint-1.7.6' into maint-1.7.7Junio C Hamano2012-01-032-5/+5
| | |\ \ \ \ \ | | | | |_|/ / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | * maint-1.7.6: Documentation: read-tree --prefix works with existing subtrees Add MYMETA.json to perl/.gitignore
| | | * | | | Documentation: read-tree --prefix works with existing subtreesClemens Buchacher2012-01-011-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 34110cd4 (Make 'unpack_trees()' have a separate source and destination index) it is no longer true that a subdirectory with the same prefix must not exist. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | * | | | Add MYMETA.json to perl/.gitignoreJack Nagel2011-12-291-0/+1
| | | | |/ / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ExtUtils::MakeMaker generates MYMETA.json in addition to MYMETA.yml since version 6.57_07. As it suggests, it is just meta information about the build and is cleaned up with 'make clean', so it should be ignored. Signed-off-by: Jack Nagel <jacknagel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * | | | docs: describe behavior of relative submodule URLsJens Lehmann2012-01-031-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the relative submodule URLs have been introduced in f31a522a2d, they do not conform to the rules for resolving relative URIs but rather to those of relative directories. Document that behavior. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | fix hang in git fetch if pointed at a 0 length bundleBrian Harring2012-01-032-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-repo if interupted at the exact wrong time will generate zero length bundles- literal empty files. git-repo is wrong here, but git fetch shouldn't effectively spin loop if pointed at a zero length bundle. Signed-off-by: Brian Harring <ferringb@chromium.org> Helped-by: Johannes Sixt Helped-by: Nguyen Thai Ngoc Duy Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Update draft release notes to 1.7.9Junio C Hamano2011-12-281-72/+4
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Sync with 1.7.8.2Junio C Hamano2011-12-282-1/+72
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | Git 1.7.8.2v1.7.8.2Junio C Hamano2011-12-283-2/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Contains accumulated fixes since 1.7.8 that have been merged to the 'master' branch in preparation for the 1.7.9 release. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | Merge branch 'jv/maint-config-set' into maintJunio C Hamano2011-12-281-1/+1
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jv/maint-config-set: Fix an incorrect reference to --set-all.
| | * | | | | Fix an incorrect reference to --set-all.jv/maint-config-setJelmer Vernooij2011-12-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>