Commit Graph

19391 Commits

Author SHA1 Message Date
Sean Farley
576828ddf4 changectx: if passing a basectx then exit __init__ immediately 2013-08-06 16:42:41 -05:00
Sean Farley
7c95c6b91c basectx: return a copied context if changeid is already a basectx
This implements a copy constructor so that we can pass a basectx-derived object
in future refactorings.
2013-08-06 15:50:28 -05:00
Sean Farley
8bfc82b32e basectx: add an empty class that will be used as a parent of all contexts
At the moment, there is no simple way to check if an object is a context
because there is no common parent class. If there were, we could use
'isinstance' everywhere. Simply having memctx inherit from workingctx or
changectx would allow the use of 'isinstance' but that could lead to some
confusing situations of reading the code since we have three distinct concepts
of a context:

- changectx represents a changeset *already* in the repo, and is therefore immutable
- workingctx represents changes on disk in the working directory
- memctx represents changes solely in memory which may or may not be on disk

Therefore, I propose refactoring context.py to have all three contexts inherit
from a parent class 'basectx'.
2013-07-13 19:59:21 -05:00
Augie Fackler
15caa41e46 ui.config: fix bug in config alternatives from 98114deb235a 2013-07-24 19:13:39 -04:00
Matt Mackall
8384e61b90 proxy: allow wildcards in the no proxy list (issue1821) 2013-08-03 13:23:48 -05:00
Alexander Plavin
1a5c5a0196 hgweb: cleaner if conditions in changelog() function
This removes unneeded extra nesting level and extra variable, which makes
the code easier to understand.
2013-07-19 02:08:19 +04:00
Alexander Plavin
888e02c499 hgweb: separate search itself and template generation
This will make it simpler to add other search modes.
2013-07-15 01:10:22 +04:00
Alexander Plavin
9e521b740d paper: remove unused occurence of changelogtag in views
This variably isn't passed to these views and it always renders to empty string
for this reason. Other themes don't have this issue.
2013-08-03 00:34:56 +04:00
Alexander Plavin
ce27765c65 hgweb: show full date in rfc822 format in tooltips at shortlog page
The absolute date was not shown anywhere in the log view for users with
enabled JavaScript.
2013-06-30 11:48:21 +04:00
Kevin Bullock
a111856fd9 hgweb: remove trailing whitespace in mercurial.js 2013-08-04 16:19:12 -05:00
Alexander Plavin
db303d2e5c paper: get rid of changelogtag template duplication 2013-07-22 17:07:19 +04:00
Augie Fackler
10a7abe904 obsolete: clean up a couple of docstrings for correctness 2013-07-26 15:59:16 -04:00
Simon Heimberg
96b55afc5a run-tests: only check the common criteria once per test 2013-07-26 21:18:40 -04:00
Matt Mackall
59df62f815 Added signature for changeset da90524fb77e 2013-08-01 22:37:44 -05:00
Kevin Bullock
7e226a7735 bookmarks: pull --update updates to active bookmark if it moved (issue4007)
This makes `hg pull --update` behave the same wrt the active bookmark as
`hg pull && hg update` does as of 13ea5e437ff8. A helper function,
bookmarks.calculateupdate, is added to prevent code duplication between
postincoming and update.
2013-08-01 21:43:14 -05:00
Matt Mackall
0ac4365bef merge with i18n 2013-08-01 20:06:00 -05:00
Matt Mackall
d52228b61b histedit: don't clobber working copy on --abort if not on histedit cset
Similar to issue4009, 2.7 will force people to abort histedits before
doing interesting things. Without this fix, people with histedit
sessions they wandered away from before upgrading to 2.7 could clobber
their working copy for no reason.
2013-08-01 19:55:02 -05:00
Matt Mackall
758ebca217 rebase: allow aborting when descendants detected
With this, all aborts will succeed in removing the state, rather than
leaving the user in 'what do I do now?' limbo.
2013-08-01 17:54:12 -05:00
Matt Mackall
c63eb47329 rebase: continue abort without strip for immutable csets (issue3997)
This causes us to simply discard the rebase state.
2013-08-01 17:45:13 -05:00
Matt Mackall
0cf44a4d14 rebase: don't clobber wd on --abort when we've updated away (issue4009) 2013-08-01 17:33:09 -05:00
Wagner Bruna
04fb6bb30f i18n-pt_BR: synchronized with 1d921a7399ad 2013-08-01 02:36:59 -03:00
FUJIWARA Katsunori
13b4a0deaa i18n-ja: synchronized with d64dab8bf4c4 2013-08-01 04:32:29 +09:00
Matt Mackall
9b3084fb50 checklink: work around sshfs brain-damage (issue3636)
With the follow_symlinks option, sshfs will successfully create links
while claiming it encountered an I/O error. In addition, depending on
the type of link, it may subsequently be impossible to delete the link
via sshfs. Our existing link to '.' will cause sshfs to think the link
is a directory, and thus cause unlink to give EISDIR. Links to
non-existent names or circular links will cause the created link to not even
be visible.

Thus, we need to create a new temporary file and link to that. We'll
still get a failure, but we'll be able to remove the link.
2013-07-28 15:02:32 -05:00
Matt Mackall
aa456e3925 import: cut commit messages at --- unconditionally (issue2148)
We used to do this based on X-mailer: mentioning git, but git doesn't
put X-mailer in its git-format-patch output.
2013-07-27 19:31:14 -05:00
Pascal Quantin
b52e26e4ec win32: update Inno Setup installer script and extensions list 2013-07-27 21:16:12 +02:00
Matt Mackall
b2c60c13a2 revert: fix largefiles breakage 2013-07-26 21:03:25 -05:00
Matt Mackall
0bc2bdce17 revert: make backup when unforgetting a file (issue3423)
This skips the backup if it would be a duplicate.
2013-07-26 17:08:05 -05:00
Matt Mackall
fac649fcb2 revsingle: fix silly API issue (issue2992) 2013-07-26 15:42:10 -05:00
Wojciech Lopata
af27e2b918 bookmarks: update only proper bookmarks on push -r/-B (issue 3973)
Make push -r/-B update only these bookmarks that point to pushed revisions
or their ancestors, so we can be sure that commit pointed by bookmark is
present in the remote reposiory. Previously push tried to update all shared
bookmarks.
2013-07-26 13:34:51 -07:00
Matt Mackall
a4d6cc16ae Added signature for changeset a4865ca9f2f3 2013-07-26 15:05:48 -05:00
Simon Heimberg
fb20210081 i18n-it: do not translate rst syntax
".. container::" and ".. note::" are rst syntax and therefore must not be
translated.
2013-07-25 21:00:03 +02:00
Frank Kingswood
cded2790ad convert: handle changeset sorting errors without traceback (issue3961) 2013-07-26 14:44:13 +01:00
Siddharth Agarwal
52db69329a ancestor.deepest: ignore ninteresting while building result (issue3984)
ninteresting indicates the number of non-zero elements in the interesting
array, not the number of elements in the final list. Since elements in
interesting can stand for more than one gca, limiting the number of results to
ninteresting is an error.

Tests for issue3984 are included.
2013-07-25 14:43:15 -07:00
Wei, Elson
ec2b8c873f ancestor.deepest: decrement ninteresting correctly (issue3984)
The invariant this code tries to hold is that ninteresting is the number of
non-zero elements in the interesting array. interesting[nsp] is incremented at
the same time as interesting[sp] is decremented. So if interesting[nsp] was
previously 0, ninteresting shouldn't be decremented.
2013-07-25 17:35:53 +08:00
Siddharth Agarwal
2267993ebc ancestor.deepest: sort revs in C version
This isn't strictly necessary, but it makes the code more consistent with the
Python version.
2013-07-25 14:20:37 -07:00
Augie Fackler
ac76c4f1a9 check-code: add a check for the next() builtin, which was new in 2.6 2013-07-25 10:44:51 -04:00
Augie Fackler
a3022f6834 mq: rename next() to nextpatch() to avoid confusing a future check-code patch
next() is a builtin starting in 2.6, so it's also nice to avoid
shadowing the builtin.
2013-07-25 10:42:36 -04:00
Alexander Plavin
f7a860d1a8 hgweb: replace next(revs) to revs.next() to fix compatibility with Python 2.5- 2013-07-25 15:27:41 +04:00
Matt Mackall
5cac0cf3ba tests: glob out exception type for directory collision
Got three different results on buildbot.
2013-07-25 02:44:27 -05:00
Matt Mackall
d177c8d161 record: add checkunfinished support (issue3955) 2013-07-25 02:34:09 -05:00
Matt Mackall
6d0d30f28a checkunfinished: accommodate histedit quirk
Turns out histedit actually intends for commits (but not other
operations like update) to be possible during its operation.
2013-07-25 02:17:52 -05:00
Simon Heimberg
c498cc8a17 tests: test-check-code-hg.t works for all files to check
with xargs, backslashes are eaten up. Convert them to slashes therefore.
This is only a problem with ls (on windows). hg manifest returns slashes.

The pipe char is moved before the line end for telling check-code.py that sed
does not modify the output.
2013-07-22 10:04:53 +02:00
Simon Heimberg
7ea18de5fd check-code: do not abort on an unreadable file, only report this 2013-07-22 10:04:45 +02:00
Matt Mackall
54bbf86a7b heads: fix children/descendants in doc (issue3992) 2013-07-25 00:54:49 -05:00
Alexander Plavin
da7dc49074 paper: fix rendering of the first tab in a line in Webkit (issue3990)
This fixes issue3990 for Webkit-browsers, and also older Opera versions.
Rendering in firefox is not changed.
2013-07-21 18:50:54 +04:00
Alexander Plavin
953f96e356 hgweb: fix duplication for some search queries
Given that N is maximum revision number in a repo, than if a revision with
number N-100n or N-100n+1 (for any integer n) is found with a hgweb search,
this revision is duplicated in search results.
2013-07-21 01:38:04 +04:00
Augie Fackler
9ec0b367aa sslutil: force SSLv3 on Python 2.6 and later (issue3905)
We can't (easily) force SSL version on older Pythons, but on 2.6 and
later we can force SSLv3, which is safer and widely supported. This
also appears to work around a bug in IIS detailed in issue 3905.
2013-07-24 14:51:13 -04:00
Augie Fackler
dfecda13f3 httpclient: update to revision 9517a2b56fe9 of httpplus (issue3905)
Includes upstream change "socketutil: force SSLv3 by default, as it is
safer" which should fix issue 3905.
2013-07-24 14:45:29 -04:00
Augie Fackler
c8819014d3 hgweb: force connection close on early response
Not all WSGI servers close the socket when an early response is sent
to a large POST request, which can cause the server to interpret the
already-sent request body as an incoming (but hopelessly invalid)
request.
2013-05-11 20:40:15 -05:00
Alexander Plavin
0b5af3690c hgweb: fix incorrect revisions count in graph (issue3977)
Actual amount of revisions is used now instead of their numbers in the repo
before to deal with skipped numbers correctly.
2013-07-25 02:41:22 +04:00