Mercurial > hg
comparison mercurial/commands.py @ 16107:a3dcc59054ca stable
pull: backout change to return code
This bit a number of people.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 10 Feb 2012 16:09:30 -0600 |
parents | 093b75c7b44b |
children | cb756482c1aa 807f796e9b1a |
comparison
equal
deleted
inserted
replaced
16106:d75aa756149b | 16107:a3dcc59054ca |
---|---|
4259 ret = 1 | 4259 ret = 1 |
4260 return ret | 4260 return ret |
4261 | 4261 |
4262 def postincoming(ui, repo, modheads, optupdate, checkout): | 4262 def postincoming(ui, repo, modheads, optupdate, checkout): |
4263 if modheads == 0: | 4263 if modheads == 0: |
4264 return 1 | 4264 return |
4265 if optupdate: | 4265 if optupdate: |
4266 movemarkfrom = repo['.'].node() | 4266 movemarkfrom = repo['.'].node() |
4267 try: | 4267 try: |
4268 ret = hg.update(repo, checkout) | 4268 ret = hg.update(repo, checkout) |
4269 except util.Abort, inst: | 4269 except util.Abort, inst: |
4310 -r X` where ``X`` is the last changeset listed by :hg:`incoming`. | 4310 -r X` where ``X`` is the last changeset listed by :hg:`incoming`. |
4311 | 4311 |
4312 If SOURCE is omitted, the 'default' path will be used. | 4312 If SOURCE is omitted, the 'default' path will be used. |
4313 See :hg:`help urls` for more information. | 4313 See :hg:`help urls` for more information. |
4314 | 4314 |
4315 Returns 0 on success, 1 if no changes found or an update had | 4315 Returns 0 on success, 1 if an update had unresolved files. |
4316 unresolved files. | |
4317 """ | 4316 """ |
4318 source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch')) | 4317 source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch')) |
4319 other = hg.peer(repo, opts, source) | 4318 other = hg.peer(repo, opts, source) |
4320 ui.status(_('pulling from %s\n') % util.hidepassword(source)) | 4319 ui.status(_('pulling from %s\n') % util.hidepassword(source)) |
4321 revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev')) | 4320 revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev')) |