66a2f52395
Catch p4 errors in rollback early enough (before deleting refs!)
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-23 23:40:48 +02:00
ac3e0d79ee
Oops, fill the /list/ correct with the p4 exit code.
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-23 23:32:32 +02:00
a6d5da36af
Don't make len(p4Cmd("p4 changes -m 1 //foo/...")) == 0 succeed when the p4 command itself failed.
...
When the p4 command failed write out the exit code in the returned dict.
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-23 23:29:01 +02:00
0c66a78393
Make rollback work with locally imported branches
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-23 20:07:57 +02:00
65d2ade95e
Avoid calling git symbolic-ref refs/heads/p4//HEAD (double slash)
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-23 16:41:46 +02:00
a396b29267
Doc updates
...
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-23 00:33:34 +02:00
57284050a8
Use refs/heads/* instead of refs/heads/p4/* for local imports
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-23 00:15:50 +02:00
01a9c9c5a8
Added support for --max-changes=<count> to ease import debugging
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-23 00:07:35 +02:00
a028a98e9a
Added support for importing multiple branches into refs/heads instead of just refs/remotes
...
using --import-local. Needs some further microfix but seems to work otherwise.
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-23 00:03:08 +02:00
52102d4784
Fixes for rollback, delete branches that did not exist at the specified p4 change
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-21 23:44:24 +02:00
af8da89cb7
Fix branch detection in multi-branch imports
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-21 23:25:51 +02:00
5834684d51
Added a rollback command for debugging. It sets back the heads of the p4 branches to the specified p4 change number or earlier.
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-21 22:57:06 +02:00
7944f1425c
Make git-p4 submit --direct safer by also creating a git commit
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-21 11:04:26 +02:00
cbf5efa61a
Detect with git-p4 submit --direct when there are no changes in the working directory
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-21 10:08:11 +02:00
faf1bd2026
Fix git symbolic-ref warning on initial clone
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-21 10:05:30 +02:00
dc52403696
Fix error detection with git-p4 submit when the requested depot path is not in the client view.
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-21 09:34:56 +02:00
33be3e6550
Fix conversion from old style heads/p4 to remotes/p4/master
...
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-21 08:44:16 +02:00
56d99c67d1
Update bash completion to ignore some more plumbing commands
...
[sp: Modified Jonas' original patch to keep checkout-index
as a a valid completion.]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk >
Signed-off-by: Shawn O. Pearce <spearce@spearce.org >
2007-05-21 02:09:26 -04:00
341dc1c179
Improved output for multi branch imports and noted another little todo item
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-21 00:39:16 +02:00
b1561ee256
Another (potentially life-saving) idea for submit --direct
...
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-20 23:52:51 +02:00
24f7b53fdd
Had an idea for debugging, record it :)
...
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-20 23:42:22 +02:00
8a5fc95b43
Specifying --detect-branches is now only needed for the initial clone/sync.
...
Afterwards it's turned on implicitly if more p4 branches than remotes/p4/master
are found.
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-20 23:39:40 +02:00
c1b296b9f1
Added support for git-p4 submit --direct (experimental)
...
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-20 16:55:05 +02:00
47a130b7bf
Use git format-patch and git apply --apply when extracting patches from git and
...
applying them to a Perforce checkout. This should make it possible to apply git
commits with binary files that cannot be handled by path.
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-20 16:33:21 +02:00
64ffb06a9c
Oops, not only /set/ gitdir on clone, also set it /correctly/ :)
...
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-20 15:24:01 +02:00
59fa417109
Fix gitdir not being set when cloning. Needed for writing the p4 users cache.
...
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-20 15:15:34 +02:00
b607e71efd
Cache the output of "p4 users" for faster syncs on high latency links.
...
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-20 10:55:54 +02:00
9bda3a8556
Removed unused variable, more cleanups
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-19 12:05:40 +02:00
71b112d4a4
More cleanups and speedups for labels and branches
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-19 11:54:11 +02:00
d5904674d1
Cleanup/speed up the branch<> file split and removed change range limitation that I added
...
for debugging (oops).
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-19 11:07:32 +02:00
29bdbac1cd
More work on the incremental importing of multiple branches.
...
Improved error detection by checking the exit code of git-fast-import.
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-19 10:23:12 +02:00
8f9b2e082b
Give branches a nice project prefix and don't bail out on clone if we failed
...
to detect the master branch.
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-18 22:13:26 +02:00
4b97ffb1e4
Started rewriting the branch detection, based on "p4 branches" and "p4 branch -o foo".
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-18 21:45:23 +02:00
66c6a9b559
Removed unused cache variables.
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-18 20:39:38 +02:00
05094f987c
Fix branch setup after initial clone.
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-18 20:32:35 +02:00
71bd9bacec
Removed todo item that is implemented :)
...
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-17 22:22:26 +02:00
ef48f9093c
Added support for git-p4 sync/rebase --with-origin. See git-p4.txt for details :)
...
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-17 22:17:49 +02:00
48df6fd850
Bite the bullet and automatically convert old style refs/heads/p4 repositories
...
to the new style refs/remotes/p4 branching.
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-17 21:18:53 +02:00
c6d44cb1a1
Changed the default p4 import branch to be refs/remotes/p4/{HEAD,master}
...
instead of refs/heads/p4.
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-17 20:57:05 +02:00
8ead4fda3f
Create the origin based import branch using git update-ref instead of git branch
...
so that it's possible to have the import branch in refs/remotes.
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-17 20:26:58 +02:00
1c9d393d30
Removed ancient and unused code to find the last imported revision from previous imports
...
to use for the current import by looking at the p4 tags. The current approach of using
the log message works better.
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-17 20:15:47 +02:00
8a2820def4
Removed cleantags command. It doesn't have any meaning anymore.
...
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-17 19:44:50 +02:00
463e8af655
Clean up code duplication for revision parsing and fix previous commit to not
...
import into remotes/p4 (yet!).
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-17 09:13:54 +02:00
f9162f6a4c
Always pass a sha1 for the initial parent so that git-fast-import doesn't think
...
it's creating a new branch from itself. It's a sensible error in general but
in the case of incremental imports we have to apply force :)
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-17 09:09:05 +02:00
5c4153e488
Fixing syncing (gitdir discovery / cd) for bare repositories
...
Signed-off-by: Simon Hausmann <simon@lst.de >
2007-05-17 07:42:38 +02:00
fdcb769916
Merge branch 'maint'
...
* maint:
format-patch: add MIME-Version header when we add content-type.
Fixed link in user-manual
import-tars: Use the "Link indicator" to identify directories
git name-rev writes beyond the end of malloc() with large generations
Documentation/branch: fix small typo in -D example
2007-05-16 12:43:05 -07:00
df8cfac815
import-tars: Use the "Link indicator" to identify directories
...
Earlier, we used the mode to determine if a name was associated with
a directory. This fails, since some tar programs do not set the mode
correctly. However, the link indicator _has_ to be set correctly.
Noticed by Chris Riddoch.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
Acked-by: Junio C Hamano <junkio@cox.net >
Signed-off-by: Shawn O. Pearce <spearce@spearce.org >
2007-05-16 14:54:22 -04:00
ca0affe7bb
A little todo note before I forget it :), based on a suggestion from Lars.
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-16 13:15:34 +02:00
dc1a93b6dc
Fix calling git-p4 rebase from within a subdirectory (git rebase wants to be in toplevel)
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-16 12:12:39 +02:00
c3c4624451
Give a better hint if git-p4 submit fails
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com >
2007-05-16 09:43:13 +02:00