equal
deleted
inserted
replaced
1037 |
1037 |
1038 if not bases: |
1038 if not bases: |
1039 self.ui.status(_("no changes found\n")) |
1039 self.ui.status(_("no changes found\n")) |
1040 return 1 |
1040 return 1 |
1041 elif not force: |
1041 elif not force: |
1042 if revs is not None: |
1042 # FIXME we don't properly detect creation of new heads |
1043 updated_heads = {} |
1043 # in the push -r case, assume the user knows what he's doing |
1044 for base in msng_cl: |
1044 if not revs and len(remote_heads) < len(heads) \ |
1045 for parent in self.changelog.parents(base): |
1045 and remote_heads != [nullid]: |
1046 if parent in remote_heads: |
|
1047 updated_heads[parent] = True |
|
1048 updated_heads = updated_heads.keys() |
|
1049 if len(updated_heads) < len(heads): |
|
1050 self.ui.warn(_("abort: push creates new remote branches!\n")) |
1046 self.ui.warn(_("abort: push creates new remote branches!\n")) |
1051 self.ui.status(_("(did you forget to merge?" |
1047 self.ui.status(_("(did you forget to merge?" |
1052 " use push -f to force)\n")) |
1048 " use push -f to force)\n")) |
1053 return 1 |
1049 return 1 |
1054 |
1050 |