<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-p4.py, branch v2.25.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.25.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.25.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-01-02T20:38:29Z</updated>
<entry>
<title>Merge branch 'bk/p4-misc-usability'</title>
<updated>2020-01-02T20:38:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-01-02T20:38:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bc855232bcb14599890ddf8b97f7e94290f3a1f4'/>
<id>urn:sha1:bc855232bcb14599890ddf8b97f7e94290f3a1f4</id>
<content type='text'>
Miscellaneous small UX improvements on "git-p4".

* bk/p4-misc-usability:
  git-p4: show detailed help when parsing options fail
  git-p4: yes/no prompts should sanitize user text
</content>
</entry>
<entry>
<title>git-p4: show detailed help when parsing options fail</title>
<updated>2019-12-16T20:32:13Z</updated>
<author>
<name>Ben Keene</name>
<email>seraphire@gmail.com</email>
</author>
<published>2019-12-16T14:02:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=608e380502f754b50ead6c7e6c3f5ff5ee8eca33'/>
<id>urn:sha1:608e380502f754b50ead6c7e6c3f5ff5ee8eca33</id>
<content type='text'>
When a user provides invalid parameters to git-p4, the program
reports the failure but does not provide the correct command syntax.

Add an exception handler to the command-line argument parser to display
the command's specific command line parameter syntax when an exception
is thrown. Rethrow the exception so the current behavior is retained.

Signed-off-by: Ben Keene &lt;seraphire@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-p4: yes/no prompts should sanitize user text</title>
<updated>2019-12-16T20:31:47Z</updated>
<author>
<name>Ben Keene</name>
<email>seraphire@gmail.com</email>
</author>
<published>2019-12-16T14:02:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e2aed5fd5bfb0381a6f69373c01ef09d70467a5c'/>
<id>urn:sha1:e2aed5fd5bfb0381a6f69373c01ef09d70467a5c</id>
<content type='text'>
When prompting the user interactively for direction, the tests are
not forgiving of user input format.

For example, the first query asks for a yes/no response. If the user
enters the full word "yes" or "no" or enters a capital "Y" the test
will fail.

Create a new function, prompt(prompt_text) where
  * prompt_text is the text prompt for the user
  * returns a single character where valid return values are
      found by inspecting prompt_text for single characters
      surrounded by square brackets

This new function must  prompt the user for input and sanitize it by
converting the response to a lower case string, trimming leading and
trailing spaces, and checking if the first character is in the list
of choices. If it is, return the first letter.

Change the current references to raw_input() to use this new function.

Since the method requires the returned text to be one of the available
choices, remove the loop from the calling code that handles response
verification.

Thanks-to: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Ben Keene &lt;seraphire@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-p4: honor lfs.storage configuration variable</title>
<updated>2019-12-11T17:59:17Z</updated>
<author>
<name>r.burenkov</name>
<email>panzercheg@gmail.com</email>
</author>
<published>2019-12-11T17:47:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ea94b16fb832d6e0bc2fb8761fd4a89555002bcc'/>
<id>urn:sha1:ea94b16fb832d6e0bc2fb8761fd4a89555002bcc</id>
<content type='text'>
"git lfs" allows users to specify the custom storage location with
the configuration variable `lfs.storage`, but when interacting with
GitLFS pointers, "git p4" always uses the hardcoded default that is
the `.git/lfs/` directory, without paying attention to the
configuration.

Use the value configured in `lfs.storage`, if exists, as all the
"git" operations do, for consistency.

Signed-off-by: r.burenkov &lt;panzercheg@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-p4: auto-delete named temporary file</title>
<updated>2019-10-06T11:43:37Z</updated>
<author>
<name>Philip.McGraw</name>
<email>Philip.McGraw@bentley.com</email>
</author>
<published>2019-08-27T03:43:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=de5abb5f7a22fbb595fbc6ccb4a75bfad14396d3'/>
<id>urn:sha1:de5abb5f7a22fbb595fbc6ccb4a75bfad14396d3</id>
<content type='text'>
Avoid double-open exceptions on Windows platform when
calculating for lfs compressed size threshold
(git-p4.largeFileCompressedThreshold) comparisons.

Take new approach using the NamedTemporaryFile()
file-like object as input to the ZipFile() which
auto-deletes after implicit close leaving with scope.

Original code had double-open exception on Windows
platform because file still open from NamedTemporaryFile()
using generated filename instead of object.

Thanks to Andrey for patiently suggesting several
iterations on this change for avoiding exceptions!

Also print error details after resulting IOError to make
debugging cause of exception less mysterious when it has
nothing to do with "git version recent enough."

Signed-off-by: Philip.McGraw &lt;Philip.McGraw@bentley.com&gt;
Reviewed-by: Andrey Mazo &lt;ahippo@yandex.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>Merge branch 'am/p4-branches-excludes'</title>
<updated>2019-07-09T22:25:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-07-09T22:25:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=44275f5e1bef37304f5a9da65b588e344eb00a72'/>
<id>urn:sha1:44275f5e1bef37304f5a9da65b588e344eb00a72</id>
<content type='text'>
"git p4" update.

* am/p4-branches-excludes:
  git-p4: respect excluded paths when detecting branches
  git-p4: add failing test for "git-p4: respect excluded paths when detecting branches"
  git-p4: don't exclude other files with same prefix
  git-p4: add failing test for "don't exclude other files with same prefix"
  git-p4: don't groom exclude path list on every commit
  git-p4: match branches case insensitively if configured
  git-p4: add failing test for "git-p4: match branches case insensitively if configured"
  git-p4: detect/prevent infinite loop in gitCommitByP4Change()
</content>
</entry>
<entry>
<title>Merge branch 'mm/p4-unshelve-windows-fix'</title>
<updated>2019-06-17T17:15:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-06-17T17:15:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=add59c4708cd629a6ee3175f0e0a796cc9b6db28'/>
<id>urn:sha1:add59c4708cd629a6ee3175f0e0a796cc9b6db28</id>
<content type='text'>
The command line to invoke a "git cat-file" command from inside
"git p4" was not properly quoted to protect a caret and running a
broken command on Windows, which has been corrected.

* mm/p4-unshelve-windows-fix:
  p4 unshelve: fix "Not a valid object name HEAD0" on Windows
</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>git-p4: respect excluded paths when detecting branches</title>
<updated>2019-04-02T02:25:42Z</updated>
<author>
<name>Mazo, Andrey</name>
<email>amazo@checkvideo.com</email>
</author>
<published>2019-04-01T18:02:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d15068a6501bec72fddec9f79372a5e3ce5e1379'/>
<id>urn:sha1:d15068a6501bec72fddec9f79372a5e3ce5e1379</id>
<content type='text'>
Currently, excluded paths are only handled in the following cases:
 * no branch detection;
 * branch detection with using clientspec.

However, excluded paths are not respected in case of
branch detection without using clientspec.

Fix this by consulting the list of excluded paths
when splitting files across branches.

Signed-off-by: Andrey Mazo &lt;amazo@checkvideo.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
