Simon Hausmann
90865adc01
A new attempt at fixing the child-fast-import-process-not-finished race condition
...
in the clone command
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-04-15 09:34:15 +02:00
Simon Hausmann
5e80dd4d7e
Slightly improved formatting of the raw_input questions.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-04-14 16:09:43 +02:00
Simon Hausmann
8b72ca0f76
Removed the old patch apply code from git-p4 submit.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-04-14 16:05:54 +02:00
Simon Hausmann
f291b4e3d4
Fix the timezone formatting. Now qgit also displays (parses) it correctly.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-04-14 11:21:50 +02:00
Simon Hausmann
fd4ca86a0b
Print an error message of some sort if git fast-import fails.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-04-13 22:21:10 +02:00
Simon Hausmann
80b5910fac
Allow for convenient rebasing after git-p4 submit
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-04-09 12:43:40 +02:00
Simon Hausmann
7243b350b3
Added a simple example of usage to the "documentation" :)
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-04-08 10:21:56 +02:00
Simon Hausmann
10c3211b81
fix variable usage (oops)
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-04-08 10:15:47 +02:00
Simon Hausmann
c45b1cfe1e
Fix file determination for #head imports
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-04-08 10:13:32 +02:00
Simon Hausmann
f9a3a4f796
Added git-p4 clone convenience command
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-04-08 10:08:26 +02:00
Simon Hausmann
68ed351ab5
Honor --silent for labels
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-04-08 09:00:55 +02:00
Simon Hausmann
cb53e1f8e9
Turn off potentially slow label detection by default
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-04-08 00:12:02 +02:00
Simon Hausmann
1f52af6c73
Provide a tree summary after git-p4 rebase
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-04-08 00:07:02 +02:00
Simon Hausmann
01ce1fe967
Added git-p4 rebase convenience
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-04-07 23:46:50 +02:00
Simon Hausmann
711544b00c
Clean up python class names.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-04-01 15:40:46 +02:00
Simon Hausmann
2a9489c024
Fix "compilation" :)
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-04-01 13:39:39 +02:00
Simon Hausmann
c9b50e6307
Fix the docs for git-p4 submit and turn git-p4 submit --master=foo into
...
simply git-p4 submit mytopicbranch.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-29 19:15:24 +02:00
Simon Hausmann
a46668faf7
Fix variable usage in tag import
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-28 17:05:38 +02:00
Simon Hausmann
1f4ba1cbfc
Added support for mapping p4 labels to git tags
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-26 22:34:34 +02:00
Simon Hausmann
8910ac0e88
git-p4 debug doesn't need a git repository
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-26 08:18:55 +02:00
Simon Hausmann
e20a9e530a
Don't try to parse any options with git-p4 debug but pass it straight on to p4
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-03-26 00:13:51 +02:00
Simon Hausmann
9863f4055e
Prefer git command over git-command.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-03-24 16:35:05 +01:00
Simon Hausmann
274917a3d6
Minor cosmetic fixlet for the git-p4 submit sync question.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-03-24 09:18:20 +01:00
Simon Hausmann
cb2c9db507
Different versions of p4 have different output for the where command ;(
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-03-24 09:15:11 +01:00
Simon Hausmann
967f72e21b
Use the new incremental import style by default
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
2007-03-23 09:30:41 +01:00
Simon Hausmann
9512497bcf
Make it possible to run git-p4 submit from within the git repository
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-23 09:16:07 +01:00
Simon Hausmann
179caebff4
Brand new smart incremental import that doesn't need tags or git repo-config :)
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-03-22 22:17:42 +01:00
Simon Hausmann
569d1bd409
Set the default branch in run, not in the constructor
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-03-22 21:34:16 +01:00
Simon Hausmann
8136a6399c
Helper function to check the existance of a revision
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-03-22 21:27:14 +01:00
Simon Hausmann
6ae8de88f5
Added some helper function(s) to parse the depot path and change number from the log message
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-03-22 21:10:25 +01:00
Simon Hausmann
f5816a5522
Changed the default branch for imports from "master" to "p4"
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-03-22 20:36:28 +01:00
Simon Hausmann
a559b289bd
Changed the format of the imported log message slightly, so that it's easier to parse again.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-03-22 20:27:41 +01:00
Simon Hausmann
e7f0d0d9b9
Removed the .py extension from git-p4 as it's annoying to type every time.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-22 09:15:32 +01:00
Simon Hausmann
53150250b1
Don't show the submit template and the diff first in less but show it in $editor right away
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-03-21 21:04:12 +01:00
Simon Hausmann
2061865005
Make it possible to invoke git-p4 from within subdirectories of a git working tree.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-21 13:05:30 +01:00
Simon Hausmann
1932a6ac7c
Made --apply-as-patch the default for git-p4 submit as it's significantly faster.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-21 11:01:18 +01:00
Simon Hausmann
5d0b6042d4
Fix support for deletions in git-p4 submit when using --apply-as-patch by filtering out deletions in the diff-tree output.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-21 10:57:54 +01:00
Simon Hausmann
04219c04b7
Added experimental but super-fast --apply-as-patch option to git-p4 submit
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-21 10:11:20 +01:00
Simon Hausmann
b4aa8d12b4
Documentation enhancements.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-03-21 08:27:33 +01:00
Simon Hausmann
0b69b46925
Start of the git-p4 documentation.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-20 22:41:00 +01:00
Simon Hausmann
c5fdcbcc20
Removed p4-fast-export and p4-git-sync as they've been integrated into git-p4 now.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-20 22:09:27 +01:00
Simon Hausmann
c715706b15
Fixed the initial version import by getting the file index correct by correctly skipping deleted files.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-20 21:13:49 +01:00
Simon Hausmann
0828ab1403
Added missing "self"s to make the script evaluate correctly.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-20 20:59:30 +01:00
Simon Hausmann
b984733c80
Completely untested "merge" of p4-fast-export.py into git-p4.py
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-20 20:54:23 +01:00
Simon Hausmann
05140f342e
sync-to-perforce is now called submit and fixed the gitdir check a little bit
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-20 18:32:47 +01:00
Simon Hausmann
83dce55af3
Part of the code is copyright by Trolltech ASA.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-19 22:26:36 +01:00
Simon Hausmann
4f5cf76a55
First (untested) attempt at migrating p4-git-sync into the final git-p4 script
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-19 22:25:17 +01:00
Simon Hausmann
c8c3911685
Provide a little bit of help description for the git-p4 "tools".
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-19 21:02:30 +01:00
Simon Hausmann
86949eef40
Start moving the git-p4 tools into one single script.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-19 20:59:12 +01:00
Simon Hausmann
95d27cb75d
Pass the right number of arguments to commit, fixes single-branch imports.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-19 12:04:37 +01:00
Simon Hausmann
09e16455e0
Improved the git dir detection.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-19 11:57:10 +01:00
Simon Hausmann
228d36c92b
Default to interactive syncing
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-16 13:47:46 +01:00
Simon Hausmann
f72537f97e
Use p4 revert ... instead of revert -a ... after submitting, to make sure the p4 checkout is clean.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-15 19:07:06 +01:00
Simon Hausmann
d566209e7f
Auto-detect the current git branch before submitting back to perforce.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-03-14 23:30:23 +01:00
Simon Hausmann
4d9e5fcea6
Ignore Apple resource files when importing from perforce to git.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-03-14 19:03:16 +01:00
Simon Hausmann
d7873afdf4
Be nice and use /usr/bin/env python for the git-p4 scripts
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-14 17:33:46 +01:00
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>
2007-03-14 17:31:47 +01:00
Simon Hausmann
09a14fb524
Lots of bugfixes to p4-git-sync.
...
Added interactive and dry-run mode.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-13 16:36:10 +01:00
Simon Hausmann
5aba82fd50
Fix git-dir option and allow reading log substitutions from a file
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-13 09:14:45 +01:00
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>
2007-03-12 23:00:34 +01:00
Simon Hausmann
4fe2ca17f7
Split up the cache commandline options into (command) cache and data cache.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-10 21:30:24 +01:00
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>
2007-03-10 21:23:49 +01:00
Simon Hausmann
43cc31e8a2
More work on branch detection by implementing changeIsBranchMerge().
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-10 17:46:49 +01:00
Simon Hausmann
85a8f1ac3b
More code cleanups and preparations for more branch detection heuristics.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-10 11:46:26 +01:00
Simon Hausmann
478764bc82
Minor code cleanups.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-03-10 10:53:07 +01:00
Simon Hausmann
59f1d2b52d
Make the p4 data/command cache configurable through the --cache-debug commandline option.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-03-10 10:25:34 +01:00
Simon Hausmann
a0f22e996c
Fixed p4-debug file extension.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-03-10 09:49:19 +01:00
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>
2007-03-08 21:34:40 +01:00
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>
2007-03-08 21:27:59 +01:00
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>
2007-03-07 19:58:54 +01:00
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>
2007-02-22 10:20:53 +01:00
Simon Hausmann
47e33ec082
More work in --silent support.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-02-22 09:22:36 +01:00
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>
2007-02-22 09:03:39 +01:00
Simon Hausmann
9c9fec3d28
Added p4 delete behavioural emulation as todo item.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-02-21 17:51:07 +01:00
Simon Hausmann
90dc3dfdc8
Fix single-branch imports by skipping the branch/merge detection correctly.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-02-18 01:18:22 +10:00
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>
2007-02-15 02:16:14 +10:00
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>
2007-02-14 17:13:17 +01:00
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>
2007-02-12 22:05:21 +01:00
Simon Hausmann
77083daac7
Set git fast-import marks for every imported change for future use.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-02-12 21:56:46 +01:00
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>
2007-02-12 21:44:02 +01:00
Simon Hausmann
dcacf8b447
More fixes in heuristic p4 branch detection based on common path components.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-02-12 21:41:45 +01:00
Simon Hausmann
766887e110
Started work on p4 branch detection (experimental!).
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-02-12 21:04:59 +01:00
Simon Hausmann
44b3add651
Code cleanups.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-02-12 20:28:58 +01:00
Simon Hausmann
12d04ca7da
Cleanups, remove unused variable.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-02-11 21:35:34 +01:00
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>
2007-02-11 18:04:39 +01:00
Simon Hausmann
f7d63b0c99
Added a little helper script to remove unused tags from the perforce import.
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
2007-02-10 10:26:03 +01:00
Simon Hausmann
fe2193183a
Changed the default git import branch from "p4" to "master".
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-02-10 10:05:51 +01:00
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>
2007-02-10 10:05:29 +01:00
Simon Hausmann
b41507a427
Minor code cleanups.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-02-10 09:25:22 +01:00
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>
2007-02-08 23:00:19 +01:00
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>
2007-02-08 15:53:11 +01:00
Simon Hausmann
7315866824
Catch io exceptions from git fast-import again and print the error message.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-02-08 15:45:16 +01:00
Simon Hausmann
1e30c07dfc
Fix calculation of the newest imported revision for #head imports.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
2007-02-07 23:51:51 +01:00
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>
2007-02-07 23:37:54 +01:00
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>
2007-02-07 23:25:56 +01:00
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>
2007-02-07 23:09:49 +01:00
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>
2007-02-07 22:57:01 +01:00
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>
2007-02-01 18:19:55 +01:00
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>
2007-02-01 17:42:23 +01:00
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>
2007-02-01 08:23:39 +01:00