When `version` is not specified, it defaults to "HEAD". "HEAD" is not a
remote tag, and it's not listed in the output of get_branches(), so we'd
keep repo_updated at the default value (None) and then return early with
changed=True in --check mode, even when before == after.
Fixes#3024.
* remove unused variables
* fetch branch name instead of HEAD
fix#3782, which was introduced by f1bacc1d3f
* disable git depth option for old git versions
fixes#3782
git support for `--depth` did not fully work in old git versions (before 1.8.2)
fall back to full clones/fetches on those versions
* fix git switch branches in combination with depth
* the old implementation is correct, but relies on git working correctly
(as only newer versions do)
* with some older git version (e.g. 1.8.3), git fetch remote branch does
not work, if the branch does not yet exist locally
* this patch works around that without explicitly checking the git version
* future refactoring is needed to reduce the number of fetches to a
minimum; but this patch makes the code "correct"
* add git version requirements to doc
* replace set-branches with git 1.7.1 compatible version
From the git status doc:
--porcelain
Give the output in an easy-to-parse format for scripts. This is similar to the short output, but will remain stable across Git versions and regardless of user configuration. See below for details.
User configuration can break the git module from working as expected.
* make git updates respect depth
until now `fetch` gets all tags and heads at full depth, this change
* uses `depth` argument for `fetch`
* only get the specified `version` in `fetch`
* fixes#14954
* treat combination of refspec and depth correctly
* be more conservative for non-depth fetch
The command `hg up -C` by default moves to the latest revision on the
current branch. The `discard` function was trying to update to a
different branch, in case it was provided, by passing a `-r REVISION`
argument. Not only is this not the intended effect of the `discard`
function, but this also could update to a different branch that hasn't
been pulled yet, which is how we were experiencing trouble.
Instead, we unconditionally do `hg up -C -r .` to "update" to the
current revision (i.e. to "."), while `-C/--clean`ing the current
directory. This is similar to `hg revert --all`, except that it also
undoes the merge state of the working directory, in case there was
any.
Detached head detection seems to have broken somewhere a long the way
because git decided to change how that situation looks when doing a 'git
branch -a' which is performed by get_branches().
This is how git 1.7.1 displays this situation (which works):
shell> git branch -a
* (no branch)
master
This is the output from git 1.8.3.1 (which does not work):
shell> git branch -a
* (detached from e132711)
master
It looks like this same wording is used in the most recent version of
git (2.6.1 as of writing this).
to support updates in Subfolders with Subversion > 1.8
Fix: Ignoring svn:externals on local Modification Check.
Add: Added Argument switch to alow skipping the svn switch call.
When a SVN repository has some svn:externals properties, files will be
reported with the X attribute, and lines will be added at the end to
list externals statuses with a text looking like
"Performing status on external item at ....".
Such lines were counted as a local modification by the regex, and the
module returned a change, even though they were none.
To have a clean (and parsable) "svn status" output, it is recommended
to use the --quiet option. The externals will only appear if they have
been modified. With this option on, it seems even safer to consider
there are local modifications when "svn status" outputs anything.