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
Johannes Schindelin
87859f3443
import-tars: be nice to wrong directory modes
...
Some tars seem to have modes 0755 for directories, not 01000755. Do
not generate an empty object for them, but ignore them.
Noticed by riddochc on IRC.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
18 years ago
Uwe Kleine-König
46f6178a3f
fix importing of subversion tars
...
add a / between the prefix and name fields of the tar archive if prefix
is non-empty.
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
18 years ago
Simon Hausmann
51a2640afd
Handle patch errors in git-p4 submit better.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
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>
18 years ago
Simon Hausmann
5e80dd4d7e
Slightly improved formatting of the raw_input questions.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
8b72ca0f76
Removed the old patch apply code from git-p4 submit.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
f291b4e3d4
Fix the timezone formatting. Now qgit also displays (parses) it correctly.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
fd4ca86a0b
Print an error message of some sort if git fast-import fails.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
80b5910fac
Allow for convenient rebasing after git-p4 submit
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
7243b350b3
Added a simple example of usage to the "documentation" :)
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
10c3211b81
fix variable usage (oops)
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
c45b1cfe1e
Fix file determination for #head imports
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
f9a3a4f796
Added git-p4 clone convenience command
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
68ed351ab5
Honor --silent for labels
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
cb53e1f8e9
Turn off potentially slow label detection by default
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
1f52af6c73
Provide a tree summary after git-p4 rebase
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
01ce1fe967
Added git-p4 rebase convenience
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
711544b00c
Clean up python class names.
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
2a9489c024
Fix "compilation" :)
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
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>
18 years ago
Simon Hausmann
a46668faf7
Fix variable usage in tag import
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
1f4ba1cbfc
Added support for mapping p4 labels to git tags
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
Simon Hausmann
8910ac0e88
git-p4 debug doesn't need a git repository
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
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>
18 years ago
Simon Hausmann
9863f4055e
Prefer git command over git-command.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
274917a3d6
Minor cosmetic fixlet for the git-p4 submit sync question.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
cb2c9db507
Different versions of p4 have different output for the where command ;(
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
967f72e21b
Use the new incremental import style by default
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
9512497bcf
Make it possible to run git-p4 submit from within the git repository
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago
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>
18 years ago
Simon Hausmann
569d1bd409
Set the default branch in run, not in the constructor
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
8136a6399c
Helper function to check the existance of a revision
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
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>
18 years ago
Simon Hausmann
f5816a5522
Changed the default branch for imports from "master" to "p4"
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
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>
18 years ago
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>
18 years ago
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>
18 years ago
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>
18 years ago
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>
18 years ago
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>
18 years ago
Simon Hausmann
04219c04b7
Added experimental but super-fast --apply-as-patch option to git-p4 submit
...
Signed-off-by: Simon Hausmann <hausmann@kde.org>
18 years ago