Alexander Plavin <alexander@plav.in> [Sat, 12 Oct 2013 11:29:28 +0400] rev 19907
hgweb: fix unstoppable loading of graph when no more results
When a user reaches the end of repo history with graph view, it (unsuccessfully)
tried to load more entries. This patch disables further loading attempts.
Alexander Plavin <alexander@plav.in> [Wed, 24 Jul 2013 03:20:26 +0400] rev 19906
hgweb: remove now unnecessary explicit header() and footer()
They became unnecessary after allowing custom-named entries in templates.
Alexander Plavin <alexander@plav.in> [Fri, 16 Aug 2013 21:41:19 +0400] rev 19905
hgweb: replace 'shortlog' with 'changelog' in raw changelog template
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 14 Oct 2013 18:59:12 +0200] rev 19904
shelve: drop pickle usage
Pickle was used to the `shelvedstate` file. However the content of the file is
very simple and we can handle serialisation ourself. Not using pickle is a net
win.
Note incrementing the format version as no releases have been done so far.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 15 Oct 2013 00:51:05 +0900] rev 19903
store: use "vfs.exists()" instead of "os.path.exists()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 15 Oct 2013 00:51:05 +0900] rev 19902
context: use "vfs.lstat()" to examine target path instead of "os.path.*"
This patch gets stat object of target path by "vfs.lstat()", and
examines stat object to know the type of it. This follows the way in
"workingctx.add()".
This should be cheaper than original implementation invoking
"lexists()", "isfile()" and "islink()".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 15 Oct 2013 00:51:04 +0900] rev 19901
context: use "vfs.lstat()" instead of "os.lstat()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 15 Oct 2013 00:51:04 +0900] rev 19900
context: use "vfs.lstat()" instead of "os.lstat()"
This patch also changes paths added to "rejected" list from full path
(referred by "p") to relative one (referred by "f"), when type of
target path is neither file nor symlink.
This change should be reasonable, because the path added to "rejected"
list is relative one, when "OSError" is raised at "lstat()".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 15 Oct 2013 00:51:04 +0900] rev 19899
changelog: use "vfs.fstat()" instead of "util.fstat()"
Just invoking "os.fstat()" with "file.fileno()" doesn't require non
ANSI file API, because filename is not used for invocation of
"os.fstat()".
But "util.fstat()" should invoke "os.stat()" with "fp.name", if file
object doesn't have "fileno()" method for portability, and "fp.name"
may cause invocation of non ANSI file API.
So, this patch makes the constructor of appender class invoke
"util.fstat()" via vfs, to encapsulate filename handling.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 15 Oct 2013 00:51:04 +0900] rev 19898
changelog: use "vfs.rename()" instead of "util.rename()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 15 Oct 2013 00:51:04 +0900] rev 19897
vfs: add "open()" for newly added code paths which open files via vfs
This patch replaces "open()" by own "__call__()" defined in derived
classes at the first invocation, for efficiency of succeeding
invocations.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 15 Oct 2013 00:51:04 +0900] rev 19896
bookmarks: use "vfs.utime()" instead of "os.utime()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 15 Oct 2013 00:51:04 +0900] rev 19895
bookmarks: use "vfs.unlink()" instead of "util.unlink()"
Mads Kiilerich <madski@unity3d.com> [Thu, 03 Oct 2013 18:01:21 +0200] rev 19894
cmdutil: use None as default value for "function pointer" instead of False
Less type confusion.
Mads Kiilerich <madski@unity3d.com> [Thu, 03 Oct 2013 18:01:21 +0200] rev 19893
graft: make skip messages more helpful
This makes it possible for the user to understand and accept or work around
what is happening.
Mads Kiilerich <madski@unity3d.com> [Thu, 03 Oct 2013 18:01:21 +0200] rev 19892
convert: update source shamap when using filemap, just as when not using filemap
The reverse mapping was introduced in
2147a734dcf9 to make roundtrip
conversions possible ... but it did not work when using filemap.
Roundtrips with filemaps will of course only work flawlessly if inverse
mappings are used.
Especially, if a lossy convert mapping is used in one direction, then only
linear lines of development can be converted in the other direction. With this
constraint convert will do the right thing by assuming that excluded files
haven't been changed.)
A test case with general coverage of hg-hg roundtrips with filemap is added.
(There a cases where adding records of converted revisions to the shamap in the
source repository doesn't work - especially when converting the same repo to
several other repos and back. It would arguably be better if convert only
updated the shamaps in the target repo but read shamaps from both the source
and and target repo ... but that is a different story. Making the stuff we have
work consistently is step forward no matter what.)
Mads Kiilerich <madski@unity3d.com> [Sat, 20 Jul 2013 00:43:08 +0200] rev 19891
convert: introduce hg.revs to replace hg.startrev and --rev with a revset
The existing knobs for controlling which revisions to convert were often
insufficient. Revsets is a shiny hammer that provides a better solution.
Revsets has been introduced in --rev handling in a lot of other places while
being more or less backwards compatible. Doing the same here would be a much
more elegant ... but that would unfortunately not work in this case. "--rev 7"
used to mean revision 0 to 7 - it would be an unacceptable change if it
suddenly just meant revision 7.
Instead we introduce a new configuration setting. It will only work for
Mercurial repositories so adding a new commandline option for it would not be a
nice solution.
There is no way to use the fancy deprecation markup for configuration settings
so we just remove the documentation of hg.startrev.
Mads Kiilerich <madski@unity3d.com> [Thu, 03 Oct 2013 18:01:21 +0200] rev 19890
convert: refactor head calculation for hg sources
Mads Kiilerich <madski@unity3d.com> [Fri, 19 Jul 2013 14:20:11 +0200] rev 19889
convert: remove unused and incorrect default handling for revmapfile
destc is not a string and can thus not be os.path.join'ed. Convert would crash
if we ended up there ... but we wouldn't because both the sinks (hg and
subversion) sinks implement .revmapfile and "never" throws exceptions.
Wojciech Lopata <lopek@fb.com> [Mon, 30 Sep 2013 18:27:42 -0700] rev 19888
generaldelta: fix test
Durham Goode <durham@fb.com> [Fri, 11 Oct 2013 17:19:40 -0700] rev 19887
shelve: fix dirstate corruption during unshelve (
issue4055)
If you shelved on top of commit A, then rebased A to @ and unshelved, any file
changed in A would appear as modified in hg status despite the contents not having
changed.
The fix is to use dirstate.setparents() instead of doing it manually. This will
be a little slower since it has to iterate through everything in the dirstate
instead of only what's in the mergestate, but this will be more correct since
the mergestate did not include files which were merged but had no conflict.
The tests also had several bad dirstate's hardcoded in them. This change updates
the tests appropriately and adds a new test to cover this specific rebase case.
Matt Mackall <mpm@selenic.com> [Wed, 09 Oct 2013 14:15:34 -0700] rev 19886
merge with stable
Sean Farley <sean.michael.farley@gmail.com> [Wed, 09 Oct 2013 14:15:20 -0700] rev 19885
shelve: only save mq state if enabled
Test coverage has been added.
Durham Goode <durham@fb.com> [Mon, 07 Oct 2013 11:45:01 -0700] rev 19884
changegroup: don't run changegroup hooks if nodes are gone
The changegroup hook runs when the repo lock is released, but it's possible that
multiple transactions have happened during that single lock and therefore the
commits the hook was for may be gone. This is the case in the shelve extension
where it adds a commit and strips it in the same lock but different
transactions (which results in warning messages during unshelve on hgsubversion
repos).
A real fix would be to attach the hook to the transaction instead, but that
might have unknown consequences. Since we're this close to code-freeze, this fix
just prevents the hook from running if the commit disappeared.
Matt Mackall <mpm@selenic.com> [Wed, 09 Oct 2013 12:02:32 -0700] rev 19883
hgweb: add escaping of tags and bookmarks in graph view
Matt Mackall <mpm@selenic.com> [Wed, 09 Oct 2013 11:50:19 -0700] rev 19882
json: add more paranoid escaping
David Soria Parra <dsp@experimentalworks.net> [Wed, 02 Oct 2013 09:50:21 +0200] rev 19881
shelve: make no_backup parameter passing python 2.4 compatible
Python 2.4 doesn't allow passing named parameter after an list unpack,
but allows to unpack a dict.
Matt Mackall <mpm@selenic.com> [Wed, 09 Oct 2013 11:27:59 -0700] rev 19880
ui: send password prompts to stderr again (
issue4056)
Matt Mackall <mpm@selenic.com> [Mon, 07 Oct 2013 15:21:17 -0700] rev 19879
hgweb: escape branch names in graph view
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 02 Oct 2013 11:16:03 +0200] rev 19878
test: make test-propertycache.py python2.4 compatible
The subprocess module have not `check_call` method in python2.4. Fall back to
calling `check` with return code verification.
David Soria Parra <dsp@experimentalworks.net> [Tue, 01 Oct 2013 09:54:46 +0200] rev 19877
hgweb: log headers only if headers were successfully parsed
The headers attribute is not initialized in certain error situations
(e.g. http 400 bad request). Check for self.headers before we attempt
to access it.
Augie Fackler <raf@durin42.com> [Mon, 07 Oct 2013 17:47:55 -0400] rev 19876
merge with stable
Johan Bjork <jbjoerk@gmail.com> [Mon, 07 Oct 2013 17:47:19 -0400] rev 19875
patch: Fix nullid for binary git diffs (
issue4054)
The index for an empty file in git is not 0, but sha-1("blobl 0\0").
David Soria Parra <dsp@experimentalworks.net> [Thu, 03 Oct 2013 19:41:25 +0200] rev 19874
shelve: copy bookmarks and restore them after a commit
cmdutil.commit() will advance the bookmarks. Therefore we have to restore
them afterwards. We have to use update() to ensure we preserve the bmstore
object.
Mads Kiilerich <madski@unity3d.com> [Thu, 03 Oct 2013 14:50:47 +0200] rev 19873
check-code: check that '>' is used for continued lines
Continued lines do not get the SALT mangling.
Mads Kiilerich <madski@unity3d.com> [Thu, 03 Oct 2013 14:50:47 +0200] rev 19872
check-code: check for spaces around = for named parameters
Mads Kiilerich <madski@unity3d.com> [Thu, 03 Oct 2013 14:50:47 +0200] rev 19871
run-tests: place the .t shell script next to $TESTTMP and with a useful name
--keep can thus keep it around - very convenient for debugging.
Mads Kiilerich <madski@unity3d.com> [Thu, 03 Oct 2013 14:50:46 +0200] rev 19870
tests: fix void and invalid test in test-archive.t
An echo statement was missed in the .t-ification in
afe19a1bf9d3 so we ended up
with invalid sh syntax. But at the same time a continuation line was marked as
$ instead of > and we thus added the salt that made the expression valid again.
Siddharth Agarwal <sid0@fb.com> [Wed, 02 Oct 2013 14:24:25 -0700] rev 19869
inotify: don't pass pidfile option to child
The child no longer needs it.
Siddharth Agarwal <sid0@fb.com> [Wed, 02 Oct 2013 15:20:49 -0700] rev 19868
cmdutil.service: move pidfile writing to the parent in daemon mode
There is a potential race here, which I suspect I've spotted in the wild, where
something reads the pid file after the parent exits but before the child has
had a chance to write to it. Moving writing the file to the parent causes this
to no longer be an issue.
Siddharth Agarwal <sid0@fb.com> [Wed, 02 Oct 2013 15:17:50 -0700] rev 19867
cmdutil.service: move pidfile writing to a local function
An upcoming patch will reuse this code.
Siddharth Agarwal <sid0@fb.com> [Wed, 02 Oct 2013 14:20:26 -0700] rev 19866
inotify: add pidfile to parent options
An upcoming patch will move pidfile writing from the parent to the child. This
means that if the pid file isn't specified on the command-line but is specified
as a config option, it needs to be added to the parent's opts dict.
Javi Merino <cibervicho@gmail.com> [Wed, 02 Oct 2013 22:46:32 +0100] rev 19865
get-with-headers: don't block indefinitely if the server had an internal error
If the server had an internal error and returned 500, there's nothing
to read, so "response.read()" blocks indefinitely. Only output the
response if there's really a response.
Mads Kiilerich <madski@unity3d.com> [Fri, 19 Jul 2013 02:32:36 +0200] rev 19864
convert: fix description of 'convert --rev'
Mads Kiilerich <madski@unity3d.com> [Wed, 02 Oct 2013 19:46:48 +0200] rev 19863
convert: fix crash when existing converted revision didn't come from source
This case can happen when converting from multiple repositories with filemap.
Mads Kiilerich <madski@unity3d.com> [Wed, 02 Oct 2013 19:46:47 +0200] rev 19862
convert: fix crash when filemap filtering is changed
Augie Fackler <raf@durin42.com> [Tue, 01 Oct 2013 14:48:53 -0400] rev 19861
rebase: preserve metadata from grafts of changes (
issue4001)
Augie Fackler <raf@durin42.com> [Tue, 01 Oct 2013 14:28:18 -0400] rev 19860
rebase: rework extrafn handling to support multiple extrafns
This makes it possible to pass keepbranches and extrafn to rebase at
the same time, although nobody uses that functionality presently. This
is a precursor to keeping graft metadata.
Alexander Plavin <alexander@plav.in> [Fri, 06 Sep 2013 13:30:58 +0400] rev 19859
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.
Alexander Plavin <alexander@plav.in> [Fri, 06 Sep 2013 13:30:58 +0400] rev 19858
hgweb: add parentSelector argument to process_dates
Allow specifying parent selector of elements to process, useful for
incremental page updates.
Alexander Plavin <alexander@plav.in> [Fri, 06 Sep 2013 13:30:58 +0400] rev 19857
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+.
David Soria Parra <dsp@experimentalworks.net> [Thu, 29 Aug 2013 09:22:15 -0700] rev 19856
shelve: allow shelving of a change with an mq patch applied
We allow shelving of of changes on top of a MQ repository. MQ will
not allow repository changes on top of applied patches. We introduce
checkapplied in MQ to bypass this check.
David Soria Parra <dsp@experimentalworks.net> [Tue, 01 Oct 2013 12:20:31 +0200] rev 19855
shelve: new output format for shelve listings
Use a more condensed and mercurial-like output format for shelve listing.
We don't prefix the message with 'shelved from...' anymore as our default
name contains the branch name or the user used his own name. To avoid
just printing the last commit message, we drop writing the description
to stdout.
old output:
default [1s ago] shelved from default (
01ba9745): create conflict
new output:
default (1s ago) create conflict
David Soria Parra <dsp@experimentalworks.net> [Thu, 29 Aug 2013 09:22:13 -0700] rev 19854
shelve: add a shelve extension to save/restore working changes
This extension saves shelved changes using a temporary draft commit,
and bundles the temporary commit and its draft ancestors, then
strips them.
This strategy makes it possible to use Mercurial's bundle and merge
machinery to resolve conflicts if necessary when unshelving, even
when the destination commit or its ancestors have been amended,
squashed, or evolved. (Once a change has been unshelved, its
associated unbundled commits are either rolled back or stripped.)
Storing the shelved change as a bundle also avoids the difficulty
that hidden commits would cause, of making it impossible to amend
the parent if it is a draft commits (a common scenario).
Although this extension shares its name and some functionality with
the third party hgshelve extension, it has little else in common.
Notably, the hgshelve extension shelves changes as unified diffs,
which makes conflict resolution a matter of finding .rej files and
conflict markers, and cleaning up the mess by hand.
We do not yet allow hunk-level choosing of changes to record.
Compared to the hgshelve extension, this is a small regression in
usability, but we hope to integrate that at a later point, once the
record machinery becomes more reusable and robust.
David Soria Parra <dsp@experimentalworks.net> [Tue, 01 Oct 2013 12:20:29 +0200] rev 19853
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.
Matt Mackall <mpm@selenic.com> [Tue, 01 Oct 2013 17:00:03 -0700] rev 19852
merge with stable
Matt Mackall <mpm@selenic.com> [Tue, 01 Oct 2013 16:55:20 -0700] rev 19851
Added signature for changeset
e7fa36d2ad3a
Matt Mackall <mpm@selenic.com> [Tue, 01 Oct 2013 16:55:14 -0700] rev 19850
Added tag 2.7.2 for changeset
e7fa36d2ad3a
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 01 Oct 2013 00:35:07 +0900] rev 19849
rebase: catch RepoLookupError at restoring rebase state for summary
Before this patch, "hg summary" may fail, when there is inconsistent
rebase state: for example, the root of rebase destination revisions
recorded in rebase state file is already stripped manually.
Mercurial earlier than 2.7 allows users to do anything other than
starting new rebase, even though current rebase is not finished or
aborted yet. So, such inconsistent rebase states may be left and
forgotten in repositories.
This patch catches RepoLookupError at restoring rebase state for
summary hook, and treat such state as "broken".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 01 Oct 2013 00:35:07 +0900] rev 19848
rebase: catch RepoLookupError at restoring rebase state for abort/continue
Before this patch, "rebase --abort"/"--continue" may fail, when rebase
state is inconsistent: for example, the root of rebase destination
revisions recorded in rebase state file is already stripped manually.
Mercurial earlier than 2.7 allows users to do anything other than
starting new rebase, even though current rebase is not finished or
aborted yet. So, such inconsistent rebase states may be left and
forgotten in repositories.
This patch catches RepoLookupError at restoring rebase state for
abort/continue, and treat such state as "broken".