Mercurial > hg > mercurial-crew
comparison tests/test-push-http.t @ 15131:7c26ce9edbd2
rollback: only restore dirstate and branch when appropriate.
If the working dir parent was destroyed by rollback, then the old
behaviour is perfectly reasonable: restore dirstate, branch, and
bookmarks. That way the working dir moves back to an existing
changeset rather than becoming an orphan.
But if the working dir parent was unaffected -- say, you updated to an
older changeset and then did rollback -- then it's silly to restore
dirstate and branch. So don't do that. Leave the status of the working
dir alone. (But always restore bookmarks, because that file refers to
changeset IDs that may have been destroyed.)
author | Greg Ward <greg@gerg.ca> |
---|---|
date | Sun, 18 Sep 2011 19:59:33 -0400 |
parents | ce99d887585f |
children | c5c9ca3719f9 |
comparison
equal
deleted
inserted
replaced
15130:3d44e68360a6 | 15131:7c26ce9edbd2 |
---|---|
62 remote: added 1 changesets with 1 changes to 1 files | 62 remote: added 1 changesets with 1 changes to 1 files |
63 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob) | 63 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob) |
64 % serve errors | 64 % serve errors |
65 $ hg rollback | 65 $ hg rollback |
66 repository tip rolled back to revision 0 (undo serve) | 66 repository tip rolled back to revision 0 (undo serve) |
67 working directory now based on revision 0 | |
68 | 67 |
69 expect success, server lacks the httpheader capability | 68 expect success, server lacks the httpheader capability |
70 | 69 |
71 $ CAP=httpheader | 70 $ CAP=httpheader |
72 $ . "$TESTDIR/notcapable" | 71 $ . "$TESTDIR/notcapable" |
79 remote: added 1 changesets with 1 changes to 1 files | 78 remote: added 1 changesets with 1 changes to 1 files |
80 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob) | 79 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob) |
81 % serve errors | 80 % serve errors |
82 $ hg rollback | 81 $ hg rollback |
83 repository tip rolled back to revision 0 (undo serve) | 82 repository tip rolled back to revision 0 (undo serve) |
84 working directory now based on revision 0 | |
85 | 83 |
86 expect success, server lacks the unbundlehash capability | 84 expect success, server lacks the unbundlehash capability |
87 | 85 |
88 $ CAP=unbundlehash | 86 $ CAP=unbundlehash |
89 $ . "$TESTDIR/notcapable" | 87 $ . "$TESTDIR/notcapable" |
96 remote: added 1 changesets with 1 changes to 1 files | 94 remote: added 1 changesets with 1 changes to 1 files |
97 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob) | 95 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob) |
98 % serve errors | 96 % serve errors |
99 $ hg rollback | 97 $ hg rollback |
100 repository tip rolled back to revision 0 (undo serve) | 98 repository tip rolled back to revision 0 (undo serve) |
101 working directory now based on revision 0 | |
102 | 99 |
103 expect authorization error: all users denied | 100 expect authorization error: all users denied |
104 | 101 |
105 $ echo '[web]' > .hg/hgrc | 102 $ echo '[web]' > .hg/hgrc |
106 $ echo 'push_ssl = false' >> .hg/hgrc | 103 $ echo 'push_ssl = false' >> .hg/hgrc |