1
0
mirror of https://github.com/git/git.git synced 2024-10-20 05:18:11 +02:00
Commit Graph

8 Commits

Author SHA1 Message Date
Luke Diamand
848de9c383 git-p4: warn if git authorship won't be retained
If the git commits you are submitting contain changes made by
other people, the authorship will not be retained. Change git-p4
to warn of this and to note that --preserve-user can be used
to solve the problem (if you have suitable permissions).
The warning can be disabled.

Add a test case and update documentation.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-13 12:59:13 -07:00
Luke Diamand
3ea2cfd488 git-p4: add option to preserve user names
Patches from git passed into p4 end up with the committer being identified
as the person who ran git-p4.

With "submit --preserve-user", git-p4 modifies the p4 changelist (after it
has been submitted), setting the p4 author field.

The submitter is required to have sufficient p4 permissions or git-p4
refuses to proceed. If the git author is not known to p4, the submit will
be abandoned unless git-p4.allowMissingP4Users is true.

Signed-off-by: Luke Diamand <luke@diamand.org>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-26 11:10:46 -07:00
Pete Wyckoff
27c6000b28 git-p4: test sync new branch
Add two new unit tests.  One to test the feature that that
was added in e32e00d, and another to test the regression
that was fixed in the parent to this commit.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-16 14:34:24 -07:00
Pete Wyckoff
f0c9fe0504 git-p4: test clone @all
Cloning a p4 depot by default generates a single commit.  The use
of the "@all" revision specifier instead tells git-p4 to import
all commits.  Check to make sure both these invocations work as
expected.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-13 00:06:25 -08:00
Pete Wyckoff
3820007694 git-p4: support clone --bare
Just like git clone --bare, build a .git directory but no
checked out files.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-By: Tor Arvid Lund <torarvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-21 10:05:44 -08:00
Pete Wyckoff
084f6306d4 git-p4: decode p4 wildcard characters
There are four wildcard characters in p4.  Files with these
characters can be added to p4 repos using the "-f" option.
They are stored in %xx notation, and when checked out, p4
converts them back to normal.

This patch does the same thing when importing into git,
converting the four special characters.  Without this change,
the files appear with literal %xx in their names.

Be careful not to produce "*" in filenames on windows.  That
will fail.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-21 09:58:38 -08:00
Pete Wyckoff
68b2859389 git-p4: fix key error for p4 problem
Some p4 failures result in an error, but the info['code'] is not
set.  These include a bad p4 executable, or a core dump from p4,
and other odd internal errors where p4 fails to generate proper
marshaled output.

Make sure the info key exists before using it to avoid a python
traceback.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-21 09:50:16 -08:00
Pete Wyckoff
d00d2ed1c5 git-p4: test script
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-21 09:49:27 -08:00