comparison hgext/fetch.py @ 8112:6ee71f78497c

switch lock releasing in the extensions from gc to explicit
author Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
date Wed, 22 Apr 2009 02:01:22 +0200
parents 675a5a1ab0ee
children f3abe032fc89
comparison
equal deleted inserted replaced
8111:dbf20df40eb1 8112:6ee71f78497c
7 '''pulling, updating and merging in one command''' 7 '''pulling, updating and merging in one command'''
8 8
9 from mercurial.i18n import _ 9 from mercurial.i18n import _
10 from mercurial.node import nullid, short 10 from mercurial.node import nullid, short
11 from mercurial import commands, cmdutil, hg, util, url 11 from mercurial import commands, cmdutil, hg, util, url
12 from mercurial.lock import release
12 13
13 def fetch(ui, repo, source='default', **opts): 14 def fetch(ui, repo, source='default', **opts):
14 '''pull changes from a remote repository, merge new changes if needed. 15 '''pull changes from a remote repository, merge new changes if needed.
15 16
16 This finds all changes from the repository at the specified path 17 This finds all changes from the repository at the specified path
130 ui.status(_('new changeset %d:%s merges remote changes ' 131 ui.status(_('new changeset %d:%s merges remote changes '
131 'with local\n') % (repo.changelog.rev(n), 132 'with local\n') % (repo.changelog.rev(n),
132 short(n))) 133 short(n)))
133 134
134 finally: 135 finally:
135 del lock, wlock 136 release(lock, wlock)
136 137
137 cmdtable = { 138 cmdtable = {
138 'fetch': 139 'fetch':
139 (fetch, 140 (fetch,
140 [('r', 'rev', [], _('a specific revision you would like to pull')), 141 [('r', 'rev', [], _('a specific revision you would like to pull')),