<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/git.git/git-p4.py, branch fc/mergetools-vimdiff3</title>
<subtitle>github.com: git/git.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/'/>
<entry>
<title>git p4: fix an error message when "p4 where" fails</title>
<updated>2014-01-22T16:06:19+00:00</updated>
<author>
<name>Pete Wyckoff</name>
<email>pw@padd.com</email>
</author>
<published>2014-01-21T23:16:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=2000544330d5b047074d8043042f7cc66157f8f5'/>
<id>2000544330d5b047074d8043042f7cc66157f8f5</id>
<content type='text'>
When "p4 where" fails, for whatever reason, the error message tries to
show an undefined variable.  This minor bug applies only when using a
client spec, and was introduced recently in 9d57c4a (git p4: implement
view spec wildcards with "p4 where", 2013-08-30).

Signed-off-by: Pete Wyckoff &lt;pw@padd.com&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 "p4 where" fails, for whatever reason, the error message tries to
show an undefined variable.  This minor bug applies only when using a
client spec, and was introduced recently in 9d57c4a (git p4: implement
view spec wildcards with "p4 where", 2013-08-30).

Signed-off-by: Pete Wyckoff &lt;pw@padd.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>git p4: handle files with wildcards when doing RCS scrubbing</title>
<updated>2014-01-22T16:06:19+00:00</updated>
<author>
<name>Pete Wyckoff</name>
<email>pw@padd.com</email>
</author>
<published>2014-01-21T23:16:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=79467e61aa30342d7fb17232624ec5ade4cbbe6a'/>
<id>79467e61aa30342d7fb17232624ec5ade4cbbe6a</id>
<content type='text'>
Commit 9d7d446 (git p4: submit files with wildcards, 2012-04-29)
fixed problems with handling files that had p4 wildcard
characters, like "@" and "*".  But it missed one case, that of
RCS keyword scrubbing, which uses "p4 fstat" to extract type
information.  Fix it by calling wildcard_encode() on the raw
filename.

Signed-off-by: Pete Wyckoff &lt;pw@padd.com&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>
Commit 9d7d446 (git p4: submit files with wildcards, 2012-04-29)
fixed problems with handling files that had p4 wildcard
characters, like "@" and "*".  But it missed one case, that of
RCS keyword scrubbing, which uses "p4 fstat" to extract type
information.  Fix it by calling wildcard_encode() on the raw
filename.

Signed-off-by: Pete Wyckoff &lt;pw@padd.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>git p4 test: do not pollute /tmp</title>
<updated>2014-01-22T16:06:19+00:00</updated>
<author>
<name>Pete Wyckoff</name>
<email>pw@padd.com</email>
</author>
<published>2014-01-21T23:16:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=0cf1b72a38e6190a7e614bbc53fbb81704a3d4af'/>
<id>0cf1b72a38e6190a7e614bbc53fbb81704a3d4af</id>
<content type='text'>
Generating the submit template for p4 uses tempfile.mkstemp(),
which by default puts files in /tmp.  For a test that fails,
possibly on purpose, this is not cleaned up.  Run with TMPDIR
pointing into the trash directory so the temp files go away
with the test results.

To do this required some other minor changes.  First, the editor
is launched using system(editor + " " + template_file), using
shell expansion to build the command string.  This doesn't work
if editor has a space in it.  And is generally unwise as it's
easy to fool the shell into doing extra work.  Exec the args
directly, without shell expansion.

Second, without shell expansion, the trick of "P4EDITOR=:" used
in the tests doesn't work.  Use a real command, true, as the
non-interactive editor for testing.

Signed-off-by: Pete Wyckoff &lt;pw@padd.com&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>
Generating the submit template for p4 uses tempfile.mkstemp(),
which by default puts files in /tmp.  For a test that fails,
possibly on purpose, this is not cleaned up.  Run with TMPDIR
pointing into the trash directory so the temp files go away
with the test results.

To do this required some other minor changes.  First, the editor
is launched using system(editor + " " + template_file), using
shell expansion to build the command string.  This doesn't work
if editor has a space in it.  And is generally unwise as it's
easy to fool the shell into doing extra work.  Exec the args
directly, without shell expansion.

Second, without shell expansion, the trick of "P4EDITOR=:" used
in the tests doesn't work.  Use a real command, true, as the
non-interactive editor for testing.

Signed-off-by: Pete Wyckoff &lt;pw@padd.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>git p4: work around p4 bug that causes empty symlinks</title>
<updated>2014-01-22T16:05:04+00:00</updated>
<author>
<name>Pete Wyckoff</name>
<email>pw@padd.com</email>
</author>
<published>2014-01-21T23:16:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=40f846c35c504a1c2303be5dcca6db069a17b856'/>
<id>40f846c35c504a1c2303be5dcca6db069a17b856</id>
<content type='text'>
Damien Gérard highlights an interesting problem.  Some p4
repositories end up with symlinks that have an empty target.  It
is not possible to create this with current p4, but they do
indeed exist.

The effect in git p4 is that "p4 print" on the symlink returns an
empty string, confusing the curret symlink-handling code.

Such broken repositories cause problems in p4 as well, even with
no git involved.  In p4, syncing to a change that includes a
bogus symlink causes errors:

    //depot/empty-symlink - updating /home/me/p4/empty-symlink
    rename: /home/me/p4/empty-symlink: No such file or directory

and leaves no symlink.

In git, replicate the p4 behavior by ignoring these bad symlinks.
If, in a later p4 revision, the symlink happens to point to
something non-null, the symlink will be replaced properly.

Add a big test for all this too.

This happens to be a regression introduced by 1292df1 (git-p4:
Fix occasional truncation of symlink contents., 2013-08-08) and
appeared first in 1.8.5.  But it shows up only in p4 repositories
of dubious character, so can wait for a proper release.

Tested-by: Damien Gérard &lt;damien@iwi.me&gt;
Signed-off-by: Pete Wyckoff &lt;pw@padd.com&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>
Damien Gérard highlights an interesting problem.  Some p4
repositories end up with symlinks that have an empty target.  It
is not possible to create this with current p4, but they do
indeed exist.

The effect in git p4 is that "p4 print" on the symlink returns an
empty string, confusing the curret symlink-handling code.

Such broken repositories cause problems in p4 as well, even with
no git involved.  In p4, syncing to a change that includes a
bogus symlink causes errors:

    //depot/empty-symlink - updating /home/me/p4/empty-symlink
    rename: /home/me/p4/empty-symlink: No such file or directory

and leaves no symlink.

In git, replicate the p4 behavior by ignoring these bad symlinks.
If, in a later p4 revision, the symlink happens to point to
something non-null, the symlink will be replaced properly.

Add a big test for all this too.

This happens to be a regression introduced by 1292df1 (git-p4:
Fix occasional truncation of symlink contents., 2013-08-08) and
appeared first in 1.8.5.  But it shows up only in p4 repositories
of dubious character, so can wait for a proper release.

Tested-by: Damien Gérard &lt;damien@iwi.me&gt;
Signed-off-by: Pete Wyckoff &lt;pw@padd.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'cl/p4-use-diff-tree'</title>
<updated>2013-12-12T22:18:20+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-12-12T22:18:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=feb28ad0a87198b8ac0f2060dcfc8698bb1a67cf'/>
<id>feb28ad0a87198b8ac0f2060dcfc8698bb1a67cf</id>
<content type='text'>
* cl/p4-use-diff-tree:
  git p4: Use git diff-tree instead of format-patch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* cl/p4-use-diff-tree:
  git p4: Use git diff-tree instead of format-patch
</pre>
</div>
</content>
</entry>
<entry>
<title>git p4: Use git diff-tree instead of format-patch</title>
<updated>2013-11-22T23:30:51+00:00</updated>
<author>
<name>Crestez Dan Leonard</name>
<email>cdleonard@gmail.com</email>
</author>
<published>2013-11-21T15:19:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=109efbe4f24b1748f42af52ca6d528b2d7ffe048'/>
<id>109efbe4f24b1748f42af52ca6d528b2d7ffe048</id>
<content type='text'>
The output of git format-patch can vary with user preferences. In
particular setting diff.noprefix will break the "git apply" that
is done as part of "git p4 submit".

Acked-by: Pete Wyckoff &lt;pw@padd.com&gt;
Signed-off-by: Crestez Dan Leonard &lt;cdleonard@gmail.com&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 output of git format-patch can vary with user preferences. In
particular setting diff.noprefix will break the "git apply" that
is done as part of "git p4 submit".

Acked-by: Pete Wyckoff &lt;pw@padd.com&gt;
Signed-off-by: Crestez Dan Leonard &lt;cdleonard@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'ks/p4-view-spec'</title>
<updated>2013-09-18T18:44:50+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-09-18T18:44:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=34022ba21af3ec7d44b34a94cb8f2b3879c6c95c'/>
<id>34022ba21af3ec7d44b34a94cb8f2b3879c6c95c</id>
<content type='text'>
* ks/p4-view-spec:
  git p4: implement view spec wildcards with "p4 where"
  git p4 test: sanitize P4CHARSET
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* ks/p4-view-spec:
  git p4: implement view spec wildcards with "p4 where"
  git p4 test: sanitize P4CHARSET
</pre>
</div>
</content>
</entry>
<entry>
<title>git p4: implement view spec wildcards with "p4 where"</title>
<updated>2013-09-03T21:19:20+00:00</updated>
<author>
<name>Kazuki Saitoh</name>
<email>ksaitoh560@gmail.com</email>
</author>
<published>2013-08-30T10:02:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=9d57c4a6977997aa8150b333fbe2b88988e392d3'/>
<id>9d57c4a6977997aa8150b333fbe2b88988e392d3</id>
<content type='text'>
"git p4" does not support many of the view wildcards, such as * and
%%n.  It only knows the common ... mapping, and exclusions.

Redo the entire wildcard code around the idea of directly querying
the p4 server for the mapping.  For each commit, invoke "p4 where"
with committed file paths as args and use the client mapping to
decide where the file goes in git.

This simplifies a lot of code, and adds support for all wildcards
supported by p4.  Downside is that there is probably a 20%-ish
slowdown with this approach.

[pw: redo code and tests]

Signed-off-by: Kazuki Saitoh &lt;ksaitoh560@gmail.com&gt;
Signed-off-by: Pete Wyckoff &lt;pw@padd.com&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" does not support many of the view wildcards, such as * and
%%n.  It only knows the common ... mapping, and exclusions.

Redo the entire wildcard code around the idea of directly querying
the p4 server for the mapping.  For each commit, invoke "p4 where"
with committed file paths as args and use the client mapping to
decide where the file goes in git.

This simplifies a lot of code, and adds support for all wildcards
supported by p4.  Downside is that there is probably a 20%-ish
slowdown with this approach.

[pw: redo code and tests]

Signed-off-by: Kazuki Saitoh &lt;ksaitoh560@gmail.com&gt;
Signed-off-by: Pete Wyckoff &lt;pw@padd.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>git-p4: Fix occasional truncation of symlink contents.</title>
<updated>2013-08-12T17:10:46+00:00</updated>
<author>
<name>Alexandru Juncu</name>
<email>alexj@rosedu.org</email>
</author>
<published>2013-08-08T13:17:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=1292df11e8063442f911b2a4d0f7213f117d54d7'/>
<id>1292df11e8063442f911b2a4d0f7213f117d54d7</id>
<content type='text'>
Symlink contents in p4 print sometimes have a trailing
new line character, but sometimes it doesn't. git-p4
should only remove the last character if that character
is '\n'.

Signed-off-by: Alex Juncu &lt;ajuncu@ixiacom.com&gt;
Signed-off-by: Alex Badea &lt;abadea@ixiacom.com&gt;
Acked-by: Pete Wyckoff &lt;pw@padd.com&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>
Symlink contents in p4 print sometimes have a trailing
new line character, but sometimes it doesn't. git-p4
should only remove the last character if that character
is '\n'.

Signed-off-by: Alex Juncu &lt;ajuncu@ixiacom.com&gt;
Signed-off-by: Alex Badea &lt;abadea@ixiacom.com&gt;
Acked-by: Pete Wyckoff &lt;pw@padd.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>many small typofixes</title>
<updated>2013-07-29T19:32:25+00:00</updated>
<author>
<name>Ondřej Bílka</name>
<email>neleai@seznam.cz</email>
</author>
<published>2013-07-29T08:18:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=98e023dea40a0eca8a61c037dfc59aaf27f003a4'/>
<id>98e023dea40a0eca8a61c037dfc59aaf27f003a4</id>
<content type='text'>
Signed-off-by: Ondřej Bílka &lt;neleai@seznam.cz&gt;
Reviewed-by: Marc Branchaud &lt;marcnarc@xiplink.com&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>
Signed-off-by: Ondřej Bílka &lt;neleai@seznam.cz&gt;
Reviewed-by: Marc Branchaud &lt;marcnarc@xiplink.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
