Mercurial > hg
comparison hgext/bookmarks.py @ 11561:e5aaaef91a27 stable
bookmarks: ensure current bookmark is updated when specified with -r .
"hg bookmark -r . foo" should be equivalent to "hg bookmark foo".
author | Brodie Rao <brodie@bitheap.org> |
---|---|
date | Wed, 14 Jul 2010 11:02:20 -0400 |
parents | b9a46acdfe1f |
children | ead7550f1aab |
comparison
equal
deleted
inserted
replaced
11555:d8d0fc3988ca | 11561:e5aaaef91a27 |
---|---|
144 _("a bookmark cannot have the name of an existing branch")) | 144 _("a bookmark cannot have the name of an existing branch")) |
145 if rev: | 145 if rev: |
146 marks[mark] = repo.lookup(rev) | 146 marks[mark] = repo.lookup(rev) |
147 else: | 147 else: |
148 marks[mark] = repo.changectx('.').node() | 148 marks[mark] = repo.changectx('.').node() |
149 setcurrent(repo, mark) | 149 setcurrent(repo, mark) |
150 write(repo) | 150 write(repo) |
151 return | 151 return |
152 | 152 |
153 if mark is None: | 153 if mark is None: |
154 if rev: | 154 if rev: |