Simon Hausmann
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>
18 years ago
Simon Hausmann
33be3e6550
Fix conversion from old style heads/p4 to remotes/p4/master
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
341dc1c179
Improved output for multi branch imports and noted another little todo item
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
b1561ee256
Another (potentially life-saving) idea for submit --direct
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
24f7b53fdd
Had an idea for debugging, record it :)
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
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>
18 years ago
Simon Hausmann
c1b296b9f1
Added support for git-p4 submit --direct (experimental)
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
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>
18 years ago
Simon Hausmann
64ffb06a9c
Oops, not only /set/ gitdir on clone, also set it /correctly/ :)
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
59fa417109
Fix gitdir not being set when cloning. Needed for writing the p4 users cache.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
b607e71efd
Cache the output of "p4 users" for faster syncs on high latency links.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
9bda3a8556
Removed unused variable, more cleanups
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
71b112d4a4
More cleanups and speedups for labels and branches
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
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>
18 years ago
Simon Hausmann
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>
18 years ago
Simon Hausmann
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>
18 years ago
Simon Hausmann
4b97ffb1e4
Started rewriting the branch detection, based on "p4 branches" and "p4 branch -o foo".
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
66c6a9b559
Removed unused cache variables.
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
05094f987c
Fix branch setup after initial clone.
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
71bd9bacec
Removed todo item that is implemented :)
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
ef48f9093c
Added support for git-p4 sync/rebase --with-origin. See git-p4.txt for details :)
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
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>
18 years ago
Simon Hausmann
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>
18 years ago
Simon Hausmann
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>
18 years ago
Simon Hausmann
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>
18 years ago
Simon Hausmann
8a2820def4
Removed cleantags command. It doesn't have any meaning anymore.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
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>
18 years ago
Simon Hausmann
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>
18 years ago
Simon Hausmann
5c4153e488
Fixing syncing (gitdir discovery / cd) for bare repositories
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Johannes Schindelin
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>
18 years ago
Simon Hausmann
ca0affe7bb
A little todo note before I forget it :), based on a suggestion from Lars.
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
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>
18 years ago
Simon Hausmann
c3c4624451
Give a better hint if git-p4 submit fails
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
d336c15835
Added the possibility of skipping patches during git-p4 submit
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
81f2373f89
Make git-p4 work with bare repositories.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
cd6cc0d318
Fix git-p4 clone //depot/project (head import)
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Marius Storm-Olsen
95962f318e
Make the command call silent
...
Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
18 years ago
Simon Hausmann
42890f6291
Converted to unix newlines
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
25df95cce4
Make submitting work on Windows.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
caace11112
Make sure all popen calls use binary mode (for Windows) and
...
also make gitBranchExists work on Windows.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
ac1fde55a7
Added a little .bat wrapper from Marius
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
0848358055
Use the subprocess module instead of popen2 to make it work on Windows.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Shawn O. Pearce
d966e6aa66
Properly handle '0' filenames in import-tars
...
Randal L. Schwartz pointed out multiple times that we should be
testing the length of the name string here, not if it is "true".
The problem is the string '0' is actually false in Perl when we
try to evaluate it in this context, as '0' is 0 numerically and
the number 0 is treated as a false value. This would cause us
to break out of the import loop early if anyone had a file or
directory named "0".
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
18 years ago
Simon Hausmann
a844b7406f
Document some implementation details, for the curious... :)
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Johannes Schindelin
775477aa1d
Teach import-tars about GNU tar's @LongLink extension.
...
This extension allows GNU tar to process file names in excess of the 100
characters defined by the original tar standard. It does this by faking a
file, named '././@LongLink' containing the true file name, and then adding
the file with a truncated name. The idea is that tar without this
extension will write out a file with the long file name, and write the
contents into a file with truncated name.
Unfortunately, GNU tar does a lousy job at times. When truncating results
in a _directory_ name, it will happily use _that_ as a truncated name for
the file.
An example where this actually happens is gcc-4.1.2, where the full path
of the file WeThrowThisExceptionHelper.java truncates _exactly_ before the
basename. So, we have to support that ad-hoc extension.
This bug was noticed by Chris Riddoch on IRC.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
18 years ago
Simon Hausmann
2835925139
Cleanup, removed the old tagging code
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
8f8725314d
cleanup, renamed self.globalPrefix to self.depotPath
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
1c094184da
Micro cleanup
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
ff5dba20e3
Doc cleanups.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Junio C Hamano
d0c32b6339
Fix import-tars fix.
...
This heeds advice from our resident Perl expert to make sure
the script is not confused with a string that ends with /\n
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago