##// END OF EJS Templates
update: support updating to hidden cset if directaccess config is set...
Pulkit Goyal -
r35536:02fdb8c0 default
parent child Browse files
Show More
@@ -5528,7 +5528,11 b' def update(ui, repo, node=None, rev=None'
5528
5528
5529 # if we defined a bookmark, we have to remember the original name
5529 # if we defined a bookmark, we have to remember the original name
5530 brev = rev
5530 brev = rev
5531 rev = scmutil.revsingle(repo, rev, rev).rev()
5531 repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn')
5532 ctx = scmutil.revsingle(repo, rev, rev)
5533 rev = ctx.rev()
5534 if ctx.hidden():
5535 ui.warn(_("updating to a hidden changeset %s\n") % ctx.hex()[:12])
5532
5536
5533 repo.ui.setconfig('ui', 'forcemerge', tool, 'update')
5537 repo.ui.setconfig('ui', 'forcemerge', tool, 'update')
5534
5538
@@ -143,6 +143,15 b' Testing with hash'
143 $ hg status --change 28ad74
143 $ hg status --change 28ad74
144 A c
144 A c
145
145
146 `hg update`
147
148 $ hg up 28ad74
149 updating to a hidden changeset 28ad74487de9
150 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
151
152 $ hg up 3
153 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
154
146 Commands with undefined cmdtype should not work right now
155 Commands with undefined cmdtype should not work right now
147
156
148 $ hg phase -r 28ad74
157 $ hg phase -r 28ad74
@@ -1824,6 +1824,7 b' enable obsolete to test hidden feature'
1824 test that parent prevent a changeset to be hidden
1824 test that parent prevent a changeset to be hidden
1825
1825
1826 $ hg up 1 -q --hidden
1826 $ hg up 1 -q --hidden
1827 updating to a hidden changeset a765632148dc
1827 $ hg log --template='{rev}:{node}\n'
1828 $ hg log --template='{rev}:{node}\n'
1828 1:a765632148dc55d38c35c4f247c618701886cb2f
1829 1:a765632148dc55d38c35c4f247c618701886cb2f
1829 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1830 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
@@ -75,6 +75,7 b' Test setup'
75 Check templates
75 Check templates
76 ---------------
76 ---------------
77 $ hg up 'desc(A0)' --hidden
77 $ hg up 'desc(A0)' --hidden
78 updating to a hidden changeset 471f378eab4c
78 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
79 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
79
80
80 Predecessors template should show current revision as it is the working copy
81 Predecessors template should show current revision as it is the working copy
@@ -146,6 +147,7 b' Predecessors template should show curren'
146 summary: ROOT
147 summary: ROOT
147
148
148 $ hg up 'desc(A1)' --hidden
149 $ hg up 'desc(A1)' --hidden
150 updating to a hidden changeset a468dc9b3633
149 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
151 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
150
152
151 Predecessors template should show current revision as it is the working copy
153 Predecessors template should show current revision as it is the working copy
@@ -413,6 +415,7 b' Check templates'
413 ---------------
415 ---------------
414
416
415 $ hg up 'obsolete()' --hidden
417 $ hg up 'obsolete()' --hidden
418 updating to a hidden changeset 471597cad322
416 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
419 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
417
420
418 Predecessors template should show current revision as it is the working copy
421 Predecessors template should show current revision as it is the working copy
@@ -620,6 +623,7 b' Check templates'
620 ---------------
623 ---------------
621
624
622 $ hg up 'desc(A0)' --hidden
625 $ hg up 'desc(A0)' --hidden
626 updating to a hidden changeset 471f378eab4c
623 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
627 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
624
628
625 Predecessors template should show current revision as it is the working copy
629 Predecessors template should show current revision as it is the working copy
@@ -644,6 +648,7 b' Predecessors template should show curren'
644 o ea207398892e
648 o ea207398892e
645
649
646 $ hg up 'desc(B0)' --hidden
650 $ hg up 'desc(B0)' --hidden
651 updating to a hidden changeset 0dec01379d3b
647 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
652 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
648
653
649 Predecessors template should show both predecessors as they should be both
654 Predecessors template should show both predecessors as they should be both
@@ -809,6 +814,7 b' Test setup'
809 summary: ROOT
814 summary: ROOT
810
815
811 $ hg update --hidden 'desc(A0)'
816 $ hg update --hidden 'desc(A0)'
817 updating to a hidden changeset 471f378eab4c
812 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
818 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
813 $ hg commit --amend -m "A2"
819 $ hg commit --amend -m "A2"
814 $ hg log --hidden -G
820 $ hg log --hidden -G
@@ -880,6 +886,7 b' Check templates'
880 ---------------
886 ---------------
881
887
882 $ hg up 'desc(A0)' --hidden
888 $ hg up 'desc(A0)' --hidden
889 updating to a hidden changeset 471f378eab4c
883 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
890 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
884
891
885 Predecessors template should show current revision as it is the working copy
892 Predecessors template should show current revision as it is the working copy
@@ -1144,6 +1151,7 b' Check templates'
1144 ---------------
1151 ---------------
1145
1152
1146 $ hg up 'desc(A0)' --hidden
1153 $ hg up 'desc(A0)' --hidden
1154 updating to a hidden changeset 471f378eab4c
1147 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1155 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1148
1156
1149 Predecessors template should show current revision as it is the working copy
1157 Predecessors template should show current revision as it is the working copy
@@ -1168,6 +1176,7 b' Predecessors template should show curren'
1168 o ea207398892e
1176 o ea207398892e
1169
1177
1170 $ hg up 'desc(B0)' --hidden
1178 $ hg up 'desc(B0)' --hidden
1179 updating to a hidden changeset 0dec01379d3b
1171 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1180 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1172
1181
1173 Predecessors template should both predecessors as they are visible
1182 Predecessors template should both predecessors as they are visible
@@ -1198,6 +1207,7 b' Predecessors template should both predec'
1198 o ea207398892e
1207 o ea207398892e
1199
1208
1200 $ hg up 'desc(B1)' --hidden
1209 $ hg up 'desc(B1)' --hidden
1210 updating to a hidden changeset b7ea6d14e664
1201 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1211 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1202
1212
1203 Predecessors template should both predecessors as they are visible
1213 Predecessors template should both predecessors as they are visible
@@ -1599,6 +1609,7 b' Check templates'
1599
1609
1600
1610
1601 $ hg up -r "desc(B0)" --hidden
1611 $ hg up -r "desc(B0)" --hidden
1612 updating to a hidden changeset 0dec01379d3b
1602 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1613 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1603 $ hg tlog
1614 $ hg tlog
1604 o f897c6137566
1615 o f897c6137566
@@ -2059,6 +2070,7 b' Check templates'
2059 o ea207398892e
2070 o ea207398892e
2060
2071
2061 $ hg up --hidden 4
2072 $ hg up --hidden 4
2073 updating to a hidden changeset 9bd10a0775e4
2062 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2074 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2063 $ hg rebase -r 7 -d 8 --config extensions.rebase=
2075 $ hg rebase -r 7 -d 8 --config extensions.rebase=
2064 rebasing 7:ba2ed02b0c9a "Add A,B,C"
2076 rebasing 7:ba2ed02b0c9a "Add A,B,C"
@@ -2303,6 +2315,7 b' Test setup'
2303 obsoleted 1 changesets
2315 obsoleted 1 changesets
2304
2316
2305 $ hg up -r "desc(A0)" --hidden
2317 $ hg up -r "desc(A0)" --hidden
2318 updating to a hidden changeset 471f378eab4c
2306 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2319 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2307 $ hg commit --amend -m "A2"
2320 $ hg commit --amend -m "A2"
2308 $ hg debugobsolete --record-parent `getid "."`
2321 $ hg debugobsolete --record-parent `getid "."`
@@ -2312,6 +2325,7 b' Check output'
2312 ------------
2325 ------------
2313
2326
2314 $ hg up "desc(A0)" --hidden
2327 $ hg up "desc(A0)" --hidden
2328 updating to a hidden changeset 471f378eab4c
2315 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2329 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2316 $ hg tlog
2330 $ hg tlog
2317 @ 471f378eab4c
2331 @ 471f378eab4c
@@ -2465,6 +2479,7 b' Check templates'
2465 ---------------
2479 ---------------
2466
2480
2467 $ hg up 'desc("A0")' --hidden
2481 $ hg up 'desc("A0")' --hidden
2482 updating to a hidden changeset 471597cad322
2468 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2483 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2469
2484
2470 # todo: the obsfate output is not ideal
2485 # todo: the obsfate output is not ideal
@@ -2476,6 +2491,7 b' Check templates'
2476 o ea207398892e
2491 o ea207398892e
2477
2492
2478 $ hg up -r 'desc("A2")' --hidden
2493 $ hg up -r 'desc("A2")' --hidden
2494 updating to a hidden changeset 0d0ef4bdf70e
2479 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2495 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2480
2496
2481 $ hg fatelog --hidden
2497 $ hg fatelog --hidden
@@ -62,6 +62,7 b' Killing a single changeset without repla'
62 $ hg tip
62 $ hg tip
63 -1:000000000000 (public) [tip ]
63 -1:000000000000 (public) [tip ]
64 $ hg up --hidden tip --quiet
64 $ hg up --hidden tip --quiet
65 updating to a hidden changeset 97b7c2d76b18
65
66
66 Killing a single changeset with itself should fail
67 Killing a single changeset with itself should fail
67 (simple local safeguard)
68 (simple local safeguard)
@@ -280,6 +280,7 b' a working copy parent. We should be move'
280 even though it is hidden (until we're moved there).
280 even though it is hidden (until we're moved there).
281
281
282 $ hg --hidden up -qr 'first(hidden())'
282 $ hg --hidden up -qr 'first(hidden())'
283 updating to a hidden changeset 42ccdea3bb16
283 $ hg rebase --rev 13 --dest 15
284 $ hg rebase --rev 13 --dest 15
284 rebasing 13:98f6af4ee953 "C"
285 rebasing 13:98f6af4ee953 "C"
285 $ hg log -G
286 $ hg log -G
@@ -610,6 +611,7 b' test on rebase dropping a merge'
610 Test hidden changesets in the rebase set (issue4504)
611 Test hidden changesets in the rebase set (issue4504)
611
612
612 $ hg up --hidden 9
613 $ hg up --hidden 9
614 updating to a hidden changeset 4bde274eefcf
613 3 files updated, 0 files merged, 1 files removed, 0 files unresolved
615 3 files updated, 0 files merged, 1 files removed, 0 files unresolved
614 $ echo J > J
616 $ echo J > J
615 $ hg add J
617 $ hg add J
@@ -725,6 +727,7 b' setup'
725 $ hg commit --amend -m B1
727 $ hg commit --amend -m B1
726 $ hg commit --amend -m B2
728 $ hg commit --amend -m B2
727 $ hg up --hidden 'desc(B0)'
729 $ hg up --hidden 'desc(B0)'
730 updating to a hidden changeset a8b11f55fb19
728 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
731 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
729 $ echo C > C
732 $ echo C > C
730 $ hg add C
733 $ hg add C
@@ -748,6 +751,7 b' Rebase finds its way in a chain of marke'
748 Even when the chain include missing node
751 Even when the chain include missing node
749
752
750 $ hg up --hidden 'desc(B0)'
753 $ hg up --hidden 'desc(B0)'
754 updating to a hidden changeset a8b11f55fb19
751 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
755 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
752 $ echo D > D
756 $ echo D > D
753 $ hg add D
757 $ hg add D
@@ -862,6 +866,7 b' If a rebase is going to create divergenc'
862 $ hg add bar
866 $ hg add bar
863 $ hg commit --amend -m "10'"
867 $ hg commit --amend -m "10'"
864 $ hg up 10 --hidden
868 $ hg up 10 --hidden
869 updating to a hidden changeset 121d9e3bc4c6
865 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
870 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
866 $ echo "bar" > foo
871 $ echo "bar" > foo
867 $ hg add foo
872 $ hg add foo
@@ -1595,6 +1600,7 b' rebasestate may contain hidden hashes. "'
1595 $ rm .hg/localtags
1600 $ rm .hg/localtags
1596
1601
1597 $ hg update -q $C --hidden
1602 $ hg update -q $C --hidden
1603 updating to a hidden changeset 7829726be4dc
1598 $ hg rebase -s $B -d $D
1604 $ hg rebase -s $B -d $D
1599 rebasing 1:2ec65233581b "B"
1605 rebasing 1:2ec65233581b "B"
1600 merging D
1606 merging D
@@ -520,6 +520,7 b' Test that 4 is detected as the no-argume'
520 the bookmark with it
520 the bookmark with it
521 $ hg up --quiet 0 # we should be able to update to 3 directly
521 $ hg up --quiet 0 # we should be able to update to 3 directly
522 $ hg up --quiet --hidden 3 # but not implemented yet.
522 $ hg up --quiet --hidden 3 # but not implemented yet.
523 updating to a hidden changeset 6efa171f091b
523 $ hg book -f bm
524 $ hg book -f bm
524 $ hg up
525 $ hg up
525 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
526 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -530,6 +531,7 b' the bookmark with it'
530 Test that 5 is detected as a valid destination from 1
531 Test that 5 is detected as a valid destination from 1
531 $ hg up --quiet 0 # we should be able to update to 3 directly
532 $ hg up --quiet 0 # we should be able to update to 3 directly
532 $ hg up --quiet --hidden 3 # but not implemented yet.
533 $ hg up --quiet --hidden 3 # but not implemented yet.
534 updating to a hidden changeset 6efa171f091b
533 $ hg up 5
535 $ hg up 5
534 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
536 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
535
537
General Comments 0
You need to be logged in to leave comments. Login now