Commit Graph

10656 Commits

Author SHA1 Message Date
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
Alexander Plavin
099a1df11b hgweb: call process_dates with a specified selector in ajax scroll
Now this function processes only newly added entries, and not old ones,
the amount of which can be much bigger.
2013-09-06 13:30:58 +04:00
Alexander Plavin
6ef3f6fe6f hgweb: add parentSelector argument to process_dates
Allow specifying parent selector of elements to process, useful for
incremental page updates.
2013-09-06 13:30:58 +04:00
Alexander Plavin
3fd64dca8e hgweb: optimize process_dates function
This function looped over every node due to getElementsByTagName('*'), instead
of using selectors. In this patch we use querySelectorAll('.age') and process
only these nodes, which is much faster and also doesn't require extra condition.

Browser compatibility isn't sacrificed: IE 8+, FF 3.5+, Opera 10+.
2013-09-06 13:30:58 +04:00
David Soria Parra
f7b7fb2df4 localrepo: make report level in repo.transaction configurable
repo.transaction always writes to stderr when a transaction aborts. In order to
be able to abort a transaction quietly (e.g shelve needs a temporary view on
the repo) we need to make the report level configurable.
2013-10-01 12:20:29 +02:00
Matt Mackall
7b8a7d221c merge with stable 2013-10-01 17:00:03 -07:00
FUJIWARA Katsunori
477426f110 discovery: abort also when pushing multiple headed new branch
Before this patch, pushing with --new-branch permits to create
multiple headed branch on the destination repository.

But permitting to create new branch should be different from
permitting to create multiple heads on branch.

This patch prevents from careless pushing multiple headed new branch,
and requires --force to push such branch forcibly.
2013-10-01 00:26:22 +09:00
Pierre-Yves David
b5bc8d504a branchmap: stop looking for stripped branch
Since repoview in 2.5 we do not make special call to `branchmap` when stripping.
We just recompute the branchmap from a lower subset that still has valid
branchmap. So I'm dropping this dead code.
2013-09-30 17:42:38 +02:00
Pierre-Yves David
64005d41eb branchmap: remove the droppednodes logic
It was unused. note how it is only extended if the list is empty. So it's always
empty at the end.

We could try to fix that, however this would part of the code is to be removed
in the next changeset as we do not run `branchmap` on truncated repo since
`repoview` in 2.5.
2013-09-30 17:31:39 +02:00
Pierre-Yves David
a58c8b0406 branchmap: fix blank line position
The blank line was after was after the `if` condition instead of before.
2013-09-30 15:52:37 +02:00
Alexander Plavin
0502c7c0ba hgweb: eliminate extra complexity in process_dates definition
There was an extra anonymous outer function, called immediately. It is removed
in this patch.
2013-09-06 13:30:58 +04:00
Siddharth Agarwal
4500805b25 util.h: backout cb07828e14e0 and 7d902369e960 for big-endian breakage
getbe32 and putbe32 need to behave differently on big-endian and little-endian
systems. On big-endian ones, they should be roughly equivalent to the identity
function with a cast, but on little-endian ones they should reverse the order
of the bytes. That is achieved by the original definition, but
__builtin_bswap32 and _byteswap_ulong, as the names suggest, swap bytes around
unconditionally.

There was no measurable performance improvement, so there's no point adding
extra complexity with even more ifdefs for endianncess.
2013-09-30 12:36:26 -07:00
Angel Ezquerra
65d42d2870 merge: let the user choose to merge, keep local or keep remote subrepo revisions
When a subrepo has changed on the local and remote revisions, prompt the user
whether it wants to merge those subrepo revisions, keep the local revision or
keep the remote revision.

Up until now mercurial would always perform a merge on a subrepo that had
changed on the local and the remote revisions. This is often inconvenient. For
example:

- You may want to perform the actual subrepo merge after you have merged the
parent subrepo files.
- Some subrepos may be considered "read only", in the sense that you are not
supposed to add new revisions to them. In those cases "merging a subrepo" means
choosing which _existing_ revision you want to use on the merged revision. This
is often the case for subrepos that contain binary dependencies (such as DLLs,
etc).

This new prompt makes mercurial better cope with those common scenarios.

Notes:

- The default behavior (which is the one that is used when ui is not
interactive) remains unchanged (i.e. merge is the default action).
- This prompt will be shown even if the ui --tool flag is set.
- I don't know of a way to test the "keep local" and "keep remote" options (i.e.
to force the test to choose those options).


# HG changeset patch
# User Angel Ezquerra <angel.ezquerra@gmail.com>
# Date 1378420708 -7200
#      Fri Sep 06 00:38:28 2013 +0200
# Node ID 2fb9cb0c7b26303ac3178b7739975e663075857d
# Parent  796d34e1b749b79834321ef1181ed8433a5515d9
merge: let the user choose to merge, keep local or keep remote subrepo revisions

When a subrepo has changed on the local and remote revisions, prompt the user
whether it wants to merge those subrepo revisions, keep the local revision or
keep the remote revision.

Up until now mercurial would always perform a merge on a subrepo that had
changed on the local and the remote revisions. This is often inconvenient. For
example:

- You may want to perform the actual subrepo merge after you have merged the
parent subrepo files.
- Some subrepos may be considered "read only", in the sense that you are not
supposed to add new revisions to them. In those cases "merging a subrepo" means
choosing which _existing_ revision you want to use on the merged revision. This
is often the case for subrepos that contain binary dependencies (such as DLLs,
etc).

This new prompt makes mercurial better cope with those common scenarios.

Notes:

- The default behavior (which is the one that is used when ui is not
interactive) remains unchanged (i.e. merge is the default action).
- This prompt will be shown even if the ui --tool flag is set.
- I don't know of a way to test the "keep local" and "keep remote" options (i.e.
to force the test to choose those options).
2013-09-06 00:38:28 +02:00
Augie Fackler
67877b90cc python2.4: fix imports of sub-packages of the email package
These all have an obvious comment so if/when we finally ditch Python
2.4 we can eradicate them easily.
2013-09-24 15:10:32 -04:00
Augie Fackler
3c989f7606 httpconnection: properly inject ssl_wrap_socket into httpclient (issue4038)
This causes httpclient to use the same SSL settings as the rest of
Mercurial, and adds an easy extension point for later modifications to
our ssl handling.
2013-09-20 09:16:07 -04:00
Augie Fackler
006064bcd2 sslutil: make keyfile and certfile arguments consistent between 2.6+ and 2.5- 2013-09-20 09:15:43 -04:00
Augie Fackler
ea14145f1e httpclient: import 4bb625347d4a to provide SSL wrapper injection
This lets us inject our own ssl.wrap_socket equivalent into
httpclient, which means that any changes we make to our ssl handling
can be *entirely* on our side without having to muck with httpclient,
which sounds appealing. For example, an extension could wrap
sslutil.ssl_wrap_socket with an api-compatible wrapper and then tweak
SSL settings more precisely or use GnuTLS instead of OpenSSL.
2013-09-20 09:15:09 -04:00
Augie Fackler
cb1c036518 sslutil: add a config knob to support TLS (default) or SSLv23 (bc) (issue4038)
Prior to this change, we default to SSLv23, which is insecure because
it allows use of SSLv2. Unfortunately, there's no constant for OpenSSL
to let us use SSLv3 or TLS - we have to pick one or the other. We
expose a knob to revert to pre-TLS SSL for the user that has an
ancient server that lacks proper TLS support.
2013-09-19 16:29:00 -04:00
Siddharth Agarwal
1addd98f97 cmdutil.bailifchanged: standardize error message for dirty working dir
This affects rebase, graft, histedit, and other similar commands.
2013-09-23 21:31:37 -07:00
Siddharth Agarwal
c84868311c merge: standardize error message for dirty subrepo 2013-09-23 20:53:14 -07:00
Siddharth Agarwal
88c86521eb merge: standardize error message for dirty working dir 2013-09-23 20:50:51 -07:00
Siddharth Agarwal
663145e3f0 update: standardize error message for dirty update --check
This and following patches will standardize the error message for dirty working
directories to "uncommitted changes".
2013-09-23 20:33:02 -07:00
Siddharth Agarwal
7213ad0e07 update: improve error message for dirty non-linear update with rev 2013-09-23 20:08:52 -07:00
Siddharth Agarwal
ecd3be8cef update: add error message for dirty non-linear update with no rev
Previously, the error message for a dirty non-linear update was the same (and
relatively unhelpful) whether or not a rev was specified. This patch and an
upcoming one will introduce separate, more helpful hints.
2013-09-23 20:07:30 -07:00
Siddharth Agarwal
55e7463f51 update: improve error message for clean non-linear update 2013-09-23 17:43:33 -07:00
Siddharth Agarwal
3bfd19f5c2 pull: for pull --update with failed update, print hint if any
An upcoming patch will add a hint to the abort message, and we don't want to
lose that here.
2013-09-23 19:02:32 -07:00
Alexander Plavin
8495f525a8 paper: edit search hint to include new feature description 2013-09-06 13:30:57 +04:00
Alexander Plavin
e94f8da7af paper: define searchhint message in map file and use it in other templates 2013-07-25 01:12:25 +04:00
Augie Fackler
a49f3fa2a8 mail: correct import of email module 2013-09-20 10:16:02 -04:00
Augie Fackler
897a535360 patch: correct import of email module 2013-09-20 10:15:51 -04:00
Augie Fackler
954e5e0c1c subrepo: move import of xml.minidom.dom to its own line for check-code 2013-09-20 10:15:37 -04:00
Alexander Plavin
7837b6944a paper: add infinite scrolling to graph by calling ajaxScrollInit at the page 2013-09-22 14:19:57 +04:00
Alexander Plavin
9bfb8fe898 hgweb: add graph mode of ajax response processing
While the default mode appends all the new entries to a container on the page,
the graph mode resizes canvas correctly, and repaints the graph to include
newly received data.
2013-09-20 00:42:13 +04:00
Alexander Plavin
f0c93d06c2 hgweb: make infinite scroll handling more generic and extensible
Namely, this allows the next page pointer to be not only revision hash given
in page code, but also any value computed from the value for previous page.
2013-09-22 14:18:23 +04:00
Alexander Plavin
ee2943c680 hgweb: add reset javascript function to Graph
It makes the Graph object to be in the same state as just after
the initialization. This will help to add infinite scrolling to graph view.
2013-09-06 13:30:59 +04:00
FUJIWARA Katsunori
c1e7da5d4f localrepo: make supported features manageable in each repositories individually
Before this patch, all localrepositories support same features,
because supported features are managed by the class variable
"supported" of "localrepository".

For example, "largefiles" feature provided by largefiles extension is
recognized as supported, by adding the feature name to "supported" of
"localrepository".

So, commands handling multiple repositories at a time like below
misunderstand that such features are supported also in repositories
not enabling corresponded extensions:

  - clone/pull from or push to localhost
  - recursive execution in subrepo tree

"reposetup()" can't be used to fix this problem, because it is invoked
after checking whether supported features satisfy ones required in the
target repository.

So, this patch adds the set object named as "featuresetupfuncs" to
"localrepository" to manage hook functions to setup supported features
of each repositories.

If any functions are added to "featuresetupfuncs", they are invoked,
and information about supported features is managed in each
repositories individually.

This patch also adds checking below:

  - pull from localhost: whether features supported in the local(= dst)
    repository satisfies ones required in the remote(= src)

  - push to localhost: whether features supported in the remote(= dst)
    repository satisfies ones required in the local(= src)

Managing supported features by the class variable means that there is
no difference of supported features between each instances of
"localrepository" in the same Python process, so such checking is not
needed before this patch.

Even with this patch, if intermediate bundlefile is used as pulling
source, pulling indirectly from the remote repository, which requires
features more than ones supported in the local, can't be prevented,
because bundlefile has no information about "required features" in it.
2013-09-21 21:33:29 +09:00
FUJIWARA Katsunori
495b98fa37 extensions: list up only enabled extensions, if "ui" is specified
Before this patch, "extensions.extensions()" always lists up all
loaded extensions. So, commands handling multiple repositories at a
time like below enable extensions unexpectedly.

  - clone from or push to localhost: extensions enabled only in the
    source are enabled also in the destination

  - pull from localhost: extensions enabled only in the destination
    are enabled also in the source

  - recursive execution in subrepo tree: extensions enabled only in
    the parent or some of siblings in the tree are enabled also in
    others

In addition to it, extensions disabled locally may be enabled
unexpectedly.

This patch checks whether each of extensions should be listed up or
not, if "ui" is specified to "extensions.extensions()", and invokes
"reposetup()" of each extensions only for repositories enabling it.
2013-09-21 21:33:29 +09:00
Matt Mackall
2513030d97 merge with stable 2013-09-23 11:37:06 -07:00
Alexander Plavin
38dc1f0139 templater: support using templates with non-standard names from map file
Allow to add arbitrarily-named entries to a template map file and then
reference them, to make it possible to deduplicate and simplify
templates code.
2013-09-22 13:52:18 +04:00
Alexander Plavin
e2c135afa3 hgweb: add link to force literal keyword search
This makes it possible to make keyword search in case the search query also
specifies an exact revision (like '1234' or 'abcdef'), or a revset expression.
2013-09-06 13:30:56 +04:00
Alexander Plavin
ce8b9c14cd raw: show current search mode name at search results 2013-09-06 13:30:56 +04:00
Alexander Plavin
d89a2b2e2e paper: show current search mode name at search results 2013-09-06 13:30:56 +04:00
Alexander Plavin
ce8859ee70 hgweb: pass variable with current search mode name to the search template 2013-09-06 13:30:56 +04:00
Alexander Plavin
50e5b58d11 paper: add reddish background to ajax error message 2013-09-06 13:30:58 +04:00
Alexander Plavin
9b7f2aaba4 paper: add simple animation to the loading indicator 2013-09-06 13:30:58 +04:00
Alexander Plavin
9e2716e461 hgweb: add CSS class to the last entry on a page
The entry which was last before an ajax load now has a specific CSS class
for easier styling.
2013-09-06 13:30:58 +04:00
Augie Fackler
f56544a399 commands: import hgweb.server in a way that 2to3 can rewrite 2013-09-19 15:28:26 -04:00
Alexander Plavin
29bb643339 hgweb: show message when an error occured during ajax loading 2013-09-06 13:30:58 +04:00
Alexander Plavin
6557099843 hgweb: show loading indicator while an ajax request is in process 2013-09-06 13:30:58 +04:00
Alexander Plavin
31f9685911 hgweb: show a message when there are no more entries in the list 2013-09-06 13:30:58 +04:00
Siddharth Agarwal
57e4e00df6 util.h: fix gcc version checking
gcc doesn't have a predefined GCC_VERSION macro.
2013-09-19 09:45:00 -07:00
Matt Mackall
4831f68cac merge with stable 2013-09-18 14:52:16 -05:00
Alexander Plavin
fb413116b4 paper: call ajaxScrollInit in shortlog
This just calls ajaxScrollInit at the shortlog page template with all needed
agruments. So, infinite scrolling is working now there.
2013-09-06 13:30:57 +04:00
Alexander Plavin
079f3668b4 hgweb: add ajaxScrollInit function, which does the ajax requests and processing
This function should be correctly called on a page, otherwise there is
no effect.
When called, it makes ajax requests for the next portion of changesets when the
user scrolls to the end. Also, when the monitor is high so that the
default amount of changesets isn't enough to fill it, multiple portions are
loaded if needed after the page load.
2013-09-18 22:44:12 +04:00
Wei, Elson
f78ba81b28 util.h: getbe32() and putbe32() use intrinsic function to improve performance
Refer to https://bugzilla.mozilla.org/show_bug.cgi?id=351557. It can improve
byte-swapping performance by intrinsic function.
2013-09-14 11:22:34 +08:00
Alexander Plavin
e340f5be55 hgweb: add appendFormatHTML javascript function
This is a convenient helper function to append some formatted HTML markup to a
DOM element.
2013-09-06 13:30:58 +04:00
Alexander Plavin
3b1957de7e hgweb: add removeByClassName javascript function
It removes all elements with specified class name from the document.
2013-09-06 13:30:58 +04:00
Alexander Plavin
48ee1c4c4f hgweb: add docFromHTML javascript function
It takes a string with HTML markup and creates DOM document from it.
The implementation is a part of code from
https://developer.mozilla.org/en-US/docs/Web/API/DOMParser#DOMParser_HTML_extension_for_other_browsers
2013-09-06 13:30:57 +04:00
Alexander Plavin
6bdbb6b69d hgweb: add makeRequest javascript function
This function performs an asynchronous HTTP request and calls provided
callbacks:
- onstart: request is sent
- onsuccess: response is received
- onerror: some error occured
- oncomplete: response is fully processed and all other callbacks finished
2013-09-06 13:30:57 +04:00
Alexander Plavin
1dc1ac5d6a hgweb: add format javascript function
It replaces placeholders like '%key%' with replacement values given.
2013-09-06 13:30:57 +04:00
Alexander Plavin
eee67f7bda hgweb: add nextentry variable for easy pagination in changelog
nextentry always contains the first entry not shown on current page (if there is
such entry)
2013-09-06 13:30:57 +04:00
Alexander Plavin
be32ad07fd hgweb: always compute all entries and latestentry in changelog
Get the whole list of entries before rendering instead of using lazy evaluation.
This doesn't affect the performance for usual case when the entries are shown
anyway. When both entries and latestentry are used, this performs unnoticeably
faster, and for pages which use only latestentry (quite uncommon case) it
would be a bit slower.
This change will make it possible to get the first entry of the next page easily
without computing the list twice.
2013-09-06 13:30:57 +04:00
David Soria Parra
bd9e14bcec templatefilters: add short format for age formatting
Implements a short output format for ages e.g. "1 second ago" is
abbrevated as "1s ago".
2013-09-17 17:42:13 +02:00
Alexander Plavin
3f021369d6 hgweb: remove unused argument of changelist function in changelog
This doesn't change the behavior as the argument isn't used anyway, and
it's a preparation to the next patches,
2013-09-06 13:30:57 +04:00
Sean Farley
89ec93306f context: move evolution functions from changectx to basectx
This is just a code move and corrects an overlook from my previous patch series
that assumed only a changectx would want this functionality.
2013-09-17 23:34:57 -05:00
Sean Farley
58d5c3fd06 context: use correct spelling of committable 2013-09-17 18:34:45 -05:00
Durham Goode
87385443b0 log: make file log slow path usable on large repos
Running "hg log <pattern or directory>" on large repos took a very, very long
time because it first read ctx.files() for every commit before even starting to
process the results.

This change makes the ctx.files() check lazy, which makes the command start
producing results immediately.
2013-09-10 19:49:34 -07:00
Jeff Sickel
c1824b83d9 plan9: update util.py for cpython 2.7 build 2013-09-13 15:40:04 -05:00
Siddharth Agarwal
f64894b936 parse_manifest: rewrite to use memchr
memchr is usually smarter than a simple for loop. With gcc 4.4.6 and glibc 2.12
on x86-64, for a 20 MB, 200,000 file manifest, parse_manifest goes from 0.116
seconds to 0.095 seconds.
2013-09-06 23:47:59 -07:00
Bryan O'Sullivan
87700a719c parsers: correctly handle a failed allocation 2013-09-16 12:17:55 -07:00
Bryan O'Sullivan
fb0fb16051 parsers: use Py_INCREF safely 2013-09-16 12:12:37 -07:00
Bryan O'Sullivan
3cfc802f1f parsers: state is a char, not an int 2013-09-16 12:10:28 -07:00
Wei, Elson
2400e9cc93 util.h: add stdint basic type definitions
MS C compiler v15 doesn't have stdint.h. Add basic int types those are defined
in stdint.h.
2013-09-13 09:54:43 +08:00
Alexander Plavin
e1392e4ce2 hgweb: add revset syntax support to search
This mode is used when all the conditions are met:
- 'reverse(%s)' % query string can be parsed to a revset tree
- this tree has depth more than two, i.e. the query has some part of
revset syntax used
- the repo can be actually matched against this tree, i.e. it has only existent
function/operators and revisions/tags/bookmarks specified are correct
- no revset regexes are used in the query (strings which start with 're:')
- only functions explicitly marked as safe in revset.py are used in the query

Add several new tests for different parsing conditions and exception handling.
2013-09-06 13:30:56 +04:00
Alexander Plavin
d519eef8ec revset: add a whitelist of DoS-safe symbols
'Safe' here means that they can't be used for a DoS attack for any given input.
2013-09-06 13:30:56 +04:00
Alexander Plavin
75dc3d55d6 revset: add helper function to get functions used in a revset parse tree
Will be used to determine whether all functions used in a hgweb search query
are allowed there.
2013-08-07 01:21:31 +04:00
Alexander Plavin
573b3e69b6 revset: add helper function to get revset parse tree depth
Will be used to determine if a hgweb search query actually uses
any revset syntax.
2013-08-09 22:52:58 +04:00
Siddharth Agarwal
b2531e9232 parsers: use a lookup table to convert hex to binary
This is a hotspot for parse_manifest. With this patch, for a 20 MB, 200,000
file manifest, parse_manifest goes down from 0.153 seconds to 0.116.
2013-09-07 00:59:24 -07:00
Siddharth Agarwal
64c41699fa revlog: remove _chunkbase since it is no longer used
This was introduced in 2011 for the lwcopy feature but never actually got used.
A similar hook can easily be reintroduced if needed in the future.
2013-09-06 23:05:33 -07:00
Siddharth Agarwal
bcd16c3892 revlog: move chunk cache preload from revision to _chunks
In case we don't have a cached text already, add the base rev to the list
passed to _chunks. In the cached case this also avoids unnecessarily preloading
the chunk for the cached rev.
2013-09-06 23:05:11 -07:00
Siddharth Agarwal
61f0e46895 revlog._chunks: inline getchunk
We do this in a somewhat hacky way, relying on the fact that our sole caller
preloads the cache right before calling us. An upcoming patch will make this
more sensible.

For a 20 MB manifest with a delta chain of > 40k, perfmanifest goes from 0.49
seconds to 0.46.
2013-09-06 22:57:51 -07:00
Siddharth Agarwal
b7abdca3c1 revlog.revision: fix cache preload for inline revlogs
Previously the length of data preloaded did not account for the interleaved io
contents. This meant that we'd sometimes have cache misses in _chunks despite
the preloading.

Having a correctly filled out cache will become essential in an upcoming patch.
2013-09-07 12:42:46 -07:00
Siddharth Agarwal
d24e970042 revlog: add a fast method for getting a list of chunks
This moves _chunkraw into the loop. Doing that improves revlog decompression --
in particular, manifest decompression -- significantly. For a 20 MB manifest
which is the result of a > 40k delta chain, hg perfmanifest improves from 0.55
seconds to 0.49 seconds.
2013-09-06 16:31:35 -07:00
Siddharth Agarwal
26051a2eee lrucachedict: implement clear() 2013-09-06 13:16:21 -07:00
Kevin Bullock
6e9f30dc4d merge with stable 2013-09-07 16:08:11 -05:00
Kevin Bullock
0903f71c12 merge with stable 2013-09-07 00:08:36 -05:00
Sean Farley
f65ef721e4 commitablefilectx: move children from workingfilectx 2013-08-15 13:42:56 -05:00
Sean Farley
f415142833 commitablefilectx: move parents from workingfilectx 2013-08-15 13:42:33 -05:00
Sean Farley
f31ebd758d commitablefilectx: move __nonzero__ from workingfilectx 2013-08-15 13:23:06 -05:00
Sean Farley
f38f187cbc commitablefilectx: move __init__ from workingfilectx 2013-08-15 13:12:50 -05:00
Sean Farley
608e9a1f09 commitablefilectx: add a class that will be used for mutable file contexts
Just like commitablectx, this will serve as a common place for code that will
be shared between workingfilectx and memfilectx.
2013-08-15 13:11:51 -05:00
Sean Farley
be4c3801e7 commitablectx: move dirs from workingctx 2013-08-14 16:40:34 -05:00
Sean Farley
e88dd1aaed commitablectx: move markcommitted from workingctx 2013-08-14 16:40:27 -05:00
Sean Farley
63bb66d577 commitablectx: move ancestors from workingctx 2013-08-14 16:37:59 -05:00
Sean Farley
402e7ea991 commitablectx: move walk from workingctx 2013-08-14 16:37:11 -05:00
Sean Farley
a895d35a4d commitablectx: move ancestor from workingctx 2013-08-14 16:37:01 -05:00
Sean Farley
72513aefb7 commitablectx: move flags from workingctx 2013-08-14 16:25:43 -05:00
Sean Farley
279f4b1ae7 commitablectx: move children from workingctx 2013-08-14 16:25:26 -05:00
Sean Farley
612da7c6bb commitablectx: move hidden from workingctx 2013-08-14 16:25:17 -05:00
Sean Farley
185f3bd11b commitablectx: move phase from workingctx 2013-08-14 16:24:59 -05:00
Sean Farley
03cb1762ec commitablectx: move bookmarks from workingctx 2013-08-14 16:24:33 -05:00
Sean Farley
286aebb4f4 commitablectx: move tags from workingctx 2013-08-14 16:24:16 -05:00
Sean Farley
2d15415c23 commitablectx: move extra from workingctx 2013-08-14 16:23:28 -05:00
Sean Farley
801497cf22 commitablectx: move closesbranch from workingctx 2013-08-14 16:23:16 -05:00
Sean Farley
a72a4edc59 commitablectx: move branch from workingctx 2013-08-14 16:23:02 -05:00
Sean Farley
8853002f4d commitablectx: move clean from workingctx 2013-08-14 16:22:42 -05:00
Sean Farley
c314be2c39 commitablectx: move ignored from workingctx 2013-08-14 16:22:32 -05:00
Sean Farley
32b922e204 commitablectx: move unknown from workingctx 2013-08-14 16:22:20 -05:00
Sean Farley
93bdfe006a commitablectx: move deleted from workingctx 2013-08-14 16:21:55 -05:00
Sean Farley
fe6d82e931 commitablectx: move removed from workingctx 2013-08-14 16:15:29 -05:00
Sean Farley
eba15bc142 commitablectx: move added from workingctx 2013-08-14 16:15:18 -05:00
Sean Farley
ecee868f25 commitablectx: move modified from workingctx 2013-08-14 16:14:58 -05:00
Sean Farley
cc0f5b38da commitablectx: move files from workingctx 2013-08-14 16:09:45 -05:00
Sean Farley
a8af5db123 commitablectx: move description from workingctx 2013-08-14 16:09:30 -05:00
Sean Farley
d3e48b9c15 commitablectx: move date from workingctx 2013-08-14 16:03:32 -05:00
Sean Farley
e01ebdbeaa commitablectx: move _date from workingctx 2013-08-15 10:57:43 -05:00
Sean Farley
ee2b1a6d19 commitablectx: move user from workingctx 2013-08-14 15:57:24 -05:00
Sean Farley
befd1a7b66 commitablectx: move _user from workingctx 2013-08-15 10:51:53 -05:00
Sean Farley
b9cfaf5912 commitablectx: move status from workingctx 2013-08-14 15:55:56 -05:00
Sean Farley
e5affa49cb commitablectx: move _status from workingctx 2013-08-14 15:41:22 -05:00
Sean Farley
ec4dfee71f commitablectx: move _manifest from workingctx 2013-08-14 15:34:18 -05:00
Sean Farley
99dae9c3c7 commitablectx: move _flagfunc from workingctx 2013-08-14 15:30:17 -05:00
Sean Farley
b14aec7508 commitablectx: move _buildflagfunc from workingctx 2013-08-14 15:29:48 -05:00
Sean Farley
55ce00c298 commitablectx: move __contains__ from workingctx 2013-08-14 15:29:09 -05:00
Sean Farley
c0f8038aa8 commitablectx: move __nonzero__ from workingctx 2013-08-14 15:28:43 -05:00
Sean Farley
15cba08e2b commitablectx: move __str__ from workingctx 2013-08-14 15:25:14 -05:00
Sean Farley
cbd1bba7bc commitablectx: move __init__ from workingctx 2013-08-14 15:24:58 -05:00
Sean Farley
3eacb95a31 commitablectx: add a class that will be used as a parent of mutable contexts
Currently, we have basectx that serves as a common ancestor of all contexts. We
will now add a new class commitablectx that will inherit from basectx and will
serve as a common place for code that will be shared between mutable contexts,
e.g. workingctx and memctx.
2013-08-14 15:02:08 -05:00
Sean Farley
18c9d5ae45 workingfilectx: remove unneeded __repr__ since it is now inherited 2013-08-14 13:32:56 -05:00
Sean Farley
f9c1629d6e workingfilectx: remove bogus comment 2013-08-15 13:09:34 -05:00
Sean Farley
e44c746203 workingfilectx: remove __str__ manifest since it is now inherited 2013-08-15 13:32:07 -05:00
Sean Farley
a1f0e066e5 basefilectx: use basectx __str__ instead of duplicating logic
This change allows us to only rely on one place to convert a context to a
string which will help eliminate duplicate code in context.py
2013-08-15 13:31:17 -05:00
Sean Farley
6ed862f6fd workingctx: remove unneeded manifest since it is now inherited 2013-08-14 13:41:09 -05:00
Sean Farley
1e8645944c workingctx: remove unneeded __repr__ since it is now inherited 2013-08-14 13:32:44 -05:00
Alexander Plavin
279ad45b7d hgweb: import the whole util module in webcommands instead of just one function
This is to allow using other functions from this module easily.
2013-09-03 20:02:53 +04:00
Alexander Plavin
0aac0cdac8 hgweb: add string constants for search mode names
It helps detecting mistakes in the mode names.
2013-09-04 19:40:04 +04:00
Siddharth Agarwal
4f7171d11d addremove: don't do full walks
Full walks are only necessary when the caller needs the list of clean files.
addremove by definition doesn't need them.

With this patch and an extension that produces a subset of results for
dirstate.walk when full is False, on a repository with over 200,000 files, hg
addremove drops from 2.8 seconds to 0.5.
2013-09-04 18:42:55 -07:00
Augie Fackler
06e82cc2f4 merge with mpm 2013-09-05 11:45:27 -04:00
Matt Mackall
71d7bb71a9 merge with stable 2013-09-03 18:08:27 -05:00
Siddharth Agarwal
cf3f4a0258 pack_dirstate: only invalidate mtime for files written in the last second
Previously we'd place files written in the last second in the lookup set. This
can lead to pathological cases where a file always remains in the lookup set if
it gets modified before the next time status is run.

With this patch, only the mtime of those files is invalidated. This means that
if a file's size or mode changes, we can immediately declare it as modified
without needing to compare file contents.
2013-08-17 20:48:49 -07:00
Siddharth Agarwal
d8f5823b88 dirstate.status: don't ignore symlink placeholders in the normal set
On Windows, there are two ways symlinks can manifest themselves:
1. As placeholders: text files containing the symlink's target. This is what
   usually happens with fresh clones on Windows.
2. With their dereferenced contents. This happens with clones accessed over NFS
   or Samba.

In order to handle case 2, 28af3e0c54f0 made dirstate.status ignore all symlink
placeholders on Windows. It doesn't ignore symlinks in the lookup set, though,
since those don't have the link bit set. This is problematic because it
violates the invariant that `hg status` with every file in the normal set
produces the same output as `hg status` with every file in the lookup set.

With this change, symlink placeholders in the normal set are no longer ignored.
We instead rely on code in localrepo.status that uses heuristics to look for
suspect placeholders.

An upcoming patch will test this out by no longer adding files written in the
last second of an update to the lookup set.
2013-08-31 10:20:15 -07:00
Siddharth Agarwal
036b5d2663 localrepo.status: ignore empty symlink placeholders
A symlink's target should never be empty in normal use. Solaris and some BSDs
do allow empty symlinks to be created (with varying semantics on dereference),
but a symlink placeholder that started off as empty is either

- going to be empty, in which case ignoring it is fine, since it's unchanged, or
- going to not be empty, in which case this check is irrelevant.
2013-08-31 10:16:06 -07:00
Sean Farley
8e759a3be5 dispatch: add ability to specify a custom pdb module as a debugger
This adds the ability to specify a config option, ui.debugger, to a custom pdb
module, such as ipdb, and have mercurial use that as its debugger. As long as
the value of ui.debugger is a loadable module with the set_trace and
post_mortem functions, then dispatch will be able to use the custom module.

Debugging _parseconfig is still available in the case of an error since it will
be caught with a default the value of pdb.post_mortem.
2013-07-25 22:28:34 -05:00
Sean Farley
480e39282c dispatch: move command line --config argument parsing to _runcatch()
Previously, command line parsing of --config arguments was done in
_dispatch. This means that it takes place after activating the debugger. In an
upcoming patch, we will add a ui.debugger setting so we need to have this
parsing done before _runcatch.
2013-07-13 16:33:07 -05:00
Angel Ezquerra
3a6f04eb6d subrepo: make submerge() return the merged substate
This will be useful when reusing submerge() to improve the handling of subrepos
on mq.


# HG changeset patch
# User Angel Ezquerra <angel.ezquerra@gmail.com>
# Date 1377117244 -7200
#      Wed Aug 21 22:34:04 2013 +0200
# Node ID 2defb5453f223c3027eb2f7788fbddd52bbb3352
# Parent  a5c90acff5e61aae714ba6c9457d766c54b4f124
subrepo: make submerge() return the merged substate

This will be useful when reusing submerge() to improve the handling of subrepos
on mq.
2013-08-21 22:34:04 +02:00
Wei, Elson
ec0c0007a1 localrepo: get value from the unfiltered caches should check if the attribute existed.
If the attribute existed already, it should be returned by getattr().
Otherwise, it will be evaluated again.
2013-08-07 09:59:45 +08:00
Alexander Plavin
eac9cb37ca hgweb: always run search when a query is entered (bc)
This changes the behavior for queries which point at a revision directly,
now the output is consistent to other cases: it results in only this matched
revision shown, not the log starting with it.
A new test checks this behaviour and fails for the old one.
2013-07-19 02:09:13 +04:00
Alexander Plavin
ea40ee8f63 hgweb: search() function supports direct pointing to revision
This doesn't change the behavior, as queries directly pointing to revisions
are not delegated to the search() function now.
2013-07-19 02:41:11 +04:00
Alexander Plavin
d2cc03584c hgweb: pass arguments which a function depends on explicitly in search
This changes makes clearer which arguments can a function depend on. Now all
the modified functions depend on the 'query' argument only, but future additions
will change it.
2013-08-22 16:42:10 +04:00
Alexander Plavin
44f0fb3b4e hgweb: add dynamic search function selection, depending on the query
This allows adding other specific search functions, in addition to current
keyword search.
2013-08-22 16:45:23 +04:00
Wojciech Lopata
9eb979f33b unionrevlog: extract 'baserevision' and 'baserevdiff' methods
This makes possible to use unionrevlog class with subclasses of revlog that
override revlog's 'revision' and 'revdiff' methods. In particular this change
is necessary to implement manifest compression, as it allows extension to
replace manifest class and override 'revision' amd 'revdiff' methods there.
2013-08-26 17:11:01 -07:00
Wojciech Lopata
53c13cb614 bundlerevlog: extract 'baserevision' method
This makes possible to use bundlerevlog class with subclasses of revlog
that override revlog's 'revision' method. In particular this change is necessary
to implement manifest compression, as it allows extension to replace manifest
class and override 'revision' method there.
2013-08-26 16:50:31 -07:00
Wojciech Lopata
3a79365ccc revlog: pass node as an argument of addrevision
This change will allow revlog subclasses that override 'checkhash' method
to use custom strategy of computing nodeids without overriding 'addrevision'
method. In particular this change is necessary to implement manifest
compression.
2013-08-19 11:25:23 -07:00
Wojciech Lopata
299c718f66 revlog: extract 'checkhash' method
Extract method that decides whether nodeid is correct for paricular revision
text and parent nodes. Having this method extracted will allow revlog
subclasses to implement custom way of computing nodes. In particular this
change is necessary to implement manifest compression.
2013-08-19 11:06:38 -07:00
Augie Fackler
16812584f2 httpclient: import 0d1b0a8bc549 to fix bug involving late-arriving RST after a response
After a day of hunting this defect, I'm now unable to reproduce the
bug without this patch applied. Regardless, this should fix the
problem I was observing with wireshark. Hopefully this fixes any
flakiness in the buildbot from http2.
2013-08-23 16:16:22 -04:00
Augie Fackler
2ae3ed4f92 Backed out changeset c65cc2c5ce84 2013-08-15 21:36:53 -04:00
Matt Mackall
1e6f803e48 debugfs: add hardlink support reporting 2013-08-14 12:42:22 -05:00
Dan Villiom Podlaski Christiansen
3f40ec5e82 obsolete: allow passing a revision to successorssets() 2013-08-04 13:43:39 +02:00
Sean Farley
2f686aa464 workingfilectx: inherit from basefilectx instead of filectx 2013-08-11 23:50:32 -05:00
Sean Farley
726ffb7462 basefilectx: move copies from filectx 2013-08-11 23:06:10 -05:00
Sean Farley
4ff2bdaf91 basefilectx: move ancestors from filectx 2013-08-11 23:05:50 -05:00
Sean Farley
6e02ef72e6 basefilectx: move ancestor from filectx 2013-08-11 23:05:08 -05:00
Sean Farley
9b77633abf basefilectx: move annotate from filectx 2013-08-11 23:03:33 -05:00
Sean Farley
d165e8257b basefilectx: move p2 from filectx 2013-08-11 23:00:11 -05:00
Sean Farley
98aa1d5037 basefilectx: move p1 from filectx 2013-08-11 22:59:10 -05:00
Sean Farley
7a7821cc2f basefilectx: move parents from filectx 2013-08-11 22:57:21 -05:00
Sean Farley
b4bfc8c2dc basefilectx: move cmp from filectx 2013-08-11 22:56:53 -05:00
Sean Farley
29424e6c91 basefilectx: move isbinary from filectx 2013-08-11 22:56:30 -05:00
Sean Farley
6173fa01da basefilectx: move path from filectx 2013-08-11 22:56:18 -05:00
Sean Farley
615c354555 basefilectx: move changectx from filectx 2013-08-11 22:56:02 -05:00
Sean Farley
7f9c8225f5 basefilectx: move manifest from filectx 2013-08-11 22:55:09 -05:00
Sean Farley
3d1241011d basefilectx: move phasestr from filectx 2013-08-11 22:54:58 -05:00
Sean Farley
5fc34c58af basefilectx: move phase from filectx 2013-08-11 22:54:48 -05:00
Sean Farley
14863e5b77 basefilectx: move extra from filectx 2013-08-11 22:54:39 -05:00
Sean Farley
f6e15b5aa3 basefilectx: move branch from filectx 2013-08-11 22:54:31 -05:00
Sean Farley
0e2bdf70f7 basefilectx: move description from filectx 2013-08-11 22:54:22 -05:00
Sean Farley
7b079fe631 basefilectx: move files from filectx 2013-08-11 22:54:12 -05:00
Sean Farley
aa95db8a42 basefilectx: move date from filectx 2013-08-11 22:53:56 -05:00
Sean Farley
75c2c801b7 basefilectx: move user from filectx 2013-08-11 22:53:47 -05:00
Sean Farley
0ce35dca8c basefilectx: move hex from filectx
We also change the function call to use the hex method of its change context
so that it mirrors other such method calls.
2013-08-11 22:53:23 -05:00
Sean Farley
c0467a47e6 basefilectx: move node from filectx 2013-08-11 22:51:53 -05:00
Sean Farley
d6ce710e1b basefilectx: move linkrev from filectx 2013-08-11 22:51:41 -05:00
Sean Farley
6e99ebd143 basefilectx: move rev from filectx 2013-08-11 22:51:30 -05:00
Sean Farley
edc03d3f42 basefilectx: move filelog from filectx 2013-08-11 22:51:18 -05:00
Sean Farley
02848fc120 basefilectx: move flags from filectx 2013-08-11 22:51:04 -05:00
Sean Farley
f9fa7c5178 basefilectx: move filenode from filectx 2013-08-11 22:50:37 -05:00
Sean Farley
148e8ae6f6 basefilectx: move filerev from filectx 2013-08-11 22:50:15 -05:00
Sean Farley
ed823527a5 basefilectx: move __ne__ from filectx 2013-08-11 22:49:40 -05:00
Sean Farley
56f8d7a94b basefilectx: move __eq__ from filectx
We also add type checking for extra protection.
2013-08-11 22:49:03 -05:00
Sean Farley
cb1cda0d9a basefilectx: move __hash__ from filectx 2013-08-11 22:47:39 -05:00
Sean Farley
79dc9a8663 basefilectx: move __repr__ from filectx
We change the hardcoded 'filectx' to instead use type(self).__name__ so that objects that
inherit from basefilectx in the future will be able to use the same representation.
2013-08-11 22:46:54 -05:00
Sean Farley
6d40b2e84f basefilectx: move __str__ from filectx 2013-08-11 22:45:30 -05:00
Sean Farley
7d4c1da38f basefilectx: move __nonzero__ from filectx 2013-08-11 22:45:13 -05:00
Sean Farley
1b8c804677 basefilectx: move _repopath from filectx 2013-08-11 22:44:51 -05:00
Sean Farley
39c010ae44 basefilectx: move _filerev from filectx 2013-08-11 22:44:36 -05:00
Sean Farley
07765a7f23 basefilectx: move _filenode from filectx 2013-08-11 22:44:19 -05:00
Sean Farley
4e0ed076f1 basefilectx: move _changeid from filectx 2013-08-11 22:44:06 -05:00
Sean Farley
f3b2912cb9 basefilectx: move _filelog from filectx 2013-08-11 22:40:59 -05:00
Sean Farley
d011e7fbd2 basefilectx: add an empty class that will be used as a parent of file contexts
Similar to the refactoring of context, we split common logic from filectx to a
parent class called basefilectx that will be inherited by filectx,
workingfilectx, and memfilectx. This will allow a clear disinction of all the
file contexts:

- filectx: read-only access to a filerevision that is already present in the repo,
- workingfilectx: a filecontext that represents files from the working directory,
- memfilectx: a filecontext that represents files in-memory
2013-08-10 15:10:26 -05:00
Sean Farley
a4d6a7d01f workingctx: inherit from basectx instead of changectx 2013-08-05 18:44:18 -05:00
Sean Farley
e2e26cfe54 localrepo: remove unnecessary check of instance
The refactoring of all the context objects allows us to simply pass a basectx
to the __new__ constructor and have it return the same object without
allocating new memory.
2013-08-06 15:11:42 -05:00
Sean Farley
580a78aa17 basectx: remove unnecessary check of instance
The refactoring of all the context objects allows us to simply pass a basectx
to the __new__ constructor and have it return the same object without
allocating new memory.
2013-08-06 15:11:31 -05:00
Sean Farley
be56583a99 basectx: move dirty from changectx 2013-08-05 18:42:41 -05:00
Sean Farley
88b0e436e0 basectx: move dirs from changectx 2013-08-05 18:41:56 -05:00
Sean Farley
dca5c7f7f2 basectx: move _dirs from changectx 2013-08-05 18:41:43 -05:00
Sean Farley
91c4597fc7 basectx: move diff from changectx 2013-08-05 18:41:12 -05:00
Sean Farley
bba5397f5e basectx: move match from changectx 2013-08-05 18:41:00 -05:00
Sean Farley
6f4798a10d basectx: move sub from changectx 2013-08-05 18:40:36 -05:00
Sean Farley
e090a5106f basectx: move flags from changectx 2013-08-05 18:28:54 -05:00
Sean Farley
2cd511aaf5 basectx: move filenode from changectx 2013-08-05 18:28:40 -05:00
Sean Farley
7d373f2849 basectx: move _fileinfo from changectx 2013-08-05 18:28:23 -05:00
Sean Farley
6af5ffc183 basectx: move p2 from changectx 2013-08-05 18:26:54 -05:00
Sean Farley
5d4918976c basectx: move p1 from changectx 2013-08-05 18:26:15 -05:00
Sean Farley
4d440ce0c1 basectx: move parents from changectx 2013-08-05 18:19:38 -05:00
Sean Farley
0767e83eed basectx: move mutable from changectx 2013-08-05 18:19:19 -05:00
Sean Farley
cfa3733573 basectx: move phasestr from changectx 2013-08-05 18:19:04 -05:00
Sean Farley
9944871a46 basectx: move manifest from changectx 2013-08-05 17:22:49 -05:00
Sean Farley
11dddf4758 basectx: move __iter__ from changectx 2013-08-05 17:22:18 -05:00
Sean Farley
61511fb277 basectx: move __getitem__ from changectx 2013-08-05 17:22:05 -05:00
Sean Farley
8e476c8cae basectx: move __contains__ from changectx 2013-08-05 17:21:38 -05:00
Sean Farley
647fcb2041 basectx: move substate from changectx 2013-08-05 17:21:23 -05:00
Sean Farley
023d601420 basectx: move __ne__ from changectx 2013-08-05 17:00:32 -05:00
Sean Farley
22e31d9ce0 basectx: move __eq__ from changectx
We also add type checking for extra protection.
2013-08-05 17:00:09 -05:00
Sean Farley
c271e20c45 basectx: move __repr__ from changectx
We change the hardcoded 'changectx' to instead use type(self).__name__ so that
objects that inherit from basectx in the future will be able to use the same
representation.
2013-08-02 18:24:08 -05:00
Sean Farley
a6645dbc9c basectx: move __int__ from changectx 2013-08-02 16:52:13 -05:00
Sean Farley
818788f1ff basectx: change _node to node() in hex
This allows a child class to overload the node() function and still share the
same code for hex().
2013-08-02 16:50:13 -05:00
Sean Farley
3113ec1337 basectx: move hex from changectx 2013-08-02 16:49:01 -05:00
Sean Farley
3531329b72 basectx: move node from changectx 2013-08-02 16:48:19 -05:00
Sean Farley
57662a823e basectx: move rev from changectx 2013-08-02 19:09:06 -05:00
Sean Farley
71b2479bed basectx: move __str__ from changectx 2013-08-02 16:46:23 -05:00
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
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
Alexander Plavin
553f7e5d2b hgweb: fix incorrect way to count revisions in log (issue3977)
Actual amount of revisions is used now instead of their numbers in the repo
before to deal with skipped numbers correctly.
This iterates starting from the newest revision (which is shown on top)
yielding up to the specified count, instead of the reversed order used before.
Effect of this change on efficiency is negligible, when the same changesets are
returned.
2013-07-25 02:22:39 +04:00
Alexander Plavin
f8894d94ab hgweb: always start graph with the revision in url
It is the same fix for graph command, as was recently for log. This makes the
specified revision be always on top of the graph view.
Before the patch, for example with repo having revisions 0, 1, 2, 3 and revision
in url being '2', all revisions were shown and the specified one wasn't
the first.
2013-07-25 02:48:21 +04:00
Matt Mackall
72d6ff963c update: add tracking of interrupted updates (issue3113)
This takes advantage of the new checkunfinished infrastructure
2013-07-25 00:33:28 -05:00
Matt Mackall
1194d33a0a commands: add checks for unfinished operations (issue3955)
commands checked:
  backout
  bisect
  commit
  graft
  import
2013-07-24 23:51:40 -05:00
Matt Mackall
3e65ebe091 update: clear any clearable unfinished operations (issue3955)
Unclearable operations will cause an abort.
2013-07-24 23:30:24 -05:00