Mercurial > hg
view tests/test-nested-repo.t @ 20477:2607a21bb40b
pull: move transaction logic into the pull object
Most local change that occurs during a pull are doing within a `transaction`.
Currently this mean (1) adding new changeset (2) adding obsolescence markers. We
want the two operations to be done in the same transaction. However we do not
want to create a transaction if nothing is added to the repo. Creating an empty
transaction would drop the previous transaction data and confuse tool and people
who are still using rollback.
So the current pull code has some logic to create and handle this transaction on
demand. We are moving this logic in to the `pulloperation` object itself to
simplify this lazy creation logic through all different par of the push.
Note that, in the future, other part of pull (phases, bookmark) will probably
want to be part of the transaction too.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Fri, 31 Jan 2014 01:04:05 -0800 |
parents | 4cdec37f0018 |
children | 4441705b7111 |
line wrap: on
line source
$ hg init a $ cd a $ hg init b $ echo x > b/x Should print nothing: $ hg add b $ hg st $ echo y > b/y $ hg st Should fail: $ hg st b/x abort: path 'b/x' is inside nested repo 'b' (glob) [255] $ hg add b/x abort: path 'b/x' is inside nested repo 'b' (glob) [255] Should fail: $ hg add b b/x abort: path 'b/x' is inside nested repo 'b' (glob) [255] $ hg st Should arguably print nothing: $ hg st b $ echo a > a $ hg ci -Ama a Should fail: $ hg mv a b abort: path 'b/a' is inside nested repo 'b' (glob) [255] $ hg st $ cd ..