Commit Graph

689 Commits

Author SHA1 Message Date
Adrian Buehlmann
cf126bb7dd move opener from util to scmutil 2011-04-20 19:54:57 +02:00
Patrick Mezard
e29463618b merge with stable 2011-04-20 23:30:07 +02:00
Patrick Mezard
95e7147cd4 convert: make filemap prune useless branch closing revs (issue2774)
A branch closing revision only applies if one of its parents belongs to the
branch being closed. Otherwise the filemap can prune it too.
2011-04-20 23:15:18 +02:00
Martin Geisler
a0a2144b94 i18n: don't mark trivial string for translation 2011-03-16 17:38:25 +01:00
Patrick Mezard
ec6a1a3ed2 convert/svn: fix _iterfiles() output in root dir case (issue2647)
When converting directory additions/replacement with project directory set to
root, _iterfiles() sometimes returned paths starting with a slash making
following svn calls to fail.

I could not reproduce the issue with hand-crafted repositories.

Report and first analysis by Clinton Chau <clinton@clearcanvas.ca>
2011-03-14 21:35:31 +01:00
Daniel Atallah
54e55b4dbb convert/mtn: Fix conversion of large files from mtn (broken in 64963df7238d)
"mtn automate stdio" will break output larger than 32kB into several packets.
This ensures that we are processing all the output on the main stream and not
only the last packet.
2011-03-28 23:16:20 -04:00
Daniel Atallah
e07af26e9b convert/mtn: convert suspended branches as closed branches
Monotone treats branch closing ("suspending") in a similar manner to how we do
in mercurial - a cert is added to a revision that marks the branch to be hidden.
If a subsequent commit is made, the branch is effectively reopened.
2011-03-25 15:49:43 -04:00
Daniel Atallah
76c70d873a convert/mtn: avoid unnecessary initial test of mtn repo
As soon as before() is called, we'll know if there is a problem (and get a
better error message).
2011-03-25 10:13:46 -04:00
Daniel Atallah
3b1242e5b1 convert/mtn: add support for using monotone's "automate stdio" when available
Currently the convert extension spawns a new mtn process for each
operation. For a large repository, this ends up being hundreds of
thousands of processes. The following enables usage of monotone's
"automate stdio" functionality - documented at:

http://www.monotone.ca/docs/Automation.html#index-mtn-automate-stdio-188

The effect is that (after determining that a new enough mtn executable
is available) a single long-running mtn process is used for all the
operations, using stdin/stdout to send commands and read output.

This has a pretty significant effect on the performance of some parts
of the conversion process.
2011-03-23 14:26:56 -04:00
Daniel Atallah
066e208063 convert: add support to common commandline to access stdin of the process 2011-03-24 16:54:09 -04:00
Edouard Gomez
4503be63c2 convert: add bookmark support to hg source 2011-03-25 01:38:47 +01:00
Edouard Gomez
4060d3d548 convert: add bookmarks reading support to git backend 2011-03-25 01:38:43 +01:00
Pavel Boldin
b786abc779 convert.svn: branch name which equals trunk means `default' branch (issue2653)
Converting from subversion specifying config.svn.trunk results
in storing trunk under branch named as config.svn.trunk, where `default'
brunch is expected. Submission contains patch and test.
2011-02-25 21:01:30 +03:00
Azhagu Selvan SP
c5a761259d convert/svn: abort operation when python bindings are not available
Subversion python bindings check was not present in svn_sink source
class which made it fail while using svn as destination repository.
Added a more maintainble svn bindings check for svn_source and svn_sink
classes.
2011-02-24 01:14:15 +05:30
Azhagu Selvan SP
346cc8ff15 convert/svn: handle MissingTool exception from converter_sink class
The converter_sink class had no way of handling MissingTool
exception. This change makes it to abort when there is a
MissingTool exception.
2011-02-24 00:45:02 +05:30
Wagner Bruna
1dcfdaf8df convert: fix typos in docstring 2011-02-16 21:02:19 -02:00
Steve Borho
7b9494aa62 convert: subversion should use util.quotecommand to wrap args to popen2
All other callers of util.popen2 and util.popen3 do this, as well as direct
callers of subprocess.Popen.
2010-12-22 13:25:00 -06:00
Nicolas Dumazet
7e56ad61ee merge with stable 2010-12-01 11:02:12 +09:00
Patrick Mezard
120ad3c801 convert/svn: fix changed files list upon directory replacements
When branch2/dir was replacing branch1/dir, we only marked branch2/dir files a
changed. Add branch1/dir files as they may not exist in branch2.
2010-11-29 20:13:11 +01:00
Martin Geisler
270e016cd4 convert: better ReST markup in docstring 2010-11-04 18:19:10 +01:00
Martin Geisler
065bf6632b convert: split docstring lists for easier translation 2010-11-04 18:11:10 +01:00
Erik Zielke
e9f419e2c6 convert: use field list instead of option list in help
Use field list instead of option list in convert help, because the
option list format used, with defaults and type of argument is not
supported by docutils.
2010-11-04 14:14:47 +01:00
Mike Sperber
bb18159cb0 convert: Work around p4 instability (issue2465)
The p4 command-line client sometimes fails upon doing "p4 describe"
when trying to produce a patch. (I'm guessing it's a bug in p4.)
However, "hg convert" doesn't even make use of the patch, and it can
be elided by adding "-s" to the p4 command line here.
2010-10-30 02:47:34 -05:00
Erik Zielke
dd7e779d17 help: different section separators
Changes the characters used as section separators, so different ones
are used for module docstring and command docstring.

This is done because the section from the docstring will be at
different levels in the restructured text output, therefore
different symbols have to be used.
2010-10-19 13:39:34 +02:00
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