<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-p4.py, branch v2.22.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.22.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.22.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-07-25T21:27:15Z</updated>
<entry>
<title>Merge branch 'sw/git-p4-unshelve-branched-files' into maint</title>
<updated>2019-07-25T21:27:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-07-25T21:27:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fe3ec21fb03e7d02d00fc845e7a7d3e692bb67a2'/>
<id>urn:sha1:fe3ec21fb03e7d02d00fc845e7a7d3e692bb67a2</id>
<content type='text'>
"git p4" update.

* sw/git-p4-unshelve-branched-files:
  git-p4: allow unshelving of branched files
</content>
</entry>
<entry>
<title>p4 unshelve: fix "Not a valid object name HEAD0" on Windows</title>
<updated>2019-05-28T20:32:20Z</updated>
<author>
<name>Mike Mueller</name>
<email>mike.mueller@moodys.com</email>
</author>
<published>2019-05-28T18:15:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c3f2358de39a8ac754ae68880a992835a84a6f0c'/>
<id>urn:sha1:c3f2358de39a8ac754ae68880a992835a84a6f0c</id>
<content type='text'>
git p4 unshelve was failing with these errors:

fatal: Not a valid object name HEAD0
Command failed: git cat-file commit HEAD^0

(git version 2.21.0.windows.1, python 2.7.16)

The pOpen call used by git-p4 to invoke the git command can take either a
string or an array as a first argument. The array form is preferred
because platform-specific escaping of special characters will be
handled automatically.(https://docs.python.org/2/library/subprocess.html)
The extractLogMessageFromGitCommit method was, however, using the string
form and so the caret (^) character in the HEAD^0 argument was not being
escaped on Windows.  The caret happens to be the escape character, which
is why the git command was receiving HEAD0.

The behaviour can be confirmed by typing ECHO HEAD^0 at the command-
prompt, which emits HEAD0.

The solution is simply to use the array format of passing the command to
fOpen, which is recommended and used in other parts of this code anyway.

Signed-off-by: Mike Mueller &lt;mike.mueller@moodys.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-p4: allow unshelving of branched files</title>
<updated>2019-05-28T17:54:42Z</updated>
<author>
<name>Simon Williams</name>
<email>simon@no-dns-yet.org.uk</email>
</author>
<published>2019-05-22T06:21:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0108f47eb30b9b473e044285b731e2fbca803170'/>
<id>urn:sha1:0108f47eb30b9b473e044285b731e2fbca803170</id>
<content type='text'>
When unshelving a changelist, git-p4 tries to work out the appropriate
parent commit in a given branch (default: HEAD).  To do this, it looks
at the state of any pre-existing files in the target Perforce branch,
omitting files added in the shelved changelist.  Currently, only files
added (or move targets) are classed as new.  However, files integrated
from other branches (i.e. a 'branch' action) also need to be considered
as added, for this purpose.

Signed-off-by: Simon Williams &lt;simon@no-dns-yet.org.uk&gt;
Acked-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ld/git-p4-shelve-update-fix'</title>
<updated>2019-02-05T22:26:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-02-05T22:26:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=40b8ba2c4458bd1ed6d32092712c07a4fc26e256'/>
<id>urn:sha1:40b8ba2c4458bd1ed6d32092712c07a4fc26e256</id>
<content type='text'>
"git p4" failed to update a shelved change when there were moved
files, which has been corrected.

* ld/git-p4-shelve-update-fix:
  git-p4: handle update of moved/copied files when updating a shelve
  git-p4: add failing test for shelved CL update involving move/copy
</content>
</entry>
<entry>
<title>git-p4: handle update of moved/copied files when updating a shelve</title>
<updated>2019-01-18T17:43:40Z</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2019-01-18T09:36:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7a10946ab9dd4692fc99d219f0cd4bc3d5e16d63'/>
<id>urn:sha1:7a10946ab9dd4692fc99d219f0cd4bc3d5e16d63</id>
<content type='text'>
Perforce requires a complete list of files being operated on. If
git is updating an existing shelved changelist, then any files
which are moved or copied were not being added to this list.

Signed-off-by: Luke Diamand &lt;luke@diamand.org&gt;
Acked-by: Andrey Mazo &lt;amazo@checkvideo.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-p4: fix problem when p4 login is not necessary</title>
<updated>2019-01-07T22:23:22Z</updated>
<author>
<name>Peter Osterlund</name>
<email>peterosterlund2@gmail.com</email>
</author>
<published>2019-01-07T20:51:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d4990d56a8dd64667df9daa5eedb8134ccc4356f'/>
<id>urn:sha1:d4990d56a8dd64667df9daa5eedb8134ccc4356f</id>
<content type='text'>
In a perforce setup where login is not required, communication fails
because p4_check_access does not understand the response from the p4
client. Fixed by detecting and ignoring the "info" response.

Signed-off-by: Peter Osterlund &lt;peterosterlund2@gmail.com&gt;
Acked-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: 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>
</feed>
