Age | Commit message (Collapse) | Author | Files | Lines |
|
The current git-p4 implementation does support file renames. However, because
it does not use the "p4 integrate" command, the history for the renamed file is
not linked to the new file.
This changeset adds support for perforce renames with the integrate command.
Currently this feature is only enabled when calling git-p4 submit with the -M
option. This is intended to look and behave similar to the "detect renames"
feature of other git commands.
The following sequence is used for renamed files:
p4 integrate -Dt x x'
p4 edit x'
rm x'
git apply
p4 delete x
By default, perforce will not allow an integration with a target file that has
been deleted. That is, if x' in the example above is the name of a previously
deleted file then perforce will fail the integrate. The -Dt option tells
perforce to allow the target of integrate to be a previously deleted file.
Signed-off-by: Chris Pettitt <cpettitt@gmail.com>
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
correctly revert to the previous state of the files using "p4 revert".
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
Given that git uses 'commit', git-p4's 'sumbit' was a bit confusing at times;
often making me do 'git submit' and 'git-p4 commit' instead.
Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
Acked-By: Simon Hausmann <simon@lst.de>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
* maint:
git-svn: don't attempt to spawn pager if we don't want one
Supplant the "while case ... break ;; esac" idiom
User Manual: add a chapter for submodules
user-manual: don't assume refs are stored under .git/refs
Detect exec bit in more cases.
Conjugate "search" correctly in the git-prune-packed man page.
Move the paragraph specifying where the .idx and .pack files should be
Documentation/git-lost-found.txt: drop unnecessarily duplicated name.
|
|
git-p4 was missing the execute bit setting if the file had other attribute
bits set.
Acked-By: Simon Hausmann <simon@lst.de>
|
|
branches.
If a change in a p4 "branch" appears that hasn't seen any previous commit and
that has a known branch mapping we now try to import it properly. First we
find the p4 change of the source branch that the new p4 branch is based on. Then
we using git rev-list --bisect to locate the corresponding git commit to that change.
Finally we import all changes in the new p4 branch up to the current change and resume
with the regular import.
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
ref (for example foo -> refs/remotes/p4/<project>/foo) into a separate method.
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
into a separate function, out of P4Sync.run.
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
used anywhere outside the function).
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
fast-import into a separate member function of P4Sync.
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
a list of given depot paths into a standalone method.
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
refs/remotes). Whether to rebase HEAD or not is still left as question to the end-user.
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
Acked-by: Marius Storm-Olsen <marius@trolltech.com>
Acked-by: Thiago Macieira <thiago@kde.org>
|
|
running git-p4 sync the first time after a git clone.
Don't create the p4/HEAD symbolic ref if p4/master doesn't exist yet.
Signed-off-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
|
from an origin-updated repository.
After a clone with "git clone" of a repository the p4 branches are only in remotes/origin/p4/* and not in remotes/p4/*.
Separate the code for detection and creation out of the P4Sync command class into standalone methods and use them
from the P4Branches command.
Signed-off-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
|
When performing a git-p4 clone operation on a Perforce repository,
where the changelists change in order of magnitude (e.g. 100 to 1000),
the set of changes to import from is not sorted properly. This is
because the data in the list is strings not integers. The other place
where this is done already converts the value to an integer, so it is
not affected.
Acked-by: Simon Hausmann <simon@lst.de>
|
|
submit template.
Parse the files section in the "p4 change -o" output and remove lines with file changes in unrelated depot paths.
Signed-off-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
|
Detect symlinks as file type, set the git file mode accordingly and strip off the trailing newline in the p4 print output.
Make the mode handling a bit more readable at the same time.
Signed-off-by: Simon Hausmann <simon@lst.de>
Acked-by: Brian Swetland <swetland@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
|
Python slices start at 0 by default.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
processing
P4 change outputs the changes sorted for each directory separately. We
want the global ordering on the changes, hence we sort.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
Fall back to USERPROFILE if HOME isn't set.
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
|
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
Don't use git name-rev to locate the upstream git-p4 branch for rebase and submit but instead locate the branch by comparing the depot paths.
name-rev may produce results like wrongbranch~12 as it uses the first match.
Signed-off-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
|
|
Signed-off-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
|
|
This approach, suggested by Alex Riesen, bypasses the need for xargs-style
argument list handling. The handling in question looks broken in a corner
case with SC_ARG_MAX=4096 and final argument over 96 characters.
Signed-off-by: Scott Lamb <slamb@slamb.org>
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
This allows bidirectional piping - useful for "-x -" to avoid commandline
arguments - and is a step toward bypassing the shell.
Signed-off-by: Scott Lamb <slamb@slamb.org>
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
Add condition for Windows, since it doesn't support the os.sysconf module.
We hardcode the commandline limit to 2K, as that should work on most
Windows platforms.
Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
Acked-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
findUpstreamBranchPoint function.
This isn't used right now in git-p4 but I use it in an external script that loads git-p4 as module.
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
|
|
to imported git branches.
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
branches" output.
Collect "unknown" source branches separately and register them at the end.
Also added a minor speed up to splitFilesIntoBranches by breaking out of the loop through all branches when it's safe.
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
A perforce command with all the files in the repo is generated to get
all the file content.
Here is a patch to break it into multiple successive perforce command
who uses 4K of parameter max, and collect the output for later.
It works, but not for big depos, because the whole perforce depo
content is stored in memory in P4Sync.run(), and it looks like mine is
bigger than 2 Gigs, so I had to kill the process.
[Simon: I added the bit about using SC_ARG_MAX, as suggested by Han-Wen]
Signed-off-by: Benjamin Sergeant <bsergean@gmail.com>
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
The list of existing p4 branches in git wasn't initialized.
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
|
|
Signed-off-by: Marius Storm-Olsen <mstormo_git@storm-olsen.com>
|
|
unconditionally
always rebasing on top of remotes/p4/master
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
|
|
into a separate helper method.
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
|
|
spaces in filenames
Noticed by Alex Riesen
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
When using git-p4 in this manner:
git-p4 clone //depot/path/project myproject
If "myproject" already exists as a dir, but not a valid git repo, it fails
to create the directory.
Signed-off-by: Kevin Green <Kevin.Green@morganstanley.com>
|
|
options
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
//depot/path/foo)
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
the remotes/p4 branches from origin.
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
|
|
|
|
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
|
|
syncing with the help of an origin remote (which we instead then use
to get new branches from).
Signed-off-by: Simon Hausmann <simon@lst.de>
|
|
working with multi-branch imports.
Signed-off-by: Simon Hausmann <simon@lst.de>
|