annotate tests/test-commit-multiple.t @ 20742:3681de20b0a7

parsers: fail fast if Python has wrong minor version (issue4110) This change causes an informative ImportError to be raised when importing the parsers extension module if the minor version of the currently-running Python interpreter doesn't match that of the Python used when compiling the extension module. This change also exposes a parsers.versionerrortext constant in the C implementation of the module. Its presence can be used to determine whether this behavior is present in a version of the module. The value of the constant is the leading text of the ImportError raised and is set to "Python minor version mismatch". Here is an example of what the new error looks like: Traceback (most recent call last): File "test.py", line 1, in <module> import mercurial.parsers ImportError: Python minor version mismatch: The Mercurial extension modules were compiled with Python 2.7.6, but Mercurial is currently using Python with sys.hexversion=33883888: Python 2.5.6 (r256:88840, Nov 18 2012, 05:37:10) [GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] at: /opt/local/Library/Frameworks/Python.framework/Versions/2.5/Resources/ Python.app/Contents/MacOS/Python The reason for raising an error in this scenario is that Python's C API is known not to be compatible from minor version to minor version, even if sys.api_version is the same. See for example this Python bug report about incompatibilities between 2.5 and 2.6+: http://bugs.python.org/issue8118 These incompatibilities can cause Mercurial to break in mysterious, unforeseen ways. For example, when Mercurial compiled with Python 2.7 was run with 2.5, the following crash occurred when running "hg status": http://bz.selenic.com/show_bug.cgi?id=4110 After this crash was fixed, running with Python 2.5 no longer crashes, but the following puzzling behavior still occurs: $ hg status ... File ".../mercurial/changelog.py", line 123, in __init__ revlog.revlog.__init__(self, opener, "00changelog.i") File ".../mercurial/revlog.py", line 251, in __init__ d = self._io.parseindex(i, self._inline) File ".../mercurial/revlog.py", line 158, in parseindex index, cache = parsers.parse_index2(data, inline) TypeError: data is not a string which can be reproduced more simply with: import mercurial.parsers as parsers parsers.parse_index2("", True) Both the crash and the TypeError occurred because the Python C API's PyString_Check() returns the wrong value when the C header files from Python 2.7 are run with Python 2.5. This is an example of an incompatibility of the sort mentioned in the Python bug report above. Failing fast with an informative error message results in a better user experience in cases like the above. The information in the ImportError also simplifies troubleshooting for those on Mercurial mailing lists, the bug tracker, etc. This patch only adds the version check to parsers.c, which is sufficient to affect command-line commands like "hg status" and "hg summary". An idea for a future improvement is to move the version-checking C code to a more central location, and have it run when importing all Mercurial extension modules and not just parsers.c.
author Chris Jerdonek <chris.jerdonek@gmail.com>
date Wed, 04 Dec 2013 20:38:27 -0800
parents aa9385f983fa
children 701df761aa94
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13704
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
1 # reproduce issue2264, issue2516
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
2
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
3 create test repo
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
4 $ cat <<EOF >> $HGRCPATH
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
5 > [extensions]
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
6 > transplant =
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
7 > EOF
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
8 $ hg init repo
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
9 $ cd repo
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
10 $ template="{rev} {desc|firstline} [{branch}]\n"
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
11
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
12 # we need to start out with two changesets on the default branch
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
13 # in order to avoid the cute little optimization where transplant
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
14 # pulls rather than transplants
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
15 add initial changesets
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
16 $ echo feature1 > file1
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
17 $ hg ci -Am"feature 1"
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
18 adding file1
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
19 $ echo feature2 >> file2
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
20 $ hg ci -Am"feature 2"
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
21 adding file2
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
22
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
23 # The changes to 'bugfix' are enough to show the bug: in fact, with only
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
24 # those changes, it's a very noisy crash ("RuntimeError: nothing
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
25 # committed after transplant"). But if we modify a second file in the
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
26 # transplanted changesets, the bug is much more subtle: transplant
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
27 # silently drops the second change to 'bugfix' on the floor, and we only
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
28 # see it when we run 'hg status' after transplanting. Subtle data loss
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
29 # bugs are worse than crashes, so reproduce the subtle case here.
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
30 commit bug fixes on bug fix branch
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
31 $ hg branch fixes
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
32 marked working directory as branch fixes
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 13749
diff changeset
33 (branches are permanent and global, did you want a bookmark?)
13704
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
34 $ echo fix1 > bugfix
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
35 $ echo fix1 >> file1
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
36 $ hg ci -Am"fix 1"
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
37 adding bugfix
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
38 $ echo fix2 > bugfix
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
39 $ echo fix2 >> file1
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
40 $ hg ci -Am"fix 2"
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 16913
diff changeset
41 $ hg log -G --template="$template"
13704
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
42 @ 3 fix 2 [fixes]
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
43 |
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
44 o 2 fix 1 [fixes]
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
45 |
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
46 o 1 feature 2 [default]
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
47 |
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
48 o 0 feature 1 [default]
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
49
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
50 transplant bug fixes onto release branch
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
51 $ hg update 0
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
52 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
53 $ hg branch release
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
54 marked working directory as branch release
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 13749
diff changeset
55 (branches are permanent and global, did you want a bookmark?)
13704
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
56 $ hg transplant 2 3
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
57 applying [0-9a-f]{12} (re)
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
58 [0-9a-f]{12} transplanted to [0-9a-f]{12} (re)
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
59 applying [0-9a-f]{12} (re)
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
60 [0-9a-f]{12} transplanted to [0-9a-f]{12} (re)
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 16913
diff changeset
61 $ hg log -G --template="$template"
13704
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
62 @ 5 fix 2 [release]
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
63 |
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
64 o 4 fix 1 [release]
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
65 |
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
66 | o 3 fix 2 [fixes]
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
67 | |
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
68 | o 2 fix 1 [fixes]
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
69 | |
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
70 | o 1 feature 2 [default]
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
71 |/
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
72 o 0 feature 1 [default]
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
73
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
74 $ hg status
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
75 $ hg status --rev 0:4
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
76 M file1
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
77 A bugfix
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
78 $ hg status --rev 4:5
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
79 M bugfix
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
80 M file1
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
81
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
82 now test that we fixed the bug for all scripts/extensions
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
83 $ cat > $TESTTMP/committwice.py <<__EOF__
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
84 > from mercurial import ui, hg, match, node
13749
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
85 > from time import sleep
13704
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
86 >
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
87 > def replacebyte(fn, b):
13749
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
88 > f = open(fn, "rb+")
13704
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
89 > f.seek(0, 0)
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
90 > f.write(b)
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
91 > f.close()
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
92 >
13749
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
93 > def printfiles(repo, rev):
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
94 > print "revision %s files: %s" % (rev, repo[rev].files())
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
95 >
13704
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
96 > repo = hg.repository(ui.ui(), '.')
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
97 > assert len(repo) == 6, \
13749
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
98 > "initial: len(repo): %d, expected: 6" % len(repo)
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
99 >
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
100 > replacebyte("bugfix", "u")
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
101 > sleep(2)
13704
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
102 > try:
13749
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
103 > print "PRE: len(repo): %d" % len(repo)
13704
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
104 > wlock = repo.wlock()
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
105 > lock = repo.lock()
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
106 > replacebyte("file1", "x")
13749
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
107 > repo.commit(text="x", user="test", date=(0, 0))
13704
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
108 > replacebyte("file1", "y")
13749
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
109 > repo.commit(text="y", user="test", date=(0, 0))
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
110 > print "POST: len(repo): %d" % len(repo)
13704
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
111 > finally:
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
112 > lock.release()
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
113 > wlock.release()
13749
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
114 > printfiles(repo, 6)
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
115 > printfiles(repo, 7)
13704
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
116 > __EOF__
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
117 $ $PYTHON $TESTTMP/committwice.py
13749
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
118 PRE: len(repo): 6
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
119 POST: len(repo): 8
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
120 revision 6 files: ['bugfix', 'file1']
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
121 revision 7 files: ['file1']
13704
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
122
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
123 Do a size-preserving modification outside of that process
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
124 $ echo abcd > bugfix
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
125 $ hg status
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
126 M bugfix
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
127 $ hg log --template "{rev} {desc} {files}\n" -r5:
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
128 5 fix 2 bugfix file1
13749
8bb03283e9b9 test-commit-multiple.t: improve committwice.py
Adrian Buehlmann <adrian@cadifra.com>
parents: 13704
diff changeset
129 6 x bugfix file1
13704
a464763e99f1 dirstate: avoid a race with multiple commits in the same process
Greg Ward <greg@gerg.ca>
parents:
diff changeset
130 7 y file1
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15615
diff changeset
131
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15615
diff changeset
132 $ cd ..