check-code passes now
Diff Detail
Diff Detail
- Repository
- rFBHGX Facebook Mercurial Extensions
- Branch
- default
- Lint
Lint OK - Unit
Unit Tests OK
| Lint OK |
| Unit Tests OK |
| Path | Packages | |||
|---|---|---|---|---|
| M | hgext3rd/undo.py (2 lines) | |||
| M | tests/test-undo.t (2 lines) |
| Commit | Local | Parents | Author | Summary | Date |
|---|---|---|---|---|---|
| 6f929f5eda5d | 3717 | a5f16618cedd | Mateusz Kwapich | undo: fix check-code (Show More…) | Aug 4 2017, 9:32 AM |
| hexnode = nodebranch[0] | hexnode = nodebranch[0] | ||||
| try: | try: | ||||
| oldbranch = nodebranch[1] | oldbranch = nodebranch[1] | ||||
| except IndexError: | except IndexError: | ||||
| oldbranch = "" | oldbranch = "" | ||||
| rlog = _getrevlog(repo, 'index.i') | rlog = _getrevlog(repo, 'index.i') | ||||
| rev = rlog.rev(bin(hexnode)) | rev = rlog.rev(bin(hexnode)) | ||||
| shiftedindex = _invertindex(rlog, rev) | shiftedindex = _invertindex(rlog, rev) | ||||
| except IOError, error.RevlogError: | except (IOError, error.RevlogError): | ||||
| # no shift | # no shift | ||||
| shiftedindex = 0 | shiftedindex = 0 | ||||
| oldbranch = "" | oldbranch = "" | ||||
| else: | else: | ||||
| shiftedindex = 0 | shiftedindex = 0 | ||||
| oldbranch = "" | oldbranch = "" | ||||
| if not branch: | if not branch: | ||||
| user: test | user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: newbranch | summary: newbranch | ||||
| Check local undo with facebook style strip | Check local undo with facebook style strip | ||||
| $ cat >> $HGRCPATH <<EOF | $ cat >> $HGRCPATH <<EOF | ||||
| > [extensions] | > [extensions] | ||||
| > strip = | > strip = | ||||
| > fbamend = | > fbamend = $TESTDIR/../hgext3rd/fbamend/ | ||||
| > EOF | > EOF | ||||
| $ hg strip 3ee6 | $ hg strip 3ee6 | ||||
| 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
| working directory now at 75f63379f12b | working directory now at 75f63379f12b | ||||
| 1 changesets pruned | 1 changesets pruned | ||||
| $ hg undo -b 3532 | $ hg undo -b 3532 | ||||
| 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
| $ hg log -r . -T {node} | $ hg log -r . -T {node} | ||||
| 3ee6a6880888df9e48cdc568b5e835bd3087f8cb (no-eol) | 3ee6a6880888df9e48cdc568b5e835bd3087f8cb (no-eol) | ||||
| $ cat >> $HGRCPATH <<EOF | $ cat >> $HGRCPATH <<EOF | ||||
| > [extensions] | > [extensions] | ||||
| > strip =! | > strip =! | ||||
| > fbamend =! | > fbamend =! | ||||
| > EOF | > EOF | ||||