Age | Commit message (Collapse) | Author | Files | Lines |
|
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
|
|
|
|
|
|
Fixes T7744
Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D1724
|
|
Should have been part of commit 7575cd81ef1712ae39030282773c7c1facab6282
Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D1723
|
|
Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D1722
|
|
And document the fetch --checkout argument
|
|
Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
Differential Revision: https://phabricator.freedesktop.org/D1510
|
|
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
|
|
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
|
|
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
|
|
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
|
|
If there are several depending revision it will always fail as the base
revision won't be accessible in the local repo
|
|
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Differential Revision: https://phabricator.freedesktop.org/D1673
|
|
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Differential Revision: https://phabricator.freedesktop.org/D1470
|
|
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
|
|
|
|
|
|
Fixes T7574
Reviewed-by: Daniel Stone <daniels@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D1480
|
|
Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
Differential Revision: https://phabricator.freedesktop.org/D1474
|
|
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
|
|
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
|
|
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
|
|
|
|
Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D1339
|
|
Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D1338
|
|
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
|
|
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
|
|
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
|
|
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
|
|
That code was duplicated so unify it.
Reviewed-by: Daniel Stone <daniels@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D1271
|
|
Differential Revision: https://phabricator.freedesktop.org/D1270
|
|
Reviewed-by: Daniel Stone <daniels@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D1262
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
Rather than aborting with a string processing exception.
Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D1237
|
|
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
|
|
|
|
|
|
And fix a sensibly the way we pack the data so that it corresponds
better to what arc does.
|