equal
deleted
inserted
replaced
84 """ |
84 """ |
85 def updatebookmarks(newid): |
85 def updatebookmarks(newid): |
86 oldbookmarks = repo.nodebookmarks(oldid) |
86 oldbookmarks = repo.nodebookmarks(oldid) |
87 bmchanges = [(b, newid) for b in oldbookmarks] |
87 bmchanges = [(b, newid) for b in oldbookmarks] |
88 if bmchanges: |
88 if bmchanges: |
89 compat.bookmarkapplychanges(repo, tr, bmchanges) |
89 repo._bookmarks.applychanges(repo, tr, bmchanges) |
90 return updatebookmarks |
90 return updatebookmarks |
91 |
91 |
92 def disallowednewunstable(repo, revs): |
92 def disallowednewunstable(repo, revs): |
93 """Check that editing <revs> will not create disallowed unstable |
93 """Check that editing <revs> will not create disallowed unstable |
94 |
94 |
123 lock = repo.lock() |
123 lock = repo.lock() |
124 tr = repo.transaction('prune') |
124 tr = repo.transaction('prune') |
125 bmchanges = [] |
125 bmchanges = [] |
126 for bookmark in bookmarks: |
126 for bookmark in bookmarks: |
127 bmchanges.append((bookmark, None)) |
127 bmchanges.append((bookmark, None)) |
128 compat.bookmarkapplychanges(repo, tr, bmchanges) |
128 repo._bookmarks.applychanges(repo, tr, bmchanges) |
129 tr.close() |
129 tr.close() |
130 for bookmark in sorted(bookmarks): |
130 for bookmark in sorted(bookmarks): |
131 repo.ui.write(_("bookmark '%s' deleted\n") % bookmark) |
131 repo.ui.write(_("bookmark '%s' deleted\n") % bookmark) |
132 finally: |
132 finally: |
133 lockmod.release(tr, lock, wlock) |
133 lockmod.release(tr, lock, wlock) |