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

2015-09-21 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 t/t9824-git-p4-git-lfs.sh | 288

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

2015-09-21 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: //depot/file.bin --> local/file.bin

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

2015-09-21 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 insertions(+) diff --git a/git-p4.py b/git-p4.py in

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

2015-09-21 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 a generic mechanism to dete

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

2015-09-21 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 --- git-p4.py | 27 ++

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

2015-09-21 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 2715895..e7d1b3f 100755 --- a/git-p4.py +++ b/git-p4.py @@ -638,6 +638,8 @@ def gitConfigList(key): if not _gitConfig.has_key(key): s

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

2015-09-21 Thread larsxschneider
From: Lars Schneider diff to v6: * fix spaces in .gitattributes for Git-LFS files (old "[:space:]", new "[[:space:]]") * generated patch on top of next (95c4325) to resolve merge conflicts I am sorry about the "[:space:]" bug this late. I had the fix in my development branch but missed to apply

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

2015-09-21 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 other type specifiers su

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

2015-09-21 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. More info here: http://answers.perforc

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

2015-09-21 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. More info here: http://answers.perforc

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

2015-09-21 Thread larsxschneider
From: Lars Schneider diff to v3: * replace non portable "sed -i" call in test case (thanks Luke and Torsten!) * use "test_expect_failure" in the first commit that adds the test case, flip it to "test_expect_success" in subsequent commit (thanks Eric and Luke!) * rename test case from t9824... to

[PATCH v3] git-p4: use replacement character for non UTF-8 characters in paths

2015-09-21 Thread larsxschneider
From: Lars Schneider If non UTF-8 characters are detected in paths then replace them with � instead of throwing a UnicodeDecodeError exception. This restores the original (implicit) implementation that was broken in 00a9403. Signed-off-by: Lars Schneider --- git-p4.py | 2 +- 1 file changed, 1

[PATCH v3] git-p4: use replacement character for non UTF-8 characters in paths

2015-09-21 Thread larsxschneider
From: Lars Schneider I broke a test in "[PATCH v2] git-p4: improve path encoding verbose output" on the next branch. This patch on top of next (3dd15c0) fixes the issue. Thanks to Luke for finding the issue! Cheers, Lars Lars Schneider (1): git-p4: use replacement character for non UTF-8 ch

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

2015-09-20 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: //depot/file.bin --> local/file.bin

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

2015-09-20 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 a generic mechanism to dete

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

2015-09-20 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 --- git-p4.py | 27 ++

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

2015-09-20 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 other type specifiers su

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

2015-09-20 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 gitConfigList(key): if not _gitConfig.has_key(key): s

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

2015-09-20 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 t/t9824-git-p4-git-lfs.sh | 288

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

2015-09-20 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 insertions(+) diff --git a/git-p4.py b/git-p4.py in

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

2015-09-20 Thread larsxschneider
From: Lars Schneider diff to v5: * remove superfluous flush call (thanks Luke!) * keep &&-chain intact in test cases (thanks Luke, Junio and Eric!) * add mock LFS test case for deleting files (thanks Luke!) * add mock LFS test case for git-p4.largeFileExtensions option * add Luke's ACK to commit

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

2015-09-20 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. More info here: http://answers.perforc

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

2015-09-20 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. More info here: http://answers.perforc

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

2015-09-20 Thread larsxschneider
From: Lars Schneider diff to v2: * remove Perl calls for printing characters (Thanks Torsten!) * remove whitespaces after ">" (Thanks Torsten!) * add test case to show that the fix is not working for non "--verbose" mode (Thanks Luke!) * add P4 knowledge base link with detailed error description

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

2015-09-16 Thread larsxschneider
From: Lars Schneider If a path with non-ASCII characters is detected then print the encoding and the encoded string in verbose mode. Signed-off-by: Lars Schneider --- git-p4.py | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/git-p4.py b/git-p4.py index

[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 explicit (thanks Junio!) * im

[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 verbose output git-p4.py | 19

[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 insertions(+), 10 deletions(-) diff --git a/git-p4.py b/git-p4.py

[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 detecting this error and r

[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. Lars Schneider (2): git

[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. Signed-off-by: Lars Schneider --- t/

[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 of other type specifiers su

[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 gitConfigList(key): if not _gitConfig.has_key(key): s

[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 t/t9824-git-p4-git-lfs.sh | 288

[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 a generic mechanism to dete

[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: //depot/file.bin --> local/file.bin

[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 --- git-p4.py | 27 ++

[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 mechanism" anymore. * Throw e

[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 insertions(+) diff --git a/git-p4.py b/git-p4.py in

[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 | 52 ++ t/t9824-git-p4-git

[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 mechanism to detect large fil

[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 gitConfigList(key): if not _gitConfig.has_key(key): s

[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 of other type specifiers su

[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 insertions(+) diff --git a/git-p4.py b/git-p4.py in

[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 optional type specifier to gitConf

[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 b/git-p4.py index 073f87b..36a4bcb 100755 --- a/git-p4.py +

[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 content failed" error. Fix this

[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: https://stackoverflow.com/questions/51

[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 gitConfigList(key): if not _gitConfig.has_key(key): s

[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 of other type specifiers su

[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| 52 ++ t/t9823-git-p4-lfs.s

[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 server * use ValueError for gitC

[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 insertions(+) diff --git a/git-p4.py b/git-p4.py in

[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 mechanism to detect large fil

[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 large files based on extens

[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 gitConfigBool(key): _gitConfig[key] = gitConfig

[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 +604,12 @@ def gitBranchExists(branch): _gitConfig =

[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 gitConfigList(key): if not _gitConfig.has_key(key): s

[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 * support for generic large

[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 index 81e46ac..5a26fec 100755 --- a/t/t9821-git-p4-p

[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 unsubscribe from this list: s

[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 example, Perforce on Windows often

[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 way. I hope this is OK.)

[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! Cheers, Lars Lars Schneider (1):

[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 example, Perforce on Windows often

[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 example, Perforce on my Windows bo

[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 static ISO-8859-1 encoded

[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 insertions(+) create mode 100755 t/t9821-git-p4-path-

[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: add "--path-encoding" optio

[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 insertions(+) create mode 100755 t/t9821-git-p4-path

[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 Linux. I noticed one weird po

[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 insertions(+) create mode 100755 t/t9821-git-p4-path-e

[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. Thanks, Lars Lars Schneider (1

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

2015-08-28 Thread larsxschneider
From: Lars Schneider Signed-off-by: Lars Schneider --- Documentation/git-p4.txt | 12 ++ git-p4.py| 94 ++-- t/t9822-git-p4-lfs.sh| 277 +++ 3 files changed, 374 insertions(+), 9 deletions(-) create mode 100755 t/t98

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

2015-08-28 Thread larsxschneider
From: Lars Schneider 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 the unit tests you need to

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

2015-08-28 Thread larsxschneider
From: Lars Schneider 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 //depot/Path/to/file2 wh

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

2015-08-28 Thread larsxschneider
From: Lars Schneider 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 ++ 2 f

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

2015-08-27 Thread larsxschneider
From: Lars Schneider 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 ++ t/t9821-git-p4-path-variation

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

2015-08-27 Thread larsxschneider
From: Lars Schneider 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 //depot/Path/to/file2 wh

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

2015-08-27 Thread larsxschneider
From: Lars Schneider 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 git-p4.py

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

2015-08-27 Thread larsxschneider
From: Lars Schneider 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 //depot/Path/to/file2 wh

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

2015-08-26 Thread larsxschneider
From: Lars Schneider 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 //depot/pATH/to/file2 If you use P4/P

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

2015-08-24 Thread larsxschneider
From: Lars Schneider 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 //depot/pATH/to/file2 If you use P4/P

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

2015-08-24 Thread larsxschneider
From: Lars Schneider 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 (ignorecase)" fail with

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

2015-08-21 Thread larsxschneider
From: Lars Schneider 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 //depot/PATH/to/file2 If you

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

2015-08-20 Thread larsxschneider
From: Lars Schneider 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 //depot/PATH/to/file2 If you

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

2015-08-19 Thread larsxschneider
From: Lars Schneider 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 //depot/PATH/to/file2 If you

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

2015-08-19 Thread larsxschneider
From: Lars Schneider 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): git-p4: fix faulty path

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

2015-08-02 Thread larsxschneider
From: Lars Schneider 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 //depot/PATH/to/file2 If you

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

2015-08-02 Thread larsxschneider
From: Lars Schneider 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 you only run git-p4 integr

<    1   2   3   4