Commit Graph

430 Commits

Author SHA1 Message Date
Rocco Rutte
fb5cd150a6 hg2git.py: Map 'HEAD', 'default' and '' hg branches to 'master' in git
Also add a note where HEAD is comming from.

Signed-off-by: Rocco Rutte <pdmef@gmx.net>
2007-10-22 09:44:12 +02:00
Rocco Rutte
4cc1d7cf17 Allow for $PYTHON environment variable specifying python binary to use
Signed-off-by: Rocco Rutte <pdmef@gmx.net>
2007-10-22 09:34:40 +02:00
Scott Lamb
e1aa392c39 This prevents invalid command errors caused by bytes not being flushed to
git-fastimport in the same order as they were written to the buffer.

Signed-off-by: Scott Lamb <slamb@slamb.org>
2007-07-16 01:34:49 -07:00
Simon Hausmann
9f234284a7 Removed git-p4 from fast-export. It has been moved to git.git:contrib/fast-import.
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
2007-06-25 10:34:20 +02:00
Simon Hausmann
ee45a2dc49 Make it possible to specify the HEAD for the internal 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>
2007-06-22 00:01:57 +02:00
Simon Hausmann
01f691145c Added git-p4 branches command that shows the mapping of perforce depot paths to imported git branches.
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-20 23:10:28 +02:00
Simon Hausmann
82f6aacdb7 Warn about conflicting p4 branch mappings and use the first one found.
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-17 15:10:24 +02:00
Simon Hausmann
81313edcc0 Fix the branch mapping detection to be independent from the order of the "p4 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>
2007-06-17 11:25:59 +02:00
Benjamin Sergeant
6e1d41035f git-p4 fails when cloning a p4 depo.
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>
2007-06-16 22:06:06 +02:00
Simon Hausmann
5339c58a25 Fix initial multi-branch import.
The list of existing p4 branches in git wasn't initialized.
2007-06-16 13:09:21 +02:00
Marius Storm-Olsen
b6abe2d89a Only use double quotes on Windows 2007-06-12 15:27:52 +02:00
Simon Hausmann
46cfe91e74 Fix git-p4 rebase to detect the correct upstream branch instead of unconditionally
always rebasing on top of remotes/p4/master
2007-06-12 14:34:46 +02:00
Simon Hausmann
3f7d065721 Moved the code from git-p4 submit to figure out the upstream branch point
into a separate helper method.
2007-06-12 14:31:59 +02:00
Simon Hausmann
f04a1d52e9 git-p4 submit: Fix missing quotes around p4 commands to make them work with spaces in filenames
Noticed by Alex Riesen
2007-06-11 23:41:41 +02:00
Simon Hausmann
b595271340 Mention remotes/p4/master also in the documentation. 2007-06-11 23:30:23 +02:00
Simon Hausmann
1f1d1fd37d Provide some information for single branch imports where the commits go 2007-06-11 23:28:03 +02:00
Kevin Green
58739b4166 git-p4: check for existence of repo dir before trying to create
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>
2007-06-11 23:15:38 +02:00
Simon Hausmann
62d7323e48 Write out the options tag in the log message of imports only if we actually have
options
2007-06-11 10:01:58 +02:00
Simon Hausmann
d0b4b5c1ad Fix support for explicit disabling of syncing with the origin 2007-06-11 09:59:27 +02:00
Simon Hausmann
883791be16 Fix depot-paths encoding for multi-path imports (don't split up //depot/path/foo) 2007-06-11 08:54:45 +02:00
Simon Hausmann
753e5e80a0 Fix project name guessing 2007-06-11 08:50:57 +02:00
Simon Hausmann
1bc0c678f0 Fix updating/creating remotes/p4/* heads from origin/p4/* 2007-06-10 10:57:40 +02:00
Simon Hausmann
9689743e30 Fixed the check to make sure to exclude the HEAD symbolic refs when updating
the remotes/p4 branches from origin.
2007-06-10 00:22:30 +02:00
Han-Wen Nienhuys
9003c6a1e6 also strip p4/ from local imports. 2007-06-08 19:31:49 -03:00
Han-Wen Nienhuys
2710e51e06 Merge branch 'master' of git://repo.or.cz/fast-export 2007-06-08 18:19:23 -03:00
Han-Wen Nienhuys
8e26f9c2bb print error message when p4 print fails (eg. due to permission problems) 2007-06-08 18:19:16 -03:00
Simon Hausmann
f4b5d09a6a Only get the expensive branch mapping from the p4 server when not
syncing with the help of an origin remote (which we instead then use
to get new branches from).
2007-06-08 08:49:22 +02:00
Simon Hausmann
59a2926517 Make git-p4 submit detect the correct reference (origin) branch when
working with multi-branch imports.

Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-07 22:54:32 +02:00
Simon Hausmann
7f182ef1b0 Make clone behave like git clone by default again.
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-07 21:52:12 +02:00
Marius Storm-Olsen
853e41475e Exclude the HEAD symbolic ref from the list of known branches 2007-06-07 15:28:04 +02:00
Marius Storm-Olsen
275f02aadc Fix single branch import into remotes 2007-06-07 15:13:59 +02:00
Marius Storm-Olsen
553b6a4a99 Fix git-p4 clone (defaultDestination) 2007-06-07 15:08:33 +02:00
Marius Storm-Olsen
b7bf365514 Ensure that the commit message is Windows formated (CRLF) before invoking the editor.
(The default editor on Windows (Notepad) doesn't handle Unix line endings)

Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
2007-06-07 14:11:15 +02:00
Simon Hausmann
6ce8e50925 Fix depot-path determination for git-p4 submit 2007-06-07 13:10:20 +02:00
Simon Hausmann
a72cdbe18d Fix git-p4 submit 2007-06-07 13:09:14 +02:00
Simon Hausmann
bf109db2b2 Fix git-p4 rebase 2007-06-07 12:51:03 +02:00
Simon Hausmann
94d5e2bc84 Hack to make the multi-branch import work again with self.depotPaths now that
self.depotPath is gone
2007-06-07 09:41:53 +02:00
Simon Hausmann
afd960f59b Don't attempt to set the initialParent on multi-branch imports (useless).
At some point the code paths should be unified, but for now I need a working
git-p4 :)
2007-06-07 09:39:51 +02:00
Simon Hausmann
74b0014a7a Fix common path "calculation" from logs of multiple branches.
Need to use min instead of max for prev/cur to avoid out-of-bounds
string access. Also treat "i" as index of the last match instead of
a length because in case of a complete match of the two strings
i was off by one.
2007-06-07 09:37:13 +02:00
Simon Hausmann
51944c93af Fix support for "depot-path" in older git-p4 imports 2007-06-07 09:19:34 +02:00
Han-Wen Nienhuys
eb4a85cc97 look for 'text' and 'binary' files. 2007-06-05 20:29:59 -03:00
Han-Wen Nienhuys
97dabfacd8 thinko: really ignore deleted files. 2007-05-31 14:21:58 -03:00
Han-Wen Nienhuys
a196ae17a6 remove debug print 2007-05-31 12:40:24 -03:00
Han-Wen Nienhuys
f1d3db44f5 Cleanups & import into p4/master for local import
- import into master/local if --import-local is set

- use Die() for exiting

- if --verbose is set, raise Exception()

- use joined strings iso. `list` for progress printing
2007-05-31 12:38:30 -03:00
Han-Wen Nienhuys
449242bc4c use p4CmdList() to get file contents in Python dicts. This is more robust. 2007-05-31 11:29:25 -03:00
Han-Wen Nienhuys
6b6e82375b only run p4 print if necessary 2007-05-30 18:50:41 -03:00
Han-Wen Nienhuys
9261cdfd99 don't p4 print deleted files. 2007-05-30 17:33:18 -03:00
Han-Wen Nienhuys
afdbaf0593 read files before creating the commit. 2007-05-30 16:57:59 -03:00
Han-Wen Nienhuys
0be300b90e thinko. 2007-05-30 16:38:32 -03:00
Han-Wen Nienhuys
3c1c54742c store p4 user cache in home directory. 2007-05-30 16:35:32 -03:00