##// END OF EJS Templates
bookmarks: fix bug that activated a bookmark even with -r passed...
Sean Farley -
r19112:23f785b3 2.6 stable
parent child Browse files
Show More
@@ -880,7 +880,7 b' def bookmark(ui, repo, mark=None, rev=No'
880 tgt = scmutil.revsingle(repo, rev).node()
880 tgt = scmutil.revsingle(repo, rev).node()
881 checkconflict(repo, mark, force, tgt)
881 checkconflict(repo, mark, force, tgt)
882 marks[mark] = tgt
882 marks[mark] = tgt
883 if not inactive and cur == marks[mark]:
883 if not inactive and cur == marks[mark] and not rev:
884 bookmarks.setcurrent(repo, mark)
884 bookmarks.setcurrent(repo, mark)
885 elif cur != tgt and mark == repo._bookmarkcurrent:
885 elif cur != tgt and mark == repo._bookmarkcurrent:
886 bookmarks.setcurrent(repo, None)
886 bookmarks.setcurrent(repo, None)
@@ -91,14 +91,19 b' update to tip'
91 $ hg update tip
91 $ hg update tip
92 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
92 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
93
93
94 set bookmark Y using -r .
94 set bookmark Y using -r . but make sure that the active
95 bookmark is not activated
95
96
96 $ hg bookmark -r . Y
97 $ hg bookmark -r . Y
97
98
98 list bookmarks
99 list bookmarks, Y should not be active
99
100
100 $ hg bookmark
101 $ hg bookmark
101 * Y 0:719295282060
102 Y 0:719295282060
103
104 now, activate Y
105
106 $ hg up -q Y
102
107
103 set bookmark Z using -i
108 set bookmark Z using -i
104
109
@@ -26,6 +26,7 b' initialize repository'
26
26
27 $ hg bookmark -r 1 one
27 $ hg bookmark -r 1 one
28 $ hg bookmark -r 3 two
28 $ hg bookmark -r 3 two
29 $ hg up -q two
29
30
30 bookmark list
31 bookmark list
31
32
@@ -157,6 +157,7 b' list bookmarks'
157 bookmarks from a revset
157 bookmarks from a revset
158 $ hg bookmark -r '.^1' REVSET
158 $ hg bookmark -r '.^1' REVSET
159 $ hg bookmark -r ':tip' TIP
159 $ hg bookmark -r ':tip' TIP
160 $ hg up -q TIP
160 $ hg bookmarks
161 $ hg bookmarks
161 REVSET 0:f7b1eb17ad24
162 REVSET 0:f7b1eb17ad24
162 * TIP 2:db815d6d32e6
163 * TIP 2:db815d6d32e6
@@ -601,8 +602,8 b' test clearing divergent bookmarks of lin'
601 Z 0:f7b1eb17ad24
602 Z 0:f7b1eb17ad24
602 Z@1 1:925d80f479bb
603 Z@1 1:925d80f479bb
603 Z@2 2:db815d6d32e6
604 Z@2 2:db815d6d32e6
604 * Z@3 3:9ba5f110a0b3
605 Z@3 3:9ba5f110a0b3
605 four 3:9ba5f110a0b3
606 * four 3:9ba5f110a0b3
606 should-end-on-two 2:db815d6d32e6
607 should-end-on-two 2:db815d6d32e6
607 $ hg bookmark Z
608 $ hg bookmark Z
608 moving bookmark 'Z' forward from f7b1eb17ad24
609 moving bookmark 'Z' forward from f7b1eb17ad24
@@ -620,9 +621,9 b' test clearing only a single divergent bo'
620 $ hg book foo@3 -r 3
621 $ hg book foo@3 -r 3
621 $ hg book foo -r foo@3
622 $ hg book foo -r foo@3
622 $ hg book
623 $ hg book
623 Z 3:9ba5f110a0b3
624 * Z 3:9ba5f110a0b3
624 Z@1 1:925d80f479bb
625 Z@1 1:925d80f479bb
625 * foo 3:9ba5f110a0b3
626 foo 3:9ba5f110a0b3
626 foo@1 0:f7b1eb17ad24
627 foo@1 0:f7b1eb17ad24
627 foo@2 2:db815d6d32e6
628 foo@2 2:db815d6d32e6
628 four 3:9ba5f110a0b3
629 four 3:9ba5f110a0b3
General Comments 0
You need to be logged in to leave comments. Login now