##// END OF EJS Templates
journal: track bookmark deletion...
marmoute -
r51701:e9a2e1c7 default
parent child Browse files
Show More
@@ -127,7 +127,10 b' def recordbookmarks(orig, store, fp):'
127 127 repo = store._repo
128 128 if util.safehasattr(repo, 'journal'):
129 129 oldmarks = bookmarks.bmstore(repo)
130 for mark, value in store.items():
130 all_marks = set(b for b, n in oldmarks.items())
131 all_marks.update(b for b, n in store.items())
132 for mark in sorted(all_marks):
133 value = store.get(mark, repo.nullid)
131 134 oldvalue = oldmarks.get(mark, repo.nullid)
132 135 if value != oldvalue:
133 136 repo.journal.record(bookmarktype, mark, oldvalue, value)
@@ -91,6 +91,7 b' Test that we tracks bookmark deletion'
91 91 $ hg book -d babar
92 92 $ hg journal babar
93 93 previous locations of 'babar':
94 000000000000 book -d babar
94 95 cb9a9f314b8b book -f -r '.~1' babar
95 96 1e6c11564562 book -r . babar
96 97
@@ -109,6 +110,7 b' Test that you can list all entries as we'
109 110 $ hg journal --all
110 111 previous locations of the working copy and bookmarks:
111 112 1e6c11564562 baz book -r tip baz
113 000000000000 babar book -d babar
112 114 cb9a9f314b8b babar book -f -r '.~1' babar
113 115 1e6c11564562 babar book -r . babar
114 116 1e6c11564562 bar up
@@ -139,6 +141,7 b' Test that you can list all entries as we'
139 141 $ hg journal "re:ba."
140 142 previous locations of 're:ba.':
141 143 1e6c11564562 baz book -r tip baz
144 000000000000 babar book -d babar
142 145 cb9a9f314b8b babar book -f -r '.~1' babar
143 146 1e6c11564562 babar book -r . babar
144 147 1e6c11564562 bar up
@@ -150,6 +153,7 b' Test that verbose, JSON, template and co'
150 153 $ hg journal --verbose --all
151 154 previous locations of the working copy and bookmarks:
152 155 000000000000 -> 1e6c11564562 foobar baz 1970-01-01 00:00 +0000 book -r tip baz
156 cb9a9f314b8b -> 000000000000 foobar babar 1970-01-01 00:00 +0000 book -d babar
153 157 1e6c11564562 -> cb9a9f314b8b foobar babar 1970-01-01 00:00 +0000 book -f -r '.~1' babar
154 158 000000000000 -> 1e6c11564562 foobar babar 1970-01-01 00:00 +0000 book -r . babar
155 159 cb9a9f314b8b -> 1e6c11564562 foobar bar 1970-01-01 00:00 +0000 up
General Comments 0
You need to be logged in to leave comments. Login now