summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-08-07add some efl-style improvementsHEADmasterMike Blumenkrantz
2017-05-31git-phab: Handle NoSection exception from configparserPhilip Withnall
If the user doesn’t have a `phab` section in their configuration, they will hit this exception, spuriously. Signed-off-by: Philip Withnall <withnall@endlessm.com> Differential Revision: https://phabricator.freedesktop.org/D1738
2017-04-17Back to development toward 3.0Thibault Saunier
2017-04-17Release 2.1.0Thibault Saunier
2017-04-17Handle a different title placeholderAlexandru Băluț
Fixes T7744 Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1724
2017-04-17Set the title in the dict only onceAlexandru Băluț
Should have been part of commit 7575cd81ef1712ae39030282773c7c1facab6282 Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1723
2017-04-17man: Fix incorrect flagAlexandru Băluț
Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1722
2017-03-21man: Remove now removed documentation about checkoutThibault Saunier
And document the fetch --checkout argument
2017-03-21Document 'apply' subcommand.Andrew Shadura
Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk> Differential Revision: https://phabricator.freedesktop.org/D1510
2017-03-21Use branches from staging repo to set task branchesThibault Saunier
No reason to use some other repo if a staging repo is avalaible. Also if no remote URI is set on the task we won't be able to later `git phab apply TXXX` because it is currently impossible to retrieve the list of differential associated to a task. Here we simply set the URI to the last published diff which contains the whole branch as expected. The following error was happenning: Can not apply revisions from a task if no 'remote branch' has been set for it. INFO: You need to find what revisions are associated with the tasks and apply them. Differential Revision: https://phabricator.freedesktop.org/D1672
2017-03-21Allow stashing changes before applying/attaching/landing patchesThibault Saunier
Avoid to require the user to do it himself and making the worklow less painful. Very similare to git.rebase.autostash and friends. Differential Revision: https://phabricator.freedesktop.org/D1641
2017-03-16Explicitly set revision title when creatingDaniel Stone
When creating a revision through the Conduit API, newer versions of Phabricator require we explicitly set the title in the field, rather than pulling it back from the commit message parsing. Signed-off-by: Daniel Stone <daniels@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1694
2017-03-16Update pre-commit configDaniel Stone
pre-commit has apparently changed incompatibly, spewing warnings about how legacy hooks are being used and thus it is skipping everything. Signed-off-by: Daniel Stone <daniels@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1693
2017-02-28Checkout the base commit of the first differential when building fake branchThibault Saunier
If there are several depending revision it will always fail as the base revision won't be accessible in the local repo
2017-02-17README: Add some documentation about how to first setup a projectThibault Saunier
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Differential Revision: https://phabricator.freedesktop.org/D1673
2017-02-17If there are multiple remotes, use the one we are trackingSimon McVittie
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Differential Revision: https://phabricator.freedesktop.org/D1470
2017-02-17Re-enable '--arcrc' optionJustin Kim
In some cases like testing, it requires to be a different user by using different token or ceritificate in arcrc. This feature was originally created in D833, but disappeared with D851. Signed-off-by: Justin Kim <justin.kim@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1509
2016-11-17Bump version after releaseThibault Saunier
2016-11-17Release 2.0Thibault Saunier
2016-11-14Never add dependency on already closed revisionsThibault Saunier
Fixes T7574 Reviewed-by: Daniel Stone <daniels@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1480
2016-11-14Parse the repository-local arcconfig (in .git/arc/config).Andrew Shadura
Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk> Differential Revision: https://phabricator.freedesktop.org/D1474
2016-11-14git-phab.txt: Make the formatting more manpagey.Andrew Shadura
Apply formatting traditionally used in manpages: commands in bold, metavariables in italic, code samples in monospace. Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk> Differential Revision: https://phabricator.freedesktop.org/D1395
2016-11-09git-phab: Fix additions and deletions of binary filesPhilip Withnall
The code was only handling changes to, or renames of, binary files. Additionally, it was never uploading the old binary file, so these changes were appearing as file additions. Signed-off-by: Philip Withnall <philip.withnall@collabora.co.uk> Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1455
2016-11-09git-phab: Pass --keep-cr to git-am to avoid breaking on CRLF patchesPhilip Withnall
If a patch (and the file it is patching) use CRLF line endings, git-am will not work, as it normalises the line endings in the file (but not the patch) before applying. Pass --keep-cr to git-am to avoid this — it will now apply the patches, but will spew warnings about trailing whitespace (the CR characters), which seems fair. Signed-off-by: Philip Withnall <philip.withnall@collabora.co.uk> Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1266
2016-11-09Do not try to apply abandonned revisionsThibault Saunier
2016-09-28README: Add back instructions to install git-phabXavier Claessens
Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1339
2016-09-28Enable bash completion againXavier Claessens
Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1338
2016-09-17git-phab: Use repository.query for all repository queriesPhilip Withnall
Instead of downloading the entire list of repositories and manually searching through by remote URI. Signed-off-by: Philip Withnall <philip.withnall@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1284
2016-09-17Avoid trying to connect to phab when not neededThibault Saunier
Making GitPhab.phabricator a @property so that we do not actually set connect when not calling it. Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1272
2016-09-17get_changes_for_diff: ignore UnicodeDecodeErrorGuillaume Desmottes
If, for some reason, blob_is_binary() failed to detect that the file is actually a binary, best to silently ignore it than crash on UnicodeDecodeError exception. Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1304
2016-09-17fix 'arc lint' callGuillaume Desmottes
We are using check_call() which does not return anything. This bug is a leftover from the check_output() -> check_call() change as the former does return the output of the command. Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1287
2016-08-10Use same code path to handle `fetch --checkout` as `fetch` aloneThibault Saunier
That code was duplicated so unify it. Reviewed-by: Daniel Stone <daniels@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1271
2016-08-10Do not print `pre-commit` output and let user interact with arclintThibault Saunier
Differential Revision: https://phabricator.freedesktop.org/D1270
2016-08-10Remove useless printsThibault Saunier
Reviewed-by: Daniel Stone <daniels@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1262
2016-08-10Rename merge to apply handling both revisions and tasksThibault Saunier
And remove the cherry-pick command merging it into 'apply --no-dependencies' Reviewed-by: Daniel Stone <daniels@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1260
2016-08-10Remove checkout and make fetch behave like git fetchThibault Saunier
But add a `--checkout` argument to `fetch` so that the user can still get the branch almost verbatim to what has been proposed in one step. Reviewed-by: Daniel Stone <daniels@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1259
2016-08-09git-phab: Fix offsets in manually constructed git diffsPhilip Withnall
The new and old offsets of the start of the file in diffs which are sent to Phabricator must only be zero if the file has been deleted or added, respectively. This was previously backwards in one of the cases, resulting in invalid raw diffs being downloaded from Phabricator, and hence the round-trip `git phab attach; git phab merge` not working. Signed-off-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.freedesktop.org/D1254
2016-08-09git-phab: Add --never-apply-patches argument to `arc lint`Philip Withnall
The linting infrastructure in git-phab assumes that the linter is not interactive; if it is (as `arc lint` can sometimes be, for example when running its clang-format plugin), everything will seemingly hang, as git-phab is waiting for `arc lint` to complete before it will print the output from it, and `arc lint` is waiting for user input after printing a prompt which the user has not seen. Fix that by automatically answering negatively to all `arc lint` questions, which are typically of the form ‘do you want to make this automatic indentation change?’. The questions should then be printed afterwards. Signed-off-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.freedesktop.org/D1251
2016-08-09git-phab: Fix content type detection for binary filesPhilip Withnall
The mime_type field of GitPython’s Blob object is unreliable: it detects the type based entirely on the blob’s filename, which results in weird types for files like ‘configure.ac’. Instead, since we have the data available, we can check whether any of the bytes in the file are non-ASCII, which is precisely when we should use a binary diff. Signed-off-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.freedesktop.org/D1258
2016-08-09git-phab: Do not strip leading spaces from commit messagesPhilip Withnall
Only strip leading newlines; otherwise commit messages which are a list of bullet points will end up with one space missing from the front of the first bullet point. Signed-off-by: Philip Withnall <philip.withnall@collabora.co.uk> Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1257
2016-08-09git-phab: Only match blacklisted headers at the start of linesPhilip Withnall
It’s fine for commit messages to contain ‘tests:’ in the middle of the line; Phabricator only checks for headers at the start of lines. Signed-off-by: Philip Withnall <philip.withnall@collabora.co.uk> Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1256
2016-08-09git-phab: Search for blacklisted fields in attach commit messagesPhilip Withnall
As well as when landing a commit, search for blacklisted fields when initially attaching the commit to Phabricator, otherwise attaching a comment with a subject like ‘tests: Add more tests’ will fail. Signed-off-by: Philip Withnall <philip.withnall@collabora.co.uk> Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1255
2016-08-09git-phab: Fix inclusion of git fields in attach commit messagesPhilip Withnall
The move away from arc broke inclusion of git fields (such as Signed-off-by or Reviewed-by) in commit messages when using `git phab attach` to upload them to Phabricator. Fix that by handling git and Phabricator fields separately, and more explicitly. Signed-off-by: Philip Withnall <philip.withnall@collabora.co.uk> Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1252
2016-08-09git-phab: Increase result limit on repository.query methodPhilip Withnall
Some Phabricator installations have more than 100 repositories; and 100 is the default results limit on repository.query, which can cause git-phab to incorrectly not find the repository the user is trying to submit to. Ideally, we would be able to use the ‘remoteURIs’ parameter of repository.query to instantly select the repository we care about (as we essentially currently implement that search locally), but its semantics are unclear. Signed-off-by: Philip Withnall <philip.withnall@collabora.co.uk> Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1250
2016-08-09git-phab: Add some input error checking to cherry-pick modePhilip Withnall
cherry-pick doesn’t support tasks, so improve the error message if you run `git phab cherry-pick T123`, rather than throwing a phabricator.APIError which is not especially helpful. Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1239
2016-08-09git-phab: Expand error message if repository cannot be foundPhilip Withnall
It’s more likely due to the git remote URI being outdated than anything else. Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1238
2016-08-09fetch: Gracefully error if task has no git URI setPhilip Withnall
Rather than aborting with a string processing exception. Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1237
2016-08-09setup: Ignore pre-commit FileNotFoundError exceptionsPhilip Withnall
This exception may be thrown if the pre-commit script isn’t available, as opposed to it being available but returning an error. Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1236
2016-08-09Add thiblahute as default reviewerThibault Saunier
2016-08-05Remove 'Oo' prefix to oct valuesThibault Saunier