Commit Graph

6 Commits

Author SHA1 Message Date
Laurent Charignon
b36541de7d cleanup: replace all the calls to util.Abort to error.Abort
Summary: This diff is part of a series to cleanup fb-hgext and make it pass check-code.

Test Plan: all tests pass like before

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2811837
2016-01-07 18:30:24 -08:00
Laurent Charignon
8f0e47e826 phrevset: fix because of changes in core
Summary:
phrevset: fix because of changes in core
Core changed the definition of stringset, it broke git and phabricator revset
that we define in fb-hgext. This is the same fix than the one we did for
the git revset.

Test Plan: N/A

Reviewers: durham, mitrandir

Differential Revision: https://phabricator.fb.com/D2065005
2015-05-12 11:14:44 -07:00
Delyan Kratunov
eea8a70884 [phrevset] Add ability to parse git revisions from Phabricator
Summary:
We couldn't handle the git case (fbandroid-hg) at all. This fixes that.

I changed my .hg/hgrc to have
```[phrevset]
callsign = FA```
but I've no idea how to do that globally.

Test Plan:
```
[diffrev] Starting Conduit call
[diffrev] echo '{"revision_id": "1153911"}' | arc call-conduit differential.getdiff
[diffrev] Starting log walk
[diffrev] Traversing log for 1153911
[diffrev] Conduit call returned 0
[diffrev] VCS is git
[diffrev] GIT rev is 34838a7f1d68531f385e471bf76f89c6620ea563
Path: ssh://hg.vip.facebook.com//data/scm/fbandroid opts: {}
running ssh hg.vip.facebook.com 'hg -R /data/scm/fbandroid serve --stdio'
sending hello command
sending between command
remote: 199
remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream-preferred streamreqs=lz4revlog,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 remotefilelog
remote: 1
sending lookup command
[diffrev] HG rev is e67eac10eef35a21a3b61f8aa8caa330884d48d4
...
```

Reviewers: sid0, davidsp

Reviewed By: davidsp

Differential Revision: https://phabricator.fb.com/D1458491
2014-07-24 20:27:05 -07:00
Delyan Kratunov
c0418e22e8 [phrevset] Fix failing lookup
Summary: phrevset was completely broken, even for the case where it does a linear search.

Test Plan:
Tested before and after in fbandroid-hg. It was finding the revision but
`hg log -r 'DXX'` wasn't printing anything.

Reviewers: sid0, davidsp

Reviewed By: davidsp

Differential Revision: https://phabricator.fb.com/D1458472
2014-07-24 19:36:09 -07:00
David Soria Parra
790e43474a Use a processgroup to ensure all arc subprocesses are properly killed
Summary:
phrevset can hang when the revwalk already returns a rev but
the parallel arc call didn't finish with arc having subprocesses running.
This will result in hg log showing output but hanging for a quiet a bit.
We have to use a processgroup and make arc the leader of it to kill
all it's subprocesses properly. Note this will make it incompatible
with windows.

Test Plan:
Tested locally and ensured that a differential revision is
found and we abort nicely.

Reviewers: durham

Reviewed By: durham

Differential Revision: https://phabricator.fb.com/D1096568
2013-12-12 14:49:04 -08:00
Delyan Kratunov
95f6d97e12 [hg] Add support for Differential revsets
Summary:
Add the ability to issue commands like

  hg log -r D12345

Supports already shipped commits (by parsing the SVN rev number and delegating to hgsubversion), as well as mercurial commits in various states

Test Plan:
Easier to show than tell:

  [delyank@dev1436 ~/www] arc feature test_diff_revset
  [delyank@dev1436 ~/www] echo "Don't commit me" > dontcommit.test
  [delyank@dev1436 ~/www] hg add dontcommit.test
  [delyank@dev1436 ~/www] hg commit -m "[test] Test commit"
  [delyank@dev1436 ~/www] arc diff
  [...]
  Created a new Differential revision:
          Revision URI: https://phabricator.fb.com/D1055569
  [...]

  [delyank@dev1436 ~/www] hg log --debug -r D1055569
  [diffrev] Getting diff from Conduit..done
  [diffrev] VCS is hg
  changeset:   587735:82d4de66e17bb3b92fe15df4eda8b8420b7ed074
  bookmark:    test_diff_revset
  tag:         tip
  phase:       draft
  [...]
  description:
  [test] Playing with conduit, don't commit
  [...]
  Differential Revision: https://phabricator.fb.com/D1055569

  [delyank@dev1436 ~/www] echo "No, really, don't" >> dontcommit.test
  [delyank@dev1436 ~/www] hg amend # change local hash
  [delyank@dev1436 ~/www] hg log --debug -r D1055569
  [diffrev] Getting diff from Conduit..done
  [diffrev] VCS is hg
  [diffrev] Traversing log for 1055569
  changeset:   587735:48565d21a43f730aa3b9cebccbb47fa406df557b
  bookmark:    test_diff_revset
  tag:         tip
  phase:       draft
  [...]
  description:
  [test] Playing with conduit, don't commit
  [...]
  Differential Revision: https://phabricator.fb.com/D1055569

  [delyank@dev1436 ~/www] hg log --debug -r D1053132 # a diff that's already been shipped
  [diffrev] Getting diff from Conduit..done
  [diffrev] VCS is svn
  changeset:   586857:61a4036e89bafefaba4de2ebe1190db999a8915d
  [...]
  description:
  [hashtagbot] Add the #filetask hashtag to Task Creeper
  [...]
  Differential Revision: https://phabricator.fb.com/D1053132

Reviewers: sid0, davidsp

Reviewed By: davidsp

CC: jhunt, davidsp

Differential Revision: https://phabricator.fb.com/D1055637

Task ID: 3159944
2013-11-15 14:55:42 -08:00