Commit Graph

648 Commits

Author SHA1 Message Date
Alexis S. L. Carvalho
5a20fc9e55 mercurial_sink: regrab locks in setbranch 2007-10-06 15:30:15 -03:00
Alexis S. L. Carvalho
856d368557 convert --filemap: reduce memory usage 2007-10-06 15:30:15 -03:00
Alexis S. L. Carvalho
f377d00047 convert: change SKIPREV to 'SKIP' 2007-10-06 15:30:15 -03:00
Patrick Mezard
0e612978e0 hgk: add basic usage and configuration documentation 2007-10-05 23:40:33 +02:00
Patrick Mezard
510efc6c01 hgk: add debug-config command to pass configuration options 2007-10-05 22:39:36 +02:00
Alexis S. L. Carvalho
a305a3e419 convert_svn: add --filemap support 2007-10-04 23:21:37 -03:00
Alexis S. L. Carvalho
df6f43b4df convert_cvs: add --filemap support 2007-10-04 23:21:37 -03:00
Alexis S. L. Carvalho
b7d48206ca convert_git: add --filemap support 2007-10-04 23:21:37 -03:00
Alexis S. L. Carvalho
f951bc5803 mercurial_source: add --filemap support 2007-10-04 23:21:37 -03:00
Alexis S. L. Carvalho
4bc9e33d0e convert: add a mode where mercurial_sink skips empty revisions.
The getchanges function of some converter_source classes can return
some false positives.  I.e. they sometimes claim that a file "foo"
was changed in some revision, even though its contents are still the
same.

convert_svn is particularly bad, but I think this can also happen with
convert_cvs and, at least in theory, with mercurial_source.

For regular conversions this is not really a problem - as long as
getfile returns the right contents, we'll get a converted revision
with the right contents.  But when we use --filemap, this could lead
to superfluous revisions being converted.

Instead of fixing every converter_source, I decided to change
mercurial_sink to work around this problem.

When --filemap is used, we're interested only in revisions that touch
some specific files.  If a revision doesn't change any of these files,
then we're not interested in it (at least for revisions with a single
parent; merges are special).

For mercurial_sink, we abuse this property and rollback a commit if
the manifest text hasn't changed.  This avoids duplicating the logic
from localrepo.filecommit to detect unchanged files.
2007-10-04 23:21:37 -03:00
Alexis S. L. Carvalho
8978438d64 convert: readd --filemap
To handle merges correctly, this revision adds a filemap_source class
that wraps a converter_source and does the work necessary to calculate
the subgraph we're interested in.

The wrapped converter_source must provide a new getchangedfiles method
that, given a revision rev, and an index N, returns the list of files
that are different in rev and its Nth parent.

The implementation depends on the ability to skip some revisions and to
change the parents field of the commit objects that we returned earlier.

To make the conversion restartable, we assume the revisons in the
revmapfile are topologically sorted.
2007-10-04 23:21:37 -03:00
Alexis S. L. Carvalho
ab0d9013c0 convert: move filemapper class to a separate file 2007-10-04 23:21:37 -03:00
Alexis S. L. Carvalho
9ca59573cc convert: disable current --filemap support
The --filemap support in hg convert doesn't handle merges correctly.
(And after 98d1e8c16343 I managed to break it even for simple cases
where we don't want the first revision.)
2007-10-04 23:21:37 -03:00
Alexis S. L. Carvalho
10150a4dc3 convert: allow the converter_source to say "skip this revision"
If getchanges returns a string, it's assumed to be the id of an
already converted revision.  We map the current revision to the same
revision this converted revision was mapped to.

To allow skipping a root revision, getchanges can return the special
string 'hg-convert-skipped-revision' (a.k.a. common.SKIPREV), which
hopefully won't clash with any real id.

The converter_source is responsible for rewriting the parents of the
commit objects to make sure the revision graph makes sense.
2007-10-04 23:21:37 -03:00
Alexis S. L. Carvalho
af43e5bffa convert: pass the order of the revmapfile to the converter_source
The entries in this file are supposed to be topologically sorted and
this may be useful for a converter_source.
2007-10-04 23:21:37 -03:00
Bryan O'Sullivan
417886f00a Merge with crew 2007-10-02 21:01:00 -07:00
Bryan O'Sullivan
028f525b88 convert: fix a few residual bugs in darcs importer 2007-10-02 21:00:38 -07:00
Bryan O'Sullivan
5e33599d0f Merge with crew. 2007-10-02 13:49:36 -07:00
Bryan O'Sullivan
ecdd764817 convert: support darcs as a source repo 2007-10-02 13:49:11 -07:00
Bryan O'Sullivan
3ba6252dc7 convert: fail properly if we can't read a source hg repository 2007-10-02 13:48:52 -07:00
Bryan O'Sullivan
57e084bf32 convert: add before/after hooks for converter sources 2007-10-02 13:46:17 -07:00
Patrick Mezard
091596b961 Merge with crew-stable 2007-09-30 12:36:11 +02:00
Patrick Mezard
12ec5fa979 convert: fix missing import 2007-09-30 12:08:33 +02:00
Bryan O'Sullivan
cfd6f17898 Merge with crew-stable. 2007-09-29 21:10:54 -07:00
Bryan O'Sullivan
4f30385a85 convert: delete empty directories if deleting a file (bug 754) 2007-09-29 21:08:14 -07:00
Alexis S. L. Carvalho
ddf41e005d Merge with crew-stable 2007-09-24 19:14:18 -03:00
Alexis S. L. Carvalho
6f75c91b5f convert_git: avoid returning two entries for the same file in getchanges
This could happen in merge changesets if the merged file was different
from both parents.
2007-09-24 19:00:11 -03:00
Alexis S. L. Carvalho
38a7ae7001 mq: fix qrefresh -e with no patches applied 2007-09-24 19:00:11 -03:00
Patrick Mezard
e735e01dae bisect: remove useless try/except 2007-09-22 19:05:36 +02:00
Benoit Boissinot
2c52922666 bisect: don't write data on failure 2007-09-22 18:35:53 +02:00
Benoit Boissinot
5d47e0ef5a bisect: do silent init if necessary 2007-09-22 18:23:56 +02:00
Patrick Mezard
d24e36a450 Merge with crew-stable 2007-09-14 23:10:41 +02:00
Patrick Mezard
8577cf36be convert: workaround for cvsps.cache under Windows
In non-cygwin environment, cvsps fails to create its cache directory and redirect its output to stderr. Just ignore the error and capture stderr as well.
2007-09-14 22:17:53 +02:00
Patrick Mezard
7d74b8608f convert: fix remote cvs file paths separator 2007-09-14 22:17:53 +02:00
Patrick Mezard
fc230fc7bd convert: avoid interpreting Windows path as CVS connection strings.
CVS connection strings regexp detect colons to separate protocols from path and login. Unfortunately, Windows paths contains colons and were interpreted as rsh connection strings.
2007-09-14 22:17:53 +02:00
Patrick Mezard
93f1b14c12 convert: call popen2 in binary mode, with a command string. 2007-09-14 22:17:53 +02:00
Brendan Cully
541b432293 Merge with crew 2007-09-10 15:00:19 -07:00
Brendan Cully
92a19d3a72 mq: fix regression in c5d80ff6828f
It caused qrefresh; qrefresh -X addedfile to leave the file as normal in dirstate.
It should be marked added on the second pass.
2007-09-10 15:00:05 -07:00
Patrick Mezard
7c1d0710ee Merge with crew-stable 2007-09-10 23:53:23 +02:00
Patrick Mezard
239ea63571 extdiff: avoid repr() doubling paths backslashes under Windows 2007-09-10 23:36:01 +02:00
Edward Lee
3227d5925c interhg: allow more flexible pattern specification (fixes 2/3 of issue699)
- something else than "pat" followed by a number can be used as key
- something else than "/" can be used as delimiter
- "ilmsux" flags (e.g. "i" for case insensitive) can be used
2007-09-07 16:35:43 +02:00
Thomas Arendsen Hein
0b6d82e138 Don't decode unicode strings.
This does not work with python2.3 and is probably not useful anyway with 2.4.
2007-09-07 16:14:51 +02:00
Bryan O'Sullivan
f3ff6b7741 record: change wording of initial per-file prompt 2007-09-06 10:52:54 -07:00
Alexis S. L. Carvalho
2442d0db1e convert: rename a class and a function 2007-09-01 02:49:18 -03:00
Alexis S. L. Carvalho
7dac6f1262 convert: mercurial_source: also search for copies in modified files
There are some corner cases where we may have a copy in a file that
isn't in the added list:

- the result of a hg copy --after --force

- after a merge across a (local) rename
2007-09-01 02:49:18 -03:00
Alexis S. L. Carvalho
6309fee56a convert: clear the dirstate before a conversion, invalidate it afterwards
Clearing it before the conversion protects us from whatever data were
there (file copies in particular).

Invalidating it after the conversion avoids writing a possibly
inconsistent dirstate to disk.
2007-09-01 02:49:18 -03:00
Alexis S. L. Carvalho
41b6be949d convert: avoid dirstate checks; add a test
During a conversion, the dirstate contents are not consistent - there
are files that may be missing from the dirstate and there may be files
that shouldn't be in the dirstate.

While this is not fixed, don't mark files as added - put them directly
in state 'n'ormal.
2007-09-01 02:49:18 -03:00
Thomas Arendsen Hein
a476e1623a convert/subversion: Use util.set() instead of set() for python2.3 compatibility 2007-08-31 13:14:03 +02:00
Brendan Cully
2ddab8e83a Merge with crew 2007-08-27 15:41:31 -07:00
Brendan Cully
4d5be2d7bc convert: new config variable hg.tagsbranch controls which branch tags are committed to 2007-08-27 15:39:07 -07:00