Commit Graph

160 Commits

Author SHA1 Message Date
Mads Kiilerich
f92d923209 convert: backout 41e062383fc9 and 80f42131aca3 -closemap
Closemap solves a very specific use case. It would be better to have a more
generic solution than to have to maintain this forever.

Closemap has not been released yet and removing it now will not break any
backward compatibility contract.

There is no test coverage for closemap but it seems like the same can be
achieved with a simple and much more powerful custom extension:

import hgext.convert.hg
class source(hgext.convert.hg.mercurial_source):
    def getcommit(self, rev):
        c = super(source, self).getcommit(rev)
        if rev in ['''
d643f67092ff123f6a192d52f12e7d123dae229f
3a6a38229d418ba09cb7784c01453a93b4d363f8
facceca31c18f7ef800977055dbcbd7fcb5c5cb2
''']:
            c.extra = c.extra.copy()
            c.extra['close'] = '1'
        return c
hgext.convert.hg.mercurial_source = source
2014-04-16 01:10:08 +02:00
Mads Kiilerich
46b435b7d3 convert: backout 8a62813ea220 and ca6679798c95 - tagmap
Tagmap solves a very specific use case. It would be better to have a more
generic solution than to have to maintain this forever.

Tagmap has not been released yet and removing it now will not break any
backward compatibility contract.

There is no test coverage for tagmap but it seems like the same can be achieved
with a (relatively) simple and much more powerful custom extension:

import hgext.convert.hg
def f(tag):
    return tag.replace('some', 'other')
class source(hgext.convert.hg.mercurial_source):
    def gettags(self):
        return dict((f(tag), node)
                    for tag, node in in super(source, self).gettags().items())
    def getfile(self, name, rev):
        data, flags = super(source, self).getfile(name, rev)
        if name == '.hgtags':
            data = ''.join(l[:41] + f(l[41:]) + '\n' for l in data.splitlines())
        return data, flags
hgext.convert.hg.mercurial_source = source
2014-04-16 01:09:49 +02:00
Mads Kiilerich
0e8795ccd6 spelling: fixes from spell checker 2014-04-13 19:01:00 +02:00
Matt Mackall
9ca3ee752a merge with stable 2014-03-19 16:21:53 -05:00
Mads Kiilerich
f6b400481f convert: more clear documentation of the 'include' default of a 'include .'
At first glance it can be confusing that adding a superfluous include directive
will exclude more files.
2014-03-19 00:19:54 +01:00
Sean Farley
6aefcf4449 convert: add tagmap option
Tests have been updated.
2014-01-22 15:43:21 -06:00
Sean Farley
e7a8a8092c convert: add closemap option
Tests have been updated.
2014-01-21 11:35:17 -06:00
Mads Kiilerich
1692899d8d convert: introduce hg.revs to replace hg.startrev and --rev with a revset
The existing knobs for controlling which revisions to convert were often
insufficient. Revsets is a shiny hammer that provides a better solution.

Revsets has been introduced in --rev handling in a lot of other places while
being more or less backwards compatible. Doing the same here would be a much
more elegant ... but that would unfortunately not work in this case.  "--rev 7"
used to mean revision 0 to 7 - it would be an unacceptable change if it
suddenly just meant revision 7.

Instead we introduce a new configuration setting. It will only work for
Mercurial repositories so adding a new commandline option for it would not be a
nice solution.

There is no way to use the fancy deprecation markup for configuration settings
so we just remove the documentation of hg.startrev.
2013-07-20 00:43:08 +02:00
Mads Kiilerich
29b14aad65 convert: fix description of 'convert --rev' 2013-07-19 02:32:36 +02:00
Constantine Linnick
4d22c22a01 convert: add closesort algorithm to mercurial sources
If you actively work with branches, sometimes you need to close old branches
which last commited hundreds revisions ago. After close you will see long
lines in graph visually spoiling history. This sort only moves closed
revisions as close as possible to parents and does not increase storage size
as datesort do.
2013-03-24 00:06:52 +07:00
Kevin Bullock
bd7b56e105 merge with stable 2013-01-14 10:17:06 -06:00
FUJIWARA Katsunori
9fd6562bca convert: correct 'hooks' section name in online help
The section name for hooks is not 'hook', but 'hooks'.
2013-01-14 23:14:45 +09:00
Julian Cowley
15e470ce7f convert: add config option to use the local time zone
The default for the time zone offset in a converted changeset has
always been 0 (UTC).  With this patch, the converted changeset is
modified so that the local offset from UTC is specified as the time
zone offset.

The option is specified as the boolean convert.localtimezone (default
False).  Example usage:

    hg convert -s cvs --config convert.localtimezone=True example-cvs example-hg

IMPORTANT: the patch only applies to conversions from cvs or svn.
The documentation for the option only appears in those two sections
in the convert help text.
2012-11-18 12:26:50 -10:00
Mads Kiilerich
2f4504e446 fix trivial spelling errors 2012-08-15 22:38:42 +02:00
FUJIWARA Katsunori
0cf97588a4 doc: unify section level between help topics
Some help topics use "-" for the top level underlining section mark,
but "-" is used also for the top level categorization in generated
documents: "hg.1.html", for example.

So, TOC in such documents contain "sections in each topics", too.

This patch changes underlining section mark in some help topics to
unify section level in generated documents.

After this patching, levels of each section marks are:

  level0
  """"""
    level1
    ======
      level2
      ------
        level3
        ......
          level4
          ######

And use of section markers in each documents are:

  - mercurial/help/*.txt can use level1 or more
    (now these use level1 and level2)

  - help for core commands can use level2 or more
    (now these use no section marker)

  - descriptions of extensions can use level2 or more
    (now hgext/acl uses level2)

  - help for commands defined in extension can use level4 or more
    (now "convert" of hgext/convert uses level4)

"Level0" is used as top level categorization only in "doc/hg.1.txt"
and the intermediate file generated by "doc/gendoc.py", so end users
don't see it in "hg help" outoput and so on.
2012-07-25 16:40:38 +09:00
Mads Kiilerich
377db36818 help: fix some instances of 'the the' 2012-07-26 02:54:13 +02:00
Augie Fackler
96d44b39f7 hgext: mark all first-party extensions as such 2012-05-15 14:37:49 -05:00
Brodie Rao
d6a6abf2b0 cleanup: eradicate long lines 2012-05-12 15:54:54 +02:00
Eli Carter
bad1c40c51 convert: fix typo 2011-10-18 10:32:12 -05: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
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
Wagner Bruna
1dcfdaf8df convert: fix typos in docstring 2011-02-16 21:02:19 -02: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
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
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
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
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
Patrick Mezard
3153012325 cleanup: typos 2010-07-26 22:29:49 +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
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
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
Martin Geisler
5a115c8c69 convert: document parent order in splicemap help (issue1764) 2009-10-23 22:55:28 +02:00
Patrick Mezard
0133f8d115 convert/cvs: stop supporting external cvsps 2009-10-05 22:57:15 +02:00
Patrick Mezard
6e34e060d6 convert/cvs: update debugcvsps documentation 2009-09-22 13:30:32 +02:00
Martin Geisler
38c7268d62 convert: wrap docstrings at 70 characters 2009-07-26 01:44:41 +02:00
Martin Geisler
3951831e0b commands: use minirst parser when displaying help 2009-07-16 23:25:26 +02:00
Martin Geisler
bd5efe5737 convert: fix inconsistent indentation in help text
The sort modes flags and convert.cvsps options were indented while the
convert.hg, convert.svn, and convert.p4 options were not. I've now
un-indented all of them.
2009-07-09 20:15:15 +02:00
Martin Geisler
c2c41ac679 convert: fixed typo in docstring 2009-07-08 23:12:40 +02:00
Martin Geisler
e4a37ea58a convert: wrapped docstrings at 78 characters 2009-07-07 23:54:42 +02:00
Dirkjan Ochtman
1c6c4a9bc7 extensions: fix up description lines some more 2009-06-24 12:25:56 +02:00
Cédric Duval
dbcec5595d extensions: improve the consistency of synopses
Trying as much as possible to consistently:
 - use a present tense predicate followed by a direct object
 - verb referring directly to the functionality provided
   (ie. not "add command that does this" but simple "do that")
 - keep simple and to the point, leaving details for the long help
   (width is tight, possibly even more so for translations)

Thanks to timeless, Martin Geisler, Rafael Villar Burke, Dan Villiom
Podlaski Christiansen and others for the helpful suggestions.
2009-06-22 15:48:08 +02:00