Re: [PATCH 03/12] git p4: gracefully fail if some commits could not be applied

2012-08-17 Thread Pete Wyckoff
l...@diamand.org wrote on Fri, 17 Aug 2012 08:21 +0100: On 17/08/12 00:35, Pete Wyckoff wrote: 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

Re: [PATCH 00/12] git p4: submit conflict handling

2012-08-17 Thread Pete Wyckoff
l...@diamand.org wrote on Fri, 17 Aug 2012 07:04 +0100: On 17/08/12 00:35, Pete Wyckoff wrote: These patches rework how git p4 deals with conflicts that arise during a git p4 submit. These may arise due to changes that happened in p4 since the last git p4 sync. Luke: I especially wanted

[PATCH 00/12] git p4: submit conflict handling

2012-08-16 Thread Pete Wyckoff
, as a replacement for the [a]pply option in the submit-conflict loop. Pete Wyckoff (12): git p4 test: remove bash-ism of combined export/assignment git p4 test: use p4d -L option to suppress log messages git p4: gracefully fail if some commits could not be applied git p4: remove submit failure options

[PATCH 01/12] git p4 test: remove bash-ism of combined export/assignment

2012-08-16 Thread Pete Wyckoff
Signed-off-by: Pete Wyckoff p...@padd.com --- t/lib-git-p4.sh | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh index 2d753ab..482eeac 100644 --- a/t/lib-git-p4.sh +++ b/t/lib-git-p4.sh @@ -26,9 +26,10 @@ testid=${this_test#t

[PATCH 02/12] git p4 test: use p4d -L option to suppress log messages

2012-08-16 Thread Pete Wyckoff
Send p4d output to a logfile in the $TRASH_DIRECTORY. Its messages add no value to testing. Signed-off-by: Pete Wyckoff p...@padd.com --- t/lib-git-p4.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh index 482eeac..edb4033 100644 --- a/t

[PATCH 03/12] git p4: gracefully fail if some commits could not be applied

2012-08-16 Thread Pete Wyckoff
not happen after failure, do not test this. Normal rebase machinery, outside of git p4, will let rebase --skip work. Signed-off-by: Pete Wyckoff p...@padd.com --- git-p4.py | 42 ++- t/t9810-git-p4-rcs.sh | 50 ++- t/t9815

[PATCH 04/12] git p4: remove submit failure options [a]pply and [w]rite

2012-08-16 Thread Pete Wyckoff
submit. Signed-off-by: Pete Wyckoff p...@padd.com --- git-p4.py | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/git-p4.py b/git-p4.py index 2405f38..e08fea1 100755 --- a/git-p4.py +++ b/git-p4.py @@ -1200,9 +1200,8 @@ class P4Submit(Command, P4UserMap

[PATCH 06/12] git p4: standardize submit cancel due to unchanged template

2012-08-16 Thread Pete Wyckoff
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: Pete Wyckoff p

[PATCH 07/12] git p4: test clean-up after failed submit, fix added files

2012-08-16 Thread 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: Pete Wyckoff p...@padd.com --- git-p4.py | 2 - t

[PATCH 08/12] git p4: rearrange submit template construction

2012-08-16 Thread Pete Wyckoff
Put all items in order as they appear, and add comments. Signed-off-by: Pete Wyckoff p...@padd.com --- git-p4.py | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/git-p4.py b/git-p4.py index 13c62c6..0e874cb 100755 --- a/git-p4.py +++ b/git-p4.py

[PATCH 09/12] git p4: revert deleted files after submit cancel

2012-08-16 Thread Pete Wyckoff
The user can decide not to continue with a submission, by not saving the p4 submit template, then answering no to the Submit anyway? prompt. In this case, be sure to return the p4 client to its initial state. Deleted files were not reverted; fix this and test all cases. Signed-off-by: Pete

[PATCH 10/12] git p4: accept -v for --verbose

2012-08-16 Thread Pete Wyckoff
The short form -v is common in many git commands as an alias for --verbose. Signed-off-by: Pete Wyckoff p...@padd.com --- Documentation/git-p4.txt | 2 +- git-p4.py| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-p4.txt b/Documentation/git

[PATCH 11/12] git p4: add submit --dry-run option

2012-08-16 Thread Pete Wyckoff
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 p...@padd.com --- Documentation/git-p4.txt | 4 git-p4.py| 43 ++- t/t9807-git-p4-submit.sh | 41

[PATCH 12/12] git p4: add submit --prepare-p4-only option

2012-08-16 Thread Pete Wyckoff
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 p...@padd.com --- Documentation/git-p4.txt | 7 +++ git-p4.py

Re: [PATCH 0/5] git p4: fix branch detection with --use-client-spec

2012-08-12 Thread Pete Wyckoff
gits...@pobox.com wrote on Sat, 11 Aug 2012 21:41 -0700: Pete Wyckoff p...@padd.com writes: matt...@korich.net wrote on Fri, 10 Aug 2012 12:14 -0700: Using git p4 on git version 1.7.12.rc2 has path issues. Standard clone/sync ops apparently place detected master and branches

[PATCH 0/5] git p4: fix branch detection with --use-client-spec

2012-08-11 Thread Pete Wyckoff
. Pete Wyckoff (5): git p4 test: move client_view() function to library git p4 test: add broken --use-client-spec --detect-branches tests git p4: set self.branchPrefixes in initialization git p4: do wildcard decoding in stripRepoPath git p4: make branch detection work with --use-client

[PATCH 1/5] git p4 test: move client_view() function to library

2012-08-11 Thread Pete Wyckoff
This code will be useful in --detect-branches --use-client-spec tests. Signed-off-by: Pete Wyckoff p...@padd.com --- t/lib-git-p4.sh | 18 ++ t/t9809-git-p4-client-view.sh | 17 - 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/t/lib

[PATCH 2/5] git p4 test: add broken --use-client-spec --detect-branches tests

2012-08-11 Thread Pete Wyckoff
Signed-off-by: Pete Wyckoff p...@padd.com --- t/t9801-git-p4-branch.sh | 77 1 file changed, 77 insertions(+) diff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh index 99fe16b..ca3a7f9 100755 --- a/t/t9801-git-p4-branch.sh +++ b/t

[PATCH 3/5] git p4: set self.branchPrefixes in initialization

2012-08-11 Thread Pete Wyckoff
This instance variable is needed during commit() to map files from p4 to their relative locations in git. Set it when initializing P4Sync to avoid passing it to every commit() call. Signed-off-by: Pete Wyckoff p...@padd.com --- git-p4.py | 25 ++--- 1 file changed, 14

[PATCH 4/5] git p4: do wildcard decoding in stripRepoPath

2012-08-11 Thread Pete Wyckoff
Instead of having to remember to do it after each call to stripRepoPath, make it part of that function. Signed-off-by: Pete Wyckoff p...@padd.com --- git-p4.py | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/git-p4.py b/git-p4.py index 6d07115..e20ff5d

[PATCH 5/5] git p4: make branch detection work with --use-client-spec

2012-08-11 Thread Pete Wyckoff
. The problem was likely introduced with ecb7cf9 (git-p4: rewrite view handling, 2012-01-02). Signed-off-by: Pete Wyckoff p...@padd.com --- git-p4.py| 37 +++-- t/t9801-git-p4-branch.sh | 2 +- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git

Re: [PATCH] test: some testcases failed if cwd is on a symlink

2012-07-24 Thread Pete Wyckoff
worldhello@gmail.com wrote on Tue, 24 Jul 2012 16:00 +0800: Run command 'git rev-parse --git-dir' under subdir will return realpath of '.git' directory. Some test scripts compare this realpath against $TRASH_DIRECTORY, they are not equal if current working directory is on a symlink. In

Re: git-p4: Jobs and skipSubmitEdit

2012-07-17 Thread Pete Wyckoff
m...@horowitz.name wrote on Tue, 17 Jul 2012 04:49 -0400: I gave the patch a try, and it seems to work great. Only problem I realized is that it means that the git commit message and the p4 log message end up different, because to p4 the jobs lines are special and get stripped out, but in

Re: [PATCH 1/3] git p4: remove unused P4Submit interactive setting

2012-07-14 Thread Pete Wyckoff
p...@padd.com wrote on Thu, 05 Jul 2012 08:30 -0400: l...@diamand.org wrote on Thu, 05 Jul 2012 08:20 +0100: On 04/07/12 14:34, Pete Wyckoff wrote: The code is unused. Delete. I've used that non-interactive code path in the past, in the very early days of using it (setting interactive

[PATCHv2 0/2] git p4: use move command for renames

2012-07-12 Thread Pete Wyckoff
Difference from v1: * Remove tee usage in t9814, just send output to a file and grep it directly. Recent p4 supports a move command that records explicitly that a file was moved from one place to another. It can be changed a bit during the move, too. Use this feature, if it exists,

[PATCHv2 1/2] git p4: refactor diffOpts calculation

2012-07-12 Thread Pete Wyckoff
. [pw: fix documentation, rearrange code a bit] Signed-off-by: Gary Gibbons ggibb...@perforce.com Signed-off-by: Pete Wyckoff p...@padd.com --- Documentation/git-p4.txt | 10 ++ git-p4.py| 52 +--- 2 files changed, 38 insertions

[PATCHv2 2/2] git p4: add support for 'p4 move' in P4Submit

2012-07-12 Thread Pete Wyckoff
] Signed-off-by: Gary Gibbons ggibb...@perforce.com Signed-off-by: Pete Wyckoff p...@padd.com --- git-p4.py| 34 ++ t/t9814-git-p4-rename.sh | 16 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/git-p4.py b/git-p4.py

Re: [PATCH 2/2] git p4: add support for 'p4 move' in P4Submit

2012-07-09 Thread Pete Wyckoff
gits...@pobox.com wrote on Thu, 05 Jul 2012 23:28 -0700: Pete Wyckoff p...@padd.com writes: diff --git a/t/t9814-git-p4-rename.sh b/t/t9814-git-p4-rename.sh index 84fffb3..8be74b6 100755 --- a/t/t9814-git-p4-rename.sh +++ b/t/t9814-git-p4-rename.sh @@ -77,16 +77,16

<    1   2   3