Mercurial > hg
comparison mercurial/localrepo.py @ 20184:a14d93b2fb1b
bookmarks: allow push -B to create a new remote head (issue2372)
Push is currently allowed to create a new head if there is a remote
bookmark that will be updated to point to the new head. If the
bookmark is not known remotely then push aborts, even if a -B argument
is about to push the bookmark. This change allows push to continue in
this case. This does not require a wireproto force.
author | Stephen Lee <sphen.lee@gmail.com> |
---|---|
date | Mon, 11 Nov 2013 21:16:54 +1100 |
parents | 969148b49fc6 |
children | 4d6d5ef88538 |
comparison
equal
deleted
inserted
replaced
20183:de7e6c489412 | 20184:a14d93b2fb1b |
---|---|
1865 raise util.Abort(mso % ctx) | 1865 raise util.Abort(mso % ctx) |
1866 elif ctx.troubled(): | 1866 elif ctx.troubled(): |
1867 raise util.Abort(_(mst) | 1867 raise util.Abort(_(mst) |
1868 % (ctx.troubles()[0], | 1868 % (ctx.troubles()[0], |
1869 ctx)) | 1869 ctx)) |
1870 newbm = self.ui.configlist('bookmarks', 'pushing') | |
1870 discovery.checkheads(unfi, remote, outgoing, | 1871 discovery.checkheads(unfi, remote, outgoing, |
1871 remoteheads, newbranch, | 1872 remoteheads, newbranch, |
1872 bool(inc)) | 1873 bool(inc), newbm) |
1873 | 1874 |
1874 # TODO: get bundlecaps from remote | 1875 # TODO: get bundlecaps from remote |
1875 bundlecaps = None | 1876 bundlecaps = None |
1876 # create a changegroup from local | 1877 # create a changegroup from local |
1877 if revs is None and not outgoing.excluded: | 1878 if revs is None and not outgoing.excluded: |