Show More
@@ -196,9 +196,6 b' def push(oldpush, ui, repo, dest=None, *' | |||||
196 | return result |
|
196 | return result | |
197 |
|
197 | |||
198 | def uisetup(ui): |
|
198 | def uisetup(ui): | |
199 | if ui.configbool('bookmarks', 'track.current'): |
|
|||
200 | extensions.wrapcommand(commands.table, 'update', updatecurbookmark) |
|
|||
201 |
|
||||
202 | entry = extensions.wrapcommand(commands.table, 'pull', pull) |
|
199 | entry = extensions.wrapcommand(commands.table, 'pull', pull) | |
203 | entry[1].append(('B', 'bookmark', [], |
|
200 | entry[1].append(('B', 'bookmark', [], | |
204 | _("bookmark to import"), |
|
201 | _("bookmark to import"), | |
@@ -208,19 +205,6 b' def uisetup(ui):' | |||||
208 | _("bookmark to export"), |
|
205 | _("bookmark to export"), | |
209 | _('BOOKMARK'))) |
|
206 | _('BOOKMARK'))) | |
210 |
|
207 | |||
211 | def updatecurbookmark(orig, ui, repo, *args, **opts): |
|
|||
212 | '''Set the current bookmark |
|
|||
213 |
|
||||
214 | If the user updates to a bookmark we update the .hg/bookmarks.current |
|
|||
215 | file. |
|
|||
216 | ''' |
|
|||
217 | res = orig(ui, repo, *args, **opts) |
|
|||
218 | rev = opts['rev'] |
|
|||
219 | if not rev and len(args) > 0: |
|
|||
220 | rev = args[0] |
|
|||
221 | bookmarks.setcurrent(repo, rev) |
|
|||
222 | return res |
|
|||
223 |
|
||||
224 | cmdtable = { |
|
208 | cmdtable = { | |
225 | "bookmarks": |
|
209 | "bookmarks": | |
226 | (bookmark, |
|
210 | (bookmark, |
@@ -3893,9 +3893,14 b' def update(ui, repo, node=None, rev=None' | |||||
3893 | rev = cmdutil.finddate(ui, repo, date) |
|
3893 | rev = cmdutil.finddate(ui, repo, date) | |
3894 |
|
3894 | |||
3895 | if clean or check: |
|
3895 | if clean or check: | |
3896 |
ret |
|
3896 | ret = hg.clean(repo, rev) | |
3897 | else: |
|
3897 | else: | |
3898 |
ret |
|
3898 | ret = hg.update(repo, rev) | |
|
3899 | ||||
|
3900 | if repo.ui.configbool('bookmarks', 'track.current'): | |||
|
3901 | bookmarks.setcurrent(repo, rev) | |||
|
3902 | ||||
|
3903 | return ret | |||
3899 |
|
3904 | |||
3900 | def verify(ui, repo): |
|
3905 | def verify(ui, repo): | |
3901 | """verify the integrity of the repository |
|
3906 | """verify the integrity of the repository |
General Comments 0
You need to be logged in to leave comments.
Login now