bookmark: informs of failure to upgrade a bookmark
When we explicitly requested to update a bookmark but the bookmark location was
missing locally, we used to silently ignore the case. We now issue a message
about it to point that something wrong is going on.
By chance, we fixed all the cases where is case happened (for explicit pulling
only,
issue4700 is still open). But I think it is still valuable to have a
warning in place in case such issue is reintroduced.
This patch have been tested against
issue4689 test (but without
issue4689 fix).
It give the better but expected failure seen below:
> --- /home/pyd/src/mercurial-dev/tests/test-bookmarks-pushpull.t
> +++ /home/pyd/src/mercurial-dev/tests/test-bookmarks-pushpull.t.err
> @@ -337,12 +337,12 @@
> adding manifests
> adding file changes
> added 1 changesets with 1 changes to 1 files
> - updating bookmark Y
> + remote bookmark Y point to locally missing
0d60821d2197
> (run 'hg update' to get a working copy)
> $ hg book
> * @ 1:
0d2164f0ce0d
> X 1:
0d2164f0ce0d
> - Y 5:
35d1ef0a8d1b
> + Y 4:
b0a5eff05604
> Z 1:
0d2164f0ce0d
>
> Update a bookmark right after the initial lookup -r (
issue4700)
> @@ -387,12 +387,11 @@
> adding manifests
> adding file changes
> added 1 changesets with 1 changes to 1 files
> - updating bookmark Y
> (run 'hg update' to get a working copy)
> $ hg book
> * @ 1:
0d2164f0ce0d
> X 1:
0d2164f0ce0d
> - Y 6:
0d60821d2197
> + Y 4:
b0a5eff05604
> Z 1:
0d2164f0ce0d
> $ hg -R $TESTTMP/pull-race book
> @ 1:
0d2164f0ce0d
http://mercurial.selenic.com/bts/issue1306
Initialize remote repo with branches:
$ hg init remote
$ cd remote
$ echo a > a
$ hg ci -Ama
adding a
$ hg branch br
marked working directory as branch br
(branches are permanent and global, did you want a bookmark?)
$ hg ci -Amb
$ echo c > c
$ hg ci -Amc
adding c
$ hg log
changeset: 2:ae3d9c30ec50
branch: br
tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: c
changeset: 1:3f7f930ca414
branch: br
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: b
changeset: 0:cb9a9f314b8b
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: a
$ cd ..
Try cloning -r branch:
$ hg clone -rbr remote local1
adding changesets
adding manifests
adding file changes
added 3 changesets with 2 changes to 2 files
updating to branch br
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg -R local1 parents
changeset: 2:ae3d9c30ec50
branch: br
tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: c
Try cloning -rother clone#branch:
$ hg clone -r0 remote#br local2
adding changesets
adding manifests
adding file changes
added 3 changesets with 2 changes to 2 files
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg -R local2 parents
changeset: 0:cb9a9f314b8b
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: a
Try cloning -r1 clone#branch:
$ hg clone -r1 remote#br local3
adding changesets
adding manifests
adding file changes
added 3 changesets with 2 changes to 2 files
updating to branch br
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg -R local3 parents
changeset: 1:3f7f930ca414
branch: br
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: b