Skip to content

Commit

Permalink
Merge branch 'pw/p4-submit-conflicts'
Browse files Browse the repository at this point in the history
Add '--conflict' option to git-p4 subcommand to specify what action
to take when conflicts are found during 'p4 submit'.

* pw/p4-submit-conflicts:
  git-p4: add submit --conflict option and config varaiable
  git p4: add submit --prepare-p4-only option
  git p4: add submit --dry-run option
  git p4: accept -v for --verbose
  git p4: revert deleted files after submit cancel
  git p4: rearrange submit template construction
  git p4: test clean-up after failed submit, fix added files
  git p4: standardize submit cancel due to unchanged template
  git p4: move conflict prompt into run, add [q]uit input
  git p4: remove submit failure options [a]pply and [w]rite
  git p4: gracefully fail if some commits could not be applied
  git p4 test: remove bash-ism of combined export/assignment
  • Loading branch information
gitster committed Sep 18, 2012
2 parents 3387423 + 6bbfd13 commit 8db3865
Show file tree
Hide file tree
Showing 7 changed files with 709 additions and 107 deletions.
24 changes: 23 additions & 1 deletion Documentation/git-p4.txt
Expand Up @@ -163,7 +163,7 @@ All commands except clone accept these options.
--git-dir <dir>:: --git-dir <dir>::
Set the 'GIT_DIR' environment variable. See linkgit:git[1]. Set the 'GIT_DIR' environment variable. See linkgit:git[1].


--verbose:: --verbose, -v::
Provide more progress information. Provide more progress information.


Sync options Sync options
Expand Down Expand Up @@ -269,6 +269,24 @@ These options can be used to modify 'git p4 submit' behavior.
Export tags from git as p4 labels. Tags found in git are applied Export tags from git as p4 labels. Tags found in git are applied
to the perforce working directory. to the perforce working directory.


--dry-run, -n::
Show just what commits would be submitted to p4; do not change
state in git or p4.

--prepare-p4-only::
Apply a commit to the p4 workspace, opening, adding and deleting
files in p4 as for a normal submit operation. Do not issue the
final "p4 submit", but instead print a message about how to
submit manually or revert. This option always stops after the
first (oldest) commit. Git tags are not exported to p4.

--conflict=(ask|skip|quit)::
Conflicts can occur when applying a commit to p4. When this
happens, the default behavior ("ask") is to prompt whether to
skip this commit and continue, or quit. This option can be used
to bypass the prompt, causing conflicting commits to be automatically
skipped, or to quit trying to apply commits, without prompting.

Rebase options Rebase options
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
These options can be used to modify 'git p4 rebase' behavior. These options can be used to modify 'git p4 rebase' behavior.
Expand Down Expand Up @@ -519,6 +537,10 @@ git-p4.labelExportRegexp::
Only p4 labels matching this regular expression will be exported. The Only p4 labels matching this regular expression will be exported. The
default value is '[a-zA-Z0-9_\-.]+$'. default value is '[a-zA-Z0-9_\-.]+$'.


git-p4.conflict::
Specify submit behavior when a conflict with p4 is found, as per
--conflict. The default behavior is 'ask'.

IMPLEMENTATION DETAILS IMPLEMENTATION DETAILS
---------------------- ----------------------
* Changesets from p4 are imported using git fast-import. * Changesets from p4 are imported using git fast-import.
Expand Down

0 comments on commit 8db3865

Please sign in to comment.