Commit Graph

5 Commits

Author SHA1 Message Date
Therin Irwin
66b64d8fb6 fbamend: change hint text to suggest running restack
Summary: Instead of referencing `hg rebase` --restack option, just reference the `restack` subcommand.

Test Plan:
1. Make a few commits 1, 2, 3, 4 on any branch
2. `hg update 1`
3. Try to amend commit 1
4. Warning message should appear about children left behind
expected: Hint text does not mention `hg rebase --restack`

Reviewers: durham, kulshrax

Reviewed By: kulshrax

Subscribers: medson, mjpieters, kkrewink

Differential Revision: https://phabricator.intern.facebook.com/D5313108

Tasks: 19601780

Signature: t1:5313108:1498249314:98f31f4424341ef51997687293bf99b7297b6cd0
2017-06-26 07:31:28 -07:00
Jun Wu
4a936cee21 codemod: remove extpath in tests
Summary:
Previously, the following pattern is common in our tests:

```
   $ extpath=`dirname $TESTDIR`
   $ cp $extpath/hgext3rd/name.py $TESTTMP # use $TESTTMP substitution in message
   $ cat >> $HGRCPATH<<EOF
   > [extensions]
   > name=$TESTTMP/name.py
   > EOF
```

Now, it gets simplified to:

```
   $ cat >> $HGRCPATH<<EOF
   > [extensions]
   > name=$TESTDIR/../hgext3rd/name.py
   > EOF
```

This removes unnecessary `dirname` and `cp`.

Also fixed a regex that does not match `bytes`:

```
-  transferred 268 bytes in [\d.]+ seconds \([\d.]+ KB/sec\) (re)
+  transferred 268 bytes in 0.3 seconds (939 bytes/sec)
```

Test Plan: arc unit

Reviewers: #mercurial, phillco

Reviewed By: phillco

Subscribers: medson, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D5270897

Signature: t1:5270897:1497663052:bf860a0b480c751b1e4b53cebf6526193f0f6652
2017-06-16 18:31:25 -07:00
Jun Wu
be7ac42b50 codemod: replace evolve by fbamend
Summary:
Now that fbamend has most of the features we want. Replace evolve
used by tests.

Minor changes are made to some extensions to make test pass:
- reset: drop commit reviving support (was provided by "hg touch")
- smartlog: do not assume who provides "allsuccessors" revset
- fbamend: return 1 on "nothing changed"
- fbamend: write operation data for split and fold
- fbamend: do not print incompatibility notice
- fbamend: do not disable itself when rebase is not enabled
- inhibit: remove `bookmark -D` option - use `prune -B` instead

Test Plan: arc unit

Reviewers: #mercurial, stash

Reviewed By: stash

Subscribers: stash, mjpieters, medson

Differential Revision: https://phabricator.intern.facebook.com/D5258813

Signature: t1:5258813:1497604051:0c7334f9a6554cf31aaaaa2a4995b17d4e445847
2017-06-16 15:50:01 -07:00
Jun Wu
f1b6191c18 fbamend: move to a package
Summary: `fbamend.py` is already long. It will become more complex so let's move it.

Test Plan: arc unit

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Differential Revision: https://phabricator.intern.facebook.com/D5209475

Signature: t1:5209475:1497260957:e84aec4a2f90c8dd1d247b2b0caef48cfbb59c55
2017-06-13 17:08:20 -07:00
Arun Kulshreshtha
6065ceef3f fbamend: use unfiltered repo when clearing preamend bookmarks
Summary: Sometimes restack attempts to clear preamend bookmarks on hidden commits. This only happens when the user has a configuration error (typically inhibit is disabled) which would mess up other parts of restack. Nonetheless, there is no reason to crash here.

Test Plan: Disable inhibit, perform an amend, and run `hg restack`. Unit test is forthcoming.

Reviewers: #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4856640

Tasks: 16726367

Signature: t1:4856640:1491816803:56beeb11360a7a2f6bc6243069c562b08a015afc
2017-04-19 15:52:45 -07:00