Commit Graph

655 Commits

Author SHA1 Message Date
Martin Geisler
77ce66fb6a check-code: find trailing whitespace 2010-10-20 10:13:04 +02:00
timeless
2c0786a591 convert: kill trailing whitespace 2010-10-20 10:07:38 +02:00
timeless
4edbb771f8 convert: fix typo in comment 2010-10-20 10:02:54 +02:00
Matt Mackall
b37df2f50a merge with stable 2010-10-12 16:25:38 -05:00
Brodie Rao
c97e40185c convert/darcs: support changelogs with bytes 0x7F-0xFF (issue2411)
This is a followup to dd4fb29994d3, which only fixed the conversion of
patches with UTF-8 metadata.

This patch allows a changelog to have any bytes with values
0x7F-0xFF. It parses the XML changelog as Latin-1 and uses
converter_source.recode() to decode the data as UTF-8/Latin-1.

Caveats:

- Since the convert extension doesn't provide any way to specify the
  source encoding, users are still limited to UTF-8 and Latin-1.

- etree will still complain if the changelog has bytes with values
  0x00-0x19. XML only allows printable characters.
2010-10-01 10:15:04 -05:00
Patrick Mezard
42663f256e convert/darcs: improve unsupported format detection (issue2172) 2010-09-24 00:04:07 +02:00
Patrick Mezard
979ccf4590 Use lexists() instead of exists() where appropriate 2010-09-20 21:46:56 +02:00
Patrick Mezard
0988572cc6 convert/svn: fix broken symlink renames in svn sink 2010-09-20 21:46:39 +02:00
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
Matt Mackall
51b3b09c8f backout most of 26e0b9a8ce0d 2010-09-24 12:46:54 -05:00
Patrick Mezard
bb3259c957 Merge with stable 2010-09-24 00:17:04 +02:00
Brodie Rao
7362459729 cleanup: use x in (a, b) instead of x == a or x == b 2010-09-23 00:02:31 -05:00
Patrick Mezard
614db673f4 Merge with stable 2010-09-20 22:29:13 +02:00
Martin Geisler
28afb23368 merge with stable 2010-09-12 14:00:40 +02:00
Martin Geisler
964567ee35 convert: move -A option to --authormap 2010-09-10 20:11:42 +02:00
Martin Geisler
0447137bce convert: deprecate --authors in preference for --authormap
This aligns the authormap option with the other three mapping options.
The old --authors option is still supported and 'hg help convert -v'
will still show it.
2010-09-10 01:34:14 +02:00
Martin Geisler
77e923da30 merge with stable 2010-09-10 01:04:32 +02:00
Martin Geisler
e783fa28e6 convert: better grouping of command line flags in help
We normally put related command line flags after one another.
2010-09-10 00:07:38 +02:00
Martin Geisler
c27c54faec clone, patch, convert: use hex(nullid) instead of '0'*40 2010-09-02 12:08:13 +02:00
Brodie Rao
0f9d940cb9 cleanup: remove unused variables 2010-08-27 13:32:40 -04:00
Matt Mackall
a628b4fc64 merge with stable 2010-08-19 11:51:30 -05: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
c3f9a46ceb Merge with stable 2010-08-11 12:30:18 +02: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
Matt Mackall
8b11223ff6 Merge with stable 2010-08-02 10:55:51 -05:00
Mads Kiilerich
ef1e88d17c convert: warn on superfluous / in paths
shlex is really a bad parser for this line-based format ...
2010-07-20 15:49:28 +02:00
Matt Mackall
3a240dadce convert: handle closed branch heads in hg-hg conversion (issue2185) 2010-07-25 17:18:35 -05:00
Patrick Mezard
3153012325 cleanup: typos 2010-07-26 22:29:49 +02:00
Martin Geisler
5fbbb27c25 Merge with stable 2010-07-09 14:21:45 +02: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
Renato Cunha
5766b997d7 convert: tuple parameter unpacking is deprecated in py3k 2010-07-01 19:27:02 -03: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