[PATCH v2] git-p4: fix faulty paths for case insensitive systems

2015-08-19 Thread larsxschneider
From: Lars Schneider larsxschnei...@gmail.com Hi, as discussed with Luke in [PATCH] git-p4: fix faulty paths for case insensitive systems I added a test case for my path fix. I also changed the trigger for the fix to the command line parameter --fix-paths. Cheers, Lars Lars Schneider (1):

[PATCH v2] git-p4: fix faulty paths for case insensitive systems

2015-08-19 Thread larsxschneider
From: Lars Schneider larsxschnei...@gmail.com PROBLEM: We run P4 servers on Linux and P4 clients on Windows. For an unknown reason the file path for a number of files in P4 does not match the directory path with respect to case sensitivity. E.g. `p4 files` might return //depot/path/to/file1

[PATCH v4] git-p4: fix faulty paths for case insensitive systems

2015-08-21 Thread larsxschneider
From: Lars Schneider larsxschnei...@gmail.com PROBLEM: We run P4 servers on Linux and P4 clients on Windows. For an unknown reason the file path for a number of files in P4 does not match the directory path with respect to case sensitivity. E.g. `p4 files` might return //depot/path/to/file1

[PATCH v3] git-p4: fix faulty paths for case insensitive systems

2015-08-20 Thread larsxschneider
From: Lars Schneider larsxschnei...@gmail.com PROBLEM: We run P4 servers on Linux and P4 clients on Windows. For an unknown reason the file path for a number of files in P4 does not match the directory path with respect to case sensitivity. E.g. `p4 files` might return //depot/path/to/file1

[PATCH] git-p4: fix faulty paths for case insensitive systems

2015-08-02 Thread larsxschneider
From: Lars Schneider larsxschnei...@gmail.com Hi, I want to propose this patch as it helped us to migrate a big source code base successfully from P4 to Git. I am sorry that I don't provide a test case, yet. I would like to get advise on the patch and on the best strategy to provide a test. Do

[PATCH] git-p4: fix faulty paths for case insensitive systems

2015-08-02 Thread larsxschneider
From: Lars Schneider larsxschnei...@gmail.com PROBLEM: We run P4 servers on Linux and P4 clients on Windows. For an unknown reason the file path for a number of files in P4 does not match the directory path with respect to case sensitivity. E.g. `p4 files` might return //depot/path/to/file1

[PATCH v5] git-p4: Obey core.ignorecase when using P4 client specs.

2015-08-24 Thread larsxschneider
From: Lars Schneider larsxschnei...@gmail.com We run P4 servers on Linux and P4 clients on Windows. For an unknown reason the file path for a number of files in P4 does not match the directory path with respect to case sensitivity. E.g. p4 files might return //depot/path/to/file1

[PATCH v5] git-p4: Obey core.ignorecase when using P4 client specs.

2015-08-24 Thread larsxschneider
From: Lars Schneider larsxschnei...@gmail.com Thanks to Luke Diamand I realized the core problem and propose here a substiantially simpler fix to my PATCH v4. The test cases remain and prove the problem. In particular 8 - Clone path (ignorecase) and Add a new file and clone path with new file

[PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-12 Thread larsxschneider
From: Lars Schneider "git clone --recursive --depth 1 --single-branch " clones the submodules successfully. However, it does not obey "--depth 1" for submodule cloning. The following workaround does only work if the used submodule pointer is on the default branch.

[PATCH v1] add test to demonstrate that shallow recursive clones fail

2015-11-12 Thread larsxschneider
From: Lars Schneider "git clone --recursive --depth 1 --single-branch " clones the submodules successfully. However, it does not obey "--depth 1" for submodule cloning. The following workaround does only work if the used submodule pointer is on the default branch.

[PATCH v5 1/6] implement test_might_fail using a refactored test_must_fail

2015-11-15 Thread larsxschneider
From: Lars Schneider Add an (optional) first parameter "ok=" to test_must_fail and return success for "". Add "success" as "" and use it to implement "test_might_fail". This removes redundancies in test-lib-function.sh. Signed-off-by: Junio C Hamano

[PATCH v5 0/6] Add Travis CI support

2015-11-15 Thread larsxschneider
to git-p4 tests that ensure p4d is always killed You can see the CI results for this patch applied on master here: https://travis-ci.org/larsxschneider/git/builds/91216501 Thanks, Lars Lars Schneider (6): implement test_might_fail using a refactored test_must_fail add "ok=sigpipe" to t

[PATCH v5 5/6] git-p4: add trap to kill p4d on test exit

2015-11-15 Thread larsxschneider
From: Lars Schneider Sometimes the "prove" test runner hangs on test exit because p4d is still running. Add a trap to always kill "p4d" on test exit. You can reproduce the problem by commenting "P4D_TIMEOUT" in "lib-git-p4.sh" and running "prove

[PATCH v5 2/6] add "ok=sigpipe" to test_must_fail and use it to fix flaky tests

2015-11-15 Thread larsxschneider
From: Lars Schneider t5516 "75 - deny fetch unreachable SHA1, allowtipsha1inwant=true" is flaky in the following case: 1. remote upload-pack finds out "not our ref" 2. remote sends a response and closes the pipe 3. fetch-pack still tries to write commands to the remote

[PATCH v5 3/6] git-p4: retry kill/cleanup operations in tests with timeout

2015-11-15 Thread larsxschneider
From: Lars Schneider In rare cases kill/cleanup operations in tests fail. Retry these operations with a timeout to make the test less flaky. Signed-off-by: Lars Schneider --- t/lib-git-p4.sh | 31 +++ 1 file

[PATCH v5 4/6] git-p4: add p4d timeout in tests

2015-11-15 Thread larsxschneider
From: Lars Schneider In rare cases p4d seems to hang. This watchdog will kill the p4d process after 300s in any case. That means each individual git p4 test needs to finish before 300s or it will fail. Signed-off-by: Lars Schneider ---

[PATCH v5 6/6] Add Travis CI support

2015-11-15 Thread larsxschneider
From: Lars Schneider The tests are currently executed on "Ubuntu 12.04 LTS Server Edition 64 bit" and on "OS X Mavericks" using gcc and clang. Perforce and Git-LFS are installed and therefore available for the respective tests. Signed-off-by: Lars Schneider

[PATCH v4 0/4] Add Travis CI support

2015-11-06 Thread larsxschneider
not bothered by emails. If we find in six months from now that TravisCI has too many false failures then we could remove the .travis.yml, again, and move on. I had to apply this patch on master to get David Turner's fix for flaky t7063 [6]/[7]. You can find the TravisCI run for this roll

[PATCH v4 1/4] add function test_must_fail_or_sigpipe and use it to fix flaky tests

2015-11-06 Thread larsxschneider
From: Lars Schneider t5516 "75 - deny fetch unreachable SHA1, allowtipsha1inwant=true" is flaky in the following case: 1. remote upload-pack finds out "not our ref" 2. remote sends a response and closes the pipe 3. fetch-pack still tries to write commands to the remote

[PATCH v4 3/4] git-p4: retry kill/cleanup operations in tests with timeout

2015-11-06 Thread larsxschneider
From: Lars Schneider In rare cases kill/cleanup operations in tests fail. Retry these operations with a timeout to make the test less flaky. Signed-off-by: Lars Schneider --- t/lib-git-p4.sh | 31 +++ 1 file

[PATCH v4 2/4] git-p4: add p4d timeout in tests

2015-11-06 Thread larsxschneider
From: Lars Schneider In rare cases p4d seems to hang. This watchdog will kill the p4d process after 300s in any case. That means each individual git p4 test needs to finish before 300s or it will fail. Signed-off-by: Lars Schneider ---

[PATCH v4 4/4] Add Travis CI support

2015-11-06 Thread larsxschneider
From: Lars Schneider The tests are currently executed on "Ubuntu 12.04 LTS Server Edition 64 bit" and on "OS X Mavericks" using gcc and clang. Perforce and Git-LFS are installed and therefore available for the respective tests. Signed-off-by: Lars Schneider

[PATCH v1] git-p4: Add option to ignore empty commits

2015-10-19 Thread larsxschneider
From: Lars Schneider A changelist that contains only excluded files (e.g. via client spec or branch prefix) will be imported as empty commit. Add option "git-p4.ignoreEmptyCommits" to ignore these commits. Signed-off-by: Lars Schneider ---

[PATCH v3 2/3] git-p4: Improve test case portability for t9815 git-p4-submit-fail

2015-10-11 Thread larsxschneider
From: Lars Schneider Replace the stats command with the ls command to check file mode bits. The stats command is not available on Windows and has different command line options on OS X. Signed-off-by: Lars Schneider ---

[PATCH v3 0/3] Add Travis CI support

2015-10-11 Thread larsxschneider
From: Lars Schneider diff to v2: * fix commit message to express what systems the Travis CI's infrastructure "currently" uses (thanks Dscho) * use `case` instead `if` syntax for OS detection (thanks Dscho) * remove unnessary DARWIN flag (thanks Junio) * use flag

[PATCH v3 3/3] git-p4: Skip t9819 test case on case insensitive file systems

2015-10-11 Thread larsxschneider
From: Lars Schneider Windows and OS X file systems are case insensitive by default. Consequently the "git-p4-case-folding" test case does not apply to them. Signed-off-by: Lars Schneider --- t/t9819-git-p4-case-folding.sh | 6 ++ 1 file

[PATCH v3 1/3] Add Travis CI support

2015-10-11 Thread larsxschneider
From: Lars Schneider The tests are currently executed on "Ubuntu 12.04 LTS Server Edition 64 bit" and on "OS X Mavericks" using gcc and clang. Perforce and Git-LFS are installed and therefore available for the respective tests. Signed-off-by: Lars Schneider

[PATCH v1 2/2] git-p4: Skip t9819 test case on case insensitive file systems

2015-10-12 Thread larsxschneider
From: Lars Schneider Windows and OS X file systems are case insensitive by default. Consequently the "git-p4-case-folding" test case does not apply to them. Signed-off-by: Lars Schneider Acked-by: Luke Diamand ---

[PATCH v1 0/2] git-p4: Fix tests on OS X

2015-10-12 Thread larsxschneider
From: Lars Schneider I extracted this patch series from "[PATCH v3 0/3] Add Travis CI support" as suggested by Junio. Thanks, Lars Lars Schneider (2): git-p4: Improve test case portability for t9815 git-p4-submit-fail git-p4: Skip t9819 test case on case

[PATCH v1 1/2] git-p4: Improve test case portability for t9815 git-p4-submit-fail

2015-10-12 Thread larsxschneider
From: Lars Schneider Replace the stats command with the ls command to check file mode bits. The stats command is not available on Windows and has different command line options on OS X. Signed-off-by: Lars Schneider ---

[PATCH v8] git-p4: Obey core.ignorecase when using P4 client specs

2015-08-27 Thread larsxschneider
From: Lars Schneider larsxschnei...@gmail.com I realized after reading the mailing list that my v7 was signed off twice. I fixed that in v8. Sorry for the spam, Lars Lars Schneider (1): git-p4: Obey core.ignorecase when using P4 client specs git-p4.py | 7 ++

[PATCH v8] git-p4: Obey core.ignorecase when using P4 client specs

2015-08-27 Thread larsxschneider
From: Lars Schneider larsxschnei...@gmail.com Perforce depot may record paths in mixed cases, e.g. p4 files may show that there are these two paths: //depot/Path/to/file1 //depot/pATH/to/file2 and with p4 or p4v, these end up in the same directory, e.g. //depot/Path/to/file1

[PATCH v7] git-p4: Obey core.ignorecase when using P4 client specs

2015-08-27 Thread larsxschneider
From: Lars Schneider larsxschnei...@gmail.com Perforce depot may record paths in mixed cases, e.g. p4 files may show that there are these two paths: //depot/Path/to/file1 //depot/pATH/to/file2 and with p4 or p4v, these end up in the same directory, e.g. //depot/Path/to/file1

[PATCH v7] git-p4: Obey core.ignorecase when using P4 client specs

2015-08-27 Thread larsxschneider
From: Lars Schneider larsxschnei...@gmail.com I changed the commit message based on Junio's suggestion in the v6 thread and I changed the test case path names to match the commit message example. Thanks, Lars Lars Schneider (1): git-p4: Obey core.ignorecase when using P4 client specs

[PATCH v6] git-p4: Obey core.ignorecase when using P4 client specs.

2015-08-26 Thread larsxschneider
From: Lars Schneider larsxschnei...@gmail.com We run P4 servers on Linux and P4 clients on Windows. For an unknown reason the file path for a number of files in P4 does not match the directory path with respect to case sensitivity. E.g. p4 files might return //depot/path/to/file1

[PATCH v9] git-p4: Obey core.ignorecase when using P4 client specs

2015-08-28 Thread larsxschneider
From: Lars Schneider larsxschnei...@gmail.com I fixed a commit message typo discover by Remi in v8. Thanks, Lars Lars Schneider (1): git-p4: Obey core.ignorecase when using P4 client specs git-p4.py | 7 ++ t/t9821-git-p4-path-variations.sh | 200

[PATCH v9] git-p4: Obey core.ignorecase when using P4 client specs

2015-08-28 Thread larsxschneider
From: Lars Schneider larsxschnei...@gmail.com Perforce depot may record paths in mixed cases, e.g. p4 files may show that there are these two paths: //depot/Path/to/file1 //depot/pATH/to/file2 and with p4 or p4v, these end up in the same directory, e.g. //depot/Path/to/file1

[RFC PATCH] git-p4: add option to store files in Git LFS on import

2015-08-28 Thread larsxschneider
From: Lars Schneider larsxschnei...@gmail.com Signed-off-by: Lars Schneider larsxschnei...@gmail.com --- Documentation/git-p4.txt | 12 ++ git-p4.py| 94 ++-- t/t9822-git-p4-lfs.sh| 277 +++ 3 files changed, 374

[RFC PATCH] git-p4: add option to store files in Git LFS on import

2015-08-28 Thread larsxschneider
From: Lars Schneider larsxschnei...@gmail.com I am migrating huge Perforce repositories including history to Git. Some of them contain large files that would blow up the resulting Git repositories. This patch adds an option to store these files in Git LFS [1] on git-p4 clone. In order to run

[PATCH] git-p4: add "--path-encoding" option

2015-08-31 Thread larsxschneider
From: Lars Schneider Hi, I think I discovered a path encoding issue if you migrate P4 repositories that contain path names generated with Windows. I added a test case to prove my point. Character encoding is a complicated topic. Feedback is highly appreciated.

[PATCH] git-p4: add "--path-encoding" option

2015-08-31 Thread larsxschneider
From: Lars Schneider Signed-off-by: Lars Schneider --- Documentation/git-p4.txt| 4 git-p4.py | 6 ++ t/t9821-git-p4-path-encoding.sh | 38 ++ 3 files changed, 48

[PATCH v2] git-p4: add "--path-encoding" option

2015-08-31 Thread larsxschneider
From: Lars Schneider Signed-off-by: Lars Schneider --- Documentation/git-p4.txt| 5 + git-p4.py | 6 ++ t/t9821-git-p4-path-encoding.sh | 39 +++ 3 files changed, 50

[PATCH v2] git-p4: add "--path-encoding" option

2015-08-31 Thread larsxschneider
From: Lars Schneider Diff to v1: * switch example conversions from cp1252 to iso8859-1 (thanks Torsten!) * fix git-p4.txt line length and double dashes (thanks Junio!) * remove bare UTF-8 sequence (thanks Junio!) As with v1, I ensured the unit test runs on OS X and

[PATCH v3] git-p4: add "--path-encoding" option

2015-08-31 Thread larsxschneider
From: Lars Schneider Diff to v2: * remove comment * use "core.quotepath false" to simplify test case Unit test passed on OS X and Linux. The unit test did also pass on v2 as "printf $(git ls-files) >actual" removes the LF. Cheers, Lars Lars Schneider (1): git-p4:

[PATCH v3] git-p4: add "--path-encoding" option

2015-08-31 Thread larsxschneider
From: Lars Schneider Signed-off-by: Lars Schneider --- Documentation/git-p4.txt| 5 + git-p4.py | 6 ++ t/t9821-git-p4-path-encoding.sh | 38 ++ 3 files changed, 49

[PATCH v2] git-p4: add support for large file systems

2015-09-03 Thread larsxschneider
From: Lars Schneider Diff to v1: Fixed: * simpler makedirs * remove temp file if git-lfs command failed * fix typos * remove uneccessary sub shell for (git lfs help) * make TC not dependable on hashes Thanks Luke for the feedback! Added: * new gitConfigInt function *

[PATCH v2 1/4] git-p4: add optional type specifier to gitConfig reader

2015-09-03 Thread larsxschneider
From: Lars Schneider Signed-off-by: Lars Schneider --- git-p4.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/git-p4.py b/git-p4.py index 073f87b..c139cab 100755 --- a/git-p4.py +++ b/git-p4.py @@ -604,9

[PATCH v2 3/4] git-p4: return an empty list if a list config has no values

2015-09-03 Thread larsxschneider
From: Lars Schneider Signed-off-by: Lars Schneider --- git-p4.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git-p4.py b/git-p4.py index ae1a4d3..4d78e1c 100755 --- a/git-p4.py +++ b/git-p4.py @@ -638,6 +638,8 @@ def

[PATCH v2 2/4] git-p4: add gitConfigInt reader

2015-09-03 Thread larsxschneider
From: Lars Schneider Signed-off-by: Lars Schneider --- git-p4.py | 11 +++ 1 file changed, 11 insertions(+) diff --git a/git-p4.py b/git-p4.py index c139cab..ae1a4d3 100755 --- a/git-p4.py +++ b/git-p4.py @@ -623,6 +623,17 @@ def

[PATCH v2 4/4] git-p4: add support for large file systems

2015-09-03 Thread larsxschneider
From: Lars Schneider Perforce repositories can contain large (binary) files. Migrating these repositories to Git generates very large local clones. External storage systems such as LFS [1] or git-annex [2] try to address this problem. Add a generic mechanism to detect

[PATCH v3 0/5] git-p4: add support for large file systems

2015-09-07 Thread larsxschneider
From: Lars Schneider Diff to v2: * add proper commit messages * split commits into generic large file system and GitLFS implementation * improve docs, mention clean/smduge filter and add example for clean checkout * fix spelling * add option to push large files to

[PATCH v3 4/5] git-p4: add support for large file systems

2015-09-07 Thread larsxschneider
From: Lars Schneider Perforce repositories can contain large (binary) files. Migrating these repositories to Git generates very large local clones. External storage systems such as Git LFS [1], Git Fat [2], or Git Media [2] try to address this problem. Add a generic

[PATCH v3 5/5] git-p4: add Git LFS backend for large file system

2015-09-07 Thread larsxschneider
From: Lars Schneider Add example implementation including test cases for the large file system using Git LFS. Pushing files to the Git LFS server is not tested. Signed-off-by: Lars Schneider --- Documentation/git-p4.txt | 4 +- git-p4.py

[PATCH v3 1/5] git-p4: add optional type specifier to gitConfig reader

2015-09-07 Thread larsxschneider
From: Lars Schneider The functions “gitConfig” and “gitConfigBool” are almost identical. Make “gitConfig” more generic by adding an optional type specifier. Use the type specifier “—bool” with “gitConfig” to implement “gitConfigBool. This prepares the implementation

[PATCH v3 3/5] git-p4: return an empty list if a list config has no values

2015-09-07 Thread larsxschneider
From: Lars Schneider Signed-off-by: Lars Schneider --- git-p4.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git-p4.py b/git-p4.py index 40ad4ae..90d3b90 100755 --- a/git-p4.py +++ b/git-p4.py @@ -638,6 +638,8 @@ def

[PATCH v3 2/5] git-p4: add gitConfigInt reader

2015-09-07 Thread larsxschneider
From: Lars Schneider Add a git config reader for integer variables. Please note that the git config implementation automatically supports k, m, and g suffixes. Signed-off-by: Lars Schneider --- git-p4.py | 11 +++ 1 file changed, 11

[PATCH v1 0/2] git-p4: handle "Translation of file content failed"

2015-09-07 Thread larsxschneider
From: Lars Schneider Hi, this patch fixes the P4 "Translation of file content failed" error. Unfortuantly I was not able to generate a P4 test repository to reproduce the error with a test case. An Internet search shows that this error happens in the wild:

[PATCH v1 2/2] git-p4: handle "Translation of file content failed"

2015-09-07 Thread larsxschneider
From: Lars Schneider A P4 repository can get into a state where it contains a file with file type UTF16 that does not not contain valid UTF16 characters. If git-p4 attempts to retrieve the file as UTF16 from P4 then the process crashes with a "Translation of file

[PATCH v5] git-p4: add config git-p4.pathEncoding

2015-09-02 Thread larsxschneider
From: Lars Schneider Perforce keeps the encoding of a path as given by the originating OS. Git expects paths encoded as UTF-8. Add a config to tell git-p4 what encoding Perforce had used for the paths. This encoding is used to transcode the paths to UTF-8. As an

[PATCH v5] git-p4: add config git-p4.pathEncoding

2015-09-02 Thread larsxschneider
From: Lars Schneider Diff to v4: * add verbose output * reword help text * remove comment how to generate encoded sequence * use ascii characters in encoded sequence where possible * wrap 'cd' in TC in a subshell Thanks to Eric, Torsten, and Junio for feedback!

[PATCH v6] git-p4: add config git-p4.pathEncoding

2015-09-03 Thread larsxschneider
From: Lars Schneider Diff to v5: * use "test_config" (Thanks Remi! I am still learning all the tools...) * removed whitespaces (Thanks Luke! I added this to my "generate patch" script. Won't happen again :-) * added ACK from Luke (I interpreted "Looks good to me" that

[PATCH v1] t9821: use test_config

2015-09-03 Thread larsxschneider
From: Lars Schneider Signed-off-by: Lars Schneider --- t/t9821-git-p4-path-variations.sh | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/t/t9821-git-p4-path-variations.sh b/t/t9821-git-p4-path-variations.sh

[PATCH v1] t9821: use test_config

2015-09-03 Thread larsxschneider
From: Lars Schneider Thanks Remi for pointing out test_config to me! Cheers, Lars Lars Schneider (1): t9821: use test_config t/t9821-git-p4-path-variations.sh | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) -- 1.9.5 (Apple Git-50.3) -- To

[PATCH v6] git-p4: add config git-p4.pathEncoding

2015-09-03 Thread larsxschneider
From: Lars Schneider Perforce keeps the encoding of a path as given by the originating OS. Git expects paths encoded as UTF-8. Add a config to tell git-p4 what encoding Perforce had used for the paths. This encoding is used to transcode the paths to UTF-8. As an

[PATCH v4] git-p4: add config git-p4.pathEncoding

2015-09-02 Thread larsxschneider
From: Lars Schneider Diff to v3: * add proper commit message * remove command line option "--path-encoding" and add config "git-p4.pathEncoding" * change TC number to 9822 * escape UTF-8 characters in TC * change test encoding used in TC from cp1251 to ISO-8859-1 * use

[PATCH v4] git-p4: add config git-p4.pathEncoding

2015-09-02 Thread larsxschneider
From: Lars Schneider Perforce keeps the encoding of a path as given by the originating OS. Git expects paths encoded as UTF-8. Add a config to tell git-p4 what encoding Perforce had used for the paths. This encoding is used to transcode the paths to UTF-8. As an

[PATCH v1 1/2] git-p4: print stderr if P4 read_pipe operation fails

2015-09-07 Thread larsxschneider
From: Lars Schneider If read_pipe crashes then the caller can inspect the error and handle it appropriately. Signed-off-by: Lars Schneider --- git-p4.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-p4.py

[PATCH v4 0/5] git-p4: add support for large file systems

2015-09-09 Thread larsxschneider
From: Lars Schneider Diff to v3: * add large file system mock class for testing (Thanks Luke!) * add early exit for compressed threshold: If a file is smaller then the threshold then we don't need to compress it. Thanks, Lars Lars Schneider (5): git-p4: add

[PATCH v4 1/5] git-p4: add optional type specifier to gitConfig reader

2015-09-09 Thread larsxschneider
From: Lars Schneider The functions “gitConfig” and “gitConfigBool” are almost identical. Make “gitConfig” more generic by adding an optional type specifier. Use the type specifier “—bool” with “gitConfig” to implement “gitConfigBool. This prepares the implementation

[PATCH v4 2/5] git-p4: add gitConfigInt reader

2015-09-09 Thread larsxschneider
From: Lars Schneider Add a git config reader for integer variables. Please note that the git config implementation automatically supports k, m, and g suffixes. Signed-off-by: Lars Schneider --- git-p4.py | 11 +++ 1 file changed, 11

[PATCH v4 3/5] git-p4: return an empty list if a list config has no values

2015-09-09 Thread larsxschneider
From: Lars Schneider Signed-off-by: Lars Schneider --- git-p4.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git-p4.py b/git-p4.py index 40ad4ae..90d3b90 100755 --- a/git-p4.py +++ b/git-p4.py @@ -638,6 +638,8 @@ def

[PATCH v4 4/5] git-p4: add support for large file systems

2015-09-09 Thread larsxschneider
From: Lars Schneider Perforce repositories can contain large (binary) files. Migrating these repositories to Git generates very large local clones. External storage systems such as Git LFS [1], Git Fat [2], or Git Media [2] try to address this problem. Add a generic

[PATCH v4 5/5] git-p4: add Git LFS backend for large file system

2015-09-09 Thread larsxschneider
From: Lars Schneider Add example implementation including test cases for the large file system using Git LFS. Pushing files to the Git LFS server is not tested. Signed-off-by: Lars Schneider --- Documentation/git-p4.txt | 4 +- git-p4.py

[PATCH v5 3/7] git-p4: return an empty list if a list config has no values

2015-09-14 Thread larsxschneider
From: Lars Schneider Signed-off-by: Lars Schneider --- git-p4.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git-p4.py b/git-p4.py index 40ad4ae..90d3b90 100755 --- a/git-p4.py +++ b/git-p4.py @@ -638,6 +638,8 @@ def

[PATCH v5 1/7] git-p4: add optional type specifier to gitConfig reader

2015-09-14 Thread larsxschneider
From: Lars Schneider The functions “gitConfig” and “gitConfigBool” are almost identical. Make “gitConfig” more generic by adding an optional type specifier. Use the type specifier “—bool” with “gitConfig” to implement “gitConfigBool. This prepares the implementation

[PATCH v5 5/7] git-p4: check free space during streaming

2015-09-14 Thread larsxschneider
From: Lars Schneider git-p4 will just halt if there is not enough disk space while streaming content from P4 to Git. Add a check to ensure at least 4 times (arbitrarily chosen) the size of a streamed file is available. Signed-off-by: Lars Schneider

[PATCH v5 7/7] git-p4: add Git LFS backend for large file system

2015-09-14 Thread larsxschneider
From: Lars Schneider Add example implementation including test cases for the large file system using Git LFS. Pushing files to the Git LFS server is not tested. Signed-off-by: Lars Schneider --- git-p4.py | 72

[PATCH v5 4/7] git-p4: add file streaming progress in verbose mode

2015-09-14 Thread larsxschneider
From: Lars Schneider If a file is streamed from P4 to Git then the verbose mode prints continuously the progress as percentage like this: //depot/file.bin 20% (10 MB) Upon completion the progress is overwritten with depot source, local file and size like this:

[PATCH v5 6/7] git-p4: add support for large file systems

2015-09-14 Thread larsxschneider
From: Lars Schneider Perforce repositories can contain large (binary) files. Migrating these repositories to Git generates very large local clones. External storage systems such as Git LFS [1], Git Fat [2], Git Media [3], git-annex [4] try to address this problem. Add

[PATCH v5 2/7] git-p4: add gitConfigInt reader

2015-09-14 Thread larsxschneider
From: Lars Schneider Add a git config reader for integer variables. Please note that the git config implementation automatically supports k, m, and g suffixes. Signed-off-by: Lars Schneider --- git-p4.py | 11 +++ 1 file changed, 11

[PATCH v5 0/7] git-p4: add support for large file systems

2015-09-14 Thread larsxschneider
From: Lars Schneider Diff to v4: * Add streaming progress in verbose mode. * Add check for free disk space. * Remove the limitation that no .gitattribues must be present. * Refactor large file system classes. The base implementation does not assume a ".gitattributes

[PATCH v2 1/2] git-p4: add test case for "Translation of file content failed" error

2015-09-14 Thread larsxschneider
From: Lars Schneider A P4 repository can get into a state where it contains a file with type UTF-16 that does not contain a valid UTF-16 BOM. If git-p4 attempts to retrieve the file then the process crashes with a "Translation of file content failed" error.

[PATCH v2 0/2] git-p4: handle "Translation of file content failed"

2015-09-14 Thread larsxschneider
From: Lars Schneider diff to v1: * add a test case * use Popen "communication" function instead of "wait" Thanks to Junio for feedback! Known issue: My fix works only if git-p4 is executed in verbose mode. In normal mode no exceptions are thrown and git-p4 just exits.

[PATCH v2 2/2] git-p4: handle "Translation of file content failed"

2015-09-14 Thread larsxschneider
From: Lars Schneider A P4 repository can get into a state where it contains a file with type UTF-16 that does not contain a valid UTF-16 BOM. If git-p4 attempts to retrieve the file then the process crashes with a "Translation of file content failed" error. Fix this by

[PATCH v7] git-p4: add config git-p4.pathEncoding

2015-09-14 Thread larsxschneider
From: Lars Schneider diff to v6: * Always print the encoded path in verbose mode. v6 is already on next (a9e383). This patch must be applied on next. Is this the right way to handle this situation? Thanks, Lars Lars Schneider (1): git-p4: improve path encoding

[PATCH v7] git-p4: improve path encoding verbose output

2015-09-14 Thread larsxschneider
From: Lars Schneider If a path with non-ASCII characters is detected then print always the encoding and the encoded string in verbose mode. Signed-off-by: Lars Schneider --- git-p4.py | 19 +-- 1 file changed, 9

[PATCH v2] git-p4: improve path encoding verbose output

2015-09-16 Thread larsxschneider
From: Lars Schneider Follow up patch for a9e38359 (git-p4: add config git-p4.pathEncoding, 2015-09-03) which is already on 'next'. diff to v1 (wrongly called v7 in "[PATCH v7] git-p4: add config git-p4.pathEncoding") * make path encoding for utf-8 default case more

[PATCH v8 7/7] git-p4: add Git LFS backend for large file system

2015-09-26 Thread larsxschneider
From: Lars Schneider Add example implementation including test cases for the large file system using Git LFS. Pushing files to the Git LFS server is not tested. Signed-off-by: Lars Schneider --- git-p4.py | 72

[PATCH v8 3/7] git-p4: return an empty list if a list config has no values

2015-09-26 Thread larsxschneider
From: Lars Schneider Signed-off-by: Lars Schneider --- git-p4.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git-p4.py b/git-p4.py index 40ad4ae..90d3b90 100755 --- a/git-p4.py +++ b/git-p4.py @@ -638,6 +638,8 @@ def

[PATCH v8 2/7] git-p4: add gitConfigInt reader

2015-09-26 Thread larsxschneider
From: Lars Schneider Add a git config reader for integer variables. Please note that the git config implementation automatically supports k, m, and g suffixes. Signed-off-by: Lars Schneider --- git-p4.py | 11 +++ 1 file changed, 11

[PATCH v8 4/7] git-p4: add file streaming progress in verbose mode

2015-09-26 Thread larsxschneider
From: Lars Schneider If a file is streamed from P4 to Git then the verbose mode prints continuously the progress as percentage like this: //depot/file.bin 20% (10 MB) Upon completion the progress is overwritten with depot source, local file and size like this:

[PATCH v8 6/7] git-p4: add support for large file systems

2015-09-26 Thread larsxschneider
From: Lars Schneider Perforce repositories can contain large (binary) files. Migrating these repositories to Git generates very large local clones. External storage systems such as Git LFS [1], Git Fat [2], Git Media [3], git-annex [4] try to address this problem. Add

[PATCH v8 1/7] git-p4: add optional type specifier to gitConfig reader

2015-09-26 Thread larsxschneider
From: Lars Schneider The functions “gitConfig” and “gitConfigBool” are almost identical. Make “gitConfig” more generic by adding an optional type specifier. Use the type specifier “—bool” with “gitConfig” to implement “gitConfigBool. This prepares the implementation of

[PATCH v8 5/7] git-p4: check free space during streaming

2015-09-26 Thread larsxschneider
From: Lars Schneider git-p4 will just halt if there is not enough disk space while streaming content from P4 to Git. Add a check to ensure at least 4 times (arbitrarily chosen) the size of a streamed file is available. Signed-off-by: Lars Schneider

[PATCH v8 0/7] git-p4: add support for large file systems

2015-09-26 Thread larsxschneider
From: Lars Schneider diff to v7: * fix commit message line length (thanks Junio) * fix sync command for large file system support (thanks Luke!) * add test case for sync command * rename git-p4.pushLargeFiles to git-p4.largeFilePush for consistency with other

[PATCH v2 3/4] git-p4: Fix t9815 git-p4-submit-fail test case on OS X

2015-10-04 Thread larsxschneider
From: Lars Schneider The stats command works differently on OS X compared to Linux. Detect OS X and execute the appropriate assertions. Signed-off-by: Lars Schneider --- t/t9815-git-p4-submit-fail.sh | 8 ++-- 1 file changed, 6

[PATCH v2 2/4] Add prereq to detect OS X

2015-10-04 Thread larsxschneider
From: Lars Schneider Some Unix tools differ between Linux and Mac OS X. Add this prereq to detect OS X and handle it appropriately. Signed-off-by: Lars Schneider --- t/test-lib.sh | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

[PATCH v2 4/4] git-p4: Disable t9819 git-p4-case-folding test on OS X

2015-10-04 Thread larsxschneider
From: Lars Schneider The OS X file system is case insensitive by default. Consequently this test does not apply. Signed-off-by: Lars Schneider --- t/t9819-git-p4-case-folding.sh | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH v2 1/4] Add Travis CI support

2015-10-04 Thread larsxschneider
From: Lars Schneider The tests are executed on "Ubuntu 12.04 LTS Server Edition 64 bit" and on "OS X Mavericks" using gcc and clang. Perforce and Git-LFS are installed and therefore available for the respective tests. Signed-off-by: Lars Schneider

[PATCH v2 0/4] Add Travis CI support

2015-10-04 Thread larsxschneider
ble t9819 git-p4-case-folding test on OS X Thanks Junio for the feedback. You are right, I should have fixed the failing tests in the first place. With this patch all tests pass on Linux and OS X: https://travis-ci.org/larsxschneider/git/builds/83575208 In a subsequent patch I plan to: * add cvs to

  1   2   3   4   >