Page MenuHomePhabricator

arc land fails with error "Usage Exception: --merge is not currently supported for hg repos."
Closed, ResolvedPublic

Asked by cul8er on Jul 9 2017, 8:56 AM.

Details

Hi, I'm using phabricator with mercurial in ubuntu 16.04. I'm new to phabricator.
arc land doesn't work and I'm not sure that I understand accurately using arc with mercurial.
The error was Usage Exception: --merge is not currently supported for hg repos.

Can anybody advise?
What I did is as following:

$ hg branches
default   8:df2864cf531d

$ hg branch add-new-features

$ ls
README.md

$ vi README.md

$ hg commit
$ hg branches
add-new-features 10:9945d756d5a2
default           8:df2864cf531d (非アクティブ)
$ arc diff
Linting...
No lint engine configured for this project.
Running unit tests...
No unit test engine is configured for this project.
 SKIP STAGING  Phabricator does not support staging areas for this repository.
Created a new Differential revision:
        Revision URI: http://127.0.0.1:8100/D5

Included changes:
  M       README.md

(after review is accepted on differential)

$ arc land
Landing current branch 'add-new-features'.
Updating default...
The following commit(s) will be landed:

9945d756d5a2 文章追加

Switched to branch add-new-features. Identifying and merging...
Landing revision 'D5: 文章追加'...
 BUILDS PASSED  Harbormaster builds for the active diff completed successfully.
Usage Exception: --merge is not currently supported for hg repos.

UPDATED (2017/07/10 21:26 +9:00)

mercurial version is 4.2.
I did the same thing again but added --trace option to arc land

$ hg branch add-new-features2

$ vi README.md

$ hg commit
$ arc diff
Linting...
No lint engine configured for this project.
Running unit tests...
No unit test engine is configured for this project.
 SKIP STAGING  Phabricator does not support staging areas for this repository.
Created a new Differential revision:
        Revision URI: http://127.0.0.1:8100/D6

Included changes:
  M       README.md
$ arc land --trace
 ARGV  '/home/cul8er/pkg/bin/arc' 'land' '--trace'
 LOAD  Loaded "phutil" from "/home/cul8er/pkg/share/libphutil/src".
 LOAD  Loaded "arcanist" from "/home/cul8er/pkg/share/arcanist/src".
Config: Reading user configuration file "/home/cul8er/.arcrc"...
Config: Did not find system configuration at "/etc/arcconfig".
Working Copy: Reading .arcconfig from "/home/cul8er/tmp/hg/test-repo/.arcconfig".
Working Copy: Path "/home/cul8er/tmp/hg/test-repo" is part of `hg` working copy "/home/cul8er/tmp/hg/test-repo".
Working Copy: Project root is at "/home/cul8er/tmp/hg/test-repo".
Config: Did not find local configuration at "/home/cul8er/tmp/hg/test-repo/.hg/arc/config".
>>> [0] <conduit> user.whoami() <bytes = 117>
>>> [1] <http> http://127.0.0.1:8100/api/user.whoami
<<< [1] <http> 258,150 us
<<< [0] <conduit> 271,697 us
>>> [2] <exec> $ HGPLAIN=1 hg bookmarks
<<< [2] <exec> 113,305 us
>>> [3] <exec> $ HGPLAIN=1 hg branch
<<< [3] <exec> 112,611 us
>>> [4] <exec> $ HGPLAIN=1 hg bookmarks
<<< [4] <exec> 113,353 us
Landing current branch 'add-new-features2'.
>>> [5] <exec> $ HGPLAIN=1 hg bookmarks
<<< [5] <exec> 113,718 us
>>> [6] <exec> $ HGPLAIN=1 hg bookmarks
<<< [6] <exec> 113,065 us
>>> [7] <exec> $ HGPLAIN=1 hg status
<<< [7] <exec> 142,675 us
Updating default...
>>> [8] <exec> $ HGPLAIN=1 hg pull
<<< [8] <exec> 568,058 us
>>> [9] <exec> $ HGPLAIN=1 hg help phase
<<< [9] <exec> 190,080 us
>>> [10] <exec> $ HGPLAIN=1 hg log -r 'default' --template '{phase}'
<<< [10] <exec> 126,372 us
>>> [11] <exec> $ HGPLAIN=1 hg log -l 1 --template '{node}' -r 'ancestor('\''default'\'','\''add-new-features2'\'')' --
<<< [11] <exec> 132,758 us
>>> [12] <exec> $ HGPLAIN=1 hg log -r 'reverse(('\''6bae97d77bd1cf4c2d6e2cd8223f012784fb74ab'\''::'\''add-new-features2'\'') - '\''6bae97d77bd1cf4c2d6e2cd8223f012784fb74ab'\'')' --template '{node|short} {desc|firstline}\n'
<<< [12] <exec> 135,379 us
The following commit(s) will be landed:

8c6ee0f68052 add new features part 2

>>> [13] <exec> $ HGPLAIN=1 hg bookmarks
<<< [13] <exec> 114,441 us
Switched to branch add-new-features2. Identifying and merging...
>>> [14] <exec> $ HGPLAIN=1 hg log -l 1 --template '{node}' -r 'ancestor('\''default'\'',.)' --
<<< [14] <exec> 129,045 us
>>> [15] <exec> $ HGPLAIN=1 hg log --template '{node}{desc}' --rev '('\''6bae97d77bd1cf4c2d6e2cd8223f012784fb74ab'\''::. - '\''6bae97d77bd1cf4c2d6e2cd8223f012784fb74ab'\'')' --branch 'add-new-features2' --
<<< [15] <exec> 128,736 us
>>> [16] <exec> $ HGPLAIN=1 hg log --template '{node}{rev}{author}{date|rfc822date}{branch}{tag}{parents}{desc}' --rev '('\''6bae97d77bd1cf4c2d6e2cd8223f012784fb74ab'\''::. - '\''6bae97d77bd1cf4c2d6e2cd8223f012784fb74ab'\'')' --branch 'add-new-features2' --
<<< [16] <exec> 130,758 us
>>> [17] <exec> $ HGPLAIN=1 hg parents --template '{node}\n' --rev '8c6ee0f68052bedd231c489b256694890652eba6'
<<< [17] <exec> 123,278 us
>>> [18] <conduit> differential.query() <bytes = 212>
>>> [19] <http> http://127.0.0.1:8100/api/differential.query
<<< [19] <http> 269,186 us
<<< [18] <conduit> 269,415 us
>>> [20] <conduit> differential.getcommitmessage() <bytes = 147>
>>> [21] <http> http://127.0.0.1:8100/api/differential.getcommitmessage
<<< [21] <http> 177,558 us
<<< [20] <conduit> 177,749 us
Landing revision 'D6: add new features part 2'...
>>> [22] <conduit> harbormaster.querybuildables() <bytes = 218>
>>> [23] <http> http://127.0.0.1:8100/api/harbormaster.querybuildables
<<< [23] <http> 181,741 us
<<< [22] <conduit> 181,915 us
 BUILDS PASSED  Harbormaster builds for the active diff completed successfully.
>>> [24] <exec> $ HGPLAIN=1 hg checkout 'default'
<<< [24] <exec> 240,709 us
Usage Exception: --merge is not currently supported for hg repos.

[2017-07-10 19:01:43] EXCEPTION: (ArcanistUsageException) --merge is not currently supported for hg repos. at [<arcanist>/src/workflow/ArcanistLandWorkflow.php:1135]
arcanist(), phutil()
  #0 ArcanistLandWorkflow::merge() called at [<arcanist>/src/workflow/ArcanistLandWorkflow.php:275]
  #1 ArcanistLandWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]

Answer Summary

I read arcanist's source (src/workflow/ArcanistWorkflow.php)

at line 271 (this isn't exactly same as current phabricator repository)

if ($this->useSquash) {
  $this->rebase();
  $this->squash();
} else {
  $this->merge();
}

This is the reason arc land fails with mercurial. According to this code, I should do arc land --squash and It worked fine.

Answers

quark.zju
Updated 2,717 Days Ago

Might try arc land --squash? arc land --help lists a list of options that are sadly only supported for git.

This answer has been hidden.

cspeckmim
Updated 2,717 Days Ago

What version of mercurial are you using? Also - can you paste the output when you run arc land --trace?

New Answer

Answer

This question has been marked as closed, but you can still leave a new answer.