Skip to content

Commit

Permalink
git-p4: move to toplevel
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Pete Wyckoff authored and gitster committed Apr 9, 2012
1 parent e8dde3e commit b6f9305
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
/git-name-rev
/git-mv
/git-notes
/git-p4
/git-pack-redundant
/git-pack-objects
/git-pack-refs
Expand Down
19 changes: 6 additions & 13 deletions Documentation/git-p4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ the updated p4 remote branch.

EXAMPLE
-------
* Create an alias for 'git p4', using the full path to the 'git-p4'
script if needed:
+
------------
$ git config --global alias.p4 '!git-p4'
------------

* Clone a repository:
+
------------
Expand Down Expand Up @@ -311,19 +304,19 @@ configuration file. This allows future 'git p4 submit' commands to
work properly; the submit command looks only at the variable and does
not have a command-line option.

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

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

The name of the client can be given to git-p4 in multiple ways. The
The name of the client can be given to 'git p4' in multiple ways. The
variable 'git-p4.client' takes precedence if it exists. Otherwise,
normal p4 mechanisms of determining the client are used: environment
variable P4CLIENT, a file referenced by P4CONFIG, or the local host name.
Expand Down
3 changes: 3 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ Issues of note:
use English. Under autoconf the configure script will do this
automatically if it can't find libintl on the system.

- Python version 2.6 or later is needed to use the git-p4
interface to Perforce.

- Some platform specific issues are dealt with Makefile rules,
but depending on your specific installation, you may not
have all the libraries/tools needed, or you may have
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ SCRIPT_PERL += git-send-email.perl
SCRIPT_PERL += git-svn.perl

SCRIPT_PYTHON += git-remote-testgit.py
SCRIPT_PYTHON += git-p4.py

SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
$(patsubst %.perl,%,$(SCRIPT_PERL)) \
Expand Down
1 change: 1 addition & 0 deletions command-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ git-mktree plumbingmanipulators
git-mv mainporcelain common
git-name-rev plumbinginterrogators
git-notes mainporcelain
git-p4 foreignscminterface
git-pack-objects plumbingmanipulators
git-pack-redundant plumbinginterrogators
git-pack-refs ancillarymanipulators
Expand Down
12 changes: 12 additions & 0 deletions contrib/fast-import/git-p4.README
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
The git-p4 script moved to the top-level of the git source directory.

Invoke it as any other git command, like "git p4 clone", for instance.

Note that the top-level git-p4.py script is now the source. It is
built using make to git-p4, which will be installed.

Windows users can copy the git-p4.py source script directly, possibly
invoking it through a batch file called "git-p4.bat" in the same folder.
It should contain just one line:

@python "%~d0%~p0git-p4.py" %*
1 change: 0 additions & 1 deletion contrib/fast-import/git-p4.bat

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion t/lib-git-p4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fi
test_done
}

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

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

0 comments on commit b6f9305

Please sign in to comment.