Commit Graph

5527 Commits

Author SHA1 Message Date
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
91790f92bf Test darcs converter 2007-10-07 19:03:32 +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
07f69a32a2 hghave: detect darcs client 2007-10-07 18:58:44 +02:00
Patrick Mezard
dc56a66c81 hghave: reorder check functions and entries 2007-10-07 18:58:36 +02:00
Patrick Mezard
be799c79c6 Test workingctx exec/link bit for copies.
Also, make the test runnable on platforms without symlinks.
2007-10-07 15:13:50 +02:00
Patrick Mezard
2dee2a1086 Fix workingctx exec/link bit of copies on non-supporting systems 2007-10-07 15:07:35 +02:00
Patrick Mezard
2eb7f085fc test-manifest: test symlink and exec bit display 2007-10-06 22:30:24 +02:00
Patrick Mezard
c9215420e8 Display symlink or executable bit with manifest -v
New output looks like:

644   a
755 * b/a
644 @ l
2007-10-06 22:30:22 +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
fa0374301e Always copy the necessary files before applying a git patch
This patch removes the "copymod" attribute from the gitpatch
class.

AFAICS, that attribute was only used to delay the copying of
renamed/copied files if there are no other changes to the target,
but in this case, if there are changes to the source, we'll end
up copying the wrong version.

This should fix issue762.
2007-10-06 15:30:15 -03: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
8102777e5e Fix bad lambda prototype in workingctx.fileflags() 2007-10-06 17:54:33 +02:00
Alexis S. L. Carvalho
f77b38c731 osutil.c: use readdir instead of readdir64
Some systems (e.g. *BSD) don't have a readdir64 function - the regular
readdir already uses 64-bit types.

On other systems (Linux, Solaris, ...), if Python was compiled with large
file support, Python.h will define _LARGEFILE_SOURCE and _FILE_OFFSET_BITS=64,
so that any call to readdir will actually be a call to readdir64.  If Python
was not compiled with large file support, we probably don't want to define
these macros to avoid ABI problems.
2007-10-06 14:14:11 -03:00
Alexis S. L. Carvalho
f65110708a osutil.c: include Python.h before the other headers
This is recommended by the Python documentation, since Python.h defines
some constants.
2007-10-06 14:14:11 -03:00
Bryan O'Sullivan
e317f81ab3 Add osutil module, containing a listdir function.
This is similar to os.listdir, only it returns a sorted list of tuples.
2007-10-05 15:01:06 -07:00
Patrick Mezard
0e612978e0 hgk: add basic usage and configuration documentation 2007-10-05 23:40:33 +02:00
Patrick Mezard
8dbf0b280f hgk: add context menu visual diff action
* * *
2007-10-02 23:28:04 +02:00
Patrick Mezard
510efc6c01 hgk: add debug-config command to pass configuration options 2007-10-05 22:39:36 +02:00
Patrick Mezard
671b107790 hgk: fix right-mouse button handling under macosx 2007-10-02 23:28:02 +02:00
Patrick Mezard
0dd09ef0fc Test *_ISLINK merge environment vars 2007-10-05 23:01:38 +02:00
Patrick Mezard
2d1e4a3c40 merge: provide *_ISLINK environment vars to merge helper
Sets HG_MY_ISLINK, HG_OTHER_ISLINK, HG_BASE_ISLINK in environment. Without these variables, it's impossible for the merge application to know whether the 'other' and 'base' files were symlinks in their original contexts. For the purposes of the merge they are always emitted as small text files.
2007-10-03 23:09:36 +02:00
Patrick Mezard
904ffeda9f context: add fileflags() to avoid rebuilding manifests 2007-10-05 23:01:38 +02:00
Bryan O'Sullivan
f5b570e3a6 run-tests.py: allow a different temporary directory to be specified 2007-10-05 12:42:52 -07:00
Bryan O'Sullivan
01e8a7db01 Update test for new output produced since e24568a05150 2007-10-05 12:30:19 -07:00
Bryan O'Sullivan
74de1ac8b8 Fix accidentally broken test. 2007-10-05 12:28:18 -07:00
Bryan O'Sullivan
1a3055eb4e Merge with crew. 2007-10-05 12:17:29 -07:00
Bryan O'Sullivan
a03fea73e0 Allow tests to run in parallel. 2007-10-05 12:17:01 -07:00
Bryan O'Sullivan
b1622da091 run-tests.py: reorder options alphabetically. 2007-10-05 09:30:02 -07: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
Matt Mackall
24f40f64eb Merge with crew 2007-10-04 19:47:22 -05:00
Matt Mackall
3f58de820d merge: add debug diagnostics for findcopies 2007-10-04 19:44:37 -05:00
Patrick Mezard
755593a7fa Merge with crew-stable 2007-10-04 14:26:34 +02:00
Matt Mackall
305c1ae64c changegroup: avoid large copies
- handle chunk headers separately rather than prepending them to
  (potentially large) chunks
- break large chunks into 1M pieces for compression
- don't prepend file metadata onto (potentially large) file data
2007-10-03 17:17:28 -05:00
Matt Mackall
a92b40c2ed revlog: generate trivial deltas against null revision
To avoid extra memory usage and performance issues with large files,
generate a trivial delta header for deltas against the null revision
rather than calling the usual delta generator.

We append the delta header to meta rather than prepending it to data
to avoid a large allocate and copy.
2007-10-03 17:17:27 -05:00
Matt Mackall
a6cf90f286 Merge with crew 2007-10-03 16:50:32 -05:00
Patrick Mezard
01d91ed943 Merge with crew-stable 2007-10-03 21:08:37 +02:00