Commit Graph

677 Commits

Author SHA1 Message Date
Christian Ebert
69c7eeabfc patchbomb: make "hg email -b" w/o destination work as advertised 2007-12-16 22:55:23 +01:00
Patrick Mezard
9760500b06 convert: move commands definition to ease demandload job (issue 860) 2007-12-09 15:25:36 +01:00
David J. Mellor
b1df375d09 convert: fix SVN date parser dropping the final whole second digit 2007-12-06 13:10:25 -08:00
Patrick Mezard
8ae803be30 mq: avoid qnew committing everything on invalid paths (issue 803)
If paths are supplied but resolve to nothing, localrepo.commit() is called with an empty set and commits the whole dirstate. Avoid this by passing the match function to commit.
2007-11-20 14:31:58 +01:00
Alexis S. L. Carvalho
0086f97dc7 mq: really remove undo after a qpush (and after a strip)
For qpush, removeundo has to be called after the transaction has finished.

strip may use unbundle, which also leaves an undo file.

Fixes issue780.
2007-11-09 20:21:35 -02:00
Alexis S. L. Carvalho
8775f8f81c convert: make sure mercurial_source has a local hg repo 2007-11-09 20:21:35 -02:00
Alexis S. L. Carvalho
fe9d865e0d convert: display all errors if we couldn't open the source repo
This should give the user a better hint of what's going wrong.

Improve some error messages.  In particular, mention "CVS checkout" instead
of "CVS repo".

Fixes issue822 and issue826.
2007-11-09 20:21:35 -02:00
Alexis S. L. Carvalho
959d3f5cd4 test-convert-darcs: skip if we can't find the elementtree module
This patch is a bit dirty to avoid having to repeat the dance required
to import elementtree.
2007-11-09 20:21:35 -02:00
Alexis S. L. Carvalho
c4d02f3fdf purge: simplify safety net for case mangling filesystems
Relying on the exact return of statwalk would cause us to abort
when there was at least one tracked file inside an ignored directory.

This patch forces an extra walk of the whole working directory even
on sane filesystems, where it wouldn't be needed.

Fixes issue621.
2007-11-09 20:21:35 -02:00
Benoit Boissinot
37290329f4 fix typo in convert help text, update test 2007-11-05 20:15:33 +01:00
Rafael Villar Burke ext:(%22)
163660fdbe Update convert help text
Add Mercurial as a source format, clarify that the include directive triggers the exclusion of all not explicitely included files/dirs and use MAPFILE instead of revmapfile in the text, following the short message convention.
2007-11-02 20:09:21 +01:00
Patrick Mezard
6aa1e21320 Fix Windows os.popen bug with interleaved stdout/stderr output
See python bug 1366 "popen spawned process may not write to stdout under windows" for more details.
2007-11-01 12:05:14 +01:00
Christian Ebert
b5976042a1 patchbomb: no traceback if (diffstat) confirmation is refused 2007-10-28 09:25:35 +01:00
Benoit Boissinot
e8f520a51b patchbomb: fix traceback when diffstat isn't available 2007-10-26 12:01:14 +02:00
Christian Ebert
61e3b4ba58 Catch smtp exceptions 2007-09-07 16:48:42 +02:00
Kirill Smelkov
c46ae95f3f convert: svn -- fix tags handling
They were simply not detected.
2007-10-13 15:25:11 +04:00
Kirill Smelkov
87c2048488 convert: svn -- fix 'exists'
Previously 'exists' erroneously returned False for empty dirictories. This is
wrong since we want to detect even empty 'branches/' or 'tags/'.
2007-10-13 15:22:03 +04:00
Matt Mackall
f666cf65b1 Merge with crew
Those crew folks are getting lazy about pulling from upstream before
committing.
2007-10-11 00:46:40 -05:00
Bryan O'Sullivan
0ec99ed035 convert: refactor sink initialisation, to remove hardcoding of hg
We also introduce options to explicitly set the source and destination
repository types.

Improve testing of corner cases a little.
2007-10-10 15:42:00 -07:00
Bryan O'Sullivan
1264846224 convert: add default constructor for converter_sink 2007-10-10 15:30:00 -07:00
Bryan O'Sullivan
6df62fb77c convert: make contents of "extra" dict available from sources, for sinks.
This breaks hash preservation for hg->hg conversion, as each converted
change gets a convert_revision item added to its extra dict.  Ugh.
2007-10-10 15:30:00 -07:00
Bryan O'Sullivan
31308e92ec convert: rename convert_svn to svn_source 2007-10-10 15:30:00 -07:00
Bryan O'Sullivan
27bb37764f convert: report errors more meaningfully if run with --traceback 2007-10-10 00:15:33 -07:00
Matt Mackall
21d438d5c0 mq: clarify queue top message 2007-10-09 17:22:38 -05:00
Benoit Boissinot
8905e2628f convert: do not output when trying to load svn bindings 2007-10-07 20:45:10 +02:00
Benoit Boissinot
7120a66c0d convert: split converters into sink/source 2007-10-07 20:44:54 +02:00
Patrick Mezard
99fd23e158 convert: fix darcs_source.pull() under windows 2007-10-07 18:59:03 +02:00
Patrick Mezard
fec1f9ad02 convert: fix darcs_source._run() under windows 2007-10-07 18:58:54 +02:00
Patrick Mezard
2d81806ba5 convert: quote "^" to avoid windows using it as an escape char. 2007-10-06 21:19:06 +02:00
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