Ross Lagerwall
cb8603510f
convert/git: catch errors from modern git-ls-remote (issue3428)
...
Since git v1.7.8.2-327-g926f1dd (the change was first released in git
1.7.10), git does not return non-zero when "git ls-remote --tags ..."
is run and the repository is damaged. This causes the "damaged
repository with missing commit" test in test-convert-git.t to
unexpectedly succeed.
Fix by aborting if git outputs any lines beginning with "error:",
which required adding some subprocess use in convert/git.py.
2013-02-08 08:02:57 -06:00
Bryan O'Sullivan
8f2116535a
convert: fix a too-long line nag
2012-11-13 13:09:42 -08:00
YaNan Xu
69a8b90589
convert: add support for converting git submodule (issue3528)
...
Previously, convert aborted upon encountering a git submodule. This patch
changes it so that it now succeeds. It modifies convert_git to manually generate
'.hgsub' and '.hgsubstate' files for each git revision, so as to convert git sub
modules to non-mercurial subrepositories.
2012-10-29 17:40:13 -07:00
Brodie Rao
a706d64a2c
cleanup: replace naked excepts with except Exception: ...
2012-05-12 16:02:46 +02:00
Brodie Rao
92158e04de
cleanup: "raise SomeException()" -> "raise SomeException"
2012-05-12 16:00:58 +02:00
Brodie Rao
d6a6abf2b0
cleanup: eradicate long lines
2012-05-12 15:54:54 +02:00
Matt Mackall
2cf26ea8f0
merge with stable
2012-03-27 16:17:46 -05:00
Edouard Gomez
da8b7a73ff
convert: support non annotated tags in git backend
...
Do not blindly filter out non ending ^{} tags. The new logic
is:
- if both "tag" and "tag^{}" exist, "tag^{}" is what we want
- if only "tag" exists, "tag" is fine
2012-03-14 01:13:45 +01:00
Augie Fackler
dcc437f837
convert/git: abort if git submodules are detected (issue2150)
...
This improves the error message when convert encounters a git
submodule. Now, instead of a git-cat-file error, we'll directly report
the lack of support for git submodules.
2012-03-24 22:13:17 -05:00
Augie Fackler
3fddb45056
hgext: replace uses of hasattr with util.safehasattr
2011-07-25 20:37:12 -05:00
Mads Kiilerich
9013069b41
convert: fix git convert on solaris - it cannot remove environment variables
2011-06-25 01:55:15 +02:00
timeless
925cd8ddf7
convert: fix error in git solaris code
2011-05-01 18:57:11 +02:00
Edouard Gomez
4060d3d548
convert: add bookmarks reading support to git backend
2011-03-25 01:38:43 +01:00
Martin Geisler
c27c54faec
clone, patch, convert: use hex(nullid) instead of '0'*40
2010-09-02 12:08:13 +02:00
Patrick Mezard
20f6d4cdf1
convert: merge sources getmode() into getfile()
2010-05-09 21:52:34 +02:00
Patrick Mezard
438c49a871
convert/git: check status when reading output stream
2010-04-25 23:07:46 +02:00
Patrick Mezard
7dba5c05ca
convert/git: check status when reading the whole output
2010-04-25 22:59:50 +02:00
Patrick Mezard
cadf5fd884
convert/git: rename gitcmd() into gitopen() for readability
2010-04-25 22:32:27 +02:00
Martin Geisler
9346f78d09
convert: mark strings for translation
2010-04-18 15:47:49 +02:00
Martin Geisler
540a354601
convert: write "repository" instead of "repo"
...
We should strive to avoid slang in our messages to the users.
2010-04-18 15:47:49 +02:00
Matt Mackall
8d99be19f0
many, many trivial check-code fixups
2010-01-25 00:05:27 -06:00
Matt Mackall
595d66f424
Update license to GPLv2+
2010-01-19 22:20:08 -06:00
Benoit Boissinot
04ba054816
convert: use set instead of dict
2009-05-17 03:04:17 +02:00
Richard Quirk
1652c239fa
Add committer tag only when needed in git conversion
...
Convert from a git repo added a committer: tag in the log message
even if the committer and the author were the same person.
2009-05-01 11:32:19 +02:00
Martin Geisler
393fa0bd51
convert: add copyright and license headers to back-ends
2009-04-26 01:47:44 +02:00
Peter Arrenbrecht
19591b6a8c
cleanup: drop unused assignments
2009-03-23 13:13:06 +01:00
Patrick Mezard
0147011be6
Merge with crew-stable
2008-10-26 14:02:32 +01:00
Patrick Mezard
844a06bfd6
convert: fix non-ASCII filenames retrieval from git sources (issue 1360)
2008-10-26 13:23:02 +01:00
Patrick Mezard
54f7c66fa0
convert: read git output in binary mode under Windows (issue 1359)
2008-10-23 14:05:11 +02:00
Edouard Gomez
bea37bac1c
convert: return remote branches in git source
...
When converting git repos, all stuff happening on branches
seems to be ignored.
This is caused by the fact a "git clone" of a remote git
repo has all its branches prefixed with "origin/". By
chance, the "origin/master" branch is always linked to a
local "master" branch. So getheads() returns only the
master head, and it ignores all the other heads.
Make sure getheads() returns all heads, forcing remote
branches to be return by git-rev-parse.
2008-10-19 00:32:23 +02:00
Dhruva Krishnamurthy
efe9469ff7
convert: use git executable only, with subcommands
...
The latest GIT has some changes in the way it is installed. Only the 'git'
executable need to be in the path. All other commands are treated as sub
commands of 'git'.
2008-07-24 22:44:15 +02:00
Alexis S. L. Carvalho
961a45df72
merge with crew-stable
2008-02-03 21:47:07 -02:00
Alexis S. L. Carvalho
99a2d5f75c
convert: use 'unknown' and '0 0' if commit author or date weren't specified
...
Closes issue873.
2008-02-03 21:03:46 -02:00
Alexis S. L. Carvalho
2e160ca8ff
merge with crew-stable
2007-11-09 21:24:25 -02:00
Alexis S. L. Carvalho
fe9d865e0d
convert: display all errors if we couldn't open the source repo
...
This should give the user a better hint of what's going wrong.
Improve some error messages. In particular, mention "CVS checkout" instead
of "CVS repo".
Fixes issue822 and issue826.
2007-11-09 20:21:35 -02:00
Patrick Mezard
90a7d714cf
Merge with crew-stable
2007-11-01 12:37:17 +01:00
Patrick Mezard
6aa1e21320
Fix Windows os.popen bug with interleaved stdout/stderr output
...
See python bug 1366 "popen spawned process may not write to stdout under windows" for more details.
2007-11-01 12:05:14 +01:00
Patrick Mezard
e3792eb143
convert: fail if an external required tool is not found
2007-10-30 22:14:15 +01:00
Patrick Mezard
2d81806ba5
convert: quote "^" to avoid windows using it as an escape char.
2007-10-06 21:19:06 +02:00
Alexis S. L. Carvalho
b7d48206ca
convert_git: add --filemap support
2007-10-04 23:21:37 -03:00
Alexis S. L. Carvalho
ddf41e005d
Merge with crew-stable
2007-09-24 19:14:18 -03:00
Alexis S. L. Carvalho
6f75c91b5f
convert_git: avoid returning two entries for the same file in getchanges
...
This could happen in merge changesets if the merged file was different
from both parents.
2007-09-24 19:00:11 -03:00
Patrick Mezard
c9e8914a18
Merge with crew-stable
2007-08-26 19:13:24 +02:00
Patrick Mezard
e0104ee85f
convert: fix /dev/null redirections under Windows
2007-08-26 19:05:19 +02:00
Patrick Mezard
5d54b971c7
Merge with crew-stable
2007-08-26 16:49:26 +02:00
Patrick Mezard
6202bc3003
convert: fix issue702 about GIT_DIR= construct unsupported under Windows.
2007-08-26 14:51:27 +02:00
Brendan Cully
e14b56ed31
convert: look up copies in getchanges instead of getcommit
...
svn: defer path expansion until getchanges to reduce latency, as well as memory
usage when converting incrementally.
2007-08-05 12:03:27 -07:00
Brendan Cully
ee2cc772b4
convert: record the source revision in the changelog
2007-07-13 08:28:57 -07:00
Brendan Cully
d2a6fef145
convert: move some code into common init function
2007-07-05 12:08:48 -07:00
Brendan Cully
0588c7805e
convert: call superclass init from engine init functions
2007-07-05 12:00:04 -07:00