Commit Graph

628 Commits

Author SHA1 Message Date
Brodie Rao
1833e73f70 convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354)
Given a commit author or message with non-ASCII characters in a darcs
repo, convert would raise a UnicodeEncodeError when adding changesets
to the hg changelog.

This happened because etree returns back unicode objects for any text
it can't encode into ASCII. convert was passing these objects to
changelog.add(), which would then attempt encoding.fromlocal() on
them.

This patch ensures converter_source.recode() is called on each piece
of commit data returned by etree.

(Also note that darcs is currently encoding agnostic and will print
out whatever is in a patch's metadata byte-for-byte, even in the XML
changelog.)
2010-09-10 09:30:50 -05:00
Martin Geisler
074f6b21a9 convert: help string cleanups 2010-09-10 00:36:01 +02:00
Martin Geisler
6765286f85 convert: better quoting in help text 2010-09-10 00:30:36 +02:00
Martin Geisler
e1be8b3f05 convert: show example splice, author, and branch map entries in help
Also document that

- empty lines are skipped and comment are supported in author map

- whitespace is not allowed in branch map entries since we split on it
  when parsing the file
2010-09-10 00:22:46 +02:00
Brodie Rao
5c97a02c1e convert: use encoding.encoding instead of locale.getpreferredencoding()
The latter may not return useful results in certain OS X environments.
2010-08-18 10:53:52 -04:00
Brodie Rao
e752297abf convert: properly set encoding for gnuarch converter 2010-08-18 10:53:50 -04:00
Martin Geisler
14ab4a3d21 convert: less shouting in SVN sink warning 2010-08-11 12:29:20 +02:00
Daniel J. Lauk
770d0f10a6 convert: Using --dest-type svn crashed, if the source repo used tags.
The convert extension requires puttags(self, tags) to return a sequence
for a multi-variable assignment.  If puttags implicitly returns None,
the code will break when trying to un-pack None for assignment.
2010-08-11 11:46:06 +02:00
timeless
4c60b4bbe9 convert/progress: use plural and avoid retrieving 2010-07-30 10:38:54 +03:00
Mads Kiilerich
337e489bbe convert: cleanup of filemap help text
Clarify that:
- Specified paths are matched by comparing name of file or directory.
- Line order (thus) doesn't matter.
- Rename doesn't imply include.
2010-07-08 15:44:14 +02:00
Martin Geisler
6e246c45aa p4: fix long line and bad spacing around % 2010-06-15 11:05:17 +02:00
Frank Kingswood
28f1de6e41 Fix shell quoting on p4 conversion 2010-06-14 16:38:36 +01:00
FUJIWARA Katsunori
ce06b102df help: show value requirement and multiple occurrence of options
this helps users to know what kind of option is:

  - no value is required(flag option)
  - value is required
  - value is required, and multiple occurrences are allowed

each kinds are shown as below:

 -f --force              force push
 -e --ssh CMD            specify ssh command to use
 -b --branch BRANCH [+]  a specific branch you would like to push

if one or more 3rd type options are shown, explanation for '[+]' mark
is also shown as footnote.
2010-06-06 17:25:00 +09:00
Patrick Mezard
b68b0fc427 Merge with crew-stable 2010-05-19 22:32:40 +02:00
Aaron Digulla
db9d4ddfda convert/svn: close gettags() log stream (issue2196) 2010-05-19 22:09:58 +02:00
Patrick Mezard
094ca2873a convert/svn: remove useless try/catch
While the try/catch was reintroduced in 05a88417e1cb, it was made useless by
the tags/ existence check in getheads().
2010-05-19 22:04:41 +02:00
Matt Mackall
e2dac1c52b convert/svn: fix long line 2010-05-12 14:49:46 -05:00
Benoit Boissinot
56bc6417ea merge with mpm 2010-05-11 20:22:37 +02:00
Patrick Mezard
d289b10ad0 convert/svn: report path discovery progress
When converting non-local repositories, scanning changed paths before
retrieving data can be almost as slow as retrieving the data itself, thanks to
HTTP calls overhead.
2010-05-09 22:51:25 +02:00
Patrick Mezard
ba463ef89c convert: display files data retrieval progress 2010-05-09 22:50:42 +02:00
Patrick Mezard
8c28124de1 convert: add progress support 2010-05-09 22:50:07 +02:00
Patrick Mezard
20f6d4cdf1 convert: merge sources getmode() into getfile() 2010-05-09 21:52:34 +02:00
Patrick Mezard
9b61bd6f00 convert/svn: remove useless sort 2010-05-09 21:49:57 +02:00
Patrick Mezard
6a90010ffe convert/svn: list files explicitely, stop checking their type
We do not care about directories when looking for recursively added or removed
items, and the redundant _checkpath() call is expensive with remote
repositories.
2010-05-09 21:45:00 +02:00
Patrick Mezard
0c57130de8 convert/svn: remove unused variable 2010-05-09 19:37:16 +02:00
Patrick Mezard
3cefb24597 convert/svn: handle files/links replaced by dirs (issue2166) 2010-05-09 19:11:02 +02:00
Patrick Mezard
c25c428f66 convert/svn: do not retrieve removed files
It gives us a way to not retrieve content of entries we know are no longer
files. And it is faster when converting remote repositories.
2010-05-09 19:11:02 +02:00
Patrick Mezard
1cb53b6a8f convert/svn: correctly encode deleted entry paths
This recode call was removed in 597805361f86, because it looked the
encode(decode()) construct was a no-op. In fact, the first decode() call was
wrong, and entries still have to be encoded before being passed to the sink.
2010-05-09 19:11:02 +02:00
Patrick Mezard
c5e014e3e0 convert/svn: remove broken but unused copy filtering code
For some reason, if a copy source is deleted in the same revision it is
referenced, it is filtered out. This is silly, because this happens all the
time with move operations. Fortunately, the filtering code is buggy and ends
being a no-op 99% of the time, since it does not delete the right key. Just
remove all this nonsense.
2010-05-09 19:11:02 +02:00
Matt Mackall
f37d605b14 clean up remaining generic exceptions 2010-05-07 16:59:00 -05:00
Patrick Mezard
ce447a0bd6 convert/svn: tree conflicts no longer happen now we use memctx 2010-05-01 16:29:27 +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
Brandon Parsons
dc54791a49 cvs: skip bad tags
If the CVS repo somehow has a symbolic name that references a revision
consisting of a single number (e.g. BAD_TAG: 1), convert will fail when
attempting to find the branches, preventing the initial import from
working.
This patch skips those symbolic names--without warning.
2010-03-04 14:32:01 -06:00
Martin Geisler
a6f1ed6804 convert: write "working copy" instead of "wc" 2010-04-18 15:47:49 +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
Patrick Mezard
4070a4e9d2 convert/subversion: fix default URL checker prototype 2010-04-12 21:19:53 +02:00
Mads Kiilerich
378848d5c1 convert.cvs: Initialize state variable and abort on cvs error
Fix as proposed by Frank Kingswood.

Avoids
UnboundLocalError: local variable 'mode' referenced before assignment
when cvs fails.

This alsa partially fixes issue1592.
2010-03-30 02:42:21 +02:00
Benoit Boissinot
12b6faccfd cvsps: fix traceback involving 'synthetic'
https://bugzilla.redhat.com/show_bug.cgi?id=573666
Reported by Sjoerd Mullender
2010-03-15 19:55:52 +01:00
Mathieu Clabaut
14e6714bd1 convert: teach cvsps to handle . repository (issue1649)
For a CVS repository checked out with "cvs co .", the prefix used to strip of
what we get from CVS was previously erroneously set to "repopath/.".
We now prevent the dot to be added.

Test folded in test-convert-cvs and simplified by Patrick Mézard
<pmezard@gmail.com>.
2010-03-09 12:09:57 +01:00
Patrick Mezard
5f49cde57a convert: handle svn tree with empty roots (issue2079) 2010-03-09 22:11:43 +01:00
Pierre-Yves David
31bf517562 Add ElementPath to the list of package ignored by demand import
The bzrlib try to import the ElementPath module but had a fallback in
case the import fails. Lazy import of this module leads to later
failure.

The bzrlib is used by the convert extension.
2010-03-01 14:15:55 +01:00
Benoit Boissinot
328394047f fix coding style (reported by pylint) 2010-02-08 15:36:34 +01:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Matt Mackall
cd3ef170f7 Merge with stable 2010-01-19 22:45:09 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Matt Mackall
2487655eb4 convert: make hg sink cleanup safer 2009-12-16 16:42:58 -06:00
Patrick Mezard
ceda6d3ffc convert/svn: better handling of hg recursive call failure 2009-12-14 22:09:49 +01:00