aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Wyckoff <pw@padd.com>2012-04-08 20:18:00 -0400
committerJunio C Hamano <gitster@pobox.com>2012-04-09 14:59:40 -0700
commitb6f930576469052af87e96b549c37630b56aab93 (patch)
treea544a06b42479575fd794c3be5b27327762f8e3b
parente8dde3e5f9ddb7cf95a6ff3cea6cf07c3a2db80d (diff)
downloadgit-b6f930576469052af87e96b549c37630b56aab93.tar.gz
git-b6f930576469052af87e96b549c37630b56aab93.tar.xz
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 <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--.gitignore1
-rw-r--r--Documentation/git-p4.txt19
-rw-r--r--INSTALL3
-rw-r--r--Makefile1
-rw-r--r--command-list.txt1
-rw-r--r--contrib/fast-import/git-p4.README12
-rw-r--r--contrib/fast-import/git-p4.bat1
-rwxr-xr-xgit-p4.py (renamed from contrib/fast-import/git-p4)0
-rw-r--r--t/lib-git-p4.sh2
9 files changed, 25 insertions, 15 deletions
diff --git a/.gitignore b/.gitignore
index 87fcc5f6f..5a0782fe8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -92,6 +92,7 @@
/git-name-rev
/git-mv
/git-notes
+/git-p4
/git-pack-redundant
/git-pack-objects
/git-pack-refs
diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt
index b7c792971..3fac4137e 100644
--- a/Documentation/git-p4.txt
+++ b/Documentation/git-p4.txt
@@ -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:
+
------------
@@ -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.
diff --git a/INSTALL b/INSTALL
index 58b2b86cc..87e03bbfd 100644
--- a/INSTALL
+++ b/INSTALL
@@ -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
diff --git a/Makefile b/Makefile
index be1957a5e..df86f2f97 100644
--- a/Makefile
+++ b/Makefile
@@ -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)) \
diff --git a/command-list.txt b/command-list.txt
index a36ee9b01..38ec5f7b8 100644
--- a/command-list.txt
+++ b/command-list.txt
@@ -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
diff --git a/contrib/fast-import/git-p4.README b/contrib/fast-import/git-p4.README
new file mode 100644
index 000000000..cec5ecfa7
--- /dev/null
+++ b/contrib/fast-import/git-p4.README
@@ -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" %*
diff --git a/contrib/fast-import/git-p4.bat b/contrib/fast-import/git-p4.bat
deleted file mode 100644
index 9f97e884f..000000000
--- a/contrib/fast-import/git-p4.bat
+++ /dev/null
@@ -1 +0,0 @@
-@python "%~d0%~p0git-p4" %*
diff --git a/contrib/fast-import/git-p4 b/git-p4.py
index c5362c4c1..c5362c4c1 100755
--- a/contrib/fast-import/git-p4
+++ b/git-p4.py
diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh
index a870f9a5d..49edaaec0 100644
--- a/t/lib-git-p4.sh
+++ b/t/lib-git-p4.sh
@@ -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.