Commit Graph

7 Commits

Author SHA1 Message Date
Joel Brobecker
d1a76a87a8 Change the hooks.non-fast-forward config to match the entire ref name
This lifts a limitation where non-fast-forward updates could only be
allowed for references whose name start with 'refs/heads/' (the
standard namespace for branches). As it happens, GCC is using branch
names in a different namespace. So this commit changes this config
option to match the entire reference name, rather than just the branch
name. There is a break in compatibility for the repositories already
using this configuration, but this change takes care of detecting
this situation and provide an informative message explaining the likely
situation.

Change-Id: I330d15ccef448e815c94a620f008275f1e1914db
TN: T209-002
2020-06-15 11:32:45 -07:00
Joel Brobecker
68a9b53ca5 fast_forward.py: Do not import * from git.
This prevents pyflakes from detecting undefined names.
This also makes it easier during code review to determine where
each symbol comes from.
2013-12-26 14:37:15 +04:00
Joel Brobecker
34185485ed fast_forward.py: fix style violations 2013-12-26 14:34:48 +04:00
Joel Brobecker
51f3cadf6e Convert hooks.allow-non-fast-forward to type tuple. 2012-12-29 19:46:11 +04:00
Joel Brobecker
7f9a9298e9 Create errors.py and move InvalidUpdate there.
The fact that utils.py imports config.py makes it difficult for
config.py to access the InvalidUpdate exception.  So move this
exception to its own package, free of dependencies.

Preparation work for LC27-007.
2012-12-28 13:43:27 +04:00
Joel Brobecker
54776335d7 Rename hooks.allowNonFastForwardOnBranches into hooks.allow-non-fast-forward
For LC27-006.
2012-12-27 15:07:27 +04:00
Joel Brobecker
6ac6d2674a Add initial branch-update support. Update the testsuite accordingly. 2012-05-20 12:19:19 +02:00