<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-p4.py, branch v2.18.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.18.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.18.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-06-18T17:18:41Z</updated>
<entry>
<title>Merge branch 'ld/git-p4-updates'</title>
<updated>2018-06-18T17:18:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-06-18T17:18:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e638899470621738f32ef75dc0a092f6475a4a6e'/>
<id>urn:sha1:e638899470621738f32ef75dc0a092f6475a4a6e</id>
<content type='text'>
"git p4" updates.

* ld/git-p4-updates:
  git-p4: auto-size the block
  git-p4: narrow the scope of exceptions caught when parsing an int
  git-p4: raise exceptions from p4CmdList based on error from p4 server
  git-p4: better error reporting when p4 fails
  git-p4: add option to disable syncing of p4/master with p4
  git-p4: disable-rebase: allow setting this via configuration
  git-p4: add options --commit and --disable-rebase
</content>
</entry>
<entry>
<title>git-p4: auto-size the block</title>
<updated>2018-06-12T21:46:09Z</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2018-06-08T20:32:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3deed5e078f2998573589b1ca03d89f41ea346e9'/>
<id>urn:sha1:3deed5e078f2998573589b1ca03d89f41ea346e9</id>
<content type='text'>
git-p4 originally would fetch changes in one query. On large repos this
could fail because of the limits that Perforce imposes on the number of
items returned and the number of queries in the database.

To fix this, git-p4 learned to query changes in blocks of 512 changes,
However, this can be very slow - if you have a few million changes,
with each chunk taking about a second, it can be an hour or so.

Although it's possible to tune this value manually with the
"--changes-block-size" option, it's far from obvious to ordinary users
that this is what needs doing.

This change alters the block size dynamically by looking for the
specific error messages returned from the Perforce server, and reducing
the block size if the error is seen, either to the limit reported by the
server, or to half the current block size.

That means we can start out with a very large block size, and then let
it automatically drop down to a value that works without error, while
still failing correctly if some other error occurs.

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: narrow the scope of exceptions caught when parsing an int</title>
<updated>2018-06-12T21:46:09Z</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2018-06-08T20:32:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8fa0abf830ef3c8e97846cef0986589b49bcfe6f'/>
<id>urn:sha1:8fa0abf830ef3c8e97846cef0986589b49bcfe6f</id>
<content type='text'>
The current code traps all exceptions around some code which parses an
integer, and then talks to Perforce.

That can result in errors from Perforce being ignored. Change the code
to only catch the integer conversion exceptions.

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: raise exceptions from p4CmdList based on error from p4 server</title>
<updated>2018-06-12T21:46:09Z</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2018-06-08T20:32:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=55bb3e3611c7b3f7bbbaf8d9ce98a4ed4196c3eb'/>
<id>urn:sha1:55bb3e3611c7b3f7bbbaf8d9ce98a4ed4196c3eb</id>
<content type='text'>
This change lays some groundwork for better handling of rowcount errors
from the server, where it fails to send us results because we requested
too many.

It adds an option to p4CmdList() to return errors as a Python exception.

The exceptions are derived from P4Exception (something went wrong),
P4ServerException (the server sent us an error code) and
P4RequestSizeException (we requested too many rows/results from the
server database).

This makes the code that handles the errors a bit easier.

The default behavior is unchanged; the new code is enabled with a flag.

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: better error reporting when p4 fails</title>
<updated>2018-06-12T21:46:09Z</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2018-06-08T20:32:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0ef67acdd784852ee8e86dcdb653cc290c1a77a3'/>
<id>urn:sha1:0ef67acdd784852ee8e86dcdb653cc290c1a77a3</id>
<content type='text'>
Currently when p4 fails to run, git-p4 just crashes with an obscure
error message.

For example, if the P4 ticket has expired, you get:

  Error: Cannot locate perforce checkout of &lt;path&gt; in client view

This change checks whether git-p4 can talk to the Perforce server when
the first P4 operation is attempted, and tries to print a meaningful
error message if it fails.

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 option to disable syncing of p4/master with p4</title>
<updated>2018-06-12T21:46:08Z</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2018-06-08T20:32:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b9d34db9a2108755ad01926cccc2a5007b5862a6'/>
<id>urn:sha1:b9d34db9a2108755ad01926cccc2a5007b5862a6</id>
<content type='text'>
Add an option to the git-p4 submit command to disable syncing
with Perforce.

This is useful for the case where a git-p4 mirror has been setup
on a server somewhere, running from (e.g.) cron, and developers
then clone from this. Having the local cloned copy also sync
from Perforce just isn't useful.

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: disable-rebase: allow setting this via configuration</title>
<updated>2018-06-12T21:46:08Z</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2018-06-08T20:32:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3b3477ea5ae0a443ecceaf588c41cbc937066260'/>
<id>urn:sha1:3b3477ea5ae0a443ecceaf588c41cbc937066260</id>
<content type='text'>
This just lets you set the --disable-rebase option with the
git configuration options git-p4.disableRebase. If you're
using this option, you probably want to set it all the time
for a given repo.

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 options --commit and --disable-rebase</title>
<updated>2018-06-12T21:45:16Z</updated>
<author>
<name>Romain Merland</name>
<email>merlorom@yahoo.fr</email>
</author>
<published>2018-06-01T07:46:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f55b87c1c748cdec7ce1631e6296e3edfd7cfc7d'/>
<id>urn:sha1:f55b87c1c748cdec7ce1631e6296e3edfd7cfc7d</id>
<content type='text'>
On a daily work with multiple local git branches, the usual way to
submit only a specified commit was to cherry-pick the commit on
master then run git-p4 submit.  It can be very annoying to switch
between local branches and master, only to submit one commit.  The
proposed new way is to select directly the commit you want to
submit.

Add option --commit to command 'git-p4 submit' in order to submit
only specified commit(s) in p4.

On a daily work developping software with big compilation time, one
may not want to rebase on his local git tree, in order to avoid long
recompilation.

Add option --disable-rebase to command 'git-p4 submit' in order to
disable rebase after submission.

Thanks-to: Cedric Borgese &lt;cedric.borgese@gmail.com&gt;
Reviewed-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Romain Merland &lt;merlorom@yahoo.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ld/p4-unshelve'</title>
<updated>2018-06-01T06:06:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-06-01T06:06:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=caf0c98c63ac4b79a3a2e3952863b68740face10'/>
<id>urn:sha1:caf0c98c63ac4b79a3a2e3952863b68740face10</id>
<content type='text'>
"git p4" learned to "unshelve" shelved commit from P4.

* ld/p4-unshelve:
  git-p4: add unshelve command
</content>
</entry>
<entry>
<title>git-p4: add unshelve command</title>
<updated>2018-05-23T23:58:28Z</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2018-05-23T22:20:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=123f631761dab8c37391ba1584122c2578f51923'/>
<id>urn:sha1:123f631761dab8c37391ba1584122c2578f51923</id>
<content type='text'>
This can be used to "unshelve" a shelved P4 commit into
a git commit.

For example:

  $ git p4 unshelve 12345

The resulting commit ends up in the branch:
   refs/remotes/p4/unshelved/12345

If that branch already exists, it is renamed - for example
the above branch would be saved as p4/unshelved/12345.1.

git-p4 checks that the shelved changelist is based on files
which are at the same Perforce revision as the origin branch
being used for the unshelve (HEAD by default). If they are not,
it will refuse to unshelve. This is to ensure that the unshelved
change does not contain other changes mixed-in.

The reference branch can be changed manually with the "--origin"
option.

The change adds a new Unshelve command class. This just runs the
existing P4Sync code tweaked to handle a shelved changelist.

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