Skip to content

Commit b6f9305

Browse files
Pete Wyckoffgitster
authored andcommitted
git-p4: move to toplevel
Move git-p4 out of contrib/fast-import into the main code base, aside other foreign SCM tools. Signed-off-by: Pete Wyckoff <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e8dde3e commit b6f9305

File tree

9 files changed

+25
-15
lines changed

9 files changed

+25
-15
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
/git-name-rev
9393
/git-mv
9494
/git-notes
95+
/git-p4
9596
/git-pack-redundant
9697
/git-pack-objects
9798
/git-pack-refs

Documentation/git-p4.txt

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ the updated p4 remote branch.
3131

3232
EXAMPLE
3333
-------
34-
* Create an alias for 'git p4', using the full path to the 'git-p4'
35-
script if needed:
36-
+
37-
------------
38-
$ git config --global alias.p4 '!git-p4'
39-
------------
40-
4134
* Clone a repository:
4235
+
4336
------------
@@ -311,19 +304,19 @@ configuration file. This allows future 'git p4 submit' commands to
311304
work properly; the submit command looks only at the variable and does
312305
not have a command-line option.
313306

314-
The full syntax for a p4 view is documented in 'p4 help views'. Git-p4
307+
The full syntax for a p4 view is documented in 'p4 help views'. 'Git p4'
315308
knows only a subset of the view syntax. It understands multi-line
316309
mappings, overlays with '+', exclusions with '-' and double-quotes
317-
around whitespace. Of the possible wildcards, git-p4 only handles
318-
'...', and only when it is at the end of the path. Git-p4 will complain
310+
around whitespace. Of the possible wildcards, 'git p4' only handles
311+
'...', and only when it is at the end of the path. 'Git p4' will complain
319312
if it encounters an unhandled wildcard.
320313

321314
Bugs in the implementation of overlap mappings exist. If multiple depot
322315
paths map through overlays to the same location in the repository,
323-
git-p4 can choose the wrong one. This is hard to solve without
324-
dedicating a client spec just for git-p4.
316+
'git p4' can choose the wrong one. This is hard to solve without
317+
dedicating a client spec just for 'git p4'.
325318

326-
The name of the client can be given to git-p4 in multiple ways. The
319+
The name of the client can be given to 'git p4' in multiple ways. The
327320
variable 'git-p4.client' takes precedence if it exists. Otherwise,
328321
normal p4 mechanisms of determining the client are used: environment
329322
variable P4CLIENT, a file referenced by P4CONFIG, or the local host name.

INSTALL

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ Issues of note:
131131
use English. Under autoconf the configure script will do this
132132
automatically if it can't find libintl on the system.
133133

134+
- Python version 2.6 or later is needed to use the git-p4
135+
interface to Perforce.
136+
134137
- Some platform specific issues are dealt with Makefile rules,
135138
but depending on your specific installation, you may not
136139
have all the libraries/tools needed, or you may have

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ SCRIPT_PERL += git-send-email.perl
440440
SCRIPT_PERL += git-svn.perl
441441

442442
SCRIPT_PYTHON += git-remote-testgit.py
443+
SCRIPT_PYTHON += git-p4.py
443444

444445
SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
445446
$(patsubst %.perl,%,$(SCRIPT_PERL)) \

command-list.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ git-mktree plumbingmanipulators
7676
git-mv mainporcelain common
7777
git-name-rev plumbinginterrogators
7878
git-notes mainporcelain
79+
git-p4 foreignscminterface
7980
git-pack-objects plumbingmanipulators
8081
git-pack-redundant plumbinginterrogators
8182
git-pack-refs ancillarymanipulators

contrib/fast-import/git-p4.README

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
The git-p4 script moved to the top-level of the git source directory.
2+
3+
Invoke it as any other git command, like "git p4 clone", for instance.
4+
5+
Note that the top-level git-p4.py script is now the source. It is
6+
built using make to git-p4, which will be installed.
7+
8+
Windows users can copy the git-p4.py source script directly, possibly
9+
invoking it through a batch file called "git-p4.bat" in the same folder.
10+
It should contain just one line:
11+
12+
@python "%~d0%~p0git-p4.py" %*

contrib/fast-import/git-p4.bat

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.

t/lib-git-p4.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fi
1313
test_done
1414
}
1515

16-
GITP4="$GIT_BUILD_DIR/contrib/fast-import/git-p4"
16+
GITP4="$GIT_BUILD_DIR/git-p4"
1717

1818
# Try to pick a unique port: guess a large number, then hope
1919
# no more than one of each test is running.

0 commit comments

Comments
 (0)