##// END OF EJS Templates
revlog: skeleton support for version 2 revlogs...
revlog: skeleton support for version 2 revlogs There are a number of improvements we want to make to revlogs that will require a new version - version 2. It is unclear what the full set of improvements will be or when we'll be done with them. What I do know is that the process will likely take longer than a single release, will require input from various stakeholders to evaluate changes, and will have many contentious debates and bikeshedding. It is unrealistic to develop revlog version 2 up front: there are just too many uncertainties that we won't know until things are implemented and experiments are run. Some changes will also be invasive and prone to bit rot, so sitting on dozens of patches is not practical. This commit introduces skeleton support for version 2 revlogs in a way that is flexible and not bound by backwards compatibility concerns. An experimental repo requirement for denoting revlog v2 has been added. The requirement string has a sub-version component to it. This will allow us to declare multiple requirements in the course of developing revlog v2. Whenever we change the in-development revlog v2 format, we can tweak the string, creating a new requirement and locking out old clients. This will allow us to make as many backwards incompatible changes and experiments to revlog v2 as we want. In other words, we can land code and make meaningful progress towards revlog v2 while still maintaining extreme format flexibility up until the point we freeze the format and remove the experimental labels. To enable the new repo requirement, you must supply an experimental and undocumented config option. But not just any boolean flag will do: you need to explicitly use a value that no sane person should ever type. This is an additional guard against enabling revlog v2 on an installation it shouldn't be enabled on. The specific scenario I'm trying to prevent is say a user with a 4.4 client with a frozen format enabling the option but then downgrading to 4.3 and accidentally creating repos with an outdated and unsupported repo format. Requiring a "challenge" string should prevent this. Because the format is not yet finalized and I don't want to take any chances, revlog v2's version is currently 0xDEAD. I figure squatting on a value we're likely never to use as an actual revlog version to mean "internal testing only" is acceptable. And "dead" is easily recognized as something meaningful. There is a bunch of cleanup that is needed before work on revlog v2 begins in earnest. I plan on doing that work once this patch is accepted and we're comfortable with the idea of starting down this path.

File last commit:

r30229:69ffbbe7 stable
r32697:19b9fc40 default
Show More
test-up-local-change.t
252 lines | 6.1 KiB | text/troff | Tads3Lexer
/ tests / test-up-local-change.t
Nicolas Dumazet
tests: unify test-up-local-change
r12120 $ HGMERGE=true; export HGMERGE
Martin Geisler
tests: remove redundant mkdir...
r13956 $ hg init r1
Nicolas Dumazet
tests: unify test-up-local-change
r12120 $ cd r1
$ echo a > a
$ hg addremove
adding a
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg commit -m "1"
Nicolas Dumazet
tests: unify test-up-local-change
r12120
$ hg clone . ../r2
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd ../r2
$ hg up
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo abc > a
$ hg diff --nodates
Martin Geisler
tests: remove unneeded -d flags...
r12156 diff -r c19d34741b0a a
Nicolas Dumazet
tests: unify test-up-local-change
r12120 --- a/a
+++ b/a
@@ -1,1 +1,1 @@
-a
+abc
$ cd ../r1
$ echo b > b
$ echo a2 > a
$ hg addremove
adding b
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg commit -m "2"
Nicolas Dumazet
tests: unify test-up-local-change
r12120
$ cd ../r2
$ hg -q pull ../r1
$ hg status
M a
$ hg parents
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 0:c19d34741b0a
Nicolas Dumazet
tests: unify test-up-local-change
r12120 user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-up-local-change
r12120 summary: 1
$ hg --debug up
searching for copies back to rev 1
unmatched files in other:
b
resolving manifests
Siddharth Agarwal
manifestmerge: pass in branchmerge and force separately...
r18605 branchmerge: False, force: False, partial: False
Martin Geisler
merge: make debug output easier to read...
r15625 ancestor: c19d34741b0a, local: c19d34741b0a+, remote: 1e71731e6fbb
Mads Kiilerich
merge: change debug logging - test output changes but no real changes...
r21391 preserving a for resolve of a
Mads Kiilerich
merge: change priority / ordering of merge actions...
r21389 b: remote created -> g
Bryan O'Sullivan
tests: update test output (will be folded into parent)
r18631 getting b
Siddharth Agarwal
merge.mergestate: perform all premerges before any merges (BC)...
r26618 a: versions differ -> m (premerge)
Siddharth Agarwal
filemerge: add debug output for whether this is a change/delete conflict...
r27161 picked tool 'true' for a (binary False symlink False changedelete False)
Nicolas Dumazet
tests: unify test-up-local-change
r12120 merging a
Martin Geisler
tests: remove unneeded -d flags...
r12156 my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a
Siddharth Agarwal
merge.mergestate: perform all premerges before any merges (BC)...
r26618 a: versions differ -> m (merge)
Siddharth Agarwal
filemerge: add debug output for whether this is a change/delete conflict...
r27161 picked tool 'true' for a (binary False symlink False changedelete False)
Siddharth Agarwal
filemerge: break overall filemerge into separate premerge and merge steps...
r26611 my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a
launching merge tool: true *$TESTTMP/r2/a* * * (glob)
Mads Kiilerich
merge: better debug messages before/after invoking external merge tool
r24727 merge tool returned: 0
Nicolas Dumazet
tests: unify test-up-local-change
r12120 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
$ hg parents
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 1:1e71731e6fbb
Nicolas Dumazet
tests: unify test-up-local-change
r12120 tag: tip
user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-up-local-change
r12120 summary: 2
$ hg --debug up 0
Gábor Stefanik
update: enable copy tracing for backwards and non-linear updates...
r30200 starting 4 threads for background file closing (?)
searching for copies back to rev 0
unmatched files in local (from topological common ancestor):
b
Nicolas Dumazet
tests: unify test-up-local-change
r12120 resolving manifests
Siddharth Agarwal
manifestmerge: pass in branchmerge and force separately...
r18605 branchmerge: False, force: False, partial: False
Martin Geisler
merge: make debug output easier to read...
r15625 ancestor: 1e71731e6fbb, local: 1e71731e6fbb+, remote: c19d34741b0a
Mads Kiilerich
merge: change debug logging - test output changes but no real changes...
r21391 preserving a for resolve of a
Mads Kiilerich
merge: delay debug messages for merge actions...
r18541 b: other deleted -> r
Bryan O'Sullivan
tests: update test output (will be folded into parent)
r18631 removing b
Matt Harbison
tests: flag Windows specific lines about background closing as optional
r28318 starting 4 threads for background file closing (?)
Siddharth Agarwal
merge.mergestate: perform all premerges before any merges (BC)...
r26618 a: versions differ -> m (premerge)
Siddharth Agarwal
filemerge: add debug output for whether this is a change/delete conflict...
r27161 picked tool 'true' for a (binary False symlink False changedelete False)
Nicolas Dumazet
tests: unify test-up-local-change
r12120 merging a
Martin Geisler
tests: remove unneeded -d flags...
r12156 my a@1e71731e6fbb+ other a@c19d34741b0a ancestor a@1e71731e6fbb
Siddharth Agarwal
merge.mergestate: perform all premerges before any merges (BC)...
r26618 a: versions differ -> m (merge)
Siddharth Agarwal
filemerge: add debug output for whether this is a change/delete conflict...
r27161 picked tool 'true' for a (binary False symlink False changedelete False)
Siddharth Agarwal
filemerge: break overall filemerge into separate premerge and merge steps...
r26611 my a@1e71731e6fbb+ other a@c19d34741b0a ancestor a@1e71731e6fbb
launching merge tool: true *$TESTTMP/r2/a* * * (glob)
Mads Kiilerich
merge: better debug messages before/after invoking external merge tool
r24727 merge tool returned: 0
Nicolas Dumazet
tests: unify test-up-local-change
r12120 0 files updated, 1 files merged, 1 files removed, 0 files unresolved
$ hg parents
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 0:c19d34741b0a
Nicolas Dumazet
tests: unify test-up-local-change
r12120 user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-up-local-change
r12120 summary: 1
$ hg --debug up
searching for copies back to rev 1
unmatched files in other:
b
resolving manifests
Siddharth Agarwal
manifestmerge: pass in branchmerge and force separately...
r18605 branchmerge: False, force: False, partial: False
Martin Geisler
merge: make debug output easier to read...
r15625 ancestor: c19d34741b0a, local: c19d34741b0a+, remote: 1e71731e6fbb
Mads Kiilerich
merge: change debug logging - test output changes but no real changes...
r21391 preserving a for resolve of a
Mads Kiilerich
merge: change priority / ordering of merge actions...
r21389 b: remote created -> g
Bryan O'Sullivan
tests: update test output (will be folded into parent)
r18631 getting b
Siddharth Agarwal
merge.mergestate: perform all premerges before any merges (BC)...
r26618 a: versions differ -> m (premerge)
Siddharth Agarwal
filemerge: add debug output for whether this is a change/delete conflict...
r27161 picked tool 'true' for a (binary False symlink False changedelete False)
Nicolas Dumazet
tests: unify test-up-local-change
r12120 merging a
Martin Geisler
tests: remove unneeded -d flags...
r12156 my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a
Siddharth Agarwal
merge.mergestate: perform all premerges before any merges (BC)...
r26618 a: versions differ -> m (merge)
Siddharth Agarwal
filemerge: add debug output for whether this is a change/delete conflict...
r27161 picked tool 'true' for a (binary False symlink False changedelete False)
Siddharth Agarwal
filemerge: break overall filemerge into separate premerge and merge steps...
r26611 my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a
launching merge tool: true *$TESTTMP/r2/a* * * (glob)
Mads Kiilerich
merge: better debug messages before/after invoking external merge tool
r24727 merge tool returned: 0
Nicolas Dumazet
tests: unify test-up-local-change
r12120 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
$ hg parents
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 1:1e71731e6fbb
Nicolas Dumazet
tests: unify test-up-local-change
r12120 tag: tip
user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-up-local-change
r12120 summary: 2
$ hg -v history
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 1:1e71731e6fbb
Nicolas Dumazet
tests: unify test-up-local-change
r12120 tag: tip
user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-up-local-change
r12120 files: a b
description:
2
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 0:c19d34741b0a
Nicolas Dumazet
tests: unify test-up-local-change
r12120 user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-up-local-change
r12120 files: a
description:
1
$ hg diff --nodates
Martin Geisler
tests: remove unneeded -d flags...
r12156 diff -r 1e71731e6fbb a
Nicolas Dumazet
tests: unify test-up-local-change
r12120 --- a/a
+++ b/a
@@ -1,1 +1,1 @@
-a2
+abc
create a second head
$ cd ../r1
$ hg up 0
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo b2 > b
$ echo a3 > a
$ hg addremove
adding b
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg commit -m "3"
Nicolas Dumazet
tests: unify test-up-local-change
r12120 created new head
$ cd ../r2
$ hg -q pull ../r1
$ hg status
M a
$ hg parents
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 1:1e71731e6fbb
Nicolas Dumazet
tests: unify test-up-local-change
r12120 user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-up-local-change
r12120 summary: 2
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 $ hg --debug up
Pierre-Yves David
update: change default destination to tipmost descendant (issue4673) (BC)...
r28065 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1 other heads for branch "default"
Nicolas Dumazet
tests: unify test-up-local-change
r12120
Martin von Zweigbergk
update: add tests for untracked local file...
r23477 test conflicting untracked files
$ hg up -qC 0
$ echo untracked > b
$ hg st
? b
$ hg up 1
b: untracked file differs
abort: untracked files in working directory differ from files in requested revision
[255]
$ rm b
test conflicting untracked ignored file
$ hg up -qC 0
$ echo ignored > .hgignore
$ hg add .hgignore
$ hg ci -m 'add .hgignore'
created new head
$ echo ignored > ignored
$ hg add ignored
$ hg ci -m 'add ignored file'
$ hg up -q 'desc("add .hgignore")'
$ echo untracked > ignored
$ hg st
$ hg up 'desc("add ignored file")'
Martin von Zweigbergk
update: don't overwrite untracked ignored files on update...
r23478 ignored: untracked file differs
abort: untracked files in working directory differ from files in requested revision
[255]
Martin von Zweigbergk
update: add tests for untracked local file...
r23477
Nicolas Dumazet
tests: unify test-up-local-change
r12120 test a local add
$ cd ..
$ hg init a
$ hg init b
$ echo a > a/a
$ echo a > b/a
$ hg --cwd a commit -A -m a
adding a
$ cd b
$ hg add a
$ hg pull -u ../a
pulling from ../a
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg st
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913
Gábor Stefanik
update: enable copy tracing for backwards and non-linear updates...
r30200 test updating backwards through a rename
$ hg mv a b
$ hg ci -m b
$ echo b > b
$ hg up -q 0
$ hg st
M a
$ hg diff --nodates
diff -r cb9a9f314b8b a
--- a/a
+++ b/a
@@ -1,1 +1,1 @@
-a
+b
Gábor Stefanik
merge: avoid superfluous filemerges when grafting through renames (issue5407)...
r30229 test for superfluous filemerge of clean files renamed in the past
$ hg up -qC tip
$ echo c > c
$ hg add c
$ hg up -qt:fail 0
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913 $ cd ..