setup.cfg
author Anton Shestakov <av6@dwimlabs.net>
Fri, 07 Jun 2019 18:14:48 +0800
branchstable
changeset 4687 313565dd75e3
parent 2049 b81d3775006b
permissions -rw-r--r--
pick: remove transaction on the whole command (issue6037) At its core, pick is a pretty straightforward and well-behaving command, it uses functions already in core hg, it checks that wdir is clean and that changeset to pick is not public, it checks if there happen to be merge conflicts and can be --continue'd later, etc. It is very similar to graft in core (it also uses mergemod.graft function), but it obsoletes the original changeset. However, graft does not experience this incorrect behavior from issue 6037. What happens in the test case for this issue when we pick a revision that touches both "a" and "b": mergemod.graft() takes the original changeset and tries to apply it to the wdir, which results in "b" being marked as newly added and ready to be committed, "a" updated with the new content and being marked as modified, but "a" also has conflicts. Pick correctly notices this and saves its state before asking for user intervention. So far so good. However, when the command raises InterventionRequired to print a user-facing message and exit while being wrapped in repo.transaction() context manager, the latter partially undoes what mergemod.graft() did: it unmarks "b" as added. And when user continues pick, "b" is therefore not tracked and is not included in the resulting commit. The transaction is not useful here, because it doesn't touch wdir (it's still dirty), it doesn't remove pickstate (and other commands will refuse to work until pick --abort or --continue), it just makes "b" untracked. The solution is to use repo.transaction() only to wrap code that writes data to hg store in the final stages of the command after all checks have passed and is not expected to fail on trivial cases like merge conflicts. For example, committing the picked changeset. But since pick uses repo.commit() for that, and because that function already uses a transaction, wrapping it in another transaction doesn't make sense.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2001
ddfc87788d5c flake8: add file for rules to ignore
Sean Farley <sean@farley.io>
parents:
diff changeset
     1
[flake8]
2029
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
     2
ignore =
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
     3
         #closing bracket does not match indentation of opening bracket's line
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
     4
         E123,
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
     5
         # closing bracket does not match visual indentation
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
     6
         E124,
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
     7
         # visually indented line with same indent as next logical line
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
     8
         E129,
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
     9
         # at least two spaces before inline comment
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
    10
         E261,
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
    11
         # too many leading '#' for block comment
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
    12
         E266,
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
    13
         # expected 2 blank lines, found 0
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
    14
         E302,
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
    15
         # expected 2 blank lines after end of function or class
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
    16
         E305,
2030
3e8fcf47fb1e flake8: ignore an addition rules related to import
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2029
diff changeset
    17
         # module level import not at top of file
3e8fcf47fb1e flake8: ignore an addition rules related to import
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2029
diff changeset
    18
         E402,
2029
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
    19
         # line too long (82 > 79 characters)
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
    20
         E501,
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
    21
         # do not assign a lambda expression, use a def
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
    22
         E731,
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
    23
         # class names should use CapWords convention
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
    24
         N801,
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
    25
         # line break occurred before a binary operator
a6410877339a flake8: document all the exception we added
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2020
diff changeset
    26
         W503
2049
b81d3775006b evolve: move extension metadata in their own module
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2031
diff changeset
    27
builtins=xrange, execfile
2020
143c8e4dc22d topic: merge the topic extension in the evolve repository
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2010
diff changeset
    28