Show More
@@ -202,6 +202,11 b' class changelog(revlog.revlog):' | |||||
202 | user=None, date=None, extra={}): |
|
202 | user=None, date=None, extra={}): | |
203 |
|
203 | |||
204 | user = user.strip() |
|
204 | user = user.strip() | |
|
205 | # An empty username or a username with a "\n" will make the | |||
|
206 | # revision text contain two "\n\n" sequences -> corrupt | |||
|
207 | # repository since read cannot unpack the revision. | |||
|
208 | if not user: | |||
|
209 | raise error.RevlogError(_("empty username")) | |||
205 | if "\n" in user: |
|
210 | if "\n" in user: | |
206 | raise error.RevlogError(_("username %s contains a newline") |
|
211 | raise error.RevlogError(_("username %s contains a newline") | |
207 | % repr(user)) |
|
212 | % repr(user)) |
@@ -29,3 +29,8 b' echo "username = " >> .hg/hgrc' | |||||
29 | hg commit -d '1000000 0' -m commit-1 |
|
29 | hg commit -d '1000000 0' -m commit-1 | |
30 | rm .hg/hgrc |
|
30 | rm .hg/hgrc | |
31 | hg commit -d '1000000 0' -m commit-1 2>&1 | sed -e "s/'[^']*'/user@host/" |
|
31 | hg commit -d '1000000 0' -m commit-1 2>&1 | sed -e "s/'[^']*'/user@host/" | |
|
32 | ||||
|
33 | echo space > asdf | |||
|
34 | hg commit -d '1000000 0' -u ' ' -m commit-1 | |||
|
35 | ||||
|
36 | true |
General Comments 0
You need to be logged in to leave comments.
Login now