diff --git a/hgext/phabricator.py b/hgext/phabricator.py --- a/hgext/phabricator.py +++ b/hgext/phabricator.py @@ -1457,6 +1457,17 @@ unfi = repo.unfiltered() drevs = callconduit(ui, b'differential.query', {b'ids': drevids}) with repo.wlock(), repo.lock(), repo.transaction(b'phabsend'): + # Eagerly evaluate commits to restabilize before creating new + # commits. The selected revisions are excluded because they are + # automatically restacked as part of the submission process. + restack = [ + c + for c in repo.set( + b"(%ld::) - (%ld) - unstable() - obsolete() - public()", + revs, + revs, + ) + ] wnode = unfi[b'.'].node() mapping = {} # {oldnode: [newnode]} newnodes = [] @@ -1551,6 +1562,41 @@ elif fold: _debug(ui, b"no newnodes to update\n") + # Restack any children of first-time submissions that were orphaned + # in the process. The ctx won't report that it is an orphan until + # the cleanup takes place below. + for old in restack: + parents = [ + mapping.get(old.p1().node(), (old.p1(),))[0], + mapping.get(old.p2().node(), (old.p2(),))[0], + ] + new = context.metadataonlyctx( + repo, + old, + parents=parents, + text=old.description(), + user=old.user(), + date=old.date(), + extra=old.extra(), + ) + + newnode = new.commit() + + # Don't obsolete unselected descendants of nodes that have not + # been changed in this transaction- that results in an error. + if newnode != old.node(): + mapping[old.node()] = [newnode] + _debug( + ui, + b"restabilizing %s as %s\n" + % (short(old.node()), short(newnode)), + ) + else: + _debug( + ui, + b"not restabilizing unchanged %s\n" % short(old.node()), + ) + scmutil.cleanupnodes(repo, mapping, b'phabsend', fixphase=True) if wnode in mapping: unfi.setparents(mapping[wnode][0]) diff --git a/tests/phabricator/phabsend-no-restack-orphan.json b/tests/phabricator/phabsend-no-restack-orphan.json new file mode 100644 --- /dev/null +++ b/tests/phabricator/phabsend-no-restack-orphan.json @@ -0,0 +1,1229 @@ +{ + "version": 1, + "interactions": [ + { + "response": { + "headers": { + "referrer-policy": [ + "no-referrer" + ], + "x-frame-options": [ + "Deny" + ], + "date": [ + "Wed, 15 Apr 2020 23:43:54 GMT" + ], + "server": [ + "Apache/2.4.10 (Debian)" + ], + "content-type": [ + "application/json" + ], + "expires": [ + "Sat, 01 Jan 2000 00:00:00 GMT" + ], + "transfer-encoding": [ + "chunked" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "strict-transport-security": [ + "max-age=0; includeSubdomains; preload" + ], + "cache-control": [ + "no-store" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "body": { + "string": "{\"result\":{\"21111\":{\"id\":\"21111\",\"revisionID\":\"8434\",\"dateCreated\":\"1586994225\",\"dateModified\":\"1586994227\",\"sourceControlBaseRevision\":\"5cbade24e0fae40d67c568e86a978a2a946b9aed\",\"sourceControlPath\":\"\\/\",\"sourceControlSystem\":\"hg\",\"branch\":\"default\",\"bookmark\":null,\"creationMethod\":\"phabsend\",\"description\":null,\"unitStatus\":\"0\",\"lintStatus\":\"0\",\"changes\":[{\"id\":\"57079\",\"metadata\":{\"line:first\":1,\"hash.effect\":\"xfwwSr8O83OT\"},\"oldPath\":\"file1.txt\",\"currentPath\":\"file1.txt\",\"awayPaths\":[],\"oldProperties\":[],\"newProperties\":[],\"type\":\"2\",\"fileType\":\"1\",\"commitHash\":null,\"addLines\":\"1\",\"delLines\":\"1\",\"hunks\":[{\"oldOffset\":\"1\",\"newOffset\":\"1\",\"oldLength\":\"1\",\"newLength\":\"1\",\"addLines\":null,\"delLines\":null,\"isMissingOldNewline\":null,\"isMissingNewNewline\":null,\"corpus\":\"-add\\n+mod1\\n\"}]}],\"properties\":{\"hg:meta\":{\"branch\":\"default\",\"date\":\"0 0\",\"node\":\"876a60d024de493e35a1c6f963f2604056cdc0b9\",\"parent\":\"5cbade24e0fae40d67c568e86a978a2a946b9aed\",\"user\":\"test\"},\"local:commits\":{\"876a60d024de493e35a1c6f963f2604056cdc0b9\":{\"author\":\"test\",\"authorEmail\":\"test\",\"branch\":\"default\",\"commit\":\"876a60d024de493e35a1c6f963f2604056cdc0b9\",\"parents\":[\"5cbade24e0fae40d67c568e86a978a2a946b9aed\"],\"time\":0}}},\"authorName\":\"test\",\"authorEmail\":\"test\"},\"21110\":{\"id\":\"21110\",\"revisionID\":\"8433\",\"dateCreated\":\"1586994219\",\"dateModified\":\"1586994221\",\"sourceControlBaseRevision\":\"d549263bcb2db54042adf048047b368f1ed246df\",\"sourceControlPath\":\"\\/\",\"sourceControlSystem\":\"hg\",\"branch\":\"default\",\"bookmark\":null,\"creationMethod\":\"phabsend\",\"description\":null,\"unitStatus\":\"0\",\"lintStatus\":\"0\",\"changes\":[{\"id\":\"57078\",\"metadata\":{\"line:first\":1,\"hash.effect\":\"ftEQkHimiyJo\"},\"oldPath\":\"file1.txt\",\"currentPath\":\"file1.txt\",\"awayPaths\":[],\"oldProperties\":[],\"newProperties\":[],\"type\":\"2\",\"fileType\":\"1\",\"commitHash\":null,\"addLines\":\"1\",\"delLines\":\"1\",\"hunks\":[{\"oldOffset\":\"1\",\"newOffset\":\"1\",\"oldLength\":\"1\",\"newLength\":\"1\",\"addLines\":null,\"delLines\":null,\"isMissingOldNewline\":null,\"isMissingNewNewline\":null,\"corpus\":\"-mod1\\n+mod2\\n\"}]}],\"properties\":{\"hg:meta\":{\"branch\":\"default\",\"date\":\"0 0\",\"node\":\"0c6523cb1d0f560a958bcc0f4f938c91cb1141dc\",\"parent\":\"876a60d024de493e35a1c6f963f2604056cdc0b9\",\"user\":\"test\"},\"local:commits\":{\"0c6523cb1d0f560a958bcc0f4f938c91cb1141dc\":{\"author\":\"test\",\"authorEmail\":\"test\",\"branch\":\"default\",\"commit\":\"0c6523cb1d0f560a958bcc0f4f938c91cb1141dc\",\"parents\":[\"876a60d024de493e35a1c6f963f2604056cdc0b9\"],\"time\":0}}},\"authorName\":\"test\",\"authorEmail\":\"test\"}},\"error_code\":null,\"error_info\":null}" + } + }, + "request": { + "headers": { + "content-length": [ + "162" + ], + "content-type": [ + "application/x-www-form-urlencoded" + ], + "user-agent": [ + "mercurial/proto-1.0 (Mercurial 5.3.2+497-112d1ad30f88)" + ], + "accept": [ + "application/mercurial-0.1" + ], + "host": [ + "phab.mercurial-scm.org" + ] + }, + "body": "output=json&__conduit__=1¶ms=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22revisionIDs%22%3A+%5B8434%2C+8433%5D%7D", + "uri": "https://phab.mercurial-scm.org//api/differential.querydiffs", + "method": "POST" + } + }, + { + "response": { + "headers": { + "referrer-policy": [ + "no-referrer" + ], + "x-frame-options": [ + "Deny" + ], + "date": [ + "Wed, 15 Apr 2020 23:43:55 GMT" + ], + "server": [ + "Apache/2.4.10 (Debian)" + ], + "content-type": [ + "application/json" + ], + "expires": [ + "Sat, 01 Jan 2000 00:00:00 GMT" + ], + "transfer-encoding": [ + "chunked" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "strict-transport-security": [ + "max-age=0; includeSubdomains; preload" + ], + "cache-control": [ + "no-store" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "body": { + "string": "{\"result\":null,\"error_code\":null,\"error_info\":null}" + } + }, + "request": { + "headers": { + "content-length": [ + "488" + ], + "content-type": [ + "application/x-www-form-urlencoded" + ], + "user-agent": [ + "mercurial/proto-1.0 (Mercurial 5.3.2+497-112d1ad30f88)" + ], + "accept": [ + "application/mercurial-0.1" + ], + "host": [ + "phab.mercurial-scm.org" + ] + }, + "body": "output=json&__conduit__=1¶ms=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22data%22%3A+%22%7B%5C%22branch%5C%22%3A+%5C%22default%5C%22%2C+%5C%22date%5C%22%3A+%5C%220+0%5C%22%2C+%5C%22node%5C%22%3A+%5C%22876a60d024de493e35a1c6f963f2604056cdc0b9%5C%22%2C+%5C%22parent%5C%22%3A+%5C%225cbade24e0fae40d67c568e86a978a2a946b9aed%5C%22%2C+%5C%22user%5C%22%3A+%5C%22test%5C%22%7D%22%2C+%22diff_id%22%3A+%2221111%22%2C+%22name%22%3A+%22hg%3Ameta%22%7D", + "uri": "https://phab.mercurial-scm.org//api/differential.setdiffproperty", + "method": "POST" + } + }, + { + "response": { + "headers": { + "referrer-policy": [ + "no-referrer" + ], + "x-frame-options": [ + "Deny" + ], + "date": [ + "Wed, 15 Apr 2020 23:43:55 GMT" + ], + "server": [ + "Apache/2.4.10 (Debian)" + ], + "content-type": [ + "application/json" + ], + "expires": [ + "Sat, 01 Jan 2000 00:00:00 GMT" + ], + "transfer-encoding": [ + "chunked" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "strict-transport-security": [ + "max-age=0; includeSubdomains; preload" + ], + "cache-control": [ + "no-store" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "body": { + "string": "{\"result\":null,\"error_code\":null,\"error_info\":null}" + } + }, + "request": { + "headers": { + "content-length": [ + "600" + ], + "content-type": [ + "application/x-www-form-urlencoded" + ], + "user-agent": [ + "mercurial/proto-1.0 (Mercurial 5.3.2+497-112d1ad30f88)" + ], + "accept": [ + "application/mercurial-0.1" + ], + "host": [ + "phab.mercurial-scm.org" + ] + }, + "body": "output=json&__conduit__=1¶ms=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22data%22%3A+%22%7B%5C%22876a60d024de493e35a1c6f963f2604056cdc0b9%5C%22%3A+%7B%5C%22author%5C%22%3A+%5C%22test%5C%22%2C+%5C%22authorEmail%5C%22%3A+%5C%22test%5C%22%2C+%5C%22branch%5C%22%3A+%5C%22default%5C%22%2C+%5C%22commit%5C%22%3A+%5C%22876a60d024de493e35a1c6f963f2604056cdc0b9%5C%22%2C+%5C%22parents%5C%22%3A+%5B%5C%225cbade24e0fae40d67c568e86a978a2a946b9aed%5C%22%5D%2C+%5C%22time%5C%22%3A+0%7D%7D%22%2C+%22diff_id%22%3A+%2221111%22%2C+%22name%22%3A+%22local%3Acommits%22%7D", + "uri": "https://phab.mercurial-scm.org//api/differential.setdiffproperty", + "method": "POST" + } + }, + { + "response": { + "headers": { + "referrer-policy": [ + "no-referrer" + ], + "x-frame-options": [ + "Deny" + ], + "date": [ + "Wed, 15 Apr 2020 23:43:56 GMT" + ], + "server": [ + "Apache/2.4.10 (Debian)" + ], + "content-type": [ + "application/json" + ], + "expires": [ + "Sat, 01 Jan 2000 00:00:00 GMT" + ], + "transfer-encoding": [ + "chunked" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "strict-transport-security": [ + "max-age=0; includeSubdomains; preload" + ], + "cache-control": [ + "no-store" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "body": { + "string": "{\"result\":{\"errors\":[],\"fields\":{\"title\":\"modified 1\",\"revisionID\":8434},\"revisionIDFieldInfo\":{\"value\":8434,\"validDomain\":\"https:\\/\\/phab.mercurial-scm.org\"},\"transactions\":[{\"type\":\"title\",\"value\":\"modified 1\"}]},\"error_code\":null,\"error_info\":null}" + } + }, + "request": { + "headers": { + "content-length": [ + "232" + ], + "content-type": [ + "application/x-www-form-urlencoded" + ], + "user-agent": [ + "mercurial/proto-1.0 (Mercurial 5.3.2+497-112d1ad30f88)" + ], + "accept": [ + "application/mercurial-0.1" + ], + "host": [ + "phab.mercurial-scm.org" + ] + }, + "body": "output=json&__conduit__=1¶ms=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22corpus%22%3A+%22modified+1%5Cn%5CnDifferential+Revision%3A+https%3A%2F%2Fphab.mercurial-scm.org%2FD8434%22%7D", + "uri": "https://phab.mercurial-scm.org//api/differential.parsecommitmessage", + "method": "POST" + } + }, + { + "response": { + "headers": { + "referrer-policy": [ + "no-referrer" + ], + "x-frame-options": [ + "Deny" + ], + "date": [ + "Wed, 15 Apr 2020 23:43:56 GMT" + ], + "server": [ + "Apache/2.4.10 (Debian)" + ], + "content-type": [ + "application/json" + ], + "expires": [ + "Sat, 01 Jan 2000 00:00:00 GMT" + ], + "transfer-encoding": [ + "chunked" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "strict-transport-security": [ + "max-age=0; includeSubdomains; preload" + ], + "cache-control": [ + "no-store" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "body": { + "string": "{\"result\":{\"object\":{\"id\":8434,\"phid\":\"PHID-DREV-l5ocnglddqa4hwbdzcky\"},\"transactions\":[]},\"error_code\":null,\"error_info\":null}" + } + }, + "request": { + "headers": { + "content-length": [ + "251" + ], + "content-type": [ + "application/x-www-form-urlencoded" + ], + "user-agent": [ + "mercurial/proto-1.0 (Mercurial 5.3.2+497-112d1ad30f88)" + ], + "accept": [ + "application/mercurial-0.1" + ], + "host": [ + "phab.mercurial-scm.org" + ] + }, + "body": "output=json&__conduit__=1¶ms=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22objectIdentifier%22%3A+8434%2C+%22transactions%22%3A+%5B%7B%22type%22%3A+%22title%22%2C+%22value%22%3A+%22modified+1%22%7D%5D%7D", + "uri": "https://phab.mercurial-scm.org//api/differential.revision.edit", + "method": "POST" + } + }, + { + "response": { + "headers": { + "referrer-policy": [ + "no-referrer" + ], + "x-frame-options": [ + "Deny" + ], + "date": [ + "Wed, 15 Apr 2020 23:43:57 GMT" + ], + "server": [ + "Apache/2.4.10 (Debian)" + ], + "content-type": [ + "application/json" + ], + "expires": [ + "Sat, 01 Jan 2000 00:00:00 GMT" + ], + "transfer-encoding": [ + "chunked" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "strict-transport-security": [ + "max-age=0; includeSubdomains; preload" + ], + "cache-control": [ + "no-store" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "body": { + "string": "{\"result\":null,\"error_code\":null,\"error_info\":null}" + } + }, + "request": { + "headers": { + "content-length": [ + "488" + ], + "content-type": [ + "application/x-www-form-urlencoded" + ], + "user-agent": [ + "mercurial/proto-1.0 (Mercurial 5.3.2+497-112d1ad30f88)" + ], + "accept": [ + "application/mercurial-0.1" + ], + "host": [ + "phab.mercurial-scm.org" + ] + }, + "body": "output=json&__conduit__=1¶ms=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22data%22%3A+%22%7B%5C%22branch%5C%22%3A+%5C%22default%5C%22%2C+%5C%22date%5C%22%3A+%5C%220+0%5C%22%2C+%5C%22node%5C%22%3A+%5C%220c6523cb1d0f560a958bcc0f4f938c91cb1141dc%5C%22%2C+%5C%22parent%5C%22%3A+%5C%22876a60d024de493e35a1c6f963f2604056cdc0b9%5C%22%2C+%5C%22user%5C%22%3A+%5C%22test%5C%22%7D%22%2C+%22diff_id%22%3A+%2221110%22%2C+%22name%22%3A+%22hg%3Ameta%22%7D", + "uri": "https://phab.mercurial-scm.org//api/differential.setdiffproperty", + "method": "POST" + } + }, + { + "response": { + "headers": { + "referrer-policy": [ + "no-referrer" + ], + "x-frame-options": [ + "Deny" + ], + "date": [ + "Wed, 15 Apr 2020 23:43:57 GMT" + ], + "server": [ + "Apache/2.4.10 (Debian)" + ], + "content-type": [ + "application/json" + ], + "expires": [ + "Sat, 01 Jan 2000 00:00:00 GMT" + ], + "transfer-encoding": [ + "chunked" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "strict-transport-security": [ + "max-age=0; includeSubdomains; preload" + ], + "cache-control": [ + "no-store" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "body": { + "string": "{\"result\":null,\"error_code\":null,\"error_info\":null}" + } + }, + "request": { + "headers": { + "content-length": [ + "600" + ], + "content-type": [ + "application/x-www-form-urlencoded" + ], + "user-agent": [ + "mercurial/proto-1.0 (Mercurial 5.3.2+497-112d1ad30f88)" + ], + "accept": [ + "application/mercurial-0.1" + ], + "host": [ + "phab.mercurial-scm.org" + ] + }, + "body": "output=json&__conduit__=1¶ms=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22data%22%3A+%22%7B%5C%220c6523cb1d0f560a958bcc0f4f938c91cb1141dc%5C%22%3A+%7B%5C%22author%5C%22%3A+%5C%22test%5C%22%2C+%5C%22authorEmail%5C%22%3A+%5C%22test%5C%22%2C+%5C%22branch%5C%22%3A+%5C%22default%5C%22%2C+%5C%22commit%5C%22%3A+%5C%220c6523cb1d0f560a958bcc0f4f938c91cb1141dc%5C%22%2C+%5C%22parents%5C%22%3A+%5B%5C%22876a60d024de493e35a1c6f963f2604056cdc0b9%5C%22%5D%2C+%5C%22time%5C%22%3A+0%7D%7D%22%2C+%22diff_id%22%3A+%2221110%22%2C+%22name%22%3A+%22local%3Acommits%22%7D", + "uri": "https://phab.mercurial-scm.org//api/differential.setdiffproperty", + "method": "POST" + } + }, + { + "response": { + "headers": { + "referrer-policy": [ + "no-referrer" + ], + "x-frame-options": [ + "Deny" + ], + "date": [ + "Wed, 15 Apr 2020 23:43:58 GMT" + ], + "server": [ + "Apache/2.4.10 (Debian)" + ], + "content-type": [ + "application/json" + ], + "expires": [ + "Sat, 01 Jan 2000 00:00:00 GMT" + ], + "transfer-encoding": [ + "chunked" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "strict-transport-security": [ + "max-age=0; includeSubdomains; preload" + ], + "cache-control": [ + "no-store" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "body": { + "string": "{\"result\":{\"errors\":[],\"fields\":{\"title\":\"modified 2\",\"revisionID\":8433},\"revisionIDFieldInfo\":{\"value\":8433,\"validDomain\":\"https:\\/\\/phab.mercurial-scm.org\"},\"transactions\":[{\"type\":\"title\",\"value\":\"modified 2\"}]},\"error_code\":null,\"error_info\":null}" + } + }, + "request": { + "headers": { + "content-length": [ + "232" + ], + "content-type": [ + "application/x-www-form-urlencoded" + ], + "user-agent": [ + "mercurial/proto-1.0 (Mercurial 5.3.2+497-112d1ad30f88)" + ], + "accept": [ + "application/mercurial-0.1" + ], + "host": [ + "phab.mercurial-scm.org" + ] + }, + "body": "output=json&__conduit__=1¶ms=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22corpus%22%3A+%22modified+2%5Cn%5CnDifferential+Revision%3A+https%3A%2F%2Fphab.mercurial-scm.org%2FD8433%22%7D", + "uri": "https://phab.mercurial-scm.org//api/differential.parsecommitmessage", + "method": "POST" + } + }, + { + "response": { + "headers": { + "referrer-policy": [ + "no-referrer" + ], + "x-frame-options": [ + "Deny" + ], + "date": [ + "Wed, 15 Apr 2020 23:43:58 GMT" + ], + "server": [ + "Apache/2.4.10 (Debian)" + ], + "content-type": [ + "application/json" + ], + "expires": [ + "Sat, 01 Jan 2000 00:00:00 GMT" + ], + "transfer-encoding": [ + "chunked" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "strict-transport-security": [ + "max-age=0; includeSubdomains; preload" + ], + "cache-control": [ + "no-store" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "body": { + "string": "{\"result\":{\"object\":{\"id\":8433,\"phid\":\"PHID-DREV-kpkwhtylyxrzikfspl5r\"},\"transactions\":[]},\"error_code\":null,\"error_info\":null}" + } + }, + "request": { + "headers": { + "content-length": [ + "353" + ], + "content-type": [ + "application/x-www-form-urlencoded" + ], + "user-agent": [ + "mercurial/proto-1.0 (Mercurial 5.3.2+497-112d1ad30f88)" + ], + "accept": [ + "application/mercurial-0.1" + ], + "host": [ + "phab.mercurial-scm.org" + ] + }, + "body": "output=json&__conduit__=1¶ms=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22objectIdentifier%22%3A+8433%2C+%22transactions%22%3A+%5B%7B%22type%22%3A+%22parents.set%22%2C+%22value%22%3A+%5B%22PHID-DREV-l5ocnglddqa4hwbdzcky%22%5D%7D%2C+%7B%22type%22%3A+%22title%22%2C+%22value%22%3A+%22modified+2%22%7D%5D%7D", + "uri": "https://phab.mercurial-scm.org//api/differential.revision.edit", + "method": "POST" + } + }, + { + "response": { + "headers": { + "referrer-policy": [ + "no-referrer" + ], + "x-frame-options": [ + "Deny" + ], + "date": [ + "Wed, 15 Apr 2020 23:43:59 GMT" + ], + "server": [ + "Apache/2.4.10 (Debian)" + ], + "content-type": [ + "application/json" + ], + "expires": [ + "Sat, 01 Jan 2000 00:00:00 GMT" + ], + "transfer-encoding": [ + "chunked" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "strict-transport-security": [ + "max-age=0; includeSubdomains; preload" + ], + "cache-control": [ + "no-store" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "body": { + "string": "{\"result\":{\"data\":[{\"id\":2,\"type\":\"REPO\",\"phid\":\"PHID-REPO-bvunnehri4u2isyr7bc3\",\"fields\":{\"name\":\"Mercurial\",\"vcs\":\"hg\",\"callsign\":\"HG\",\"shortName\":null,\"status\":\"active\",\"isImporting\":false,\"almanacServicePHID\":null,\"refRules\":{\"fetchRules\":[],\"trackRules\":[],\"permanentRefRules\":[]},\"spacePHID\":null,\"dateCreated\":1498761653,\"dateModified\":1500403184,\"policy\":{\"view\":\"public\",\"edit\":\"admin\",\"diffusion.push\":\"users\"}},\"attachments\":{}}],\"maps\":{},\"query\":{\"queryKey\":null},\"cursor\":{\"limit\":100,\"after\":null,\"before\":null,\"order\":null}},\"error_code\":null,\"error_info\":null}" + } + }, + "request": { + "headers": { + "content-length": [ + "183" + ], + "content-type": [ + "application/x-www-form-urlencoded" + ], + "user-agent": [ + "mercurial/proto-1.0 (Mercurial 5.3.2+497-112d1ad30f88)" + ], + "accept": [ + "application/mercurial-0.1" + ], + "host": [ + "phab.mercurial-scm.org" + ] + }, + "body": "output=json&__conduit__=1¶ms=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22constraints%22%3A+%7B%22callsigns%22%3A+%5B%22HG%22%5D%7D%7D", + "uri": "https://phab.mercurial-scm.org//api/diffusion.repository.search", + "method": "POST" + } + }, + { + "response": { + "headers": { + "referrer-policy": [ + "no-referrer" + ], + "x-frame-options": [ + "Deny" + ], + "date": [ + "Wed, 15 Apr 2020 23:43:59 GMT" + ], + "server": [ + "Apache/2.4.10 (Debian)" + ], + "content-type": [ + "application/json" + ], + "expires": [ + "Sat, 01 Jan 2000 00:00:00 GMT" + ], + "transfer-encoding": [ + "chunked" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "strict-transport-security": [ + "max-age=0; includeSubdomains; preload" + ], + "cache-control": [ + "no-store" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "body": { + "string": "{\"result\":{\"diffid\":21112,\"phid\":\"PHID-DIFF-5hagl525ogjltlaimw2a\",\"uri\":\"https:\\/\\/phab.mercurial-scm.org\\/differential\\/diff\\/21112\\/\"},\"error_code\":null,\"error_info\":null}" + } + }, + "request": { + "headers": { + "content-length": [ + "1166" + ], + "content-type": [ + "application/x-www-form-urlencoded" + ], + "user-agent": [ + "mercurial/proto-1.0 (Mercurial 5.3.2+497-112d1ad30f88)" + ], + "accept": [ + "application/mercurial-0.1" + ], + "host": [ + "phab.mercurial-scm.org" + ] + }, + "body": "output=json&__conduit__=1¶ms=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22bookmark%22%3A+null%2C+%22branch%22%3A+%22default%22%2C+%22changes%22%3A+%7B%22file1.txt%22%3A+%7B%22addLines%22%3A+1%2C+%22awayPaths%22%3A+%5B%5D%2C+%22commitHash%22%3A+null%2C+%22currentPath%22%3A+%22file1.txt%22%2C+%22delLines%22%3A+1%2C+%22fileType%22%3A+1%2C+%22hunks%22%3A+%5B%7B%22addLines%22%3A+1%2C+%22corpus%22%3A+%22-mod2%5Cn%2Bobsolete%5Cn%22%2C+%22delLines%22%3A+1%2C+%22newLength%22%3A+1%2C+%22newOffset%22%3A+1%2C+%22oldLength%22%3A+1%2C+%22oldOffset%22%3A+1%7D%5D%2C+%22metadata%22%3A+%7B%7D%2C+%22newProperties%22%3A+%7B%7D%2C+%22oldPath%22%3A+%22file1.txt%22%2C+%22oldProperties%22%3A+%7B%7D%2C+%22type%22%3A+2%7D%7D%2C+%22creationMethod%22%3A+%22phabsend%22%2C+%22lintStatus%22%3A+%22none%22%2C+%22repositoryPHID%22%3A+%22PHID-REPO-bvunnehri4u2isyr7bc3%22%2C+%22sourceControlBaseRevision%22%3A+%220c6523cb1d0f560a958bcc0f4f938c91cb1141dc%22%2C+%22sourceControlPath%22%3A+%22%2F%22%2C+%22sourceControlSystem%22%3A+%22hg%22%2C+%22sourceMachine%22%3A+%22%22%2C+%22sourcePath%22%3A+%22%2F%22%2C+%22unitStatus%22%3A+%22none%22%7D", + "uri": "https://phab.mercurial-scm.org//api/differential.creatediff", + "method": "POST" + } + }, + { + "response": { + "headers": { + "referrer-policy": [ + "no-referrer" + ], + "x-frame-options": [ + "Deny" + ], + "date": [ + "Wed, 15 Apr 2020 23:44:00 GMT" + ], + "server": [ + "Apache/2.4.10 (Debian)" + ], + "content-type": [ + "application/json" + ], + "expires": [ + "Sat, 01 Jan 2000 00:00:00 GMT" + ], + "transfer-encoding": [ + "chunked" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "strict-transport-security": [ + "max-age=0; includeSubdomains; preload" + ], + "cache-control": [ + "no-store" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "body": { + "string": "{\"result\":null,\"error_code\":null,\"error_info\":null}" + } + }, + "request": { + "headers": { + "content-length": [ + "482" + ], + "content-type": [ + "application/x-www-form-urlencoded" + ], + "user-agent": [ + "mercurial/proto-1.0 (Mercurial 5.3.2+497-112d1ad30f88)" + ], + "accept": [ + "application/mercurial-0.1" + ], + "host": [ + "phab.mercurial-scm.org" + ] + }, + "body": "output=json&__conduit__=1¶ms=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22data%22%3A+%22%7B%5C%22branch%5C%22%3A+%5C%22default%5C%22%2C+%5C%22date%5C%22%3A+%5C%220+0%5C%22%2C+%5C%22node%5C%22%3A+%5C%22082be6c9415073eee91d1f5b330b93e1fefd7627%5C%22%2C+%5C%22parent%5C%22%3A+%5C%220c6523cb1d0f560a958bcc0f4f938c91cb1141dc%5C%22%2C+%5C%22user%5C%22%3A+%5C%22test%5C%22%7D%22%2C+%22diff_id%22%3A+21112%2C+%22name%22%3A+%22hg%3Ameta%22%7D", + "uri": "https://phab.mercurial-scm.org//api/differential.setdiffproperty", + "method": "POST" + } + }, + { + "response": { + "headers": { + "referrer-policy": [ + "no-referrer" + ], + "x-frame-options": [ + "Deny" + ], + "date": [ + "Wed, 15 Apr 2020 23:44:00 GMT" + ], + "server": [ + "Apache/2.4.10 (Debian)" + ], + "content-type": [ + "application/json" + ], + "expires": [ + "Sat, 01 Jan 2000 00:00:00 GMT" + ], + "transfer-encoding": [ + "chunked" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "strict-transport-security": [ + "max-age=0; includeSubdomains; preload" + ], + "cache-control": [ + "no-store" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "body": { + "string": "{\"result\":null,\"error_code\":null,\"error_info\":null}" + } + }, + "request": { + "headers": { + "content-length": [ + "594" + ], + "content-type": [ + "application/x-www-form-urlencoded" + ], + "user-agent": [ + "mercurial/proto-1.0 (Mercurial 5.3.2+497-112d1ad30f88)" + ], + "accept": [ + "application/mercurial-0.1" + ], + "host": [ + "phab.mercurial-scm.org" + ] + }, + "body": "output=json&__conduit__=1¶ms=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22data%22%3A+%22%7B%5C%22082be6c9415073eee91d1f5b330b93e1fefd7627%5C%22%3A+%7B%5C%22author%5C%22%3A+%5C%22test%5C%22%2C+%5C%22authorEmail%5C%22%3A+%5C%22test%5C%22%2C+%5C%22branch%5C%22%3A+%5C%22default%5C%22%2C+%5C%22commit%5C%22%3A+%5C%22082be6c9415073eee91d1f5b330b93e1fefd7627%5C%22%2C+%5C%22parents%5C%22%3A+%5B%5C%220c6523cb1d0f560a958bcc0f4f938c91cb1141dc%5C%22%5D%2C+%5C%22time%5C%22%3A+0%7D%7D%22%2C+%22diff_id%22%3A+21112%2C+%22name%22%3A+%22local%3Acommits%22%7D", + "uri": "https://phab.mercurial-scm.org//api/differential.setdiffproperty", + "method": "POST" + } + }, + { + "response": { + "headers": { + "referrer-policy": [ + "no-referrer" + ], + "x-frame-options": [ + "Deny" + ], + "date": [ + "Wed, 15 Apr 2020 23:44:01 GMT" + ], + "server": [ + "Apache/2.4.10 (Debian)" + ], + "content-type": [ + "application/json" + ], + "expires": [ + "Sat, 01 Jan 2000 00:00:00 GMT" + ], + "transfer-encoding": [ + "chunked" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "strict-transport-security": [ + "max-age=0; includeSubdomains; preload" + ], + "cache-control": [ + "no-store" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "body": { + "string": "{\"result\":{\"errors\":[],\"fields\":{\"title\":\"modified A\"},\"revisionIDFieldInfo\":{\"value\":null,\"validDomain\":\"https:\\/\\/phab.mercurial-scm.org\"},\"transactions\":[{\"type\":\"title\",\"value\":\"modified A\"}]},\"error_code\":null,\"error_info\":null}" + } + }, + "request": { + "headers": { + "content-length": [ + "155" + ], + "content-type": [ + "application/x-www-form-urlencoded" + ], + "user-agent": [ + "mercurial/proto-1.0 (Mercurial 5.3.2+497-112d1ad30f88)" + ], + "accept": [ + "application/mercurial-0.1" + ], + "host": [ + "phab.mercurial-scm.org" + ] + }, + "body": "output=json&__conduit__=1¶ms=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22corpus%22%3A+%22modified+A%22%7D", + "uri": "https://phab.mercurial-scm.org//api/differential.parsecommitmessage", + "method": "POST" + } + }, + { + "response": { + "headers": { + "referrer-policy": [ + "no-referrer" + ], + "x-frame-options": [ + "Deny" + ], + "date": [ + "Wed, 15 Apr 2020 23:44:01 GMT" + ], + "server": [ + "Apache/2.4.10 (Debian)" + ], + "content-type": [ + "application/json" + ], + "expires": [ + "Sat, 01 Jan 2000 00:00:00 GMT" + ], + "transfer-encoding": [ + "chunked" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "strict-transport-security": [ + "max-age=0; includeSubdomains; preload" + ], + "cache-control": [ + "no-store" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "body": { + "string": "{\"result\":{\"object\":{\"id\":8435,\"phid\":\"PHID-DREV-wn3f4ni4p5n6juwqeskr\"},\"transactions\":[{\"phid\":\"PHID-XACT-DREV-6pr73p6guxsdz4p\"},{\"phid\":\"PHID-XACT-DREV-qpigriq2bzc6xgf\"},{\"phid\":\"PHID-XACT-DREV-czslffarxz4pbmz\"},{\"phid\":\"PHID-XACT-DREV-4ahvaedacwbzzyv\"},{\"phid\":\"PHID-XACT-DREV-kmjjhdw47orongi\"},{\"phid\":\"PHID-XACT-DREV-65ahhu2fov5rwog\"}]},\"error_code\":null,\"error_info\":null}" + } + }, + "request": { + "headers": { + "content-length": [ + "410" + ], + "content-type": [ + "application/x-www-form-urlencoded" + ], + "user-agent": [ + "mercurial/proto-1.0 (Mercurial 5.3.2+497-112d1ad30f88)" + ], + "accept": [ + "application/mercurial-0.1" + ], + "host": [ + "phab.mercurial-scm.org" + ] + }, + "body": "output=json&__conduit__=1¶ms=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22transactions%22%3A+%5B%7B%22type%22%3A+%22update%22%2C+%22value%22%3A+%22PHID-DIFF-5hagl525ogjltlaimw2a%22%7D%2C+%7B%22type%22%3A+%22parents.set%22%2C+%22value%22%3A+%5B%22PHID-DREV-kpkwhtylyxrzikfspl5r%22%5D%7D%2C+%7B%22type%22%3A+%22title%22%2C+%22value%22%3A+%22modified+A%22%7D%5D%7D", + "uri": "https://phab.mercurial-scm.org//api/differential.revision.edit", + "method": "POST" + } + }, + { + "response": { + "headers": { + "referrer-policy": [ + "no-referrer" + ], + "x-frame-options": [ + "Deny" + ], + "date": [ + "Wed, 15 Apr 2020 23:44:02 GMT" + ], + "server": [ + "Apache/2.4.10 (Debian)" + ], + "content-type": [ + "application/json" + ], + "expires": [ + "Sat, 01 Jan 2000 00:00:00 GMT" + ], + "transfer-encoding": [ + "chunked" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "strict-transport-security": [ + "max-age=0; includeSubdomains; preload" + ], + "cache-control": [ + "no-store" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "body": { + "string": "{\"result\":[{\"id\":\"8435\",\"phid\":\"PHID-DREV-wn3f4ni4p5n6juwqeskr\",\"title\":\"modified A\",\"uri\":\"https:\\/\\/phab.mercurial-scm.org\\/D8435\",\"dateCreated\":\"1586994241\",\"dateModified\":\"1586994241\",\"authorPHID\":\"PHID-USER-tzhaient733lwrlbcag5\",\"status\":\"0\",\"statusName\":\"Needs Review\",\"properties\":{\"draft.broadcast\":true,\"lines.added\":1,\"lines.removed\":1},\"branch\":\"default\",\"summary\":\"\",\"testPlan\":\"\",\"lineCount\":\"2\",\"activeDiffPHID\":\"PHID-DIFF-5hagl525ogjltlaimw2a\",\"diffs\":[\"21112\"],\"commits\":[],\"reviewers\":{\"PHID-PROJ-3dvcxzznrjru2xmmses3\":\"PHID-PROJ-3dvcxzznrjru2xmmses3\"},\"ccs\":[\"PHID-USER-q42dn7cc3donqriafhjx\"],\"hashes\":[[\"hgcm\",\"\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\"]],\"auxiliary\":{\"phabricator:projects\":[],\"phabricator:depends-on\":[\"PHID-DREV-kpkwhtylyxrzikfspl5r\"]},\"repositoryPHID\":\"PHID-REPO-bvunnehri4u2isyr7bc3\",\"sourcePath\":\"\\/\"},{\"id\":\"8433\",\"phid\":\"PHID-DREV-kpkwhtylyxrzikfspl5r\",\"title\":\"modified 2\",\"uri\":\"https:\\/\\/phab.mercurial-scm.org\\/D8433\",\"dateCreated\":\"1586994221\",\"dateModified\":\"1586994241\",\"authorPHID\":\"PHID-USER-tzhaient733lwrlbcag5\",\"status\":\"0\",\"statusName\":\"Needs Review\",\"properties\":{\"draft.broadcast\":true,\"lines.added\":1,\"lines.removed\":1},\"branch\":\"default\",\"summary\":\"\",\"testPlan\":\"\",\"lineCount\":\"2\",\"activeDiffPHID\":\"PHID-DIFF-g25jdc5b5khduwpp3p3b\",\"diffs\":[\"21110\"],\"commits\":[],\"reviewers\":{\"PHID-PROJ-3dvcxzznrjru2xmmses3\":\"PHID-PROJ-3dvcxzznrjru2xmmses3\"},\"ccs\":[\"PHID-USER-q42dn7cc3donqriafhjx\"],\"hashes\":[[\"hgcm\",\"\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\"]],\"auxiliary\":{\"phabricator:projects\":[],\"phabricator:depends-on\":[\"PHID-DREV-l5ocnglddqa4hwbdzcky\"]},\"repositoryPHID\":\"PHID-REPO-bvunnehri4u2isyr7bc3\",\"sourcePath\":\"\\/\"},{\"id\":\"8434\",\"phid\":\"PHID-DREV-l5ocnglddqa4hwbdzcky\",\"title\":\"modified 1\",\"uri\":\"https:\\/\\/phab.mercurial-scm.org\\/D8434\",\"dateCreated\":\"1586994227\",\"dateModified\":\"1586994236\",\"authorPHID\":\"PHID-USER-tzhaient733lwrlbcag5\",\"status\":\"0\",\"statusName\":\"Needs Review\",\"properties\":{\"draft.broadcast\":true,\"lines.added\":1,\"lines.removed\":1},\"branch\":\"default\",\"summary\":\"\",\"testPlan\":\"\",\"lineCount\":\"2\",\"activeDiffPHID\":\"PHID-DIFF-qat4sqpqqvytzhf7rpti\",\"diffs\":[\"21111\"],\"commits\":[],\"reviewers\":{\"PHID-PROJ-3dvcxzznrjru2xmmses3\":\"PHID-PROJ-3dvcxzznrjru2xmmses3\"},\"ccs\":[\"PHID-USER-q42dn7cc3donqriafhjx\"],\"hashes\":[[\"hgcm\",\"\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\"]],\"auxiliary\":{\"phabricator:projects\":[],\"phabricator:depends-on\":[]},\"repositoryPHID\":\"PHID-REPO-bvunnehri4u2isyr7bc3\",\"sourcePath\":\"\\/\"}],\"error_code\":null,\"error_info\":null}" + } + }, + "request": { + "headers": { + "content-length": [ + "162" + ], + "content-type": [ + "application/x-www-form-urlencoded" + ], + "user-agent": [ + "mercurial/proto-1.0 (Mercurial 5.3.2+497-112d1ad30f88)" + ], + "accept": [ + "application/mercurial-0.1" + ], + "host": [ + "phab.mercurial-scm.org" + ] + }, + "body": "output=json&__conduit__=1¶ms=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22ids%22%3A+%5B8434%2C+8433%2C+8435%5D%7D", + "uri": "https://phab.mercurial-scm.org//api/differential.query", + "method": "POST" + } + }, + { + "response": { + "headers": { + "referrer-policy": [ + "no-referrer" + ], + "x-frame-options": [ + "Deny" + ], + "date": [ + "Wed, 15 Apr 2020 23:44:02 GMT" + ], + "server": [ + "Apache/2.4.10 (Debian)" + ], + "content-type": [ + "application/json" + ], + "expires": [ + "Sat, 01 Jan 2000 00:00:00 GMT" + ], + "transfer-encoding": [ + "chunked" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "strict-transport-security": [ + "max-age=0; includeSubdomains; preload" + ], + "cache-control": [ + "no-store" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "body": { + "string": "{\"result\":null,\"error_code\":null,\"error_info\":null}" + } + }, + "request": { + "headers": { + "content-length": [ + "482" + ], + "content-type": [ + "application/x-www-form-urlencoded" + ], + "user-agent": [ + "mercurial/proto-1.0 (Mercurial 5.3.2+497-112d1ad30f88)" + ], + "accept": [ + "application/mercurial-0.1" + ], + "host": [ + "phab.mercurial-scm.org" + ] + }, + "body": "output=json&__conduit__=1¶ms=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22data%22%3A+%22%7B%5C%22branch%5C%22%3A+%5C%22default%5C%22%2C+%5C%22date%5C%22%3A+%5C%220+0%5C%22%2C+%5C%22node%5C%22%3A+%5C%22b5913193c805e46620181263d5175a36ee74c48a%5C%22%2C+%5C%22parent%5C%22%3A+%5C%220c6523cb1d0f560a958bcc0f4f938c91cb1141dc%5C%22%2C+%5C%22user%5C%22%3A+%5C%22test%5C%22%7D%22%2C+%22diff_id%22%3A+21112%2C+%22name%22%3A+%22hg%3Ameta%22%7D", + "uri": "https://phab.mercurial-scm.org//api/differential.setdiffproperty", + "method": "POST" + } + }, + { + "response": { + "headers": { + "referrer-policy": [ + "no-referrer" + ], + "x-frame-options": [ + "Deny" + ], + "date": [ + "Wed, 15 Apr 2020 23:44:03 GMT" + ], + "server": [ + "Apache/2.4.10 (Debian)" + ], + "content-type": [ + "application/json" + ], + "expires": [ + "Sat, 01 Jan 2000 00:00:00 GMT" + ], + "transfer-encoding": [ + "chunked" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "strict-transport-security": [ + "max-age=0; includeSubdomains; preload" + ], + "cache-control": [ + "no-store" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "body": { + "string": "{\"result\":null,\"error_code\":null,\"error_info\":null}" + } + }, + "request": { + "headers": { + "content-length": [ + "594" + ], + "content-type": [ + "application/x-www-form-urlencoded" + ], + "user-agent": [ + "mercurial/proto-1.0 (Mercurial 5.3.2+497-112d1ad30f88)" + ], + "accept": [ + "application/mercurial-0.1" + ], + "host": [ + "phab.mercurial-scm.org" + ] + }, + "body": "output=json&__conduit__=1¶ms=%7B%22__conduit__%22%3A+%7B%22token%22%3A+%22cli-hahayouwish%22%7D%2C+%22data%22%3A+%22%7B%5C%22b5913193c805e46620181263d5175a36ee74c48a%5C%22%3A+%7B%5C%22author%5C%22%3A+%5C%22test%5C%22%2C+%5C%22authorEmail%5C%22%3A+%5C%22test%5C%22%2C+%5C%22branch%5C%22%3A+%5C%22default%5C%22%2C+%5C%22commit%5C%22%3A+%5C%22b5913193c805e46620181263d5175a36ee74c48a%5C%22%2C+%5C%22parents%5C%22%3A+%5B%5C%220c6523cb1d0f560a958bcc0f4f938c91cb1141dc%5C%22%5D%2C+%5C%22time%5C%22%3A+0%7D%7D%22%2C+%22diff_id%22%3A+21112%2C+%22name%22%3A+%22local%3Acommits%22%7D", + "uri": "https://phab.mercurial-scm.org//api/differential.setdiffproperty", + "method": "POST" + } + } + ] +} \ No newline at end of file diff --git a/tests/test-phabricator.t b/tests/test-phabricator.t --- a/tests/test-phabricator.t +++ b/tests/test-phabricator.t @@ -213,17 +213,28 @@ o 0 5cbade24e0fa 1970-01-01 00:00 +0000 test added +Also check that it doesn't create more orphans outside of the stack + + $ hg up -q 1 + $ echo "mod3" > file1.txt + $ hg ci -m 'modified 3' + created new head + $ hg up -q 3 $ hg phabsend -r ".^ + ." --test-vcr "$VCR/phabsend-add-parent.json" 2b4aa8a88d61 mapped to old nodes ['2b4aa8a88d61'] D8434 - created - d549263bcb2d: modified 1 D8433 - updated - 2b4aa8a88d61: modified 2 new commits: ['876a60d024de'] new commits: ['0c6523cb1d0f'] + restabilizing 1eda4bf55021 as d2c78c3a3e01 $ hg log -G -T compact - @ 5[tip] 1dff6b051abf 1970-01-01 00:00 +0000 test - | modified 2 + o 7[tip]:5 d2c78c3a3e01 1970-01-01 00:00 +0000 test + | modified 3 | - o 4:0 eb3752621d45 1970-01-01 00:00 +0000 test + | @ 6 0c6523cb1d0f 1970-01-01 00:00 +0000 test + |/ modified 2 + | + o 5:0 876a60d024de 1970-01-01 00:00 +0000 test | modified 1 | o 0 5cbade24e0fa 1970-01-01 00:00 +0000 test @@ -242,31 +253,38 @@ $ hg amend --config extensions.amend= 1 new orphan changesets $ hg log -G - @ changeset: 8:8d83edb3cbac + @ changeset: 10:082be6c94150 | tag: tip - | parent: 5:1dff6b051abf + | parent: 6:0c6523cb1d0f | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: modified A | - | * changeset: 7:d4ea1b2e3511 + | * changeset: 9:a67643f48146 | | user: test | | date: Thu Jan 01 00:00:00 1970 +0000 | | instability: orphan | | summary: modified B | | - | x changeset: 6:4635d7f0d1ff - |/ user: test + | x changeset: 8:db79727cb2f7 + |/ parent: 6:0c6523cb1d0f + | user: test | date: Thu Jan 01 00:00:00 1970 +0000 - | obsolete: rewritten using amend as 8:8d83edb3cbac + | obsolete: rewritten using amend as 10:082be6c94150 | summary: modified A | - o changeset: 5:1dff6b051abf - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: modified 2 + | o changeset: 7:d2c78c3a3e01 + | | parent: 5:876a60d024de + | | user: test + | | date: Thu Jan 01 00:00:00 1970 +0000 + | | summary: modified 3 + | | + o | changeset: 6:0c6523cb1d0f + |/ user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: modified 2 | - o changeset: 4:eb3752621d45 + o changeset: 5:876a60d024de | parent: 0:5cbade24e0fa | user: test | date: Thu Jan 01 00:00:00 1970 +0000 @@ -281,6 +299,59 @@ abort: obsolete commits cannot be posted for review [255] +Don't restack existing orphans + + $ hg phabsend -r 5::tip --test-vcr "$VCR/phabsend-no-restack-orphan.json" + 876a60d024de mapped to old nodes ['876a60d024de'] + 0c6523cb1d0f mapped to old nodes ['0c6523cb1d0f'] + D8434 - updated - 876a60d024de: modified 1 + D8433 - updated - 0c6523cb1d0f: modified 2 + D8435 - created - 082be6c94150: modified A + new commits: ['b5913193c805'] + not restabilizing unchanged d2c78c3a3e01 + $ hg log -G + @ changeset: 11:b5913193c805 + | tag: tip + | parent: 6:0c6523cb1d0f + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: modified A + | + | * changeset: 9:a67643f48146 + | | user: test + | | date: Thu Jan 01 00:00:00 1970 +0000 + | | instability: orphan + | | summary: modified B + | | + | x changeset: 8:db79727cb2f7 + |/ parent: 6:0c6523cb1d0f + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | obsolete: rewritten using amend, phabsend as 11:b5913193c805 + | summary: modified A + | + | o changeset: 7:d2c78c3a3e01 + | | parent: 5:876a60d024de + | | user: test + | | date: Thu Jan 01 00:00:00 1970 +0000 + | | summary: modified 3 + | | + o | changeset: 6:0c6523cb1d0f + |/ user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: modified 2 + | + o changeset: 5:876a60d024de + | parent: 0:5cbade24e0fa + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: modified 1 + | + o changeset: 0:5cbade24e0fa + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: added + $ cd .. Phabesending a new binary, a modified binary, and a removed binary