Simon Hausmann
d7873afdf4
Be nice and use /usr/bin/env python for the git-p4 scripts
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
794a913a00
Automatically operate on a temporary branch, needed for cherry-pick to work when applying changes to
...
files that are deleted in the future.
Also do some Perforce cleaning
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
09a14fb524
Lots of bugfixes to p4-git-sync.
...
Added interactive and dry-run mode.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
5aba82fd50
Fix git-dir option and allow reading log substitutions from a file
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
0bcff6121d
First version of a new script to submit changes back to perforce from git repositories.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
4fe2ca17f7
Split up the cache commandline options into (command) cache and data cache.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
dd87020bd3
Reduce the number of false "merges" by skipping "branch from" entries in the integrated output as well as by ignoring integrations of future (newer) changes.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
43cc31e8a2
More work on branch detection by implementing changeIsBranchMerge().
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
85a8f1ac3b
More code cleanups and preparations for more branch detection heuristics.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
478764bc82
Minor code cleanups.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
59f1d2b52d
Make the p4 data/command cache configurable through the --cache-debug commandline option.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
a0f22e996c
Fixed p4-debug file extension.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
934371385c
Changed --known-branches to take a file as argument instead of a comma separated list.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
3ef674bd4b
Work in progress on detecting branches.
...
Added a disk-cache p4 output so debugging imports is faster.
Added --known-branches commandline option for pre-defining branches.
Various other fixes...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
6392a40e5e
Adjust the output parsing of git name-rev to handle the output of the latest git version.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
5ea919de22
Don't print a plain newline at the end of the execution (avoids bogus cron error mails).
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
47e33ec082
More work in --silent support.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
161958cc2f
Added support for --silent so that p4-fast-export can be called from cronjobs.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
9c9fec3d28
Added p4 delete behavioural emulation as todo item.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Michael Loeffler
c750da256a
Use gunzip -c over gzcat in import-tars example.
...
Not everyone has gzcat or bzcat installed on their system, but
gunzip -c and bunzip2 -c perform the same task and are available
if the user has installed gzip support or bzip2 support.
Signed-off-by: Michael Loeffler <zvpunry@zvpunry.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
18 years ago
Simon Hausmann
90dc3dfdc8
Fix single-branch imports by skipping the branch/merge detection correctly.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
f1e9b5345e
Use sets.Set() instead of set() to run also with older versions of Python.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
0563a4538a
Make it possible to specify the p4 changes to import through a text file (for debugging) and made various improvements to the branch/merge heuristic detection.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
930d3cc94e
When trying to map p4 integrations to git merges just record it as a single merge with the newest p4 change as secondary parent.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
77083daac7
Set git fast-import marks for every imported change for future use.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
53b03239aa
After marking a p4 branch as merged don't ever merge it in git again.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
dcacf8b447
More fixes in heuristic p4 branch detection based on common path components.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
766887e110
Started work on p4 branch detection (experimental!).
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
44b3add651
Code cleanups.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Michael Loeffler
d63ea11594
import-tars: brown paper bag fix for file mode.
...
There is a bug with this $git_mode variable which should be 0644
or 0755, but nothing else I think.
Signed-off-by: Michael Loeffler <zvpunry@zvpunry.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
18 years ago
Simon Hausmann
12d04ca7da
Cleanups, remove unused variable.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
fc21f8a1da
Create lightweight git tags (using the "reset" trick) for the incremental import instead of full-blown ones. Also fix parsing the output of git name-rev for figuring out the last imported p4 change number.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
f7d63b0c99
Added a little helper script to remove unused tags from the perforce import.
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
fe2193183a
Changed the default git import branch from "p4" to "master".
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
8718f3ec9a
Avoid the excessive use of git tags for every perforce change and instead just create one git tag for the last imported change.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
b41507a427
Minor code cleanups.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
20c7bc76b9
Added a little helper script to debug the output of the p4 python interface.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Shawn O. Pearce
590dd4bfd2
tar archive frontend for fast-import.
...
This is an example fast-import frontend, in less than 100 lines
of Perl. It accepts one or more tar archives on the command line,
passes them through gzcat/bzcat/zcat if necessary, parses out the
individual file headers and feeds all contained data to fast-import.
No temporary files are involved.
Each tar is treated as one commit, with the commit timestamp coming
from the oldest file modification date found within the tar.
Each tar is also tagged with an annotated tag, using the basename
of the tar file as the name of the tag.
Currently symbolic links and hard links are not handled by the
importer. The file checksums are also not verified.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
18 years ago
Simon Hausmann
c9c527d7b6
Made the name of the git branch used for the perforce import configurable through a new --branch=<name> commandline option.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
7315866824
Catch io exceptions from git fast-import again and print the error message.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
1e30c07dfc
Fix calculation of the newest imported revision for #head imports.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
23efd2545b
Make specifying the revision ranges more convenient.
...
Added support for @all as revision range specifier to import all changes to a given depot path.
Also default to an import of #head if no revrange is specified.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
1cd573866a
Make incremental imports easier to use by storing the p4 depot path after an import in .git/config and re-using it when we're invoked again later.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
e3d37cf098
Fixed incremental imports by using the correct "from" command instead of "merge" with git fast-import.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
c4cf2d4f87
Minor cleanups and print an error message of git fast-import if it fails.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
6d48d12f5d
Initial support for importing a directory from Perforce at a specified revision.
...
Use p4 files //depot/path/...@revision to determine the state of the project and create a "fake" git commit from it.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
68f1336fe3
Code cleanups, move the code to create a commit with fast-import into a separate function out of the main loop.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
f16255f559
Simplify the incremental import by elimination the need for a temporary import branch.
...
It turns out that git fast-import can "resume" from an existing branch just fine.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
61b3cf7c47
Started working on incremental imports from Perforce.
...
Try to find the last imported p4 change number from the git tags and try to pass the right parent for commits to git fast-import.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
79799d52b2
Fix file permissions of p4-fast-export.py to be executable.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago