Commit Graph

681 Commits

Author SHA1 Message Date
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
Edouard Gomez
8efe0b6606 convert: add bookmark support to the hg sink 2010-07-07 00:06:59 +02:00
Edouard Gomez
ac88ce23c8 convert: add bookmark support to main command
During conversion, read bookmarks from source repo, filter them and push the
resulting set of bookmarks to destination sink.
2010-07-07 00:06:59 +02:00
Edouard Gomez
f8e9b0faf6 convert: add bookmark support to common sink/source implementation 2010-07-07 00:06:59 +02:00
Patrick Mezard
bd8804161f i18n: register new template keywords for translation 2011-03-19 19:50:55 +01:00
Patrick Mezard
ce258b1ae4 convert: add svnrev, svnpath and svnuuid template keywords
$ hg -R A-hg log --template '{rev} {svnuuid}{svnpath}@{svnrev}\n'
  10 644ede6c-2b81-4367-9dc8-d786514f2cde/trunk@10
2011-03-17 22:17:27 +01:00
Patrick Mezard
542a74b67c convert/svn: extract revsplit() in a function 2011-03-17 22:17:27 +01:00
Martin Geisler
9567e5a379 i18n: merge with stable 2011-03-16 17:43:43 +01: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
Matt Mackall
1402203495 merge with stable 2011-03-15 16:53:46 -05: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