<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/git.git/git-p4.py, branch ks/status-initial-commit</title>
<subtitle>github.com: git/git.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/'/>
<entry>
<title>git-p4: don't use name-rev to get current branch</title>
<updated>2017-04-17T04:13:26+00:00</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2017-04-15T10:36:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=eff451101dcdc6fe023861c6c02a9bacc43f372e'/>
<id>eff451101dcdc6fe023861c6c02a9bacc43f372e</id>
<content type='text'>
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 &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>git-p4: add read_pipe_text() internal function</title>
<updated>2017-04-17T04:13:24+00:00</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2017-04-15T10:36:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=78871bf46f18cd92e744a993c1d6422ff30d8bca'/>
<id>78871bf46f18cd92e744a993c1d6422ff30d8bca</id>
<content type='text'>
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 &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'ls/p4-path-encoding'</title>
<updated>2017-02-16T22:45:12+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-02-16T22:45:12+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=5a98255dec1578cc6dc3f25e85d7ea96028687b7'/>
<id>5a98255dec1578cc6dc3f25e85d7ea96028687b7</id>
<content type='text'>
When "git p4" imports changelist that removes paths, it failed to
convert pathnames when the p4 used encoding different from the one
used on the Git side.  This has been corrected.

* ls/p4-path-encoding:
  git-p4: fix git-p4.pathEncoding for removed files
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When "git p4" imports changelist that removes paths, it failed to
convert pathnames when the p4 used encoding different from the one
used on the Git side.  This has been corrected.

* ls/p4-path-encoding:
  git-p4: fix git-p4.pathEncoding for removed files
</pre>
</div>
</content>
</entry>
<entry>
<title>git-p4: fix git-p4.pathEncoding for removed files</title>
<updated>2017-02-10T22:33:13+00:00</updated>
<author>
<name>Lars Schneider</name>
<email>larsxschneider@gmail.com</email>
</author>
<published>2017-02-09T15:06:56+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=a8b05162e894b88aeb7d5064daba07e1a4f58463'/>
<id>a8b05162e894b88aeb7d5064daba07e1a4f58463</id>
<content type='text'>
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 worked properly for
"added" paths. "Removed" paths were not re-encoded and therefore
different from the "added" paths. Consequently, these files were not
removed in a git-p4 cloned Git repository because the path names did not
match.

Fix this by moving the re-encoding to a place that affects "added" and
"removed" paths. Add a test to demonstrate the issue.

Signed-off-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Reviewed-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 worked properly for
"added" paths. "Removed" paths were not re-encoded and therefore
different from the "added" paths. Consequently, these files were not
removed in a git-p4 cloned Git repository because the path names did not
match.

Fix this by moving the re-encoding to a place that affects "added" and
"removed" paths. Add a test to demonstrate the issue.

Signed-off-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Reviewed-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'gv/mingw-p4-mapuser'</title>
<updated>2017-02-02T21:36:55+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-02-02T21:36:55+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=a482cf446f2ced7fdd67faa2b3a55bfd5caf7d58'/>
<id>a482cf446f2ced7fdd67faa2b3a55bfd5caf7d58</id>
<content type='text'>
"git p4" did not work well with multiple git-p4.mapUser entries on
Windows.

* gv/mingw-p4-mapuser:
  git-p4: fix git-p4.mapUser on Windows
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"git p4" did not work well with multiple git-p4.mapUser entries on
Windows.

* gv/mingw-p4-mapuser:
  git-p4: fix git-p4.mapUser on Windows
</pre>
</div>
</content>
</entry>
<entry>
<title>git-p4: fix git-p4.mapUser on Windows</title>
<updated>2017-01-30T17:05:09+00:00</updated>
<author>
<name>George Vanburgh</name>
<email>gvanburgh@bloomberg.net</email>
</author>
<published>2017-01-25T09:17:29+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=c3c2b057767c037b32a276e14bf563383ce82e39'/>
<id>c3c2b057767c037b32a276e14bf563383ce82e39</id>
<content type='text'>
When running git-p4 on Windows, with multiple git-p4.mapUser entries in
git config - no user mappings are applied to the generated repository.

Reproduction Steps:

1. Add multiple git-p4.mapUser entries to git config on a Windows
   machine
2. Attempt to clone a p4 repository

None of the user mappings will be applied.

This issue is actually caused by gitConfigList, using split(os.linesep)
to convert the output of git config --get-all into a list. On Windows,
os.linesep is equal to '\r\n' - however git.exe returns configuration
with a line seperator of '\n'.

This leads to the list returned by gitConfigList containing only one
element - which contains the full output of git config --get-all in
string form, which causes problems for the code introduced to
getUserMapFromPerforceServer in 10d08a149d ("git-p4: map a P4 user to
Git author name and email address", 2016-03-01)

This issue should be caught by the test introduced in 10d08a1, however
would require running on Windows to reproduce.

Using splitlines solves this issue, by splitting config on all
typical delimiters ('\n', '\r\n' etc.)

Signed-off-by: George Vanburgh &lt;gvanburgh@bloomberg.net&gt;
Reviewed-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When running git-p4 on Windows, with multiple git-p4.mapUser entries in
git config - no user mappings are applied to the generated repository.

Reproduction Steps:

1. Add multiple git-p4.mapUser entries to git config on a Windows
   machine
2. Attempt to clone a p4 repository

None of the user mappings will be applied.

This issue is actually caused by gitConfigList, using split(os.linesep)
to convert the output of git config --get-all into a list. On Windows,
os.linesep is equal to '\r\n' - however git.exe returns configuration
with a line seperator of '\n'.

This leads to the list returned by gitConfigList containing only one
element - which contains the full output of git config --get-all in
string form, which causes problems for the code introduced to
getUserMapFromPerforceServer in 10d08a149d ("git-p4: map a P4 user to
Git author name and email address", 2016-03-01)

This issue should be caught by the test introduced in 10d08a1, however
would require running on Windows to reproduce.

Using splitlines solves this issue, by splitting config on all
typical delimiters ('\n', '\r\n' etc.)

Signed-off-by: George Vanburgh &lt;gvanburgh@bloomberg.net&gt;
Reviewed-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'ls/p4-retry-thrice'</title>
<updated>2017-01-18T23:12:12+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-01-18T23:12:12+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=74f7427f8a7a6f8ac87e9f1bb1b140cd034f428d'/>
<id>74f7427f8a7a6f8ac87e9f1bb1b140cd034f428d</id>
<content type='text'>
A recent updates to "git p4" was not usable for older p4 but it
could be made to work with minimum changes.  Do so.

* ls/p4-retry-thrice:
  git-p4: do not pass '-r 0' to p4 commands
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A recent updates to "git p4" was not usable for older p4 but it
could be made to work with minimum changes.  Do so.

* ls/p4-retry-thrice:
  git-p4: do not pass '-r 0' to p4 commands
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'gv/p4-multi-path-commit-fix' into maint</title>
<updated>2017-01-17T23:19:02+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-01-17T23:19:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=1d5cb4596db9b4c5c9e8bd25700ecde83dfd18bd'/>
<id>1d5cb4596db9b4c5c9e8bd25700ecde83dfd18bd</id>
<content type='text'>
"git p4" that tracks multile p4 paths imported a single changelist
that touches files in these multiple paths as one commit, followed
by many empty commits.  This has been fixed.

* gv/p4-multi-path-commit-fix:
  git-p4: fix multi-path changelist empty commits
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"git p4" that tracks multile p4 paths imported a single changelist
that touches files in these multiple paths as one commit, followed
by many empty commits.  This has been fixed.

* gv/p4-multi-path-commit-fix:
  git-p4: fix multi-path changelist empty commits
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'ld/p4-compare-dir-vs-symlink' into maint</title>
<updated>2017-01-17T23:11:08+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-01-17T23:11:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=aa83f7a2a4a677e9eca4a599f47e027ad06716d1'/>
<id>aa83f7a2a4a677e9eca4a599f47e027ad06716d1</id>
<content type='text'>
"git p4" misbehaved when swapping a directory and a symbolic link.

* ld/p4-compare-dir-vs-symlink:
  git-p4: avoid crash adding symlinked directory
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"git p4" misbehaved when swapping a directory and a symbolic link.

* ld/p4-compare-dir-vs-symlink:
  git-p4: avoid crash adding symlinked directory
</pre>
</div>
</content>
</entry>
<entry>
<title>git-p4: do not pass '-r 0' to p4 commands</title>
<updated>2016-12-29T21:54:05+00:00</updated>
<author>
<name>Igor Kushnir</name>
<email>igorkuo@gmail.com</email>
</author>
<published>2016-12-29T10:22:23+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=bc233524c96518c04650d297ad81a9c948fc2e41'/>
<id>bc233524c96518c04650d297ad81a9c948fc2e41</id>
<content type='text'>
git-p4 crashes when used with a very old p4 client version
that does not support the '-r &lt;number&gt;' option in its commands.

Allow making git-p4 work with old p4 clients by setting git-p4.retries to 0.

Alternatively git-p4.retries could be made opt-in.
But since only very old, barely maintained p4 versions don't support
the '-r' option, the setting-retries-to-0 workaround would do.

The "-r retries" option is present in Perforce 2012.2 Command Reference,
but absent from Perforce 2012.1 Command Reference.

Signed-off-by: Igor Kushnir &lt;igorkuo@gmail.com&gt;
Acked-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Reviewed-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-p4 crashes when used with a very old p4 client version
that does not support the '-r &lt;number&gt;' option in its commands.

Allow making git-p4 work with old p4 clients by setting git-p4.retries to 0.

Alternatively git-p4.retries could be made opt-in.
But since only very old, barely maintained p4 versions don't support
the '-r' option, the setting-retries-to-0 workaround would do.

The "-r retries" option is present in Perforce 2012.2 Command Reference,
but absent from Perforce 2012.1 Command Reference.

Signed-off-by: Igor Kushnir &lt;igorkuo@gmail.com&gt;
Acked-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Reviewed-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
