##// END OF EJS Templates
phabricator: don't infer the old `fctx` in `notutf8()`...
phabricator: don't infer the old `fctx` in `notutf8()` This is used along with `fctx.isbinary()` to gate `addoldbinary()`, so it seems like a good idea to provide the caller similar control over the current and parent filecontext. Unlike `addoldbinary()`, it doesn't need both previous and current contexts at the same time, so make the caller responsible for testing both cases, as appropriate. I haven't worked out all of the problems around marking files as binary for move/remove/copy, but this will definitely help with `--no-stack` too. It also turns out to have been doing too much- in the remove case, it tested not just the removed file in the parent context (which is what gets passed in that case), but also in the parent of the parent context (which should be irrelevant). The previous code also required the `fctx.parents()` check to work in the add (but without rename) case. Now the add and remove cases test only what they need to. But now that it is written this way, the fact that only the current `fctx` is checked to be binary in the case of modification or being renamed seems wrong. Differential Revision: https://phab.mercurial-scm.org/D8220

File last commit:

r37204:03ff17a4 default
r44913:66a05dbb default
Show More
schema.sql
33 lines | 1.1 KiB | text/x-sql | TransactSqlLexer
Pulkit Goyal
infinitepush: move the extension to core from fb-hgext...
r37204 CREATE TABLE `bookmarkstonode` (
`node` varbinary(64) NOT NULL,
`bookmark` varbinary(512) NOT NULL,
`reponame` varbinary(255) NOT NULL,
PRIMARY KEY (`reponame`,`bookmark`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `bundles` (
`bundle` varbinary(512) NOT NULL,
`reponame` varbinary(255) NOT NULL,
PRIMARY KEY (`bundle`,`reponame`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `nodestobundle` (
`node` varbinary(64) NOT NULL,
`bundle` varbinary(512) NOT NULL,
`reponame` varbinary(255) NOT NULL,
PRIMARY KEY (`node`,`reponame`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `nodesmetadata` (
`node` varbinary(64) NOT NULL,
`message` mediumblob NOT NULL,
`p1` varbinary(64) NOT NULL,
`p2` varbinary(64) DEFAULT NULL,
`author` varbinary(255) NOT NULL,
`committer` varbinary(255) DEFAULT NULL,
`author_date` bigint(20) NOT NULL,
`committer_date` bigint(20) DEFAULT NULL,
`reponame` varbinary(255) NOT NULL,
`optional_json_metadata` mediumblob,
PRIMARY KEY (`reponame`,`node`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;