Skip to content

Commit 1ec4a0a

Browse files
seraphiregitster
authored andcommitted
git-p4: add RCS keyword status message
During the p4 submit process, git-p4 will attempt to apply a patch to the files found in the p4 workspace. However, if P4 uses RCS keyword expansion, this patch may fail. When the patch fails, the user is alerted to the failure and that git-p4 will attempt to clear the expanded text from the files and re-apply the patch. The current version of git-p4 does not tell the user the result of the re-apply attempt after the RCS expansion has been removed which can be confusing. Add a new print statement after the git patch has been successfully applied when the RCS keywords have been cleansed. Signed-off-by: Ben Keene <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 38ecf75 commit 1ec4a0a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

git-p4.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2025,6 +2025,9 @@ def applyCommit(self, id):
20252025
applyPatchCmd = patchcmd + "--check --apply -"
20262026
patch_succeeded = True
20272027

2028+
if verbose:
2029+
print("TryPatch: %s" % tryPatchCmd)
2030+
20282031
if os.system(tryPatchCmd) != 0:
20292032
fixed_rcs_keywords = False
20302033
patch_succeeded = False
@@ -2064,6 +2067,7 @@ def applyCommit(self, id):
20642067
print("Retrying the patch with RCS keywords cleaned up")
20652068
if os.system(tryPatchCmd) == 0:
20662069
patch_succeeded = True
2070+
print("Patch succeesed this time with RCS keywords cleaned")
20672071

20682072
if not patch_succeeded:
20692073
for f in editedFiles:

0 commit comments

Comments
 (0)