Re: [ANNOUNCE] Git Merge Contributor's Summit Jan 31, 2019, Brussels

2018-11-14 Thread Luke Diamand
On Fri, 9 Nov 2018 at 10:48, Jeff King wrote: > > On Fri, Nov 09, 2018 at 10:44:10AM +, Luca Milanesio wrote: > > > > On 9 Nov 2018, at 10:42, Jeff King wrote: > > > > > > Git Merge 2019 is happening on February 1st. There will be a > > > Contributor's Summit the day before. Here are the

Re: [PATCHv2 0/3] git-p4: improved unshelving - small fixes

2018-10-24 Thread Luke Diamand
On Tue, 16 Oct 2018 at 05:27, Junio C Hamano wrote: > > Luke Diamand writes: > > > This is the same as my earlier patch other than fixing the > > documentation to reflect the change to the destination branch, > > as noticed by Junio. > > Also you set up when-fi

Re: [PATCH v2 09/13] git-p4: use `test_atexit` to kill the daemon

2018-10-15 Thread Luke Diamand
On Mon, 15 Oct 2018 at 16:02, Johannes Schindelin wrote: > > Hi Luke, > > On Mon, 15 Oct 2018, Luke Diamand wrote: > > > On Mon, 15 Oct 2018 at 11:12, Johannes Schindelin via GitGitGadget > > wrote: > > > > > > From: Johannes Schindelin > > &g

[PATCHv2 2/3] git-p4: unshelve into refs/remotes/p4-unshelved, not refs/remotes/p4/unshelved

2018-10-15 Thread Luke Diamand
The branch detection code looks for branches under refs/remotes/p4/... and can end up getting confused if there are unshelved changes in there as well. This happens in the function p4BranchesInGit(). Instead, put the unshelved changes into refs/remotes/p4-unshelved/. Signed-off-by: Luke Diamand

[PATCHv2 0/3] git-p4: improved unshelving - small fixes

2018-10-15 Thread Luke Diamand
This is the same as my earlier patch other than fixing the documentation to reflect the change to the destination branch, as noticed by Junio. Luke Diamand (3): git-p4: do not fail in verbose mode for missing 'fileSize' key git-p4: unshelve into refs/remotes/p4-unshelved, not refs/remotes

[PATCHv2 3/3] git-p4: fully support unshelving changelists

2018-10-15 Thread Luke Diamand
The user might still need to use the --origin option though - there is no way for git-p4 to work out the versions of all of the other *unchanged* files in the shelve, since this information is not recorded by Perforce. Additionally this fixes handling of shelved 'move' operations. Signed-off

[PATCHv2 1/3] git-p4: do not fail in verbose mode for missing 'fileSize' key

2018-10-15 Thread Luke Diamand
-off-by: Luke Diamand --- git-p4.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git-p4.py b/git-p4.py index 7fab255584..5701bad06a 100755 --- a/git-p4.py +++ b/git-p4.py @@ -2775,7 +2775,10 @@ def streamOneP4File(self, file, contents): relPath = self.stripRepoPath

Re: [PATCHv1 2/3] git-p4: unshelve into refs/remotes/p4-unshelved, not refs/remotes/p4/unshelved

2018-10-15 Thread Luke Diamand
On Fri, 12 Oct 2018 at 19:19, Luke Diamand wrote: > > On Fri, 12 Oct 2018 at 14:45, Junio C Hamano wrote: > > > > Luke Diamand writes: > > > > > The branch detection code looks for branches under refs/remotes/p4/... > > > and can end up getti

Re: [PATCH v2 09/13] git-p4: use `test_atexit` to kill the daemon

2018-10-15 Thread Luke Diamand
On Mon, 15 Oct 2018 at 11:12, Johannes Schindelin via GitGitGadget wrote: > > From: Johannes Schindelin > > This should be more reliable than the current method, and prepares the > test suite for a consistent way to clean up before re-running the tests > with different options. > I'm finding

Re: [PATCHv1 2/3] git-p4: unshelve into refs/remotes/p4-unshelved, not refs/remotes/p4/unshelved

2018-10-12 Thread Luke Diamand
On Fri, 12 Oct 2018 at 14:45, Junio C Hamano wrote: > > Luke Diamand writes: > > > The branch detection code looks for branches under refs/remotes/p4/... > > and can end up getting confused if there are unshelved changes in > > there as well. This happens in t

[PATCHv1 3/3] git-p4: fully support unshelving changelists

2018-10-11 Thread Luke Diamand
The user might still need to use the --origin option though - there is no way for git-p4 to work out the versions of all of the other *unchanged* files in the shelve, since this information is not recorded by Perforce. Additionally this fixes handling of shelved 'move' operations. Signed-off

[PATCHv1 0/3] git-p4: improved unshelving

2018-10-11 Thread Luke Diamand
that it no longer unshelves into refs/remotes/p4/master/unshelved, but instead into refs/remotes/p4-unshelved. That's because the git-p4 branch detection gets confused by branches appearing in refs/remotes/p4. Luke Diamand (3): git-p4: do not fail in verbose mode for missing 'fileSize' key git-p4

[PATCHv1 1/3] git-p4: do not fail in verbose mode for missing 'fileSize' key

2018-10-11 Thread Luke Diamand
-off-by: Luke Diamand --- git-p4.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git-p4.py b/git-p4.py index 7fab255584..5701bad06a 100755 --- a/git-p4.py +++ b/git-p4.py @@ -2775,7 +2775,10 @@ def streamOneP4File(self, file, contents): relPath = self.stripRepoPath

[PATCHv1 2/3] git-p4: unshelve into refs/remotes/p4-unshelved, not refs/remotes/p4/unshelved

2018-10-11 Thread Luke Diamand
The branch detection code looks for branches under refs/remotes/p4/... and can end up getting confused if there are unshelved changes in there as well. This happens in the function p4BranchesInGit(). Instead, put the unshelved changes into refs/remotes/p4-unshelved/. Signed-off-by: Luke Diamand

Re: [PATCH 7/9] tests: include detailed trace logs with --write-junit-xml upon failure

2018-09-05 Thread Luke Diamand
On 5 September 2018 at 13:39, Johannes Schindelin wrote: > Hi Luke, > > On Wed, 5 Sep 2018, Luke Diamand wrote: > >> On 4 September 2018 at 12:09, Johannes Schindelin >> wrote: >> > >> > On Tue, 4 Sep 2018, Eric Sunshine wrote: >> > >>

Re: [PATCH 7/9] tests: include detailed trace logs with --write-junit-xml upon failure

2018-09-04 Thread Luke Diamand
On 4 September 2018 at 12:09, Johannes Schindelin wrote: > Hi Eric, > > On Tue, 4 Sep 2018, Eric Sunshine wrote: > >> On Mon, Sep 3, 2018 at 5:10 PM Johannes Schindelin via GitGitGadget >> wrote: >> > So let's do something different in VSTS: let's run all the tests with >> > `--quiet` first, and

Re: [PATCH 1/1] Add the `p4-pre-submit` hook

2018-07-31 Thread Luke Diamand
On 31 July 2018 at 16:40, Junio C Hamano wrote: > Luke Diamand writes: > >> I think there is an error in the test harness. >> >> On 31 July 2018 at 10:46, SZEDER Gábor wrote: >>>> + test_must_fail git-p4 submit --dry-run >errs 2>&1 &

Re: [PATCH 1/1] Add the `p4-pre-submit` hook

2018-07-31 Thread Luke Diamand
I think there is an error in the test harness. On 31 July 2018 at 10:46, SZEDER Gábor wrote: >> + test_must_fail git-p4 submit --dry-run >errs 2>&1 &&> >> + ! grep "Would apply" err It writes to the file "errs" but then looks for the message in "err". Luke

Re: [PATCH 1/1] Add the `p4-pre-submit` hook

2018-07-30 Thread Luke Diamand
On 30 July 2018 at 20:07, Junio C Hamano wrote: > Chen Bin writes: > >> The `p4-pre-submit` hook is executed before git-p4 submits code. >> If the hook exits with non-zero value, submit process not start. >> >> Signed-off-by: Chen Bin >> --- > > Luke, does this version look good to you? > Yes,

Re: [PATCH 1/1] add hook pre-p4-submit

2018-07-26 Thread Luke Diamand
On 26 July 2018 at 10:21, Eric Sunshine wrote: > On Wed, Jul 25, 2018 at 10:08 PM chen bin wrote: >> The hook does not receive any information or input from git. The >> original requirement >> comes from my colleague. He want to run unit test automatically before >> submitting code >> to remote

Re: [PATCH 1/1] add hook pre-p4-submit

2018-07-25 Thread Luke Diamand
On 23 July 2018 at 12:27, Chen Bin wrote: > Hook pre-p4-submit is executed before git-p4 actually submits code. > If the hook exits with non-zero value, submit process will abort. Looks good to me - could you add some documentation please (Documentation/git-p4.txt). Thanks! Luke > >

Re: [PATCH 17/29] t: use test_must_fail() instead of checking exit code manually

2018-06-26 Thread Luke Diamand
On 26 June 2018 at 08:29, Eric Sunshine wrote: > These tests intentionally break the &&-chain to manually check the exit > code of invoked commands which they expect to fail, and invert that > local expected failure into a successful exit code for the test overall. > Such manual exit code

[PATCH 5/6] git-p4: python3: use print() function

2018-06-19 Thread Luke Diamand
Replace calls to print ... with the function form, print(...), to allow use with python3 as well as python2.x. Converted using 2to3 (and some hand-editing). Signed-off-by: Luke Diamand --- git-p4.py | 248 +++--- 1 file changed, 124 insertions

[PATCH 2/6] git-p4: python3: replace dict.has_key(k) with "k in dict"

2018-06-19 Thread Luke Diamand
Python3 does not have the dict.has_key() function, so replace all such calls with "k in dict". This will still work with python2.6 and python2.7. Converted using 2to3 (plus some hand-editing) Signed-off-by: Luke Diamand --- git-

[PATCH 4/6] git-p4: python3: basestring workaround

2018-06-19 Thread Luke Diamand
In Python3, basestring no longer exists, so use this workaround. Signed-off-by: Luke Diamand --- git-p4.py | 16 1 file changed, 16 insertions(+) diff --git a/git-p4.py b/git-p4.py index 67865d14aa..f127ebce27 100755 --- a/git-p4.py +++ b/git-p4.py @@ -27,6 +27,22 @@ import

[PATCH 1/6] git-p4: python3: replace <> with !=

2018-06-19 Thread Luke Diamand
The <> string inequality operator (which doesn't seem to be even documented) no longer exists in python3. Replace with !=. This still works with python2. Signed-off-by: Luke Diamand --- git-p4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-p4.py b/git-p4.py

[PATCH 0/6] git-p4: small step towards Python3 support

2018-06-19 Thread Luke Diamand
that is quite a bit harder (but not impossible). I have some further changes to address this, but they are quite a bit more invasive, and not actually working yet. It's based very loosely on the "polystr()" suggestion from Eric on this list. It still works fine with Python2.7 and Python

[PATCH 6/6] git-p4: python3: fix octal constants

2018-06-19 Thread Luke Diamand
See PEP3127. Works fine with python2 as well. Signed-off-by: Luke Diamand --- git-p4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-p4.py b/git-p4.py index 714e442d7c..b449db1cc9 100755 --- a/git-p4.py +++ b/git-p4.py @@ -1841,7 +1841,7 @@ def applyCommit(self, id

[PATCH 3/6] git-p4: python3: remove backticks

2018-06-19 Thread Luke Diamand
Backticks around a variable are a deprecated alias for repr(). This has been removed in python3, so just use the string representation instead, which is equivalent. Signed-off-by: Luke Diamand --- git-p4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-p4.py b/git-p4

Re: Re :Re: [PATCHv3 0/1] git-p4 unshelve

2018-06-18 Thread Luke Diamand
On 16 June 2018 at 10:58, merlo...@yahoo.fr wrote: > Yes Luke, my colleagues and I, we care ! Our repository is p4 (choice of the > high management, sigh...). Some of us are working natively on p4, but others > like me are working on git through git-p4. We often want to share pieces of > codes to

Re: [PATCHv3 0/1] git-p4 unshelve

2018-06-15 Thread Luke Diamand
On 15 May 2018 at 11:01, Luke Diamand wrote: > This is a git-p4 unshelve command which detects when extra > changes are going to be included, and refuses to unhshelve. > > As in my earlier unshelve change, this uses git fast-import > to do the actual delta generation, but no

Re: [PATCHv2 0/6] git-p4: some small fixes updated

2018-06-12 Thread Luke Diamand
On 12 June 2018 at 22:53, Eric Sunshine wrote: > On Tue, Jun 12, 2018 at 5:49 PM, Luke Diamand wrote: >> Thanks. While on the subject of git-p4, I thought I should mention >> that I've been looking at getting git-p4 to work with Python3. >> >> I've got some low

Re: [PATCHv2 0/6] git-p4: some small fixes updated

2018-06-12 Thread Luke Diamand
On 12 June 2018 at 22:35, Junio C Hamano wrote: > Luke Diamand writes: > >> On 12 June 2018 at 18:10, Junio C Hamano wrote: >>> Luke Diamand writes: >>> >>>> This is an updated version of the set of changes I posted recently, >>>> follo

Re: [PATCHv2 0/6] git-p4: some small fixes updated

2018-06-12 Thread Luke Diamand
On 12 June 2018 at 18:10, Junio C Hamano wrote: > Luke Diamand writes: > >> This is an updated version of the set of changes I posted recently, >> following comments on the list: >> >> disable automatic sync after git-p4 submit: >> https://marc.info/?

[PATCHv2 0/6] git-p4: some small fixes updated

2018-06-08 Thread Luke Diamand
the block size automatically on git-p4 submit: https://marc.info/?l=git=152819004315688=2 - Spelling corrections (Eric) - Improved comments (Eric) - Exception class hierarchy fix (Merland) - test simplification (Eric) Luke Diamand (6): git-p4: disable-rebase: allow setting this via

[PATCHv2 6/6] git-p4: auto-size the block

2018-06-08 Thread Luke Diamand
d then let it automatically drop down to a value that works without error, while still failing correctly if some other error occurs. Signed-off-by: Luke Diamand --- git-p4.py | 27 +-- t/t9818-git-p4-block.sh | 8 2 files changed, 29 insertions(+), 6

[PATCHv2 3/6] git-p4: better error reporting when p4 fails

2018-06-08 Thread Luke Diamand
is attempted, and tries to print a meaningful error message if it fails. Signed-off-by: Luke Diamand --- git-p4.py | 55 + t/t9833-errors.sh | 78 +++ 2 files changed, 133 insertions(+) create mode 100755 t/t9833

[PATCHv2 4/6] git-p4: raise exceptions from p4CmdList based on error from p4 server

2018-06-08 Thread Luke Diamand
), P4ServerException (the server sent us an error code) and P4RequestSizeException (we requested too many rows/results from the server database). This makes the code that handles the errors a bit easier. The default behavior is unchanged; the new code is enabled with a flag. Signed-off-by: Luke

[PATCHv2 2/6] git-p4: add option to disable syncing of p4/master with p4

2018-06-08 Thread Luke Diamand
useful. Signed-off-by: Luke Diamand --- Documentation/git-p4.txt | 8 git-p4.py| 31 --- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt index 3d83842e47..f0de3b891b 100644

[PATCHv2 1/6] git-p4: disable-rebase: allow setting this via configuration

2018-06-08 Thread Luke Diamand
This just lets you set the --disable-rebase option with the git configuration options git-p4.disableRebase. If you're using this option, you probably want to set it all the time for a given repo. Signed-off-by: Luke Diamand --- Documentation/git-p4.txt | 5 - git-p4.py| 2

[PATCHv2 5/6] git-p4: narrow the scope of exceptions caught when parsing an int

2018-06-08 Thread Luke Diamand
The current code traps all exceptions around some code which parses an integer, and then talks to Perforce. That can result in errors from Perforce being ignored. Change the code to only catch the integer conversion exceptions. Signed-off-by: Luke Diamand --- git-p4.py | 2 +- 1 file changed

Re: [PATCHv1 1/3] git-p4: raise exceptions from p4CmdList based on error from p4 server

2018-06-08 Thread Luke Diamand
>> >>> ErrorId MsgDb::MaxResults = { ErrorOf( ES_DB, 32, >>> E_FAILED, EV_ADMIN, 1 ), "Request too large (over %maxResults%); see >>> 'p4 help maxresults'." } ;//NOTRANS >>> ErrorId MsgDb::MaxScanRows = { ErrorOf( ES_DB, 61, >>> E_FAILED, EV_ADMIN, 1 ), "Too many

Re: [PATCHv1 1/3] git-p4: raise exceptions from p4CmdList based on error from p4 server

2018-06-05 Thread Luke Diamand
On 5 June 2018 at 20:41, Eric Sunshine wrote: > On Tue, Jun 5, 2018 at 6:56 AM Luke Diamand wrote: >> On 5 June 2018 at 10:54, Eric Sunshine wrote: >> > On Tue, Jun 5, 2018 at 5:14 AM Luke Diamand wrote: >> >> +m = re.search('Too many

Re: [PATCHv1 1/1] git-p4: better error reporting when p4 fails

2018-06-05 Thread Luke Diamand
On 5 June 2018 at 11:49, Merland Romain wrote: > >> @@ -91,6 +93,13 @@ def p4_build_cmd(cmd): >> real_cmd = ' '.join(real_cmd) + ' ' + cmd >> else: >> real_cmd += cmd >> + >> +# now check that we can actually talk to the server >> +global p4_access_checked >> +if

Re: [PATCHv1 1/3] git-p4: raise exceptions from p4CmdList based on error from p4 server

2018-06-05 Thread Luke Diamand
On 5 June 2018 at 10:54, Eric Sunshine wrote: > On Tue, Jun 5, 2018 at 5:14 AM Luke Diamand wrote: >> This change lays some groundwork for better handling of rowcount errors >> from the server, where it fails to send us results because we requested >> too many. &g

[PATCHv1 2/3] git-p4: narrow the scope of exceptions caught when parsing an int

2018-06-05 Thread Luke Diamand
The current code traps all exceptions around some code which parses an integer, and then talks to Perforce. That can result in errors from Perforce being ignored. Change the code to only catch the integer conversion exceptions. Signed-off-by: Luke Diamand --- git-p4.py | 2 +- 1 file changed

[PATCHv1 0/3] git-p4: improvements to p4 "blocking"

2018-06-05 Thread Luke Diamand
~~ The function p4CmdList() has been taught to raise an exception when it gets an error, and in particular, to notice and report the two "too many results" errors. The code that does the blocking can now start out with a nice large block size, and then reduce it if it sees an erro

[PATCHv1 3/3] git-p4: auto-size the block

2018-06-05 Thread Luke Diamand
d then let it automatically drop down to a value that works without error, while still failing correctly if some other error occurs. Signed-off-by: Luke Diamand --- git-p4.py | 26 +- t/t9818-git-p4-block.sh | 11 +++ 2 files changed, 32 insertions(+), 5

[PATCHv1 1/3] git-p4: raise exceptions from p4CmdList based on error from p4 server

2018-06-05 Thread Luke Diamand
), P4ServerException (the server sent us an error code) and P4RequestSizeException (we requested too many rows/results from the server database). This makes makes the code that handles the errors a bit easier. The default behavior is unchanged; the new code is enabled with a flag. Signed-off-by: Luke

[PATCHv1 0/1] git-p4: better error reporting

2018-06-05 Thread Luke Diamand
). It would be nice to also check for ticket expiration during long Perforce operations, but this change does not attempt to do that. Luke Diamand (1): git-p4: better error reporting when p4 fails git-p4.py | 55 + t/t9833-errors.sh | 78

[PATCHv1 1/1] git-p4: better error reporting when p4 fails

2018-06-05 Thread Luke Diamand
is attempted, and tries to print a meaningful error message if it fails. Signed-off-by: Luke Diamand --- git-p4.py | 55 + t/t9833-errors.sh | 78 +++ 2 files changed, 133 insertions(+) create mode 100755 t/t9833

[PATCHv1 2/2] git-p4: add option to disable syncing of p4/master with p4

2018-06-05 Thread Luke Diamand
useful. Signed-off-by: Luke Diamand --- Documentation/git-p4.txt | 8 git-p4.py| 31 --- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt index 3d83842e47..8f6a7543fd 100644

[PATCHv1 0/2] git-p4: disable sync after submit

2018-06-05 Thread Luke Diamand
the sync. I imagine other people with large git-p4 projects do something similar and have the same problem. This also updates Merland's recent submit-selection change so that both options can be set via configuration rather than being set on the command line. Luke Diamand (2): git-p4: disable

[PATCHv1 1/2] git-p4: disable-rebase: allow setting this via configuration

2018-06-05 Thread Luke Diamand
This just lets you set the --disable-rebase option with the git configuration options git-p4.disableRebase. If you're using this option, you probably want to set it all the time for a given repo. Signed-off-by: Luke Diamand --- Documentation/git-p4.txt | 5 - git-p4.py| 2

Re: What's cooking in git.git (Jun 2018, #02; Mon, 4)

2018-06-04 Thread Luke Diamand
On 4 June 2018 at 14:57, Junio C Hamano wrote: > Here are the topics that have been cooking. Commits prefixed with > '-' are only in 'pu' (proposed updates) while commits prefixed with > '+' are in 'next'. The ones marked with '.' do not appear in any of > the integration branches, but I am

Re: What's cooking in git.git (May 2018, #03; Wed, 23)

2018-05-24 Thread Luke Diamand
On 24 May 2018 at 01:02, Junio C Hamano wrote: > Here are the topics that have been cooking. Commits prefixed with > '-' are only in 'pu' (proposed updates) while commits prefixed with > '+' are in 'next'. The ones marked with '.' do not appear in any of > the integration

[PATCHv6 0/1] git-p4: unshelve

2018-05-23 Thread Luke Diamand
This just removes the verbose print change, which will end up causing conflicts later since it's also being fixed in another commit. Discussed here: https://public-inbox.org/git/byapr08mb38455afe85ae6b04eb31ef92da...@byapr08mb3845.namprd08.prod.outlook.com/ Luke Diamand (1): git-p4: add

[PATCHv6 1/1] git-p4: add unshelve command

2018-05-23 Thread Luke Diamand
er changes mixed-in. The reference branch can be changed manually with the "--origin" option. The change adds a new Unshelve command class. This just runs the existing P4Sync code tweaked to handle a shelved changelist. Signed-off-by: Luke Diamand <l...@diamand.org> --- Docu

Re: [PATCH 1/1] git-p4: unshelve: use action==add instead of rev==none

2018-05-23 Thread Luke Diamand
On 23 May 2018 at 17:41, Mazo, Andrey wrote: >> The last one (i.e. "even if it is verbose, if fileSize is not >> reported, do not write the verbose output") does not look like it is >> limited to the unshelve feature, so it might, even though it is a >> one-liner, deserve to

[PATCHv5 1/1] git-p4: add unshelve command

2018-05-23 Thread Luke Diamand
er changes mixed-in. The reference branch can be changed manually with the "--origin" option. The change adds a new Unshelve command class. This just runs the existing P4Sync code tweaked to handle a shelved changelist. Signed-off-by: Luke Diamand <l...@diamand.org> --- Docu

[PATCHv5 0/1] git-p4: unshelve: fix problem with newer p4d

2018-05-23 Thread Luke Diamand
This is v5 of my git-p4 unshelve patch. It fixes a problem found by SZEDER Gábor with newer versions of Perforce (2016 vs 2015). Luke Diamand (1): git-p4: add unshelve command Documentation/git-p4.txt | 32 ++ git-p4.py| 215 --- t

Re: [PATCH 1/1] git-p4: unshelve: use action==add instead of rev==none

2018-05-22 Thread Luke Diamand
On 22 May 2018 at 11:15, SZEDER Gábor <szeder@gmail.com> wrote: > On Tue, May 22, 2018 at 10:41 AM, Luke Diamand <l...@diamand.org> wrote: >> SZEDER Gábor found that the unshelve tests fail with newer >> versions of Perforce (2016 vs 2015). >> >> The prob

[PATCH 0/1] git-p4: unshelving: fix problem with newer P4

2018-05-22 Thread Luke Diamand
This fixes a problem found by SZEDER Gábor with newer versions of the Perforce database engine (2016 onwards). It looks like the behaviour has change subtly when reporting the revision of newly added files. The fix is to just use the file status. Luke Diamand (1): git-p4: unshelve: use action

[PATCH 1/1] git-p4: unshelve: use action==add instead of rev==none

2018-05-22 Thread Luke Diamand
add We can detect that a file has been added simply by using the file status ("add") instead, rather than the depot revision, which is what this change does. This also fixes a few verbose prints used for debugging this to be more friendly. Signed-off-by: Luke Diamand <l...@diamand.or

Re: [PATCHv4 1/1] git-p4: add unshelve command

2018-05-21 Thread Luke Diamand
On 21 May 2018 at 23:09, Luke Diamand <l...@diamand.org> wrote: > On 21 May 2018 at 22:39, SZEDER Gábor <szeder@gmail.com> wrote: >>> diff --git a/t/t9832-unshelve.sh b/t/t9832-unshelve.sh > > ... > ... > >>> +' >> >> This test fai

Re: [PATCHv4 1/1] git-p4: add unshelve command

2018-05-21 Thread Luke Diamand
On 21 May 2018 at 22:39, SZEDER Gábor wrote: >> diff --git a/t/t9832-unshelve.sh b/t/t9832-unshelve.sh ... ... >> +' > > This test fails on my box and on Travis CI (in all four standard Linux > and OSX build jobs) with: > > + cd /home/szeder/src/git/t/trash

Re: [PATCHv4 1/1] git-p4: add unshelve command

2018-05-21 Thread Luke Diamand
On 21 May 2018 at 08:07, Junio C Hamano wrote: > SZEDER Gábor writes: > >>> diff --git a/t/t9832-unshelve.sh b/t/t9832-unshelve.sh >>> new file mode 100755 >>> index 00..cca2dec536 > > ... in short, I'd queue a fix-up on top like this to be later

Re: Re :[PATCHv4 1/1] git-p4: add unshelve command

2018-05-19 Thread Luke Diamand
$ git checkout remotes/p4/unshelved/ $ vim foo.c $ git commit --amend foo.c $ git p4 submit --origin HEAD^ --update-shelve I think it should work as-is. > > Romain > > Envoyé depuis Yahoo Mail pour Android > > Le sam., mai 19, 2018 à 12:00, Luke Diamand > <l...@

[PATCHv4 0/1] git-p4: unshelving: fix for python2.6

2018-05-19 Thread Luke Diamand
nt indexes, e.g. "{0}".format(foo). Luke Diamand (1): git-p4: add unshelve command Documentation/git-p4.txt | 32 ++ git-p4.py| 207 --- t/t9832-unshelve.sh | 153 + 3 files changed, 356 insertions(+)

[PATCHv4 1/1] git-p4: add unshelve command

2018-05-19 Thread Luke Diamand
er changes mixed-in. The reference branch can be changed manually with the "--origin" option. The change adds a new Unshelve command class. This just runs the existing P4Sync code tweaked to handle a shelved changelist. Signed-off-by: Luke Diamand <l...@diamand.org> --- Docu

Re: [PATCH] git-p4: add options --commit and --disable-rebase

2018-05-18 Thread Luke Diamand
On 9 May 2018 at 16:32, Romain Merland wrote: > On a daily work with multiple local git branches, the usual way to submit > only a > specified commit was to cherry-pick the commit on master then run git-p4 > submit. > It can be very annoying to switch between local branches

Re: [PATCH 1/1] git-p4: add unshelve command

2018-05-16 Thread Luke Diamand
n filesToAdd: > +p4_write_pipe(['print', '-o', f["gitFile"], > f["depotFile"]+'@='+self.unshelve], "") > +write_pipe(['git', 'add', '-f', f["gitFile"]], "") > +for f in filesToDelete: > +

[PATCHv3 1/1] git-p4: add unshelve command

2018-05-15 Thread Luke Diamand
er changes mixed-in. The reference branch can be changed manually with the "--origin" option. The change adds a new Unshelve command class. This just runs the existing P4Sync code tweaked to handle a shelved changelist. Signed-off-by: Luke Diamand <l...@diamand.org> --- Docu

[PATCHv3 0/1] git-p4 unshelve

2018-05-15 Thread Luke Diamand
that fast-import will be using, using the revision numbers in the "p4 describe -S" command output. If they're different, it refuses to unshelve. That makes it safe to use, rather than potentially generating deltas that contain bits from other changes. I have added a test for this case. Luke

[PATCHv2 0/1] add git-p4 unshelve command

2018-05-12 Thread Luke Diamand
try to use .format() in place of % - rename the target branch if it already exists Luke Diamand (1): git-p4: add unshelve command Documentation/git-p4.txt | 26 ++ git-p4.py| 171 ++- t/t9832-unshelve.sh | 99 +++ 3 files

[PATCH 1/1] git-p4: add unshelve command

2018-05-12 Thread Luke Diamand
reference branch can be changed manually with the "--origin" option. The change adds a new Unshelve command class. This just runs the existing P4Sync code tweaked to handle a shelved changelist. Signed-off-by: Luke Diamand <l...@diamand.org> --- Documentation

Re: [PATCH v4 3/6] git-p4: change "commitish" typo to "committish"

2018-05-10 Thread Luke Diamand
On 10 May 2018 at 13:43, Ævar Arnfjörð Bjarmason wrote: > This was the only occurrence of "commitish" in the tree, but as the > log will reveal we've had others in the past. Fixes up code added in > 00ad6e3182 ("git-p4: work with a detached head", 2015-11-21). > > Signed-off-by:

Re: [PATCH] git-p4: add options --commit and --disable-rebase

2018-05-09 Thread Luke Diamand
mit and --disable-rebase > To: git@vger.kernel.org > Cc: Luke Diamand <l...@diamand.org>, > Junio C Hamano <gits...@pobox.com>, > Matthieu Moy <matthieu@imag.fr>, > Vinicius Kursancew <viniciusalexan...@gmail.com>, > Jeff King <p...@pe

Re: [PATCH] git-p4 - Add option --sha1 to submit in p4

2018-05-02 Thread Luke Diamand
On 2 May 2018 at 16:51, Merland Romain wrote: > Thanks Luke, > > Following your comments, I will: > - change the option name to --commit if it suits you Seems like a good name. > - add an option --force-rebase which defaults to false. Setting it to true > will rebase even

Re: [PATCH] git-p4 - Add option --sha1 to submit in p4

2018-05-02 Thread Luke Diamand
On 2 May 2018 at 15:32, Merland Romain <merlo...@yahoo.fr> wrote: > From 4867808cad2b759ebf31c275356e602b72c5659f Mon Sep 17 00:00:00 2001 > From: Romain Merland <merlo...@yahoo.fr> > To: git@vger.kernel.org > Cc: Junio C Hamano <gits...@pobox.com>, Jeff King <

Re: [BUG] git p4 clone fails when p4 sizes does not return 'fileSize' key

2018-04-18 Thread Luke Diamand
On 17 April 2018 at 20:12, Thandesha VK wrote: > I have few cases where even p4 -G sizes (or p4 sizes) is not returning > the size value even with latest version of p4 (17.2). In that case, we > have to regenerate the digest for file save it - It mean something is > wrong with

Re: [GSoC][PATCH] git-ci: use pylint to analyze the git-p4 code

2018-03-13 Thread Luke Diamand
On 13 March 2018 at 03:36, Viet Hung Tran wrote: > Hello Mr. Schneider, > > Here is my link for the passed CI build I tested on my fork: > https://travis-ci.org/VietHTran/git/builds/35210 > > In order to test .travis.yml configuration alone, I used a sample python >

Re: [PATCH 1/1] git-p4: add format-patch subcommand

2018-03-12 Thread Luke Diamand
On 26 February 2018 at 23:48, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Mon, Feb 26, 2018 at 6:48 AM, Luke Diamand <l...@diamand.org> wrote: >> It takes a list of P4 changelists and generates a patch for >> each one, using "p4 describe". &g

Re: What's cooking in git.git (Mar 2018, #01; Thu, 1)

2018-03-02 Thread Luke Diamand
On 1 March 2018 at 22:20, Junio C Hamano wrote: > Here are the topics that have been cooking. Commits prefixed with > '-' are only in 'pu' (proposed updates) while commits prefixed with > '+' are in 'next'. The ones marked with '.' do not appear in any of > the integration

Re: [PATCH] git-p4: Fix depot path stripping

2018-03-02 Thread Luke Diamand
and there's a bug! There may be some weird corner-cases where it might do the wrong thing. Thanks, Luke > > Nuno > > > On Tue, Feb 27, 2018 at 3:12 AM, Luke Diamand <l...@diamand.org> wrote: >> >> On 27 February 2018 at 08:43, Nuno Subtil <sub...@gmail.com> wrot

Re: [PATCH] git-p4: Fix depot path stripping

2018-02-27 Thread Luke Diamand
not ok 23 - subdir clone, submit add I think originally the logic came from this change: 21ef5df43 git p4: make branch detection work with --use-client-spec which was fixing what seems like the same problem but with branch detection enabled. > > Thanks, > Nuno > > > On Tue,

Re: [PATCH] git-p4: Fix depot path stripping

2018-02-27 Thread Luke Diamand
On 27 February 2018 at 04:16, Nuno Subtil wrote: > When useClientSpec=true, stripping of P4 depot paths doesn't happen > correctly on sync. Modifies stripRepoPath to handle this case better. Can you give an example of how this shows up? I could quickly write a test case for

[PATCH 0/1] git-p4: add format-patch subcommand

2018-02-26 Thread Luke Diamand
ange makes a small attempt to at least stop on binary files, but in the case of a file marked in P4 as "text", which contains binary deltas, the file will unavoidably come out corrupted. Luke Diamand (1): git-p4: add format-patch subcommand Documentation/git-p4.txt | 33 + git-p4

[PATCH 1/1] git-p4: add format-patch subcommand

2018-02-26 Thread Luke Diamand
ak unicode characters if they happen to contain LF, but I haven't tested this. Signed-off-by: Luke Diamand <l...@diamand.org> --- Documentation/git-p4.txt | 33 + git-p4.py| 304 +-- t/t9832-make-patch.sh| 135 +++

Re: [PATCH 1/1] git-p4: add unshelve command

2018-02-23 Thread Luke Diamand
On 22 February 2018 at 22:28, Luke Diamand <l...@diamand.org> wrote: > On 22 February 2018 at 21:39, Miguel Torroja <miguel.torr...@gmail.com> wrote: >> Hi Luke, >> >> I really like the idea of creating a branch based on a shelved CL (We >> particularly u

Re: [PATCH 1/1] git-p4: add unshelve command

2018-02-22 Thread Luke Diamand
On 22 February 2018 at 21:39, Miguel Torroja wrote: > Hi Luke, > > I really like the idea of creating a branch based on a shelved CL (We > particularly use shelves all the time), I tested your change and I > have some comments. > > - I have some concerns about having

[PATCH 1/1] git-p4: add unshelve command

2018-02-22 Thread Luke Diamand
This can be used to "unshelve" a shelved P4 commit into a git commit. For example: $ git p4 unshelve 12345 The resulting commit ends up in the branch: refs/remotes/p4/unshelved/12345 Signed-off-by: Luke Diamand <l...@diamand.org> --- Documentation/git-p4.txt | 22 +++

[PATCH 0/1] git-p4: add unshelve command

2018-02-22 Thread Luke Diamand
d commit into refs/remotes/p4/unshelved/ where is the changelist being unshelved. That might not be the best way to do this. Luke Diamand (1): git-p4: add unshelve command Documentation/git-p4.txt | 22 git-p4.py| 128 +++---

git-p4 + watchman - watching the p4 repo?

2018-01-08 Thread Luke Diamand
Hi! I could be wrong about this, but I when I tried mixing watchman with git-p4, I found that on "git p4 submit" it ended up watching the p4 repo, which seems a bit pointless (and was also very slow). $ [create git-p4 clone of some p4 repo] $ : >bar $ git add bar && git commit -m 'adding bar' $

[PATCH 1/1] git-p4: update multiple shelved change lists

2017-12-21 Thread Luke Diamand
that Perforce does not really support overlapping shelved changelists where one change touches the files modified by another. Trying to do this will result in merge conflicts. Signed-off-by: Luke Diamand <l...@diamand.org> --- Documentation/git-p4.txt | 8 +++- git-p4.py

[PATCH 0/1] git-p4: update multiple shelved change lists

2017-12-21 Thread Luke Diamand
do update shelved changelists like this. Luke Diamand (1): git-p4: update multiple shelved change lists Documentation/git-p4.txt | 8 +++- git-p4.py| 41 ++--- t/t9807-git-p4-submit.sh | 24 ++-- 3 files changed, 47

Re: git-p4: cloning with a change number does not import all files

2017-12-02 Thread Luke Diamand
On 2 December 2017 at 15:35, Patrick Rouleau wrote: > On Fri, Dec 1, 2017 at 7:45 AM, Lars Schneider > wrote: >> Oh, I am with you. However, I only used git-p4 for a very short time in the >> way you want to use it. Therefore, I don't have much

Re: Bug in "revision.c: --all adds HEAD from all worktrees" ?

2017-11-15 Thread Luke Diamand
On 15 November 2017 at 22:08, Junio C Hamano <gits...@pobox.com> wrote: > Luke Diamand <l...@diamand.org> writes: > >> Quite a few of the worktrees have expired - their head revision has >> been GC'd and no longer points to anything sensible >> (g

Re: Bug in "revision.c: --all adds HEAD from all worktrees" ?

2017-11-15 Thread Luke Diamand
+Jeff King On 13 November 2017 at 22:15, Stefan Beller <sbel...@google.com> wrote: > On Mon, Nov 13, 2017 at 2:03 PM, Luke Diamand <l...@diamand.org> wrote: >> On 13 November 2017 at 19:51, Luke Diamand <l...@diamand.org> wrote: >>> Hi! >>>

Re: Bug in "revision.c: --all adds HEAD from all worktrees" ?

2017-11-13 Thread Luke Diamand
On 13 November 2017 at 19:51, Luke Diamand <l...@diamand.org> wrote: > Hi! > > I think there may be a regression caused by this change which means > that "git fetch origin" doesn't work: > > commit d0c39a49ccb5dfe7feba4325c3374d99ab123c59 (refs/bisect/bad) &g

  1   2   3   4   >