0

I am working on a Hg repo in BitBucket. I forked this repo from another main repo.

Here's my scenario:

> hg paths

default = ssh://hg@bitbucket.org/shuwnyuantee/jstock-android-as
yccheok = ssh://hg@bitbucket.org/yccheok/jstock-android-as

default repo is my forked repo. yccheok is the main repo I forked from.

I did the below so I am on drive-wealth branch of default repo.

> hg pull
pulling from ssh://hg@bitbucket.org/shuwnyuantee/jstock-android-as

> hg update drive-wealth
128 files updated, 0 files merged, 1 files removed, 0 files unresolved

> hg branch
drive-wealth


> hg log -l 3
changeset:   2770:a210525cc123
branch:      drive-wealth
tag:         tip
parent:      2769:a0bacd6f326a
parent:      2768:0eb8c0268784
user:        Shuwn Yuan Tee <s.yuan31tee@gmail.com>
date:        Tue Mar 21 16:41:04 2017 +0800
summary:     merge default branch

changeset:   2769:a0bacd6f326a
branch:      drive-wealth
parent:      2676:7571be00648f
user:        Shuwn Yuan Tee <s.yuan31tee@gmail.com>
date:        Tue Mar 21 13:17:14 2017 +0800
summary:     list all accounts API

changeset:   2768:0eb8c0268784
user:        Yan Cheng Cheok <yccheok@yahoo.com>
date:        Sat Mar 18 13:56:51 2017 +0800
summary:     Add the missing tracker name.

I wish to revert commit 2770:a210525cc123 on drive-wealth branch & push to default repo. I tried hg strip --keep -r . suggested here. Some files appear as Modified as:

> hg status
M achartengine/build.gradle
M androidXml/build.gradle
M androidlockpattern/build.gradle
M gradle/wrapper/gradle-wrapper.properties
M jstockandroid/build.gradle
M jstockandroid/src/main/AndroidManifest.xml
......

My questions are:

1) Those files show changes in Merge, but not all files are reverted correctly, many changes are missing / not undone. Any idea?

2) If (1) successfully undo all, then what are steps to proceed? What I want to achieve is => simply revert commit 2770:a210525cc123 on branch drive-wealth for default repo & push to default repo?

Thanks!

Gangnus
  • 24,044
  • 16
  • 90
  • 149
Shuwn Yuan Tee
  • 5,578
  • 6
  • 28
  • 42
  • I come from Git background & find Git much easier to use than Hg. I finally migrate my Hg repo to Git by following http://arr.gr/blog/2011/10/bitbucket-converting-hg-repositories-to-git/ – Shuwn Yuan Tee Mar 23 '17 at 06:05
  • --keep on strip keeps the changes of the commit in the working directory. Probably that's the problem you face? – rfkortekaas Apr 09 '17 at 12:27

1 Answers1

0

don't you need to also trip 2769? as 2770 is your merge commit

so

hg strip --keep -r 2770
hg strip --keep -r 2769

then push

Mischa Molhoek
  • 164
  • 1
  • 9