<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/git-p4.py, branch v2.49.0-rc2</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v2.49.0-rc2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v2.49.0-rc2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2024-09-19T20:46:00Z</updated>
<entry>
<title>git-p4: fix typos</title>
<updated>2024-09-19T20:46:00Z</updated>
<author>
<name>Andrew Kreimer</name>
<email>algonell@gmail.com</email>
</author>
<published>2024-09-19T18:34:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=086ba2eb3f84936ced3d209d02fe0dbac02dfcc1'/>
<id>urn:sha1:086ba2eb3f84936ced3d209d02fe0dbac02dfcc1</id>
<content type='text'>
Fix typos in comments.

Signed-off-by: Andrew Kreimer &lt;algonell@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-p4: show Perforce error to the user</title>
<updated>2024-05-08T22:44:14Z</updated>
<author>
<name>Fahad Alrashed</name>
<email>fahad@keylock.net</email>
</author>
<published>2024-05-08T22:11:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=55702c543ea39230847dfc635ea1b604d66d9b83'/>
<id>urn:sha1:55702c543ea39230847dfc635ea1b604d66d9b83</id>
<content type='text'>
During "git p4 clone" if p4 process returns an error from the server,
it will store the message in the 'err' variable. Then it will send a
text command "die-now" to git-fast-import. However, git-fast-import
raises an exception: "fatal: Unsupported command: die-now" and err is
never displayed. This patch ensures that err is shown to the end user.

Signed-off-by: Fahad Alrashed &lt;fahad@keylock.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jt/p4-spell-re-with-raw-string'</title>
<updated>2024-02-06T22:31:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-02-06T22:31:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e87557faa1f5cf07ecd9f9b2f851f307ac3859b5'/>
<id>urn:sha1:e87557faa1f5cf07ecd9f9b2f851f307ac3859b5</id>
<content type='text'>
"git p4" update to squelch warnings from Python.

* jt/p4-spell-re-with-raw-string:
  git-p4: use raw string literals for regular expressions
</content>
</entry>
<entry>
<title>git-p4: use raw string literals for regular expressions</title>
<updated>2024-01-29T17:25:16Z</updated>
<author>
<name>James Touton</name>
<email>bekenn@gmail.com</email>
</author>
<published>2024-01-26T23:41:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=90231982800152c4d66d0feb026c2ed8d28949d4'/>
<id>urn:sha1:90231982800152c4d66d0feb026c2ed8d28949d4</id>
<content type='text'>
Fixes several Python diagnostics about invalid escape sequences. The
diagnostics appear for me in Python 3.12, and may appear in earlier
versions. The fix is to use raw string literals so that backslashes are
not interpreted as introducing escape sequences. Raw string literals
are already in use in this file, so adding more does not impact
toolchain compatibility.

Signed-off-by: James Touton &lt;bekenn@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-p4: stop reaching into the refdb</title>
<updated>2024-01-11T21:10:41Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-01-11T13:47:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=02b5c1a94698a14b6df71a9e8d38b75169787fa3'/>
<id>urn:sha1:02b5c1a94698a14b6df71a9e8d38b75169787fa3</id>
<content type='text'>
The git-p4 tool creates a bunch of temporary branches that share a
common prefix "refs/git-p4-tmp/". These branches get cleaned up via
git-update-ref(1) after the import has finished. Once done, we try to
manually remove the now supposedly-empty ".git/refs/git-p4-tmp/"
directory.

This last step can fail in case there still are any temporary branches
around that we failed to delete because `os.rmdir()` refuses to delete a
non-empty directory. It can thus be seen as kind of a sanity check to
verify that we really did delete all temporary branches. Another failure
mode though is when the directory didn't exist in the first place, which
can be the case when using an alternate ref backend like the upcoming
"reftable" backend.

Convert the code to instead use git-for-each-ref(1) to verify that there
are no more temporary branches around. This works alright with alternate
ref backends while retaining the sanity check that we really did prune
all temporary branches.

This is a modification in behaviour for the "files" backend because the
empty directory does not get deleted anymore. But arguably we should not
care about such implementation details of the ref backend anyway, and
this should not cause any user-visible change in behaviour.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-p4 shouldn't attempt to store symlinks in LFS</title>
<updated>2023-10-19T17:57:44Z</updated>
<author>
<name>Matthew McClain</name>
<email>mmcclain@noprivs.com</email>
</author>
<published>2023-10-19T00:25:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=10c89a02b046e67c861f226064180c4f978a9cc3'/>
<id>urn:sha1:10c89a02b046e67c861f226064180c4f978a9cc3</id>
<content type='text'>
git-p4.py would attempt to put a symlink in LFS if its file extension
matched git-p4.largeFileExtensions.

Git LFS doesn't store symlinks because smudge/clean filters don't handle
symlinks. They never get passed to the filter process nor the
smudge/clean filters, nor could that occur without a change to the
protocol or command-line interface. Unless Git learned how to send them
to the filters, Git LFS would have a hard time using them in any useful
way.

Git LFS's goal is to move large files out of the repository history, and
symlinks are functionally limited to 4 KiB or a similar size on most
systems.

Signed-off-by: Matthew McClain &lt;mmcclain@noprivs.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'kk/p4-client-name-encoding-fix'</title>
<updated>2022-08-01T16:58:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-08-01T16:58:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e59acea3f0752ddfdcaab08b54dc0f84c7ab66e6'/>
<id>urn:sha1:e59acea3f0752ddfdcaab08b54dc0f84c7ab66e6</id>
<content type='text'>
"git p4" did not handle non-ASCII client name well, which has been
corrected.
source: &lt;pull.1285.v3.git.git.1658394440.gitgitgadget@gmail.com&gt;

* kk/p4-client-name-encoding-fix:
  git-p4: refactoring of p4CmdList()
  git-p4: fix bug with encoding of p4 client name
</content>
</entry>
<entry>
<title>Merge branch 'mb/p4-utf16-crlf'</title>
<updated>2022-07-27T16:16:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-07-27T16:16:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=745af8c7b5506f17516e21629386191acb26aae7'/>
<id>urn:sha1:745af8c7b5506f17516e21629386191acb26aae7</id>
<content type='text'>
"git p4" working on UTF-16 files on Windows did not implement
CRLF-to-LF conversion correctly, which has been corrected.

* mb/p4-utf16-crlf:
  git-p4: fix CR LF handling for utf16 files
</content>
</entry>
<entry>
<title>git-p4: refactoring of p4CmdList()</title>
<updated>2022-07-21T16:47:06Z</updated>
<author>
<name>Kilian Kilger</name>
<email>kkilger@gmail.com</email>
</author>
<published>2022-07-21T09:07:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=d205483695366803e912da6ae24380c33c293467'/>
<id>urn:sha1:d205483695366803e912da6ae24380c33c293467</id>
<content type='text'>
The function p4CmdList executes a Perforce command and
decodes the marshalled python dictionary. Special care has to be
taken for certain dictionary values which contain non-unicode characters.
The old handling contained separate hacks for each of the corresponding
dictionary keys. This commit tries to refactor the coding to handle the
special cases uniformely.

Signed-off-by: Kilian Kilger &lt;kkilger@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-p4: fix error handling in P4Unshelve.renameBranch()</title>
<updated>2022-07-20T20:53:54Z</updated>
<author>
<name>Moritz Baumann</name>
<email>moritz.baumann@sap.com</email>
</author>
<published>2022-07-20T18:55:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=198551ca54f6ff1c95c9357ccca9ae37298811bf'/>
<id>urn:sha1:198551ca54f6ff1c95c9357ccca9ae37298811bf</id>
<content type='text'>
The error handling code path is meant to be triggered when the loop does
not exit early via "break". This fails, as the boolean variable "found",
which is used to track whether the loop was exited early, is initialized
incorrectly.

It would be possible to fix this issue by correcting the initialization,
but Python supports a for:-else: control flow construct for this exact
use case (executing code if a loop does not exit early), so it is more
idiomatic to remove the tracking variable entirely.

In addition, the error message no longer refers to a variable that does
not exist.

Signed-off-by: Moritz Baumann &lt;moritz.baumann@sap.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
