Simon Hausmann
5e100b5cd7
Make clone behave like git clone by default again.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Marius Storm-Olsen
c4b33253c2
Exclude the HEAD symbolic ref from the list of known branches
...
Signed-off-by: Marius Storm-Olsen <mstormo_git@storm-olsen.com>
18 years ago
Marius Storm-Olsen
db775559c2
Fix single branch import into remotes
...
Signed-off-by: Marius Storm-Olsen <mstormo_git@storm-olsen.com>
18 years ago
Marius Storm-Olsen
98ad4faf95
Fix git-p4 clone (defaultDestination)
...
Signed-off-by: Marius Storm-Olsen <mstormo_git@storm-olsen.com>
18 years ago
Marius Storm-Olsen
f7baba8b09
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>
18 years ago
Simon Hausmann
a52d5c7bc0
Fix depot-path determination for git-p4 submit
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
b0d10df77a
Fix git-p4 submit
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
68c4215306
Fix git-p4 rebase
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
6509e19cd1
Hack to make the multi-branch import work again with self.depotPaths now that
...
self.depotPath is gone
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
330f53b8d6
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 :)
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
583e170706
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.
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
845b42cb6c
Fix support for "depot-path" in older git-p4 imports
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Junio C Hamano
a6080a0a44
War on whitespace
...
This uses "git-apply --whitespace=strip" to fix whitespace errors that have
crept in to our source files over time. There are a few files that need
to have trailing whitespaces (most notably, test vectors). The results
still passes the test, and build result in Documentation/ area is unchanged.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
18 years ago
Han-Wen Nienhuys
7530a40ce2
look for 'text' and 'binary' files.
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
b1ce944726
thinko: really ignore deleted files.
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
b17f88b544
remove debug print
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
86dff6b676
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
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
d2c6dd30ef
use p4CmdList() to get file contents in Python dicts. This is more robust.
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
f2eda79f69
only run p4 print if necessary
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
982bb8a303
don't p4 print deleted files.
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
96e07dd23c
read files before creating the commit.
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
a3287be5bc
thinko.
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
183b8ef89b
store p4 user cache in home directory.
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
9320da8dd4
Thinko, fix buglet.
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
6a49f8e2e0
Read p4 files in one batch.
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
b86f73782e
remove global .gitdir
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
bb6e09b27a
Diverse cleanups
...
- print commands with \n
- extractDepotPathsAndChangeFromGitLog -> extractSettings, returning
dict.
- store keepRepoPath in [git-p4: ] line
- create a main() function, so git-p4 can be pychecked
- use --destination for clone destination. This simplifies logic
for --keep-path
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Shawn O. Pearce
2e4aef5893
Allow contrib new-workdir to link into bare repositories
...
On one particular system I like to keep a cluster of bare Git
repositories and spawn new-workdirs off of them. Since the bare
repositories don't have working directories associated with them
they don't have a .git/ subdirectory that hosts the repository we
are linking to.
Using a bare repository as the backing repository for a workdir
created by this script does require that the user delete core.bare
from the repository's configuration file, so that Git auto-senses
the bareness of a repository based on pathname information, and
not based on the config file.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago
Simon Hausmann
cfeb59be25
Fix typo in listExistingP4Branches that broke sync.
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
9226c03c32
In *_pipe print the command that failed if it fails.
...
Fixed old calls to mypopen.
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Han-Wen Nienhuys
6326aa5866
Extract multiple paths concurrently.
...
This enables importing just the interesting bits of large
repositories.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
4addad2291
add --verbose to all commands.
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
b25b20656d
use strip() iso. slicing for removing \n
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
b76f0565bf
use string.strip() iso. slicing.
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
8b41a97f8a
clone and sync --keep-path to keep perforce path to module.
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
6754a299d8
minor cleanups
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
bce4c5fc0b
cleanup
...
- use re.sub() iso. if for stripping ...
- spacing nits
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
b016d39756
Robustness fixes for pipes
...
- add read_pipe(), read_pipe_lines(), write_pipe(), which
check pipe.close()
- use throughout
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Simon Hausmann
c8cbbee980
Fix my email address, this isn't really KDE related :)
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Han-Wen Nienhuys
7cb5cbefd2
rename apply() to applyCommit(); apply is a python builtin
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
cebdf5af31
reformatting: break long lines.
...
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Han-Wen Nienhuys
ce6f33c835
Cleanups
...
- don't use dir (python builtin)
- use re for munging depotPath into destination
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
18 years ago
Simon Hausmann
a3c55c09ec
Fix creation of refs/remotes/p4/HEAD symbolic ref
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
cb4f1280dd
Added git-p4 submit --trust-me-like-a-fool for the adventurous users :)
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
877db584aa
Forgot to remove this TODO item when I made --with-origin the default :)
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
d414c74afd
Shortcut the case where we have no origin branch
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
01265103fe
Make --with-origin the default for syncing.
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
417a7a6fc8
Make --with-origin also work without origin :)
...
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
18 years ago
Simon Hausmann
4280e53333
Make git-p4 work with packed refs (don't use os.path.exists to check for the
...
existance of a ref)
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago
Simon Hausmann
65c5f3e3f2
Avoid creating non-p4 branches in remotes/p4 off of remotes/origin
...
Signed-off-by: Simon Hausmann <simon@lst.de>
18 years ago