[PATCH 2/2] git-p4 tests: work with python3 as well as python2

2016-04-23 Thread Luke Diamand
-by: Luke Diamand <l...@diamand.org> --- t/lib-git-p4.sh| 5 +++-- t/t9802-git-p4-filetype.sh | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh index 77802fe..b97d27c 100644 --- a/t/lib-git-p4.sh +++ b/t/lib-git-p4.sh @@ -198,9 +

[PATCH 1/2] git-p4 tests: cd to testdir before running python

2016-04-23 Thread Luke Diamand
-by: Luke Diamand <l...@diamand.org> --- t/lib-git-p4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh index f9ae1d7..77802fe 100644 --- a/t/lib-git-p4.sh +++ b/t/lib-git-p4.sh @@ -50,7 +50,7 @@ native_path() { # at runtime (e.g. v

[PATCH 0/2] git-p4: support python3 in the tests

2016-04-23 Thread Luke Diamand
This patchset updates the git-p4 tests so that they work with either Python2 or Python3. Note that this does *not* fix git-p4 to work with Python3 - that's a much bigger challenge. Luke Diamand (2): git-p4 tests: cd to testdir before running python git-p4 tests: work with python3 as well

Re: [PATCH] t9824: fix wrong reference value

2016-04-29 Thread Luke Diamand
On 29 April 2016 at 21:29, Lars Schneider wrote: > > On 29 Apr 2016, at 19:34, Junio C Hamano wrote: > >> Lars Schneider writes: >> >>> 0492eb4 fixed a broken &&-chain in this test which broke the test as it >>> checked for

Re: [PATCH 0/2] git-p4: support python3 in the tests

2016-04-26 Thread Luke Diamand
On 25 April 2016 at 23:07, Junio C Hamano <gits...@pobox.com> wrote: > Luke Diamand <l...@diamand.org> writes: > >> This patchset updates the git-p4 tests so that they work with >> either Python2 or Python3. >> >> Note that this does *not* fix git-p4 to w

[PATCHv2 3/3] git-p4 tests: time_in_seconds should use $PYTHON_PATH

2016-04-26 Thread Luke Diamand
The time_in_seconds script should use $PYTHON_PATH, rather than just hard-coded python, so that users can override which version gets used, as is done for other python invocations. Signed-off-by: Luke Diamand <l...@diamand.org> --- t/lib-git-p4.sh | 2 +- 1 file changed, 1 insertion

[PATCHv2 2/3] git-p4 tests: work with python3 as well as python2

2016-04-26 Thread Luke Diamand
-by: Luke Diamand <l...@diamand.org> --- t/lib-git-p4.sh| 5 +++-- t/t9802-git-p4-filetype.sh | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh index 724bc43..7393ee2 100644 --- a/t/lib-git-p4.sh +++ b/t/lib-git-p4.sh @@ -198,9 +

[PATCHv2 0/3] git-p4: support python3 in the tests

2016-04-26 Thread Luke Diamand
Updates to my patches to allow the git-p4 tests to work with python3. Incorporates suggestions from Junio to just switch to "/" and to use $PYTHON_PATH. Luke Diamand (3): git-p4 tests: cd to / before running python git-p4 tests: work with python3 as well as python2 gi

[PATCHv2 1/3] git-p4 tests: cd to / before running python

2016-04-26 Thread Luke Diamand
The python one-liner for getting the current time prints out error messages if the current directory is deleted while it is running if using python3. Avoid these messages by switching to "/" before running it. This problem does not arise if using python2. Signed-off-by: Luke

Re: [BUG] t9801 and t9803 broken on next

2016-05-17 Thread Luke Diamand
On 14 May 2016 at 19:15, Junio C Hamano wrote: > Lars Schneider writes: > >>> On 13 May 2016, at 18:37, Junio C Hamano wrote: >>> >>> Are you saying that "git p4" itself breaks unless fast-import always >>> writes a new (tiny)

Re: [PATCHv1] git-p4: workaround p4 removal of client directory

2016-04-29 Thread Luke Diamand
[+Git, Junio] On 29 April 2016 at 15:10, Jacob Smith <jaros...@gmail.com> wrote: > That's the identical patch I'm maintaining internally; it appears to work. Thanks, I think that counts as a "Tested-by" then. Luke > > Sent from my iPhone > >> On Apr 29,

Re: [PATCH] Adding list of p4 jobs to git commit message

2016-04-15 Thread Luke Diamand
On 15 April 2016 at 21:27, Junio C Hamano wrote: > Jan Durovec writes: > >> --- > > A few issues. Please: > > (1) Sign-off your work. > > (2) Try to find those who are familiar with the area and Cc them. > > "git shortlog -s -n --since=18.months

Re: [PATCH v2] git-p4: add P4 jobs to git commit message

2016-04-20 Thread Luke Diamand
On 19 April 2016 at 22:44, Jan Durovec wrote: >> By the way, you may or may not have noticed that I've been >> reordering the lines of your message quoted in my responses; around >> here, top-posting is frowned upon. > > I haven't noticed. Thanks for pointing out. > > As

Re: [PATCH v2] git-p4: add P4 jobs to git commit message

2016-04-20 Thread Luke Diamand
On 19 April 2016 at 22:39, Junio C Hamano wrote: > Jan Durovec writes: > >> On Tue, Apr 19, 2016 at 11:09 PM, Junio C Hamano wrote: >> >>> For a series this small it does not matter, but anything longer it >>> would be easier to

Re: [PATCH v2] git-p4: add P4 jobs to git commit message

2016-04-19 Thread Luke Diamand
On 19 April 2016 at 02:15, Junio C Hamano wrote: > Jan Durovec writes: > >> When migrating from Perforce to git the information about P4 jobs >> associated with P4 changelists is lost. >> >> Having these jobs listed on messages of related git commits

Re: [PATCH v2] git-p4: add P4 jobs to git commit message

2016-04-21 Thread Luke Diamand
On 20 April 2016 at 16:51, Junio C Hamano <gits...@pobox.com> wrote: > Luke Diamand <l...@diamand.org> writes: > >> One thing I wondered about is whether this should be enabled by >> default or not. Long-time users of git-p4 might be a bit surprised to >> fin

Re: [PATCHv2 2/3] git-p4 tests: work with python3 as well as python2

2016-04-26 Thread Luke Diamand
On 26 April 2016 at 18:48, Junio C Hamano <gits...@pobox.com> wrote: > Luke Diamand <l...@diamand.org> writes: > >> Update the git-p4 tests so that they work with both >> Python2 and Python3. >> >> We have to be explicit about the difference betwee

Re: BUG on OSX `git p4 submit` can fail when the workspace root doesn't exist locally.

2016-04-28 Thread Luke Diamand
On 27 April 2016 at 21:53, Stefan Beller wrote: > On Wed, Apr 27, 2016 at 11:06 AM, Jacob Smith wrote: >> I debugged the issue using the script here: >> https://github.com/git/git/blob/master/git-p4.py >> I'm not sure how close to the main repo that

Re: [PATCH v2] git-p4: Fix git-p4.mapUser on Windows

2017-01-29 Thread Luke Diamand
On 27 January 2017 at 17:33, Junio C Hamano wrote: > George Vanburgh writes: > >> From: George Vanburgh >> >> When running git-p4 on Windows, with multiple git-p4.mapUser entries in >> git config - no user mappings are applied to

Re: [PATCH v2] git-p4: fix git-p4.pathEncoding for removed files

2017-02-10 Thread Luke Diamand
On 9 February 2017 at 23:39, Junio C Hamano wrote: > Lars Schneider writes: > >> unfortunately, I missed to send this v2. I agree with Luke's review and >> I moved the re-encode of the path name to the `streamOneP4File` and >> `streamOneP4Deletion`

Re: [PATCH] git-p4: Fix git-p4.mapUser on Windows

2017-01-22 Thread Luke Diamand
I'm confusedsee below. On 21 January 2017 at 15:21, George Vanburgh wrote: >> On 21 Jan 2017, at 13:33, Lars Schneider >> > On 21 Jan 2017, at 13:02, George Vanburgh >> wrote: >> > >> > From: George Vanburgh

Re: [PATCH] [git-p4.py] Add --checkpoint-period option to sync/clone

2016-09-13 Thread Luke Diamand
On 12 September 2016 at 23:02, Ori Rawlings wrote: > Importing a long history from Perforce into git using the git-p4 tool > can be especially challenging. The `git p4 clone` operation is based > on an all-or-nothing transactionality guarantee. Under real-world > conditions

[PATCHv2] git-p4 worktree support

2016-12-10 Thread Luke Diamand
Second attempt at teaching git-p4 about worktrees. Earlier discussion here: http://marc.info/?l=git=148097985622294 Git-p4 exports GIT_DIR so that when it chdirs into the P4 client area to apply the change, git commands called from there will work correctly. Luke Diamand (1): git-p4: support

[PATCHv2] git-p4: support git worktrees

2016-12-10 Thread Luke Diamand
git-p4 would attempt to find the git directory using its own specific code, which did not know about git worktrees. This caused git operations to fail needlessly. Rework it to use "git rev-parse --git-dir" instead, which knows about worktrees. Signed-off-by: Luke Diamand <l..

Re: [PATCHv2] git-p4: support git worktrees

2016-12-10 Thread Luke Diamand
On 10 December 2016 at 21:57, Luke Diamand <l...@diamand.org> wrote: > git-p4 would attempt to find the git directory using > its own specific code, which did not know about git > worktrees. This caused git operations to fail needlessly. > > Rework it to use "git re

[PATCHv3] git-p4: support git worktrees

2016-12-13 Thread Luke Diamand
git-p4 would attempt to find the git directory using its own specific code, which did not know about git worktrees. Rework it to use "git rev-parse --git-dir" instead. Add test cases for worktree usage and specifying git directory via --git-dir and $GIT_DIR. Signed-off-by: Luke

[PATCHv3] git-p4 worktree support

2016-12-13 Thread Luke Diamand
Support for git-p4 worktrees. Adds test cases for using git from a worktree, and specifying the git directory either with the --git-dir command-line option, or with $ENV{GIT_DIR}. Luke Diamand (1): git-p4: support git worktrees git-p4.py | 17 + t/t9800-git-p4

[PATCHv1 0/1] git-p4: handle symlinked directories

2016-12-14 Thread Luke Diamand
There's a long-standing bug around handling of symlinked directories in git-p4. If in git you create a directory, and then symlink it, when git-p4 tries to create the diff-summary of what it's about to do, it tries to open the symlink as a regular file, and fails. Luke Diamand (1): git-p4

[PATCHv1 1/1] git-p4: avoid crash adding symlinked directory

2016-12-14 Thread Luke Diamand
When submitting to P4, if git-p4 came across a symlinked directory, then during the generation of the submit diff, it would try to open it as a normal file and fail. Spot this case, and instead output the target of the symlink in the submit diff. Add a test case. Signed-off-by: Luke Diamand &l

Re: [PATCH] git-p4: add p4 shelf support

2016-12-07 Thread Luke Diamand
On 6 December 2016 at 16:12, Nuno Subtil wrote: > Yeah, it looks similar. This change can be ignored if those have already > been accepted. Thanks, that's appreciated! Luke

[PATCHv1 0/2] git-p4 patches

2016-12-02 Thread Luke Diamand
you update an existing shelved changelist. This is a bit like using "git commit --amend" only far more painful Luke Diamand (2): git-p4: support git-workspaces git-p4: support updating an existing shelved changelist Documentation/git-p4.txt | 4 git-p4.py

[PATCHv1 2/2] git-p4: support updating an existing shelved changelist

2016-12-02 Thread Luke Diamand
ut shelved changelist make corrections git commit --amend git p4 submit --update-shelve $CHANGELIST $mail interested parties about shelved changelist etc Signed-off-by: Luke Diamand <l...@diamand.org> --- Documentation/git-p4.txt | 4 git-p4.py

[PATCHv1 1/2] git-p4: support git-workspaces

2016-12-02 Thread Luke Diamand
Teach git-p4 about git-workspaces. Signed-off-by: Luke Diamand <l...@diamand.org> --- git-p4.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/git-p4.py b/git-p4.py index 0c4f2afd2..5e2db1919 100755 --- a/git-p4.py +++ b/git-p4.py @@ -566,6 +566,12 @@ def isValidGitDi

Re: [PATCH] allow git-p4 to create shelved changelists

2016-11-29 Thread Luke Diamand
On 28 November 2016 at 19:06, Junio C Hamano wrote: > Vinicius Kursancew writes: > >> This patch adds a "--shelve" option to the submit subcommand, it will >> save the changes to a perforce shelve instead of commiting them. Looks good to me,

Re: [PATCHv1 1/2] git-p4: support git-workspaces

2016-12-05 Thread Luke Diamand
On 5 December 2016 at 20:53, Junio C Hamano <gits...@pobox.com> wrote: > Luke Diamand <l...@diamand.org> writes: > >> Teach git-p4 about git-workspaces. > > Is this what we call "git worktree", or something else? Ah, I think you're right! > >>

Re: [PATCHv1 1/2] git-p4: support git-workspaces

2016-12-05 Thread Luke Diamand
On 5 December 2016 at 21:24, Junio C Hamano <gits...@pobox.com> wrote: > Luke Diamand <l...@diamand.org> writes: > >> On 5 December 2016 at 20:53, Junio C Hamano <gits...@pobox.com> wrote: >>> Luke Diamand <l...@diamand.org> writes: >>> >&g

Re: [PATCH] git-p4: add p4 shelf support

2016-12-06 Thread Luke Diamand
On 6 December 2016 at 02:02, Nuno Subtil wrote: > Extends the submit command to support shelving a commit instead of > submitting it to p4 (similar to --prepare-p4-only). Is this just the same as these two changes? http://www.spinics.net/lists/git/msg290755.html

Re: [PATCH v1] git-p4: add config to retry p4 commands; retry 3 times by default

2016-12-05 Thread Luke Diamand
On 4 December 2016 at 14:03, wrote: > From: Lars Schneider > > P4 commands can fail due to random network issues. P4 users can counter > these issues by using a retry flag supported by all p4 commands [1]. > > Add an integer Git config

Re: [PATCH v4 2/2] t9813: avoid using pipes

2017-01-09 Thread Luke Diamand
On 8 January 2017 at 16:55, Pranit Bauva wrote: > The exit code of the upstream in a pipe is ignored thus we should avoid > using it. By writing out the output of the git command to a file, we can > test the exit codes of both the commands. Looks good to me, thanks! Ack.

Re: [PATCH] git-p4: do not pass '-r 0' to p4 commands

2016-12-29 Thread Luke Diamand
On 29 December 2016 at 09:05, Igor Kushnir wrote: > git-p4 crashes when used with a very old p4 client version > that does not support the '-r ' option in its commands. > > Allow making git-p4 work with old p4 clients by setting git-p4.retries to 0. > > Alternatively

Re: [PATCH] don't use test_must_fail with grep

2017-01-01 Thread Luke Diamand
On 31 December 2016 at 11:44, Pranit Bauva wrote: > test_must_fail should only be used for testing git commands. To test the > failure of other commands use `!`. > > Reported-by: Stefan Beller > Signed-off-by: Pranit Bauva >

Re: [PATCH] don't use test_must_fail with grep

2017-01-01 Thread Luke Diamand
On 1 January 2017 at 14:50, Johannes Sixt <j...@kdbg.org> wrote: > Am 01.01.2017 um 15:23 schrieb Luke Diamand: >> >> On 31 December 2016 at 11:44, Pranit Bauva <pranit.ba...@gmail.com> wrote: >>> >>> diff --git a/t/t9813-git-p4-preserve-users.sh >

Re: [PATCH v3 2/2] t9813: avoid using pipes

2017-01-04 Thread Luke Diamand
On 3 January 2017 at 19:57, Pranit Bauva wrote: > The exit code of the upstream in a pipe is ignored thus we should avoid > using it. By writing out the output of the git command to a file, we can > test the exit codes of both the commands. Do we also need to fix

Re: [PATCH v2] git-p4: do not pass '-r 0' to p4 commands

2017-01-04 Thread Luke Diamand
On 3 January 2017 at 20:02, Ori Rawlings wrote: > Looks good to me. And me. > > > Ori Rawlings

Re: [PATCH v2] git-p4: Fix multi-path changelist empty commits

2016-12-19 Thread Luke Diamand
On 19 December 2016 at 17:49, Junio C Hamano wrote: > George Vanburgh writes: > >> From: George Vanburgh >> >> When importing from multiple perforce paths - we may attempt to import >> a changelist that contains files from two (or

Re: [PATCH v1] git-p4: fix git-p4.pathEncoding for removed files

2016-12-20 Thread Luke Diamand
On 19 December 2016 at 21:29, Junio C Hamano wrote: > larsxschnei...@gmail.com writes: > >> From: Lars Schneider >> >> In a9e38359e3 we taught git-p4 a way to re-encode path names from what >> was used in Perforce to UTF-8. This path re-encoding

Re: [PATCH v1] git-p4: add diff/merge properties to .gitattributes for GitLFS files

2016-12-20 Thread Luke Diamand
On 19 December 2016 at 21:29, Junio C Hamano wrote: > larsxschnei...@gmail.com writes: > >> From: Lars Schneider >> >> The `git lfs track` command generates a .gitattributes file with diff >> and merge properties [1]. Set the same .gitattributes

Re: [PATCH] git-p4: Fix multi-path changelist empty commits

2016-12-16 Thread Luke Diamand
On 15 December 2016 at 17:14, George Vanburgh wrote: > From: George Vanburgh > > When importing from multiple perforce paths - we may attempt to import a > changelist that contains files from two (or more) of these depot paths. > Currently, this

[PATCHv2] git-p4: handle symlinked directories

2016-12-16 Thread Luke Diamand
commands (which also treat symlinks uniformaly). This is a very slight change in behaviour, but I don't think it can break anything since it is only when generating the summary that goes after the P4 change template. Luke Diamand (1): git-p4: avoid crash adding symlinked directory git-p4.py

[PATCHv2] git-p4: avoid crash adding symlinked directory

2016-12-16 Thread Luke Diamand
When submitting to P4, if git-p4 came across a symlinked directory, then during the generation of the submit diff, it would try to open it as a normal file and fail. Spot symlinks (of any type) and output a description of the symlink instead. Add a test case. Signed-off-by: Luke Diamand &l

[PATCH] git-p4: Add failing test case for name-rev vs symbolic-ref

2017-03-26 Thread Luke Diamand
As per the discussion about use of "git name-rev" vs "git symbolic-ref" in git-p4 here: http://marc.info/?l=git=148979063421355 git-p4 could get confused about the branch it is on and affects the git-p4.allowSubmit option. This adds a failing test case for the problem. Luk

[PATCH] git-p4: add failing test for name-rev rather than symbolic-ref

2017-03-26 Thread Luke Diamand
wrong, as git-p4 gets confused about which branch is in use. This appears to be the only place that git-p4 actually cares about the current branch. Signed-off-by: Luke Diamand <l...@diamand.org> --- t/t9807-git-p4-submit.sh | 16 1 file changed, 16 insertions(+) diff --g

Re: [PATCH] git-p4: Add failing test case for name-rev vs symbolic-ref

2017-03-27 Thread Luke Diamand
On 27 March 2017 at 00:18, Junio C Hamano <gits...@pobox.com> wrote: > Luke Diamand <l...@diamand.org> writes: > >> As per the discussion about use of "git name-rev" vs "git symbolic-ref" in >> git-p4 here: >> >> http://marc.inf

[PATCH 0/3] git-p4: use symbolic-ref instead of name-rev

2017-04-15 Thread Luke Diamand
Followup to earlier discussion about use of name-rev in git-p4. http://marc.info/?l=git=148979063421355 Luke Diamand (3): git-p4: add failing test for name-rev rather than symbolic-ref git-p4: add read_pipe_text() internal function git-p4: don't use name-rev to get current branch git-p4

[PATCH 3/3] git-p4: don't use name-rev to get current branch

2017-04-15 Thread Luke Diamand
git-p4 was using "git name-rev" to find out the current branch. That is not safe, since if multiple branches or tags point at the same revision, the result obtained might not be what is expected. Instead use "git symbolic-ref". Signed-off-by: Luke Diamand <l...@diam

[PATCH 1/3] git-p4: add failing test for name-rev rather than symbolic-ref

2017-04-15 Thread Luke Diamand
wrong, as git-p4 gets confused about which branch is in use. This appears to be the only place that git-p4 actually cares about the current branch. Signed-off-by: Luke Diamand <l...@diamand.org> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- t/t9807-git-p4-submit.sh | 16 +++

[PATCH 2/3] git-p4: add read_pipe_text() internal function

2017-04-15 Thread Luke Diamand
The existing read_pipe() function returns an empty string on error, but also returns an empty string if the command returns an empty string. This leads to ugly constructions trying to detect error cases. Add read_pipe_text() which just returns None on error. Signed-off-by: Luke Diamand &l

Re: [PATCH] git-p4: improve branch option handling

2017-04-20 Thread Luke Diamand
On 20 April 2017 at 14:52, Andrew Oakley wrote: > It is sometimes useful (much quicker) to request commands only operate > on a single branch. > > The P4Sync command has been updated to handle self.branch being None for > consitency with the P4Submit. Should that be

Re: [PATCH] git-p4: parse marshal output "p4 -G" in p4 changes

2017-07-12 Thread Luke Diamand
On 11 July 2017 at 23:53, Miguel Torroja wrote: > The option -G of p4 (python marshal output) gives more context about the > data being output. That's useful when using the command "change -o" as > we can distinguish between warning/error line and real change

Re: [PATCH] git-p4: parse marshal output "p4 -G" in p4 changes

2017-07-11 Thread Luke Diamand
On 3 July 2017 at 23:57, Miguel Torroja wrote: > The option -G of p4 (python marshal output) gives more context about the > data being output. That's useful when using the command "change -o" as > we can distinguish between warning/error line and real change description.

Re: [PATCH] git-p4: parse marshal output "p4 -G" in p4 changes

2017-06-30 Thread Luke Diamand
On 29 June 2017 at 23:41, miguel torroja <miguel.torr...@gmail.com> wrote: > On Thu, Jun 29, 2017 at 8:59 AM, Luke Diamand <l...@diamand.org> wrote: >> On 28 June 2017 at 14:14, miguel torroja <miguel.torr...@gmail.com> wrote: >>> Thanks Luke, >>>

Re: [PATCH] git-p4: parse marshal output "p4 -G" in p4 changes

2017-06-28 Thread Luke Diamand
On 28 June 2017 at 05:08, Junio C Hamano wrote: > Miguel Torroja writes: > >> The option -G of p4 (python marshal output) gives more context about the >> data being output. That's useful when using the command "change -o" as >> we can distinguish

Re: [PATCH] git-p4: parse marshal output "p4 -G" in p4 changes

2017-06-29 Thread Luke Diamand
On 28 June 2017 at 14:14, miguel torroja wrote: > Thanks Luke, > > regarding the error in t9800 (not ok 18 - unresolvable host in P4PORT > should display error), for me it's very weird too as it doesn't seem > to be related to this particular change, as the patch changes

Re: [PATCH] git-p4: changelist template with p4 -G change -o

2017-06-24 Thread Luke Diamand
On 22 June 2017 at 18:32, Junio C Hamano wrote: > Miguel Torroja writes: > >> The option -G of p4 (python marshal output) gives more context about the >> data being output. That's useful when using the command "change -o" as >> we can distinguish

Re: Git p4 sync changelist interval

2017-06-06 Thread Luke Diamand
On 6 June 2017 at 00:29, Luke Diamand <l...@diamand.org> wrote: > On 5 June 2017 at 19:50, Андрей Ефанов <1134t...@gmail.com> wrote: >> 2017-06-04 14:09 GMT+03:00 Luke Diamand <l...@diamand.org>: >>> >>> >>> > >>> > The problem,

Re: Git p4 sync changelist interval

2017-06-06 Thread Luke Diamand
On 6 June 2017 at 08:00, Luke Diamand <l...@diamand.org> wrote: > On 6 June 2017 at 00:29, Luke Diamand <l...@diamand.org> wrote: >> On 5 June 2017 at 19:50, Андрей Ефанов <1134t...@gmail.com> wrote: >>> 2017-06-04 14:09 GMT+

Re: Git p4 sync changelist interval

2017-06-06 Thread Luke Diamand
On 6 June 2017 at 08:56, Андрей Ефанов <1134t...@gmail.com> wrote: >> >> It seems to be something to do with the code around line 3395 that says: >> >> if self.changeRange == "@all": >> self.changeRange = "" >> elif ',' not in self.changeRange: >> >> It's finding a lower revision

Re: Git p4 sync changelist interval

2017-06-04 Thread Luke Diamand
On 4 June 2017 at 10:56, Андрей Ефанов <1134t...@gmail.com> wrote: > Hello, > > My goal is to sync the repository from p4 using an interval of > changelists so that the first changelist version of the repository > would be considered as an initial commit. > So I used the following command: > >

Re: Git p4 sync changelist interval

2017-06-05 Thread Luke Diamand
On 5 June 2017 at 19:50, Андрей Ефанов <1134t...@gmail.com> wrote: > 2017-06-04 14:09 GMT+03:00 Luke Diamand <l...@diamand.org>: >> >> On 4 June 2017 at 10:56, Андрей Ефанов <1134t...@gmail.com> wrote: >> > Hello, >> > >> >

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-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

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

2017-11-13 Thread Luke Diamand
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) Author: Nguyễn Thái Ngọc Duy Date: Wed Aug 23 19:36:59 2017 +0700 revision.c: --all adds HEAD

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

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

[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: [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 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:

[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

[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

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

[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

[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(+)

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...@

[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

[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

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: [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: [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

[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

[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: 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

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: > +

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

[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

[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

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

<    1   2   3   4   >