- 17 9月, 2012 5 次提交
-
-
由 Pete Wyckoff 提交于
Test a variety of cases where a patch failed to apply to p4 and had to be cleaned up. If the patch failed to apply cleanly, do not try to remove to-be-added files, as they have not really been added yet. Signed-off-by: NPete Wyckoff <pw@padd.com> Acked-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
When editing the submit template, if no change was made to it, git p4 offers a prompt "Submit anyway?". Answering "no" cancels the submit. Previously, a "no" answer behaves like a "[s]kip" answer to the failed-patch prompt, in that it proceeded to try to apply the rest of the commits. Instead, put users back into the new "[s]kip / [c]ontinue" loop so that they can decide. This makes both cases of patch failure behave identically. The return code of git p4 after a "no" answer is now the same as that for a "skip" due to failed patch; update a test to understand this. Signed-off-by: NPete Wyckoff <pw@padd.com> Acked-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
When applying a commit to the p4 workspace fails, a prompt asks what to do next. This belongs up in run() instead of in applyCommit(), where run() can notice, for instance, that the prompt is unnecessary because this is the last commit. Offer two options about how to continue at conflict: [s]kip or [q]uit. Having an explicit "quit" option gives git p4 a chance to clean up, show the applied-commit summary, and do tag export. Signed-off-by: NPete Wyckoff <pw@padd.com> Acked-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
When a patch failed to apply, these interactive options offered to: 1) apply the patch anyway, leaving reject (.rej) files around, or, 2) write the patch to a file (patch.txt) In both cases it suggested to invoke "git p4 submit --continue", an unimplemented option. While manually fixing the rejects and submitting the result might work, there are many steps that must be done to the job properly: * apply patch * invoke p4 add and delete * change executable bits * p4 sync -f renamed/copied files * extract commit message into p4 change description and move Jobs lines out of description section * set changelist owner for --preserve-user Plus the following manual sync/rebase will cause conflicts too, which must be resolved once again. Drop these workflows. Instead users should do a sync/rebase in git, fix the conflicts there, and do a clean "git p4 submit". Signed-off-by: NPete Wyckoff <pw@padd.com> Acked-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
If a commit fails to apply cleanly to the p4 tree, an interactive prompt asks what to do next. In all cases (skip, apply, write), the behavior after the prompt had a few problems. Change it so that it does not claim erroneously that all commits were applied. Instead list the set of the patches under consideration, and mark with an asterisk those that were applied successfully. Like this example: Applying 592f1f9 line5 in file1 will conflict ... Unfortunately applying the change failed! What do you want to do? [s]kip this patch / [a]pply the patch forcibly and with .rej files / [w]rite the patch to a file (patch.txt) s Skipping! Good luck with the next patches... //depot/file1#4 - was edit, reverted Applying b8db1c6 okay_commit_after_skip ... Change 6 submitted. Applied only the commits marked with '*': 592f1f9 line5 in file1 will conflict * b8db1c6 okay_commit_after_skip Do not try to sync and rebase unless all patches were applied. If there was a conflict during the submit, there is sure to be one at the rebase. Let the user to do the sync and rebase manually. This changes how a couple tets in t9810-git-p4-rcs.sh behave: - git p4 now does not leave files open and edited in the client - If a git commit contains a change to a file that was deleted in p4, the test used to check that the sync/rebase loop happened after the failure to apply the change. Since now sync/rebase does not happen after failure, do not test this. Normal rebase machinery, outside of git p4, will let rebase --skip work. Signed-off-by: NPete Wyckoff <pw@padd.com> Acked-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 13 7月, 2012 1 次提交
-
-
由 Gary Gibbons 提交于
For -M option (detectRenames) in P4Submit, use 'p4 move' rather than 'p4 integrate'. Check Perforce server for exisitence of 'p4 move' and use it if present, otherwise revert to 'p4 integrate'. [pw: wildcard-encode src/dest, add/update tests, tweak code] Signed-off-by: NGary Gibbons <ggibbons@perforce.com> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 06 7月, 2012 3 次提交
-
-
由 Gary Gibbons 提交于
P4Submit.applyCommit() To avoid recalculating the same diffOpts for each commit, move it out of applyCommit() and into the top-level run(). Also fix a bug in that code which interpreted the value of detectRenames as a string rather than as a boolean. [pw: fix documentation, rearrange code a bit] Signed-off-by: NGary Gibbons <ggibbons@perforce.com> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
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: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
The code is unused. Delete. Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 12 5月, 2012 2 次提交
-
-
由 Luke Diamand 提交于
Use Python's True, not true. Causes failure when enabling tag import or export in "git p4" using a config option rather than the command line. Signed-off-by: NLuke Diamand <luke@diamand.org> Acked-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Luke Diamand 提交于
Wrong variable name used when verbose enabled, causes failure. Signed-off-by: NLuke Diamand <luke@diamand.org> Acked-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 01 5月, 2012 3 次提交
-
-
由 Pete Wyckoff 提交于
There are four wildcard characters in p4. Files with these characters can be added to p4 repos using the "-f" option. They are stored in %xx notation, and when checked out, p4 converts them back to normal. When adding files with wildcards in git, the submit path must be careful to use the encoded names in some places, and it must use "-f" to add them. All other p4 commands that operate on the client directory expect encoded filenames as arguments. Support for wildcards in the clone/sync path was added in 084f6306 (git-p4: decode p4 wildcard characters, 2011-02-19), but that change did not handle the submit path. There was a problem with wildcards in the sync path too. Commit 084f6306 (git-p4: decode p4 wildcard characters, 2011-02-19) handled files with p4 wildcards that were added or modified in p4. Do this for deleted files, and also in branch detection checks, too. Reported-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
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: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
The code to auto-create the client directory, added in 0591cfa8 (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: NGary Gibbons <ggibbons@perforce.com> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 25 4月, 2012 3 次提交
-
-
由 Luke Diamand 提交于
The verbose flag is common to all classes, or at least should be. Make it a member of the base Command class, rather than reimplementing for each class. Make option parsing mirror this. Signed-off-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Luke Diamand 提交于
p4 itself treats an empty value for P4EDITOR as the same as having P4EDITOR unset. Do the same for "git p4". Signed-off-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Luke Diamand 提交于
The previous one is already in 'next' but was somewhat lacking. The configuration "git-p4.validLabelRegexp" is now called "labelExportRegexp", and its default covers lowercase alphabets as well. Signed-off-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 12 4月, 2012 1 次提交
-
-
由 Luke Diamand 提交于
The existing label import code looks at each commit being imported, and then checks for labels at that commit. This doesn't work in the real world though because it will drop labels applied on changelists that have already been imported, a common pattern. This change adds a new --import-labels option. With this option, at the end of the sync, git p4 gets sets of labels in p4 and git, and then creates a git tag for each missing p4 label. This means that tags created on older changelists are still imported. Tags that could not be imported are added to an ignore list. The same sets of git and p4 tags and labels can also be used to derive a list of git tags to export to p4. This is enabled with --export-labels in 'git p4 submit'. Signed-off-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 10 4月, 2012 2 次提交
-
-
由 Pete Wyckoff 提交于
In messages to the user and comments, change "git-p4" to "git p4". Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
Move git-p4 out of contrib/fast-import into the main code base, aside other foreign SCM tools. Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 27 2月, 2012 2 次提交
-
-
由 Pete Wyckoff 提交于
When the --use-client-spec is given to clone, and the clone path is a subset of the full tree as specified in the client, future submits will go to the wrong place. Factor out getClientSpec() so both clone/sync and submit can use it. Introduce getClientRoot() that is needed for the client spec case, and use it instead of p4Where(). Test the five possible submit behaviors (add, modify, rename, copy, delete). Reported-by: NLaurent Charrière <lcharriere@promptu.com> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
If --use-client-spec was given, set the matching configuration variable. This is necessary to ensure that future submits work properly. The alternatives of requiring the user to set it, or providing a command-line option on every submit, are error prone. Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 24 2月, 2012 1 次提交
-
-
由 Luke Diamand 提交于
RCS keywords cause problems for git-p4 as perforce always expands them (if +k is set) and so when applying the patch, git reports that the files have been modified by both sides, when in fact they haven't. This change means that when git-p4 detects a problem applying a patch, it will check to see if keyword expansion could be the culprit. If it is, it strips the keywords in the p4 repository so that they match what git is expecting. It then has another go at applying the patch. This behaviour is enabled with a new git-p4 configuration option and is off by default. Acked-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 23 2月, 2012 1 次提交
-
-
由 Russell Myers 提交于
This was broken since the feature was introduced initially at abcaf073 (If the user has configured various parameters, use them., 2008-08-10). Acked-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 27 1月, 2012 2 次提交
-
-
由 Pete Wyckoff 提交于
Change p4 command invocation to avoid going through the shell. This allows names with spaces and wildcards to work. Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NVitor Antunes <vitor.hda@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Vitor Antunes 提交于
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: NVitor Antunes <vitor.hda@gmail.com> Acked-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 21 1月, 2012 3 次提交
-
-
由 Luke Diamand 提交于
In p4, the Owner field is optional. If it is missing, construct something sensible rather than crashing. Signed-off-by: NLuke Diamand <luke@diamand.org> Acked-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Luke Diamand 提交于
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: NLuke Diamand <luke@diamand.org> Acked-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Luke Diamand 提交于
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: NLuke Diamand <luke@diamand.org> Acked-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 12 1月, 2012 3 次提交
-
-
由 Pete Wyckoff 提交于
Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
Catch the case where a ... exists at the end, and also elsehwere. Reported-by: NGary Gibbons <ggibbons@perforce.com> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 04 1月, 2012 4 次提交
-
-
由 Pete Wyckoff 提交于
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: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Gary Gibbons 提交于
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: NGary Gibbons <ggibbons@perforce.com> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Gary Gibbons 提交于
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: NGary Gibbons <ggibbons@perforce.com> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Gary Gibbons 提交于
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: NGary Gibbons <ggibbons@perforce.com> Signed-off-by: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 28 12月, 2011 4 次提交
-
-
由 Pete Wyckoff 提交于
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: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
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: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
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: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pete Wyckoff 提交于
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: NPete Wyckoff <pw@padd.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-