<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-p4.py, branch v2.20.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.20.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.20.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-10-16T04:28:49Z</updated>
<entry>
<title>git-p4: fully support unshelving changelists</title>
<updated>2018-10-16T04:28:49Z</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2018-10-15T11:14:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=89143ac28a61578487af7324c653a9efa5e40034'/>
<id>urn:sha1:89143ac28a61578487af7324c653a9efa5e40034</id>
<content type='text'>
The previous git-p4 unshelve support would check for changes
in Perforce to the files being unshelved since the original
shelve, and would complain if any were found.

This was to ensure that the user wouldn't end up with both the
shelved change delta, and some deltas from other changes in their
git commit.

e.g. given fileA:
      the
      quick
      brown
      fox

  change1: s/the/The/   &lt;- p4 shelve this change
  change2: s/fox/Fox/   &lt;- p4 submit this change
  git p4 unshelve 1     &lt;- FAIL

This change teaches the P4Unshelve class to always create a parent
commit which matches the P4 tree (for the files being unshelved) at
the point prior to the P4 shelve being created (which is reported
in the p4 description for a shelved changelist).

That then means git-p4 can always create a git commit matching the
P4 shelve that was originally created, without any extra deltas.

The user might still need to use the --origin option though - there
is no way for git-p4 to work out the versions of all of the other
*unchanged* files in the shelve, since this information is not recorded
by Perforce.

Additionally this fixes handling of shelved 'move' operations.

Signed-off-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-p4: unshelve into refs/remotes/p4-unshelved, not refs/remotes/p4/unshelved</title>
<updated>2018-10-16T04:28:49Z</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2018-10-15T11:14:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=088131273b7e781174eb1cffb7d4e0eb51066cba'/>
<id>urn:sha1:088131273b7e781174eb1cffb7d4e0eb51066cba</id>
<content type='text'>
The branch detection code looks for branches under refs/remotes/p4/...
and can end up getting confused if there are unshelved changes in
there as well. This happens in the function p4BranchesInGit().

Instead, put the unshelved changes into refs/remotes/p4-unshelved/&lt;N&gt;.

Signed-off-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-p4: do not fail in verbose mode for missing 'fileSize' key</title>
<updated>2018-10-12T13:38:29Z</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2018-10-12T05:28:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0742b7c860a4291868dec79b90a217db6b129d2b'/>
<id>urn:sha1:0742b7c860a4291868dec79b90a217db6b129d2b</id>
<content type='text'>
If deleting or moving a file, sometimes P4 doesn't report the file size.

The code handles this just fine but some logging crashes. Stop this
happening.

There was some earlier discussion on the list about this:

https://public-inbox.org/git/xmqq1sqpp1vv.fsf@gitster.mtv.corp.google.com/

Signed-off-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-p4: add the `p4-pre-submit` hook</title>
<updated>2018-08-01T20:37:18Z</updated>
<author>
<name>Chen Bin</name>
<email>chenbin.sh@gmail.com</email>
</author>
<published>2018-07-27T11:22:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=251c8c501faf7a7910edb7c9e19692988dcac6a8'/>
<id>urn:sha1:251c8c501faf7a7910edb7c9e19692988dcac6a8</id>
<content type='text'>
The `p4-pre-submit` hook is executed before git-p4 submits code.
If the hook exits with non-zero value, submit process not start.

Signed-off-by: Chen Bin &lt;chenbin.sh@gmail.com&gt;
Reviewed-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-p4: python3: fix octal constants</title>
<updated>2018-06-19T16:34:32Z</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2018-06-19T08:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=db2d997efa43596fe5860d1b1c0c410e99d96f67'/>
<id>urn:sha1:db2d997efa43596fe5860d1b1c0c410e99d96f67</id>
<content type='text'>
See PEP3127. Works fine with python2 as well.

Signed-off-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-p4: python3: use print() function</title>
<updated>2018-06-19T16:34:32Z</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2018-06-19T08:04:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f2606b1797fdffe40b00a6766ca1df6e1e0f3a60'/>
<id>urn:sha1:f2606b1797fdffe40b00a6766ca1df6e1e0f3a60</id>
<content type='text'>
Replace calls to print ... with the function form, print(...), to
allow use with python3 as well as python2.x.

Converted using 2to3 (and some hand-editing).

Signed-off-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-p4: python3: basestring workaround</title>
<updated>2018-06-19T16:34:32Z</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2018-06-19T08:04:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=efdcc99263871818cfe297a5a981d5841c77ebac'/>
<id>urn:sha1:efdcc99263871818cfe297a5a981d5841c77ebac</id>
<content type='text'>
In Python3, basestring no longer exists, so use this workaround.

Signed-off-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-p4: python3: remove backticks</title>
<updated>2018-06-19T16:34:32Z</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2018-06-19T08:04:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4d88519f6a2c7ea170f239a638137ce26d39cb11'/>
<id>urn:sha1:4d88519f6a2c7ea170f239a638137ce26d39cb11</id>
<content type='text'>
Backticks around a variable are a deprecated alias for repr().
This has been removed in python3, so just use the string
representation instead, which is equivalent.

Signed-off-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-p4: python3: replace dict.has_key(k) with "k in dict"</title>
<updated>2018-06-19T16:34:31Z</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2018-06-19T08:04:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dba1c9d9f26ac9fce55d0bfde8a040700fc9ff52'/>
<id>urn:sha1:dba1c9d9f26ac9fce55d0bfde8a040700fc9ff52</id>
<content type='text'>
Python3 does not have the dict.has_key() function, so replace all
such calls with "k in dict". This will still work with python2.6
and python2.7.

Converted using 2to3 (plus some hand-editing)

Signed-off-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-p4: python3: replace &lt;&gt; with !=</title>
<updated>2018-06-19T16:34:31Z</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2018-06-19T08:04:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fc35c9d5dc8fefbc29e9713e6b47eb4c19579d56'/>
<id>urn:sha1:fc35c9d5dc8fefbc29e9713e6b47eb4c19579d56</id>
<content type='text'>
The &lt;&gt; string inequality operator (which doesn't seem to be even
documented) no longer exists in python3. Replace with !=.

This still works with python2.

Signed-off-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
