Mercurial > hg
comparison tests/test-obsolete.t @ 33542:b11e8c67fb0f
debugobsolete: also report the number of obsoleted changesets
This seems useful to have the number of obsoleted changesets when calling
debugobsolete.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Sun, 16 Jul 2017 02:33:14 +0200 |
parents | 3325c7dcabaa |
children | 03039ff3082b |
comparison
equal
deleted
inserted
replaced
33541:b47fef6d2365 | 33542:b11e8c67fb0f |
---|---|
49 [255] | 49 [255] |
50 $ hg debugobsolete '00' | 50 $ hg debugobsolete '00' |
51 abort: changeset references must be full hexadecimal node identifiers | 51 abort: changeset references must be full hexadecimal node identifiers |
52 [255] | 52 [255] |
53 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar | 53 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar |
54 obsoleted 1 changesets | |
54 $ hg debugobsolete | 55 $ hg debugobsolete |
55 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'} | 56 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'} |
56 | 57 |
57 (test that mercurial is not confused) | 58 (test that mercurial is not confused) |
58 | 59 |
82 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 83 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
83 $ mkcommit new_c | 84 $ mkcommit new_c |
84 created new head | 85 created new head |
85 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden | 86 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
86 $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120' | 87 $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120' |
88 obsoleted 1 changesets | |
87 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden | 89 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
88 2:245bde4270cd add original_c | 90 2:245bde4270cd add original_c |
89 $ hg debugrevlog -cd | 91 $ hg debugrevlog -cd |
90 # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen | 92 # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen |
91 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0 | 93 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0 |
105 $ hg up '.^' | 107 $ hg up '.^' |
106 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 108 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
107 $ mkcommit new_2_c | 109 $ mkcommit new_2_c |
108 created new head | 110 created new head |
109 $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c` | 111 $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c` |
112 obsoleted 1 changesets | |
110 $ hg debugobsolete | 113 $ hg debugobsolete |
111 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | 114 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
112 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | 115 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
113 | 116 |
114 Register two markers with a missing node | 117 Register two markers with a missing node |
116 $ hg up '.^' | 119 $ hg up '.^' |
117 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 120 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
118 $ mkcommit new_3_c | 121 $ mkcommit new_3_c |
119 created new head | 122 created new head |
120 $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337 | 123 $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337 |
124 obsoleted 1 changesets | |
121 $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c` | 125 $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c` |
122 $ hg debugobsolete | 126 $ hg debugobsolete |
123 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | 127 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
124 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | 128 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
125 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | 129 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
254 $ hg revert -ar 5 | 258 $ hg revert -ar 5 |
255 adding new_3_c | 259 adding new_3_c |
256 $ hg ci -m 'add n3w_3_c' | 260 $ hg ci -m 'add n3w_3_c' |
257 created new head | 261 created new head |
258 $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` | 262 $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` |
263 obsoleted 1 changesets | |
259 $ hg log -r 'bumped()' | 264 $ hg log -r 'bumped()' |
260 $ hg log -G | 265 $ hg log -G |
261 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c | 266 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
262 | | 267 | |
263 | o 2:245bde4270cd (public) [ ] add original_c | 268 | o 2:245bde4270cd (public) [ ] add original_c |
312 $ cd rev0hidden | 317 $ cd rev0hidden |
313 | 318 |
314 $ mkcommit kill0 | 319 $ mkcommit kill0 |
315 $ hg up -q null | 320 $ hg up -q null |
316 $ hg debugobsolete `getid kill0` | 321 $ hg debugobsolete `getid kill0` |
322 obsoleted 1 changesets | |
317 $ mkcommit a | 323 $ mkcommit a |
318 $ mkcommit b | 324 $ mkcommit b |
319 | 325 |
320 Should pick the first visible revision as "repo" node | 326 Should pick the first visible revision as "repo" node |
321 | 327 |
506 $ hg up 'desc("n3w_3_c")' | 512 $ hg up 'desc("n3w_3_c")' |
507 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | 513 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
508 $ mkcommit original_d | 514 $ mkcommit original_d |
509 $ mkcommit original_e | 515 $ mkcommit original_e |
510 $ hg debugobsolete --record-parents `getid original_d` -d '0 0' | 516 $ hg debugobsolete --record-parents `getid original_d` -d '0 0' |
517 obsoleted 1 changesets | |
511 $ hg debugobsolete | grep `getid original_d` | 518 $ hg debugobsolete | grep `getid original_d` |
512 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | 519 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
513 $ hg log -r 'obsolete()' | 520 $ hg log -r 'obsolete()' |
514 4:94b33453f93b (draft *obsolete*) [ ] add original_d | 521 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
515 $ hg summary | 522 $ hg summary |
599 $ hg up -q 'desc(n3w_3_c)' | 606 $ hg up -q 'desc(n3w_3_c)' |
600 $ mkcommit obsolete_e | 607 $ mkcommit obsolete_e |
601 created new head | 608 created new head |
602 $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` \ | 609 $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` \ |
603 > -u 'test <test@example.net>' | 610 > -u 'test <test@example.net>' |
611 obsoleted 1 changesets | |
604 $ hg outgoing ../tmpf # parasite hg outgoing testin | 612 $ hg outgoing ../tmpf # parasite hg outgoing testin |
605 comparing with ../tmpf | 613 comparing with ../tmpf |
606 searching for changes | 614 searching for changes |
607 6:3de5eca88c00 (draft) [tip ] add obsolete_e | 615 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
608 $ hg push ../tmpf | 616 $ hg push ../tmpf |
777 (run 'hg heads .' to see heads, 'hg merge' to merge) | 785 (run 'hg heads .' to see heads, 'hg merge' to merge) |
778 $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`; | 786 $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`; |
779 > do | 787 > do |
780 > hg debugobsolete $node | 788 > hg debugobsolete $node |
781 > done | 789 > done |
790 obsoleted 1 changesets | |
791 obsoleted 1 changesets | |
792 obsoleted 1 changesets | |
793 obsoleted 1 changesets | |
794 obsoleted 1 changesets | |
795 obsoleted 1 changesets | |
796 obsoleted 1 changesets | |
797 obsoleted 1 changesets | |
798 obsoleted 1 changesets | |
799 obsoleted 1 changesets | |
800 obsoleted 1 changesets | |
801 obsoleted 1 changesets | |
802 obsoleted 1 changesets | |
803 obsoleted 1 changesets | |
804 obsoleted 1 changesets | |
805 obsoleted 1 changesets | |
806 obsoleted 1 changesets | |
807 obsoleted 1 changesets | |
808 obsoleted 1 changesets | |
809 obsoleted 1 changesets | |
810 obsoleted 1 changesets | |
811 obsoleted 1 changesets | |
812 obsoleted 1 changesets | |
813 obsoleted 1 changesets | |
814 obsoleted 1 changesets | |
815 obsoleted 1 changesets | |
816 obsoleted 1 changesets | |
817 obsoleted 1 changesets | |
818 obsoleted 1 changesets | |
819 obsoleted 1 changesets | |
820 obsoleted 1 changesets | |
821 obsoleted 1 changesets | |
822 obsoleted 1 changesets | |
823 obsoleted 1 changesets | |
824 obsoleted 1 changesets | |
825 obsoleted 1 changesets | |
826 obsoleted 1 changesets | |
827 obsoleted 1 changesets | |
828 obsoleted 1 changesets | |
829 obsoleted 1 changesets | |
830 obsoleted 1 changesets | |
831 obsoleted 1 changesets | |
832 obsoleted 1 changesets | |
833 obsoleted 1 changesets | |
834 obsoleted 1 changesets | |
835 obsoleted 1 changesets | |
836 obsoleted 1 changesets | |
837 obsoleted 1 changesets | |
838 obsoleted 1 changesets | |
839 obsoleted 1 changesets | |
840 obsoleted 1 changesets | |
841 obsoleted 1 changesets | |
842 obsoleted 1 changesets | |
843 obsoleted 1 changesets | |
844 obsoleted 1 changesets | |
845 obsoleted 1 changesets | |
846 obsoleted 1 changesets | |
847 obsoleted 1 changesets | |
848 obsoleted 1 changesets | |
849 obsoleted 1 changesets | |
782 $ hg up tip | 850 $ hg up tip |
783 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 851 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
784 | 852 |
785 #if serve | 853 #if serve |
786 | 854 |
838 #endif | 906 #endif |
839 | 907 |
840 Several troubles on the same changeset (create an unstable and bumped changeset) | 908 Several troubles on the same changeset (create an unstable and bumped changeset) |
841 | 909 |
842 $ hg debugobsolete `getid obsolete_e` | 910 $ hg debugobsolete `getid obsolete_e` |
911 obsoleted 1 changesets | |
843 $ hg debugobsolete `getid original_c` `getid babar` | 912 $ hg debugobsolete `getid original_c` `getid babar` |
844 $ hg log --config ui.logtemplate= -r 'bumped() and unstable()' | 913 $ hg log --config ui.logtemplate= -r 'bumped() and unstable()' |
845 changeset: 7:50c51b361e60 | 914 changeset: 7:50c51b361e60 |
846 user: test | 915 user: test |
847 date: Thu Jan 01 00:00:00 1970 +0000 | 916 date: Thu Jan 01 00:00:00 1970 +0000 |
1082 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | 1151 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
1083 $ hg graft 1 | 1152 $ hg graft 1 |
1084 grafting 1:1c9eddb02162 "content-1" (tip) | 1153 grafting 1:1c9eddb02162 "content-1" (tip) |
1085 | 1154 |
1086 $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'` | 1155 $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'` |
1156 obsoleted 1 changesets | |
1087 | 1157 |
1088 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | 1158 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
1089 $ cat hg.pid >> $DAEMON_PIDS | 1159 $ cat hg.pid >> $DAEMON_PIDS |
1090 | 1160 |
1091 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1' | 1161 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1' |