Bug 6080 - Unclear warning message when pushing a closed branch
Summary: Unclear warning message when pushing a closed branch
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: PC Linux
: wish feature
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-17 11:23 UTC by Pierre Augier
Modified: 2019-05-04 00:00 UTC (History)
3 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Augier 2019-02-17 11:23 UTC
A developer of a project using Mercurial was confused by a warning that he did not understood. He was trying to push on his own repository after a pull from the main repository of the project and he got:

```
hg push ../tmp_repo
pushing to ../tmp_repo
searching for changes
abort: push creates new remote branches: dev!
(use 'hg push --new-branch' to create new remote branches)
```

The branch dev was closed and he didn't know that this branch exists since he pulled the branch already closed from the main repository. So he obtained something like:

```
hg branches 
default                        3:2c8ac9499cf1
```

and `hg heads` also showed one head.

Wouldn't be good to provide a better message in this case? At least to mention that the branch is closed with something like

"abort: push creates new remote branches: dev (closed)!"
Comment 1 HG Bot 2019-04-26 15:45 UTC
Fixed by https://mercurial-scm.org/repo/hg/rev/5997eabc7b85
Taapas Agrawal <taapas2897@gmail.com>
push: added clear warning message when pushing closed branches(issue6080)

Differential Revision: https://phab.mercurial-scm.org/D6038

(please test the fix)
Comment 2 Bugzilla 2019-05-04 00:00 UTC
Bug was set to TESTING for 7 days, resolving