Please enable JavaScript to use RhodeCode Enterprise
##// END OF EJS Templates
Yuya Nishihara
- Sun, 30 Dec 2018 08:31:57
Show More
tests/phabricator/phab-conduit.json
0
created
644
+73
0
@@
-0,0
+1,73
b''
1
{
2
"interactions" : [
3
{
4
"response" : {
5
"status" : {
6
"message" : "OK" ,
7
"code" : 200
8
},
9
"headers" : {
10
"content-type" : [
11
"application/json"
12
],
13
"date" : [
14
"Fri, 21 Dec 2018 22:19:11 GMT"
15
],
16
"x-content-type-options" : [
17
"nosniff"
18
],
19
"cache-control" : [
20
"no-store"
21
],
22
"strict-transport-security" : [
23
"max-age=0; includeSubdomains; preload"
24
],
25
"x-frame-options" : [
26
"Deny"
27
],
28
"set-cookie" : [
29
"phsid=A%2Fdv22bpksbdis3vfeksluagfslhfojblbnkro7we4; expires=Wed, 20-Dec-2023 22:19:11 GMT; Max-Age=157680000; path=/; domain=phab.mercurial-scm.org; secure; httponly"
30
],
31
"x-xss-protection" : [
32
"1; mode=block"
33
],
34
"expires" : [
35
"Sat, 01 Jan 2000 00:00:00 GMT"
36
],
37
"transfer-encoding" : [
38
"chunked"
39
],
40
"server" : [
41
"Apache/2.4.10 (Debian)"
42
]
43
},
44
"body" : {
45
"string" : "{\"result\":{\"data\":[],\"maps\":{},\"query\":{\"queryKey\":null},\"cursor\":{\"limit\":100,\"after\":null,\"before\":null,\"order\":null}},\"error_code\":null,\"error_info\":null}"
46
}
47
},
48
"request" : {
49
"method" : "POST" ,
50
"headers" : {
51
"accept" : [
52
"application/mercurial-0.1"
53
],
54
"content-type" : [
55
"application/x-www-form-urlencoded"
56
],
57
"content-length" : [
58
"70"
59
],
60
"host" : [
61
"phab.mercurial-scm.org"
62
],
63
"user-agent" : [
64
"mercurial/proto-1.0 (Mercurial 4.8.1+564-6f483b107eb5+20181221)"
65
]
66
},
67
"uri" : "https://phab.mercurial-scm.org//api/user.search" ,
68
"body" : "constraints%5BisBot%5D=true&api.token=cli-hahayouwish"
69
}
70
}
71
],
72
"version" : 1
73
}
No newline at end of file
hgext/phabricator.py
0
+2
0
@@
-155,6
+155,8
b' def urlencodenested(params):'
155
155
"""
156
156
flatparams = util . sortdict ()
157
157
def process ( prefix , obj ):
158
if isinstance ( obj , bool ):
159
obj = { True : b 'true' , False : b 'false' }[ obj ] # Python -> PHP form
158
160
items = { list : enumerate , dict : lambda x : x . items ()} . get ( type ( obj ))
159
161
if items is None :
160
162
flatparams [ prefix ] = obj
mercurial/cext/revlog.c
0
+11
-2
@@
-967,6
+967,7
b' bail:'
967
967
static inline int index_baserev ( indexObject * self , int rev )
968
968
{
969
969
const char * data ;
970
int result ;
970
971
971
972
if ( rev >= self -> length ) {
972
973
PyObject * tuple =
@@
-975,15
+976,23
b' static inline int index_baserev(indexObj'
975
976
if ( ! pylong_to_long ( PyTuple_GET_ITEM ( tuple , 3 ), & ret )) {
976
977
return -2 ;
977
978
}
978
return ( int ) ret ;
979
result = ( int ) ret ;
979
980
} else {
980
981
data = index_deref ( self , rev );
981
982
if ( data == NULL ) {
982
983
return -2 ;
983
984
}
984
985
985
return getbe32 ( data + 16 );
986
result = getbe32 ( data + 16 );
986
987
}
988
if ( result > rev ) {
989
PyErr_Format (
990
PyExc_ValueError ,
991
"corrupted revlog, revision base above revision: %d, %d" ,
992
rev , result );
993
return -2 ;
994
}
995
return result ;
987
996
}
988
997
989
998
static PyObject * index_deltachain ( indexObject * self , PyObject * args )
tests/test-phabricator.t
0
+21
0
@@
-65,6
+65,27
b' Create a differential diff:'
65
65
D4597 - created - 1a5640df7bbf: create beta for phabricator test
66
66
saved backup bundle to $TESTTMP/repo/.hg/strip-backup/1a5640df7bbf-6daf3e6e-phabsend.hg
67
67
68
$ hg debugcallconduit user.search --test-vcr "$VCR/phab-conduit.json" << EOF
69
> {
70
> "constraints" : {
71
> "isBot" : true
72
> }
73
> }
74
> EOF
75
{
76
"cursor" : {
77
"after" : null ,
78
"before" : null ,
79
"limit" : 100 ,
80
"order" : null
81
} ,
82
"data" : [] ,
83
"maps" : {} ,
84
"query" : {
85
"queryKey" : null
86
}
87
}
88
68
89
Template keywords
69
90
$ hg log -T' { rev } { phabreview | json } \ n '
70
91
1 {"id": "D4597", "url": "https://phab.mercurial-scm.org/D4597"}
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
g 0-9
Goto bookmarked items from 0-9
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository access permissions settings
t s
Toggle sidebar on some pages