##// END OF EJS Templates
pull: abort pull --update if config requires destination (issue5528)
Ryan McElroy -
r31845:86246530 default
parent child Browse files
Show More
@@ -3938,6 +3938,12 def pull(ui, repo, source="default", **o
3938
3938
3939 Returns 0 on success, 1 if an update had unresolved files.
3939 Returns 0 on success, 1 if an update had unresolved files.
3940 """
3940 """
3941
3942 if ui.configbool('commands', 'update.requiredest') and opts.get('update'):
3943 msg = _('update destination required by configuration')
3944 hint = _('use hg pull followed by hg update DEST')
3945 raise error.Abort(msg, hint=hint)
3946
3941 source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch'))
3947 source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch'))
3942 ui.status(_('pulling from %s\n') % util.hidepassword(source))
3948 ui.status(_('pulling from %s\n') % util.hidepassword(source))
3943 other = hg.peer(repo, opts, source)
3949 other = hg.peer(repo, opts, source)
@@ -21,3 +21,15 Test update.requiredest
21
21
22 $ cd ..
22 $ cd ..
23
23
24 Check update.requiredest interaction with pull --update
25 $ hg clone repo clone
26 updating to branch default
27 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28 $ cd repo
29 $ echo a >> a
30 $ hg commit -qAm aa
31 $ cd ../clone
32 $ hg pull --update
33 abort: update destination required by configuration
34 (use hg pull followed by hg update DEST)
35 [255]
General Comments 0
You need to be logged in to leave comments. Login now