[Bug 4420] New: hg switch

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Fri Oct 24 03:57:23 CDT 2014


http://bz.selenic.com/show_bug.cgi?id=4420

          Priority: normal
            Bug ID: 4420
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: hg switch
          Severity: feature
    Classification: Unclassified
                OS: All
          Reporter: techtonik at gmail.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: 3.2-rc
         Component: Mercurial
           Product: Mercurial

In Git interface for humans (http://git-legit.org/) there is a command:

    $ git switch <branch>
    # Switches to branch. Stashes and restores unstaged changes.

Interface provided by Mercurial also have this problem of directly mapping the
intention to switch branch to the command that does this.

ISTM that existing command - 'hg up' refuses to jump across branches if there
are uncommitted (unstaged) changes. From documentation on 'hg up' -  'If the
changeset is not a descendant or ancestor of the working directory's parent,
the update is aborted.'

'hg up` provides -C -c options as a workaround (or hack in terms of user
interfaces), but they are not sufficiently distinctive and not clear enough in
the context of descendant/ancestor details of update command.

See the thread:
http://selenic.com/pipermail/mercurial-devel/2014-October/062932.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list