tests/test-purge.out
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
Thu, 04 Oct 2007 23:21:37 -0300
changeset 5378 8a2915f57dfc
parent 4691 ca4971347e0a
permissions -rw-r--r--
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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4145
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
     1
% init
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
     2
% setup
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
     3
% delete an empty directory
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
     4
empty_dir
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
     5
Removing directory empty_dir
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
     6
directory
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
     7
r1
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
     8
% delete an untracked directory
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
     9
untracked_dir/untracked_file1
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    10
untracked_dir/untracked_file2
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    11
Removing file untracked_dir/untracked_file1
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    12
Removing file untracked_dir/untracked_file2
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    13
Removing directory untracked_dir
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    14
directory
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    15
r1
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    16
% delete an untracked file
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    17
untracked_file
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    18
Removing file untracked_file
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    19
directory
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    20
r1
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    21
% delete an untracked file in a tracked directory
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    22
directory/untracked_file
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    23
Removing file directory/untracked_file
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    24
directory
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    25
r1
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    26
% delete nested directories
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    27
untracked_directory/nested_directory
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    28
Removing directory untracked_directory/nested_directory
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    29
Removing directory untracked_directory
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    30
directory
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    31
r1
4155
4c714ed245d6 purge.py: fix invocation of statwalk
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4145
diff changeset
    32
% delete nested directories from a subdir
4c714ed245d6 purge.py: fix invocation of statwalk
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4145
diff changeset
    33
untracked_directory/nested_directory
4c714ed245d6 purge.py: fix invocation of statwalk
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4145
diff changeset
    34
Removing directory untracked_directory/nested_directory
4c714ed245d6 purge.py: fix invocation of statwalk
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4145
diff changeset
    35
Removing directory untracked_directory
4c714ed245d6 purge.py: fix invocation of statwalk
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4145
diff changeset
    36
directory
4c714ed245d6 purge.py: fix invocation of statwalk
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4145
diff changeset
    37
r1
4c714ed245d6 purge.py: fix invocation of statwalk
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4145
diff changeset
    38
% delete only part of the tree
4c714ed245d6 purge.py: fix invocation of statwalk
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4145
diff changeset
    39
untracked_directory/nested_directory
4c714ed245d6 purge.py: fix invocation of statwalk
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4145
diff changeset
    40
Removing directory untracked_directory/nested_directory
4c714ed245d6 purge.py: fix invocation of statwalk
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4145
diff changeset
    41
Removing directory untracked_directory
4c714ed245d6 purge.py: fix invocation of statwalk
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4145
diff changeset
    42
directory
4c714ed245d6 purge.py: fix invocation of statwalk
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4145
diff changeset
    43
r1
4c714ed245d6 purge.py: fix invocation of statwalk
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4145
diff changeset
    44
directory/untracked_file
4691
ca4971347e0a purge: don't delete ignored files if --all is not specified
Emanuele Aina <em@nerd.ocracy.org>
parents: 4462
diff changeset
    45
% skip ignored files if --all not specified
ca4971347e0a purge: don't delete ignored files if --all is not specified
Emanuele Aina <em@nerd.ocracy.org>
parents: 4462
diff changeset
    46
directory
ca4971347e0a purge: don't delete ignored files if --all is not specified
Emanuele Aina <em@nerd.ocracy.org>
parents: 4462
diff changeset
    47
ignored
ca4971347e0a purge: don't delete ignored files if --all is not specified
Emanuele Aina <em@nerd.ocracy.org>
parents: 4462
diff changeset
    48
r1
4145
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    49
ignored
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    50
Removing file ignored
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    51
directory
2ebdd33fe456 Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff changeset
    52
r1
4307
c8919eb0f315 purge: abort with missing files avoiding problems with name-mangling fs
Emanuele Aina <em@nerd.ocracy.org>
parents: 4155
diff changeset
    53
% abort with missing files until we support name mangling filesystems
c8919eb0f315 purge: abort with missing files avoiding problems with name-mangling fs
Emanuele Aina <em@nerd.ocracy.org>
parents: 4155
diff changeset
    54
refused to run
c8919eb0f315 purge: abort with missing files avoiding problems with name-mangling fs
Emanuele Aina <em@nerd.ocracy.org>
parents: 4155
diff changeset
    55
untracked_file still around
c8919eb0f315 purge: abort with missing files avoiding problems with name-mangling fs
Emanuele Aina <em@nerd.ocracy.org>
parents: 4155
diff changeset
    56
untracked_file
c8919eb0f315 purge: abort with missing files avoiding problems with name-mangling fs
Emanuele Aina <em@nerd.ocracy.org>
parents: 4155
diff changeset
    57
refused to run
c8919eb0f315 purge: abort with missing files avoiding problems with name-mangling fs
Emanuele Aina <em@nerd.ocracy.org>
parents: 4155
diff changeset
    58
untracked_file still around
c8919eb0f315 purge: abort with missing files avoiding problems with name-mangling fs
Emanuele Aina <em@nerd.ocracy.org>
parents: 4155
diff changeset
    59
Removing file untracked_file
c8919eb0f315 purge: abort with missing files avoiding problems with name-mangling fs
Emanuele Aina <em@nerd.ocracy.org>
parents: 4155
diff changeset
    60
directory
c8919eb0f315 purge: abort with missing files avoiding problems with name-mangling fs
Emanuele Aina <em@nerd.ocracy.org>
parents: 4155
diff changeset
    61
r1
4462
a73cf208b2a0 purge: add --include and --exclude options
Emanuele Aina <em@nerd.ocracy.org>
parents: 4307
diff changeset
    62
% skip excluded files
a73cf208b2a0 purge: add --include and --exclude options
Emanuele Aina <em@nerd.ocracy.org>
parents: 4307
diff changeset
    63
directory
a73cf208b2a0 purge: add --include and --exclude options
Emanuele Aina <em@nerd.ocracy.org>
parents: 4307
diff changeset
    64
excluded_file
a73cf208b2a0 purge: add --include and --exclude options
Emanuele Aina <em@nerd.ocracy.org>
parents: 4307
diff changeset
    65
r1
a73cf208b2a0 purge: add --include and --exclude options
Emanuele Aina <em@nerd.ocracy.org>
parents: 4307
diff changeset
    66
% skip files in excluded dirs
a73cf208b2a0 purge: add --include and --exclude options
Emanuele Aina <em@nerd.ocracy.org>
parents: 4307
diff changeset
    67
directory
a73cf208b2a0 purge: add --include and --exclude options
Emanuele Aina <em@nerd.ocracy.org>
parents: 4307
diff changeset
    68
excluded_dir
a73cf208b2a0 purge: add --include and --exclude options
Emanuele Aina <em@nerd.ocracy.org>
parents: 4307
diff changeset
    69
r1
a73cf208b2a0 purge: add --include and --exclude options
Emanuele Aina <em@nerd.ocracy.org>
parents: 4307
diff changeset
    70
file
a73cf208b2a0 purge: add --include and --exclude options
Emanuele Aina <em@nerd.ocracy.org>
parents: 4307
diff changeset
    71
% skip excluded empty dirs
a73cf208b2a0 purge: add --include and --exclude options
Emanuele Aina <em@nerd.ocracy.org>
parents: 4307
diff changeset
    72
directory
a73cf208b2a0 purge: add --include and --exclude options
Emanuele Aina <em@nerd.ocracy.org>
parents: 4307
diff changeset
    73
excluded_dir
a73cf208b2a0 purge: add --include and --exclude options
Emanuele Aina <em@nerd.ocracy.org>
parents: 4307
diff changeset
    74
r1
a73cf208b2a0 purge: add --include and --exclude options
Emanuele Aina <em@nerd.ocracy.org>
parents: 4307
diff changeset
    75
% skip patterns