Mercurial > hg
annotate tests/test-generaldelta.t @ 23327:bd296bb4b5c8
remove: avoid a bogus warning about no tracked files when removing '.'
Previously, any files relative to the root of the repo that match the -I
patterns would be deleted, but the command exited with 1 after printing a
warning:
$ hg remove -S -I 're:.*.txt' .
removing sub1/sub2/folder/test.txt
removing sub1/sub2/test.txt
not removing .: no tracked files
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 16 Nov 2014 00:24:23 -0500 |
parents | 2c886dedd902 |
children | cc0ff93d0c0c |
rev | line source |
---|---|
19764
e92650e39f1c
generaldelta: initialize basecache properly
Wojciech Lopata <lopek@fb.com>
parents:
diff
changeset
|
1 Check whether size of generaldelta revlog is not bigger than its |
e92650e39f1c
generaldelta: initialize basecache properly
Wojciech Lopata <lopek@fb.com>
parents:
diff
changeset
|
2 regular equivalent. Test would fail if generaldelta was naive |
e92650e39f1c
generaldelta: initialize basecache properly
Wojciech Lopata <lopek@fb.com>
parents:
diff
changeset
|
3 implementation of parentdelta: third manifest revision would be fully |
e92650e39f1c
generaldelta: initialize basecache properly
Wojciech Lopata <lopek@fb.com>
parents:
diff
changeset
|
4 inserted due to big distance from its paren revision (zero). |
e92650e39f1c
generaldelta: initialize basecache properly
Wojciech Lopata <lopek@fb.com>
parents:
diff
changeset
|
5 |
e92650e39f1c
generaldelta: initialize basecache properly
Wojciech Lopata <lopek@fb.com>
parents:
diff
changeset
|
6 $ hg init repo |
e92650e39f1c
generaldelta: initialize basecache properly
Wojciech Lopata <lopek@fb.com>
parents:
diff
changeset
|
7 $ cd repo |
e92650e39f1c
generaldelta: initialize basecache properly
Wojciech Lopata <lopek@fb.com>
parents:
diff
changeset
|
8 $ echo foo > foo |
e92650e39f1c
generaldelta: initialize basecache properly
Wojciech Lopata <lopek@fb.com>
parents:
diff
changeset
|
9 $ echo bar > bar |
e92650e39f1c
generaldelta: initialize basecache properly
Wojciech Lopata <lopek@fb.com>
parents:
diff
changeset
|
10 $ hg commit -q -Am boo |
e92650e39f1c
generaldelta: initialize basecache properly
Wojciech Lopata <lopek@fb.com>
parents:
diff
changeset
|
11 $ hg clone --pull . ../gdrepo -q --config format.generaldelta=yes |
e92650e39f1c
generaldelta: initialize basecache properly
Wojciech Lopata <lopek@fb.com>
parents:
diff
changeset
|
12 $ for r in 1 2 3; do |
e92650e39f1c
generaldelta: initialize basecache properly
Wojciech Lopata <lopek@fb.com>
parents:
diff
changeset
|
13 > echo $r > foo |
e92650e39f1c
generaldelta: initialize basecache properly
Wojciech Lopata <lopek@fb.com>
parents:
diff
changeset
|
14 > hg commit -q -m $r |
e92650e39f1c
generaldelta: initialize basecache properly
Wojciech Lopata <lopek@fb.com>
parents:
diff
changeset
|
15 > hg up -q -r 0 |
e92650e39f1c
generaldelta: initialize basecache properly
Wojciech Lopata <lopek@fb.com>
parents:
diff
changeset
|
16 > hg pull . -q -r $r -R ../gdrepo |
e92650e39f1c
generaldelta: initialize basecache properly
Wojciech Lopata <lopek@fb.com>
parents:
diff
changeset
|
17 > done |
19942
2c886dedd902
tests: move generaldelta test to inline python (issue4064)
Matt Mackall <mpm@selenic.com>
parents:
19888
diff
changeset
|
18 |
19764
e92650e39f1c
generaldelta: initialize basecache properly
Wojciech Lopata <lopek@fb.com>
parents:
diff
changeset
|
19 $ cd .. |
19942
2c886dedd902
tests: move generaldelta test to inline python (issue4064)
Matt Mackall <mpm@selenic.com>
parents:
19888
diff
changeset
|
20 >>> import os |
2c886dedd902
tests: move generaldelta test to inline python (issue4064)
Matt Mackall <mpm@selenic.com>
parents:
19888
diff
changeset
|
21 >>> regsize = os.stat("repo/.hg/store/00manifest.i").st_size |
2c886dedd902
tests: move generaldelta test to inline python (issue4064)
Matt Mackall <mpm@selenic.com>
parents:
19888
diff
changeset
|
22 >>> gdsize = os.stat("gdrepo/.hg/store/00manifest.i").st_size |
2c886dedd902
tests: move generaldelta test to inline python (issue4064)
Matt Mackall <mpm@selenic.com>
parents:
19888
diff
changeset
|
23 >>> if regsize < gdsize: |
2c886dedd902
tests: move generaldelta test to inline python (issue4064)
Matt Mackall <mpm@selenic.com>
parents:
19888
diff
changeset
|
24 ... print 'generaldata increased size of manifest' |