[Bug 6105] New: add equivalent of `git pull --autostash` to mercurial

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Mon Mar 25 04:10:24 EDT 2019


            Bug ID: 6105
           Summary: add equivalent of `git pull --autostash` to mercurial
           Product: Mercurial
           Version: unspecified
          Hardware: PC
                OS: Mac OS
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: rebase
          Assignee: bugzilla at mercurial-scm.org
          Reporter: slippycheeze at google.com
                CC: mercurial-devel at mercurial-scm.org

Git gained at some point the extremely convenient command, and wrapper:

] git rebase --autostash
] git pull --rebase --autostash

These will automatically stash (hg shelve) changes in a dirty working copy,
perform the operation, then apply the content of the stash, and discard it.

As git note, "this may cause non-trivial merge conflicts", but it means that
the rebase operation can be done with a dirty working directory.  This turns
out to be a shockingly common operation for me, example workflow:

- create a new chain of 2-5 commits implementing something in small, logical
- identify a bug that blocks further progress
- create a commit fixing it, and rebase to shuffle it to the bottom of the
- send that upstream for review, etc
- it is committed
- `hg pull --rebase` my chain to get it incorporated

This is hardly an impossible situation: I can work on the non-committed
version, or commit current work fully and then rebase, or `hg commit -m blah`
and rebase, but ... the git option is rather nice.

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

More information about the Mercurial-devel mailing list