summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-05-31git-phab: Handle NoSection exception from configparserHEADmasterPhilip Withnall1-1/+1
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 Saunier1-1/+1
2017-04-17Release 2.1.02.1.0Thibault Saunier1-1/+1
2017-04-17Handle a different title placeholderAlexandru Băluț1-3/+11
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ț1-1/+0
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ț1-1/+1
Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1722
2017-03-21man: Remove now removed documentation about checkoutThibault Saunier1-9/+2
And document the fetch --checkout argument
2017-03-21Document 'apply' subcommand.Andrew Shadura1-0/+10
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 Saunier1-34/+52
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 Saunier1-13/+71
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 Stone1-0/+1
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 Stone1-4/+5
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 Saunier1-2/+9
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 Saunier1-0/+10
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 McVittie1-3/+11
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Differential Revision: https://phabricator.freedesktop.org/D1470
2017-02-17Re-enable '--arcrc' optionJustin Kim1-0/+7
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 Saunier1-1/+1
2016-11-17Release 2.02.0.0Thibault Saunier2-1/+2
2016-11-14Never add dependency on already closed revisionsThibault Saunier1-4/+9
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 Shadura1-0/+7
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 Shadura1-35/+36
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 Withnall1-5/+18
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 Withnall1-1/+5
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 Saunier1-0/+3
2016-09-28README: Add back instructions to install git-phabXavier Claessens1-0/+3
Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1339
2016-09-28Enable bash completion againXavier Claessens1-0/+1
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 Withnall1-10/+16
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 Saunier1-5/+20
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 Desmottes1-1/+1
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 Desmottes1-1/+1
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 Saunier1-62/+34
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 Saunier1-5/+5
Differential Revision: https://phabricator.freedesktop.org/D1270
2016-08-10Remove useless printsThibault Saunier1-3/+0
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 Saunier1-38/+81
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 Saunier1-24/+83
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 Withnall1-2/+2
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 Withnall1-2/+2
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 Withnall1-6/+20
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 Withnall1-2/+2
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 Withnall1-1/+1
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 Withnall1-15/+19
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 Withnall1-17/+20
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 Withnall1-1/+1
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 Withnall1-0/+3
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 Withnall1-2/+3
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 Withnall1-3/+6
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 Withnall1-1/+1
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 Saunier1-1/+1
2016-08-05Remove 'Oo' prefix to oct valuesThibault Saunier1-1/+1
2016-08-05Pass changes as a dict in creatediff, as done now by arcThibault Saunier1-23/+33
And fix a sensibly the way we pack the data so that it corresponds better to what arc does.