Commit Graph

9 Commits

Author SHA1 Message Date
Martin Geisler
7316194bdf tests: don't load unnecessary graphlog extension
Since graphlog is in core, we can use 'hg log -G' instead.
2013-11-22 19:14:17 +01: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
e49b0f2e4b convert: fix bad conversion of copies when hg.startrev is specified
The 'copynode' was looked up in self.keep as if it was a changeset node. It is
however a filelog node, and self.keep would thus fail if it actually looked at
its parameter ... which it only did if a startrev was specified.

Instead we now don't check the copy node - we don't have to. It must have been
copied from one of the parents, and we already check whether one of the parents
have the copy source.

We could perhaps use linkrev to see if the corresponding changeset was
converted ... but that would sometimes be wrong.

The existing test of this was wrong - now it is better, but it seems like it
exposes a 'log' issue.
2013-07-19 01:40:57 +02:00
Mads Kiilerich
54bd6f7939 test-convert-hg-startrev: fix test for copy removal on missing parent
The test assumed that 'b' was missing just because the changeset that
introduced 'b' wasn't converted ... but 'b' was also not removed before the
start revision, and the parent was thus not missing at all.

Instead we introduce a file 'f' in rev 0 and remove it in rev 1 so the copy
source really doesn't exist in the repo that is converted from rev 1.
2013-07-19 01:18:15 +02:00
Patrick Mezard
7e644e8129 log: fix --follow FILE ancestry calculation
Currently, --follow FILE looks for a FILE filelog, scans it and collects
linkrevs and renames, then filters them. The problem is the filelog scan does
not start at FILE filenode in parent revision but at the last filelog revision.
So:
- Files not in the parent revision can be followed, the starting node is
  unexpected
- Files in the parent revision can be followed from an incorrect starting
  node.

This patch makes log --follow FILE fail if FILE is not in parent revision, and
computes ancestors of the parent revision FILE filenode.
2012-02-24 20:57:59 +01:00
Martin Geisler
83c27fb95f tests: don't overwrite HGRCPATH
Overwriting instead of appending to the file removes the [defaults]
section put into the file by run-tests.py.

It also defeats the --inotify option to run-tests.py.

(Nothing was broken yet, but the lack of -d "0 0" cause changeset
hashes to change unexpectedly in a test case I was editing.)
2011-03-01 17:01:17 +01:00
Nicolas Dumazet
f48c256c16 revlog: fix descendants() if nullrev is in revs
We were not returning the correct result if nullrev was in revs, as we
are checking parent(currentrev) != nullrev before yielding currentrev

test-convert-hg-startrev was wrong: if we start converting from rev -1 and
onwards, all the descendants of -1 (full repo) should be converted.
2010-11-07 18:23:48 +09:00
Dan Villiom Podlaski Christiansen
f0900519c1 test-convert-hg-startrev: enable convert.hg.saverev. 2010-09-02 15:00:45 +02:00
Dan Villiom Podlaski Christiansen
6ba6fcecca tests: unify test-convert-hg-startrev. 2010-09-02 14:58:47 +02:00