Commit Graph

10 Commits

Author SHA1 Message Date
Laurent Charignon
d2f483b037 gitrevset: fix broken test caused by core's commit 48d6be2f1632
Summary:
We changed the way stringset work in core and we need to update our wrapping
in gitrevset. All the tests pass with this patch.

Test Plan: All tests are passing now

Reviewed By: pyd

Reviewers: durham, pyd

Differential Revision: https://phabricator.fb.com/D2055557
2015-05-07 17:46:30 -07:00
Ryan McElroy
f19c04580a Merge fbonly into default
Summary:
A ton of tests in the 'default' branch are broken, yet they all work in 'fbonly' (because that's what we test and push).

Let's give the world all of our goodness. Bleeding edge is where it's at.

Top of hg sl now looks like:

```
@    386a20  rmcelroy
|\   merge fbonly into default
| |
o |  a284c7  rmcelroy  D1880107  remote/@
| |  githelp: add: mention that record and crecord make commits
| |
| o  f4870a  sid0  remote/fbtip  fbonly
| |  crecord: update to latest default
```

Test Plan: run-tests.py actually works now

Reviewers: davidsp, ericsumner, mitrandir, akushner, durham, sid0

Reviewed By: durham

Subscribers: lcharignon, mpm, ps

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

Signature: t1:1883891:1425613263:8c199f339596384aa7d089154ef99eb982ecff87
2015-03-08 12:22:25 -07:00
Siddharth Agarwal
d8f9a69c86 [gitrevset] use an empty string rather than None 2015-02-17 19:02:09 -08:00
Siddharth Agarwal
715aac06f5 [gitrevset] don't error out when there's no git node
Summary: Templates are not supposed to abort when there's no data for them. Ensure that the `{gitnode}` template has the same behavior.

Test Plan: tests, and tested by hand on a local commit in fbcode

Reviewers: davidsp, rmcelroy, akushner, pyd, daviser, mitrandir, ericsumner, durham

Reviewed By: durham

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

Tasks: 6235780

Signature: t1:1851847:1424199479:3e2d7fb7fb7b8a60f36605279f9e2a706a42dfbd
2015-02-17 10:53:25 -08:00
Siddharth Agarwal
88df366457 Backed out changeset b9e741cead22 2015-02-17 10:44:26 -08:00
Calvin Lloyd Brizzi
9529f8bd24 Made gitrevset smarter, checks for local data before attempting to ssh to remote
Summary: This allows the hg repos to do git lookups, while previously they would fail when they attempted to.

Test Plan: Not sure how to test this to be honest, without changing a lot of settings. Possibly just deploy to hg005, and check if it works.

Reviewers: davidsp, durham, sid0

Reviewed By: sid0

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

Signature: t1:1823148:1423011290:7a2ad687fbde526413d841ea341c9352b64b62df
2015-02-03 15:44:01 -08:00
David Soria Parra
cddc80fd98 fb-hgext: add docstrings for extensions
Summary:
Most of our internal extensions don't have any docstringa causing hg help
to show nothing. I think this is confusing, as we teach people to use hg help.
In particular for our extensions they won't find anything on the internet
but hg help won't help either. So let's add rudimentary help texts.

Also ensure that gitnode is properly documented in hg help revset.

Test Plan:
added extensions, checked hg help and hg help extension. Also
checked hg help revset for gitnode.

Reviewers: rmcelroy, durham, sid0, akushner

Differential Revision: https://phabricator.fb.com/D1645964
2014-10-28 23:06:11 -07:00
Durham Goode
9962f55805 gitrevset: hide ssh warnings
Summary:
sshing to the hg server could result in stdout containing 'remote: ...' (like if
the user had an extension enabled that wasn't on the server). This interefered
with fbmake being able to parse the git hash and broke fbmake for people with
such configs.

The fix is to redirect it to stderr instead.  I tried using ui.push/popbuffer
but it doesn't actually work because the ui that is being used is newly
constructed as part of the peer being created, and therefore doesn't respect the
buffer stack. I also tried ui.quiet=True, but that also failed, as newly created
ui's don't inherit the original quiet value, but instead look at the main
config['quiet'].

Test Plan:
Added a bogus extension to my ~/.hgrc

    hh log -r 1095d3a297300405f679826fc78d52c8a6c1da85 -T '{gitnode}\n' 2>/dev/null
    hh log -r g988fa44ff4bebf4093b09ef27b5e24702ebda6ab 2>/dev/null

Verified there was no 'remote:' output.

Reviewers: sid0, mpm, pyd

Differential Revision: https://phabricator.fb.com/D1604547
2014-10-08 16:48:59 -07:00
Siddharth Agarwal
db408787ea [gitrevset] also support stringsets
Summary: Allow git hashes to work with a `g` suffix, sort of like Subversion's `r`.

Test Plan: Ran the tests, and tested it out in fbandroid-hg.

Reviewers: davidsp, akushner, pyd, durham

Reviewed By: durham

Differential Revision: https://phabricator.fb.com/D1571258
2014-09-22 18:58:36 -07:00
Jez Ng
047c4ecd44 Add gitrevset support.
Test Plan: Extended unit tests.

Reviewers: sid0, durham

Reviewed By: durham

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

Tasks: 5049742
2014-09-08 15:36:12 -07:00