Show More
@@ -4007,36 +4007,40 b' def pull(ui, repo, source="default", **o' | |||
|
4007 | 4007 | "so a rev cannot be specified.") |
|
4008 | 4008 | raise error.Abort(err) |
|
4009 | 4009 | |
|
4010 | pullopargs.update(opts.get('opargs', {})) | |
|
4011 | modheads = exchange.pull(repo, other, heads=revs, | |
|
4012 | force=opts.get('force'), | |
|
4013 | bookmarks=opts.get('bookmark', ()), | |
|
4014 | opargs=pullopargs).cgresult | |
|
4015 | ||
|
4016 | # brev is a name, which might be a bookmark to be activated at | |
|
4017 | # the end of the update. In other words, it is an explicit | |
|
4018 | # destination of the update | |
|
4019 | brev = None | |
|
4020 | ||
|
4021 | if checkout: | |
|
4022 | checkout = str(repo.changelog.rev(checkout)) | |
|
4023 | ||
|
4024 | # order below depends on implementation of | |
|
4025 | # hg.addbranchrevs(). opts['bookmark'] is ignored, | |
|
4026 | # because 'checkout' is determined without it. | |
|
4027 | if opts.get('rev'): | |
|
4028 | brev = opts['rev'][0] | |
|
4029 | elif opts.get('branch'): | |
|
4030 | brev = opts['branch'][0] | |
|
4031 | else: | |
|
4032 |
brev = |
|
|
4033 | repo._subtoppath = source | |
|
4034 | try: | |
|
4035 | ret = postincoming(ui, repo, modheads, opts.get('update'), | |
|
4036 | checkout, brev) | |
|
4037 | ||
|
4038 |
|
|
|
4039 | del repo._subtoppath | |
|
4010 | wlock = util.nullcontextmanager() | |
|
4011 | if opts.get('update'): | |
|
4012 | wlock = repo.wlock() | |
|
4013 | with wlock: | |
|
4014 | pullopargs.update(opts.get('opargs', {})) | |
|
4015 | modheads = exchange.pull(repo, other, heads=revs, | |
|
4016 | force=opts.get('force'), | |
|
4017 | bookmarks=opts.get('bookmark', ()), | |
|
4018 | opargs=pullopargs).cgresult | |
|
4019 | ||
|
4020 | # brev is a name, which might be a bookmark to be activated at | |
|
4021 | # the end of the update. In other words, it is an explicit | |
|
4022 | # destination of the update | |
|
4023 | brev = None | |
|
4024 | ||
|
4025 | if checkout: | |
|
4026 | checkout = str(repo.changelog.rev(checkout)) | |
|
4027 | ||
|
4028 | # order below depends on implementation of | |
|
4029 | # hg.addbranchrevs(). opts['bookmark'] is ignored, | |
|
4030 | # because 'checkout' is determined without it. | |
|
4031 | if opts.get('rev'): | |
|
4032 | brev = opts['rev'][0] | |
|
4033 | elif opts.get('branch'): | |
|
4034 | brev = opts['branch'][0] | |
|
4035 | else: | |
|
4036 | brev = branches[0] | |
|
4037 | repo._subtoppath = source | |
|
4038 | try: | |
|
4039 | ret = postincoming(ui, repo, modheads, opts.get('update'), | |
|
4040 | checkout, brev) | |
|
4041 | ||
|
4042 | finally: | |
|
4043 | del repo._subtoppath | |
|
4040 | 4044 | |
|
4041 | 4045 | finally: |
|
4042 | 4046 | other.close() |
@@ -262,6 +262,7 b' Pull from bundle and trigger notify' | |||
|
262 | 262 | adding file changes |
|
263 | 263 | added 2 changesets with 3 changes to 3 files |
|
264 | 264 | new changesets a2392c293916:ef63ca68695b |
|
265 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
265 | 266 | MIME-Version: 1.0 |
|
266 | 267 | Content-Type: text/plain; charset="us-ascii" |
|
267 | 268 | Content-Transfer-Encoding: 7bit |
@@ -314,7 +315,6 b' Pull from bundle and trigger notify' | |||
|
314 | 315 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
315 | 316 | @@ -0,0 +1,1 @@ |
|
316 | 317 | +ignore $Id$ |
|
317 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
318 | 318 | |
|
319 | 319 | $ cp $HGRCPATH.nohooks $HGRCPATH |
|
320 | 320 |
General Comments 0
You need to be logged in to leave comments.
Login now