Mercurial > hg
comparison mercurial/bookmarks.py @ 28182:e4fe4e903e97
bookmarks: add 'hg push -B .' for pushing the active bookmark (issue4917)
author | liscju <piotr.listkiewicz@gmail.com> |
---|---|
date | Fri, 19 Feb 2016 22:28:09 +0100 |
parents | 1c5f2c2c046b |
children | e6f490e32863 |
comparison
equal
deleted
inserted
replaced
28181:f8efc8a3a991 | 28182:e4fe4e903e97 |
---|---|
179 | 179 |
180 def _write(self, fp): | 180 def _write(self, fp): |
181 for name, node in self.iteritems(): | 181 for name, node in self.iteritems(): |
182 fp.write("%s %s\n" % (hex(node), encoding.fromlocal(name))) | 182 fp.write("%s %s\n" % (hex(node), encoding.fromlocal(name))) |
183 self._clean = True | 183 self._clean = True |
184 | |
185 def expandname(self, bname): | |
186 if bname == '.': | |
187 return self.active | |
188 return bname | |
184 | 189 |
185 def _readactive(repo, marks): | 190 def _readactive(repo, marks): |
186 """ | 191 """ |
187 Get the active bookmark. We can have an active bookmark that updates | 192 Get the active bookmark. We can have an active bookmark that updates |
188 itself as we commit. This function returns the name of that bookmark. | 193 itself as we commit. This function returns the name of that bookmark. |