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