evolve: revert amend
anatoly techtonik
techtonik at gmail.com
Mon Aug 11 15:06:07 UTC 2014
On Mon, Aug 11, 2014 at 5:54 PM, Matt Mackall <mpm at selenic.com> wrote:
> On Mon, 2014-08-11 at 17:31 +0300, anatoly techtonik wrote:
>> On Mon, Aug 11, 2014 at 5:26 PM, Matt Mackall <mpm at selenic.com> wrote:
>> > On Mon, 2014-08-11 at 12:25 +0300, anatoly techtonik wrote:
>> >> On Mon, Aug 11, 2014 at 12:22 PM, anatoly techtonik <techtonik at gmail.com> wrote:
>> >> >
>> >> > I've was fixing a typo and accidentally amended all changes
>> >> > to a commit, is there a way to revert amend so that my
>> >> > modifications are not lost?
>> >>
>> >> $ hg uncommit
>> >> abort: nothing to uncommit
>> >>
>> >> I want to get back to 3171 and get back modifications to other
>> >> files in not-committed state. It that undo is possible?
>> >>
>> >>
>> >> @ changeset: 3173:79c37431f559
>> >> | tag: tip
>> >> | parent: 3170:4d0047e4dd50
>> >> |
>> >> | x changeset: 3172:1a7eaca96f66
>> >> | | temporary amend commit for 60196217f989
>> >> | |
>> >> | x changeset: 3171:60196217f989
>> >> |/
>> >> |
>> >> o changeset: 3170:4d0047e4dd50
>> >> |\ parent: 3169:fcf21e6806af
>> >
>> > Always remember, everything in version control is just fancy diff and
>> > patch:
>>
>> Except that with diff and patch you lose at least binary files and
>> file attributes. =)
>
> Hence the qualifier: fancy.
>
> But my point remains: whenever you get stuck with the UI, you can always
> say "how would I do this if it was 1997 and I just had diff and patch?"
> and the answer is usually pretty obvious. After all: people did all this
> stuff daily back before Mercurial and Git introduced rebase and evolve
> and mq and backout and stash and whatever, they just did it without the
> fancy. But now we've made everything so easy, most people can't tie
> their own shoes without Googling "shoe tie git" and getting pages of
> opinionated wrong answers on StackOverflow.
Having more than one way of doing something often leads to a trap.
I remember before MQ I wasted hours if not days trying to figure out
'stash/unstash' workflow in Mercurial and gave up to use diff/import.
But the point is that I needed a universal solution that doesn't steal
attention on checks for possible missing data.
I really like the "google shoe tie" workflow. Making my brain thinking
about something else while Google does my shoes, gives me spine
shivers. =)
--
anatoly t.
More information about the Mercurial-devel
mailing list