view tests/test-revert.out @ 5378:8a2915f57dfc

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.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Thu, 04 Oct 2007 23:21:37 -0300
parents bfd73b567b3d
children
line wrap: on
line source

%% should show b unknown
? b
%% should show b unknown and c modified
M c
? b
%% should show b added and c modified
M c
A b
%% should show a removed, b added and c modified
M c
A b
R a
%% should show b added, copy saved, and c modified
M c
A b
%% should show b unknown, and c modified
M c
? b
%% should show unknown: b
? b
%% should show a b c e
a
b
c
e
%% should verbosely save backup to e.orig
saving current version of e as e.orig
reverting e
resolving manifests
getting e
%% should say no changes needed
no changes needed to a
%% should say file not managed
file not managed: q
%% should say file not found
notfound: No such file in rev 095eacd0c0d7
A z
? b
? e.orig
%% should add a, forget z
adding a
forgetting z
%% should forget a
forgetting a
%% should silently add a
A a
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
reverting c
%% should print non-executable
non-executable
reverting c
%% should print executable
executable
%% issue 241
adding a
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
% should fail - no arguments
abort: no files or directories specified; use --all to revert the whole repo
% should succeed
reverting a
%% issue332
adding b/b
reverting b/b
forgetting newdir/newfile
reverting b/b
% reverting a rename target should revert the source
? newa