Commit Graph

50 Commits

Author SHA1 Message Date
Greg Ward
2a117f0e09 convert/cvs: improve error message on unexpected server output. 2009-07-08 22:08:45 -04:00
Alejandro Santos
77d606ac51 compat: use open() instead of file() everywhere 2009-07-05 11:01:30 +02:00
Patrick Mezard
82ffe82eb9 convert: deprecate external cvsps, to be removed in 1.4 2009-05-24 16:27:56 +02:00
Martin Geisler
e8bc5f4f01 util: remove ignored mode argument in popen[23] 2009-05-09 17:32:57 +02:00
Martin Geisler
393fa0bd51 convert: add copyright and license headers to back-ends 2009-04-26 01:47:44 +02:00
Matt Mackall
2f9b02c62d replace util.sort with sorted built-in
This is marginally faster for small and moderately-sized lists
2009-04-26 16:50:44 -05:00
Patrick Mezard
71875461a3 convert/cvs: add an option to disable remote log caching
Useful for debugging or testing when using --tmpdir.
2009-04-26 16:30:37 +02:00
Patrick Mezard
d34099656d convert/cvs: delay CVS log parsing after initialization (issue1581/2)
Source and destination constructors should be fast so configurations issues are
hit quickly, including authentication and filemap/authormap/splicemap issues.
Delaying might be a problem if the remove side disconnects idle connections
while the log is being read. It did not happen when converting openafs
repository, where log retrieval took at least 10mn.
2009-04-11 21:17:11 +02:00
Peter Arrenbrecht
a2d3e23eef cleanup: drop variables for unused return values
They are unnecessary. I did leave them in localrepo.py where there is
something like:

  _junk = foo()
  _junk = None

to free memory early. I don't know if just `foo()` will free the return
value as early.
2009-03-23 13:13:02 +01:00
Patrick Mezard
1620a3ec34 Merge with crew-stable 2008-12-14 18:13:41 +01:00
Frank Kingswood
e9b2b07250 convert-cvs: correctly handle Removed replies, fixes bug 1427 2008-12-11 13:33:35 +00:00
Benoit Boissinot
193deb723b convert/cvs: do not compare None with int 2008-12-06 15:40:04 +01:00
Thomas Arendsen Hein
efbb4bc0d2 Improvement to 14ce129cfcd: Use try/except and pass filename on errors
Without the second part, the error message would be
  abort: Is a directory
instead of
  abort: Is a directory: /home/user/.cvspass
2008-11-28 11:38:41 +01:00
Edouard Gomez
88835d384f convert: check existence of ~/.cvspass before reading it 2008-11-27 10:13:20 +01:00
Mads Kiilerich
b9c26e8467 convert cvs: Fix branch name parsing
cvsps version 2.2b1 as found in Fedora 10 outputs the following format:
---------------------
PatchSet 1
Date: 2008/11/26 00:59:46
Author: mk
Branch: HEAD
Tag: (none)
Branches: INITIAL
Log:
Initial revision

Members:
	a:INITIAL->1.1
	b/c:INITIAL->1.1

---------------------

The parser overwrote the Branch value with noise from the misparsed Branches
value.
2008-11-27 22:04:51 +01:00
Dirkjan Ochtman
67bd09df5b python2.6: use subprocess if available 2008-10-05 21:35:26 +02:00
Patrick Mezard
71877ea8d9 convert: make built-in cvsps the default
Reviewed by Frank Kingswood <frank@kingswood-consulting.co.uk>
2008-10-15 20:14:28 +02:00
Martin Geisler
a791bcac31 i18n: mark strings for translation in convert extension 2008-08-31 16:12:02 +02:00
Patrick Mezard
49cd301d4b Merge with crew-stable 2008-07-20 21:51:13 +02:00
Martin OConnor
8a6ec085df Bug:1201 hg convert on CVS working copy produces Traceback
Fix identified by frank@kingswood-consulting.co.uk

Changed usage fron os.environ["HOME"] to expanduser("~/.cvspass") as
this is the
 only usage of this construct in mercurial sources.
2008-06-25 19:41:43 +01:00
Matt Mackall
a65ef7bc5d util: add sort helper 2008-06-27 18:28:45 -05:00
Frank Kingswood
6c0cfe8797 convert: cvs.py - Allow user to use built-in CVS changeset code.
tests: add two testcases for CVS conversion with builtin CVS
including a testcase for issue 1148.
2008-06-15 16:05:46 +01:00
Eric Hopper
40e06fccb8 convert: Add convert.cvsps option to set up an alternate cvsps command line. 2008-03-17 12:41:14 -07:00
Matt Mackall
11a373ad95 convert: try to be smarter about CVS branching
Better handles this case:

The output from cvsps -A -u --cvs-direct -q:
---------------------
PatchSet 1
Date: 2008/02/08 20:33:28
Author: fk
Branch: HEAD
Tag: (none)
Log:
initial

Members:
         file_one:INITIAL->1.1

---------------------
PatchSet 2
Date: 2008/02/08 20:33:32
Author: fk
Branch: branch_name
Ancestor branch: HEAD
Tag: (none)
Log:
new file on branch

Members:
         file_two:1.1->1.1.2.1
2008-02-11 16:16:05 -06:00
Thomas Arendsen Hein
ddce807d45 merge with crew-stable 2008-01-22 00:55:01 +01:00
Thomas Arendsen Hein
76157ccf47 CVS convert: Find correct parent for new branch (issue704)
Previously the parent was determined by the last changeset where the branched
file was changed even if the branch is based on an earlier revision.
Fix written by mpm.
2008-01-22 00:16:50 +01:00
Kostantinos Koukopoulos
9810930c5b convert should use default value when CVS_RSH is not set, that value
being 'ssh'.
2008-01-15 13:29:59 +02:00
Patrick Mezard
a9e1f119ec convert: read CVS files in chunks (issue 800)
socket.makefile() fails on large read requests (more than 10MB) with MemoryError.
2007-11-18 17:25:28 +01: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
Alexis S. L. Carvalho
df6f43b4df convert_cvs: add --filemap support 2007-10-04 23:21:37 -03:00
Patrick Mezard
d24e36a450 Merge with crew-stable 2007-09-14 23:10:41 +02:00
Patrick Mezard
8577cf36be convert: workaround for cvsps.cache under Windows
In non-cygwin environment, cvsps fails to create its cache directory and redirect its output to stderr. Just ignore the error and capture stderr as well.
2007-09-14 22:17:53 +02:00
Patrick Mezard
7d74b8608f convert: fix remote cvs file paths separator 2007-09-14 22:17:53 +02:00
Patrick Mezard
fc230fc7bd convert: avoid interpreting Windows path as CVS connection strings.
CVS connection strings regexp detect colons to separate protocols from path and login. Unfortunately, Windows paths contains colons and were interpreted as rsh connection strings.
2007-09-14 22:17:53 +02:00
Patrick Mezard
93f1b14c12 convert: call popen2 in binary mode, with a command string. 2007-09-14 22:17:53 +02:00
Brendan Cully
54828484dd convert: raise Abort instead of NoRepo when CVS pserver auth fails.
At this point we know the source is CVS, so we should not go through
the rest of the converters.
2007-08-15 14:38:18 -07:00
Thomas Arendsen Hein
8a25464ce3 merge with crew-stable 2007-08-07 15:57:23 +02:00
Thomas Arendsen Hein
b9ea9bfdb1 CVS import: Support new-style .cvspass-file format.
Based on an email from Ralf.Leibold at nuance dot com
2007-08-07 15:56:26 +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
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
Brendan Cully
7b9fcd8629 convert: move *** empty log message *** into commit class 2007-07-01 19:40:02 -07:00
Brendan Cully
ee1924281e convert: add -r argument specifying latest revision to convert 2007-07-01 15:02:15 -07:00
Brendan Cully
4ac9754fb4 convert: ove recode method into converter_source 2007-07-01 12:58:08 -07:00
Eric Hopper
bb53a2c70f convert: handle new cvsps with Tags: and multiple tags. 2007-06-24 07:22:58 -07:00
Brendan Cully
76de3f4dbc Split convert extension into common and repository type modules 2007-06-10 20:08:47 -07:00