Siddharth Agarwal <sid0@fb.com> [Tue, 19 Mar 2013 13:49:34 -0700] rev 18784
largefiles: don't query the dirstate for key None
lfutil.splitstandin(f) can be None, and we query the dirstate for that without
checking if it is. This will cause problems with the upcoming move to critbit-
based dicts, since they only support strings as keys.
Kevin Bullock <kbullock@ringworld.org> [Mon, 18 Mar 2013 19:59:05 -0500] rev 18783
merge
Kevin Bullock <kbullock@ringworld.org> [Sat, 16 Mar 2013 22:48:22 -0500] rev 18782
bookmarks: moving the active bookmark deactivates it
After this change, moving the active bookmark somewhere other than the
current changeset (i.e., with --rev) deactivates it. Previously it would
remain in .hg/bookmarks.current, which seems like a bug.
Kevin Bullock <kbullock@ringworld.org> [Sat, 16 Mar 2013 21:36:44 -0500] rev 18781
bookmarks: allow (re-)activating a bookmark on the current changeset
Allow a bookmark that points to the current changeset to be made the
active bookmark without requiring --force. Previously, this would've
aborted with:
abort: bookmark 'Z' already exists (use -f to force)
Kevin Bullock <kbullock@ringworld.org> [Mon, 18 Mar 2013 16:37:20 -0500] rev 18780
applyupdates: assign variable before we try to use it (
issue3855)
The variable 'fd' was getting used with a value left over from a prior
iteration, causing a KeyError: '.hgsubstate'.
Kevin Bullock <kbullock@ringworld.org> [Mon, 18 Mar 2013 16:04:10 -0500] rev 18779
revset: don't abort when regex to tag() matches nothing (
issue3850)
This makes the tag("re:...") revset consistent with branch("re:...").
Durham Goode <durham@fb.com> [Fri, 15 Mar 2013 11:23:29 -0700] rev 18778
rebase: fix --collapse when a file was added then removed
When a series of commits first adds a file and then removes it,
hg rebase --collapse prompts whether to keep the file or delete it. This is
due to it reusing the branch merge code. In a noninteractive terminal it
defaults to keeping the file, which results in a collapsed commit that is
has a file that should be deleted. This bug resulted in developers accidentally
commiting unintentional changes to our repo twice today, so it's fairly
important to get fixed.
This change allows rebase --collapse to tell the merge code to accept the
latest version every time without prompting.
Adds a test as well.
Augie Fackler <raf@durin42.com> [Sun, 17 Mar 2013 23:27:14 -0500] rev 18777
Merge
Bryan O'Sullivan <bryano@fb.com> [Mon, 11 Mar 2013 12:07:33 -0700] rev 18776
grep: use re2 if possible
Since re2 is enormously faster than Python's re module, this should
help performance, ceteris paribus. grep currently has other huge
performance problems that mask any gain :-(
Bryan O'Sullivan <bryano@fb.com> [Mon, 11 Mar 2013 12:06:13 -0700] rev 18775
util: add flag support to compilere
Kevin Bullock <kbullock@ringworld.org> [Sat, 16 Mar 2013 21:21:54 -0500] rev 18774
bookmarks: fix test broken by
0bba1ff2ac7b
The added test reflects an error in printing the origin node of the
bookmark that I fixed before committing, but I forgot to update the
test (whoops).
Kevin Bullock <kbullock@ringworld.org> [Fri, 15 Mar 2013 23:39:07 -0500] rev 18773
bookmarks: allow moving a bookmark forward to a descendant
Allow 'hg bookmark MARK', with an existing bookmark MARK, to move the
bookmark forward to the current or specified revision, if the target
revision is a descendant of the revision the bookmark currently points
to. Prints a status message including the revision the bookmark was
formerly at:
$ hg bookmark Z
moving bookmark 'Z' forward from
663762316562
Test coverage is added.
Angel Ezquerra <angel.ezquerra@gmail.com> [Tue, 26 Feb 2013 21:20:35 +0100] rev 18772
hgweb: change manifest archive links to only archive the current directory
When the web server shows the manifest for a single, non top directory, append
the path to the directory to the archive links. This makes the web server
generate archive files that only include the current directory (and its
subdirectories).
Note that archive links in other pages (e.g. changeset) or at the top of the
manifest are unchanged. Directory archive links have an extra "/" at the end
which does not impact the result of the archive operation. Keeping it there
made the implementation of this feature simpler.
Angel Ezquerra <angel.ezquerra@gmail.com> [Sun, 10 Feb 2013 11:52:05 +0100] rev 18771
hgweb: teach archive how to download a specific directory or file
The archive web command now takes into account the "file" request entry, if one
is provided.
The provided "file" is processed as a "path" corresponding to a directory or
file that will be downloaded.
With this change hgweb can to process requests such as:
http://mercurial.selenic.com/hg/archive/tip.zip/mercurial/templates
This will download all files on the mercurial/templates directory as a zip file.
It is not possible to specify file patterns ('glob', 'relglob', 'path',
'relpath', 're', 'relre' nor 'set'). The server will reject those with a
403 HTTP error response.
Note that this is a first step to add support for downloading directories from
the web interface. A following patch will modify the archiveentry map entry on
the different templates so that it adds the current folder path to the archive
links.
Angel Ezquerra <angel.ezquerra@gmail.com> [Wed, 06 Feb 2013 10:06:45 +0100] rev 18770
test-archive: gracefully handle HTTPErrors on get-with-headers
This avoids pritting out a traceback when a get-with-headers call causes hgweb
to respond with an HTTPError code.
Bryan O'Sullivan <bryano@fb.com> [Thu, 14 Mar 2013 16:56:10 -0700] rev 18769
bash_completion: tell an editor what type of file this is
Bryan O'Sullivan <bryano@fb.com> [Thu, 14 Mar 2013 16:50:53 -0700] rev 18768
bash_completion: allow remove to complete normal files
Previously, we only completed files that had already been manually
deleted. That behaviour made no sense. We now complete unmodified,
modified, and deleted files.
Bryan O'Sullivan <bryano@fb.com> [Thu, 14 Mar 2013 16:49:02 -0700] rev 18767
bash_completion: match more narrowly
This greatly helps completion performance for most commands that deal
with files.
In a working dir with 150,000 files, where we want to complete the name
of a modified file under a path beginning with "a", from the root of
the working dir:
(old) hg status -nm . 1.7 sec
(new) hg status -nm "glob:a**" 0.3
Even "hg add" becomes a little faster, in spite of being the worst
case (matching untracked files).
Durham Goode <durham@fb.com> [Wed, 13 Mar 2013 10:43:51 -0700] rev 18766
blackbox: add backup bundle paths to blackbox logs
Writes the backup bundle paths to the blackbox so it's easy to see which
backup bundle is associated with which command when you are debugging an
issue.
Example output:
2013/03/13 10:39:56 durham> strip tip
2013/03/13 10:39:59 durham> saved backup bundle to /data/users/durham/www-hg/.hg/strip-backup/
e5fac262363a-backup.hg
2013/03/13 10:40:03 durham> strip tip exited 0 after 7.97 seconds
Durham Goode <durham@fb.com> [Tue, 12 Mar 2013 10:37:48 -0700] rev 18765
tests: fix test-profile to not depend on HGPROF environment variable
The test-profile test would fail if the user had HGPROF set to another
profiler in their environment. This fix makes the test independent of
that environment variable.
Reverts the previous attempt to fix this, which was not cross platoform.
Bryan O'Sullivan <bryano@fb.com> [Tue, 12 Mar 2013 10:43:59 -0700] rev 18764
merge with crew-stable
Durham Goode <durham@fb.com> [Tue, 12 Mar 2013 10:37:48 -0700] rev 18763
tests: fix test-profile to not depend on HGPROF environment variable
The test-profile test would fail if the user had HGPROF set to another
profiler in their environment. This fix makes the test independent of
that environment variable.
Simon Heimberg <simohe@besonet.ch> [Sat, 09 Mar 2013 22:14:46 +0100] rev 18762
check-code: do not prepend "warning" to a failure message
The prefix has not been removed when this check changed from a warning to a
failure.
Bryan O'Sullivan <bryano@fb.com> [Sat, 09 Mar 2013 16:09:27 -0800] rev 18761
merge with crew-stable
Durham Goode <durham@fb.com> [Wed, 06 Mar 2013 20:13:09 -0800] rev 18760
strip: make --keep option not set all dirstate times to 0
hg strip -k was using dirstate.rebuild() which reset all the dirstate
entries timestamps to 0. This meant that the next time hg status was
run every file was considered to be 'unsure', which caused it to do
expensive read operations on every filelog. On a repo with >150,000
files it took 70 seconds when everything was in memory. From a cold
cache it took several minutes.
The fix is to only reset files that have changed between the working
context and the destination context.
For reference, --keep means the working directory is left alone during
the strip. We have users wanting to use this operation to store their
work-in-progress as a commit on a branch while they go work on another
branch, then come back later and be able to uncommit that work and
continue working. They currently use 'git reset HARD^' to accomplish
this in git.
Durham Goode <durham@fb.com> [Fri, 08 Mar 2013 16:59:36 -0800] rev 18759
sshpeer: store subprocess so it cleans up correctly
When running 'hg pull --rebase', I was seeing this exception 100% of the
time as the python process was closing down:
Exception TypeError: TypeError("'NoneType' object is not callable",) in
<bound method Popen.__del__ of <subprocess.Popen object at 0x937c10>> ignored
By storing the subprocess on the sshpeer, the subprocess seems to clean up
correctly, and I no longer see the exception. I have no idea why this actually
works, but I get a 0% repro if I store the subprocess in self.subprocess,
and a 100% repro if I store None in self.subprocess.
Possibly related to issue 2240.
Durham Goode <durham@fb.com> [Thu, 28 Feb 2013 10:12:26 -0800] rev 18758
blackbox: fix exception when logging commands with format characters
When running commands like 'hg export -o mypatch-%N.patch', the blackbox
would throw an exception because it tried to format %N. This change
prevents it from trying to format the command string.
Idan Kamara <idankk86@gmail.com> [Sat, 23 Mar 2013 13:34:50 +0200] rev 18757
localrepo: always write the filtered phasecache when nodes are destroyed (
issue3827)
When the strip command is run, it calls repo.destroyed, which in turn checks if
we read _phasecache, and if we did calls filterunknown on it and flushes the
changes immediately. But in some cases, nothing causes _phasecache to be read,
so we miss out on this and the file remains the same on-disk.
Then a call to invalidate comes, which should refresh _phasecache if it
changed, but it didn't, so it keeps using the old one with the stripped
revision which causes an IndexError.
Test written by Yuya Nishihara.
Bryan O'Sullivan <bryano@fb.com> [Tue, 19 Mar 2013 16:19:20 -0700] rev 18756
merge with stable
Durham Goode <durham@fb.com> [Mon, 11 Mar 2013 15:37:28 -0700] rev 18755
rebase: restore active bookmark after rebase --continue
When a rebase has conflicts and the user uses rebase --continue, the previously
active bookmark was not being made active once again. With this change that
bookmark is made active again, just as if the rebase had never been interrupted.
This changes the rebasestate file format, but should handle old formats correctly.
Since the file is transient, this is even less of a problem.
Adds a test to verify the new behavior. I manually tested continuing rebases
with and without an active bookmark, and with and without being on the bookmark
being rebased.
Benoit Boissinot <benoit.boissinot@ens-lyon.org> [Mon, 04 Mar 2013 10:05:52 +0100] rev 18754
setup.py: ignore warnings from obsolete
Fix version detection with recent hg versions.
Benoit Boissinot <benoit.boissinot@ens-lyon.org> [Mon, 04 Mar 2013 10:13:28 +0100] rev 18753
setup.py: add metadata to register package to PyPI
This allows updating PyPI with just 'setup.py register' (assuming the user is
an owner or maintainer of the PyPI package).
Dan Villiom Podlaski Christiansen <danchr@gmail.com> [Sat, 09 Feb 2013 21:51:21 +0000] rev 18752
minirst: optimize HTML table generation a bit
avoid a couple of array copies and string interpolations
Dan Villiom Podlaski Christiansen <danchr@gmail.com> [Sat, 09 Feb 2013 21:51:21 +0000] rev 18751
minirst: HTML formatter tweaks
output table rows on distinct lines
don't make the first row a table header
Dan Villiom Podlaski Christiansen <danchr@gmail.com> [Sat, 09 Feb 2013 17:44:25 -0500] rev 18750
minirst: CGI escape strings prior to embedding it in the HTML
Dan Villiom Podlaski Christiansen <danchr@gmail.com> [Sat, 09 Feb 2013 21:51:21 +0000] rev 18749
minirst: don't generate TH elements for the first row in table
We mainly use them for option tables -- browsers bolding and centering
them looks wrong.
Dan Villiom Podlaski Christiansen <danchr@gmail.com> [Sun, 10 Feb 2013 12:58:57 +0100] rev 18748
help: use a full header for topic titles
...for prettier HTML!
Dan Villiom Podlaski Christiansen <danchr@gmail.com> [Sat, 09 Feb 2013 21:51:21 +0000] rev 18747
hgweb: generate HTML documentation
It's generated from the raw ReST source, as returned from help.help_().
Dan Villiom Podlaski Christiansen <danchr@gmail.com> [Sat, 09 Feb 2013 21:51:21 +0000] rev 18746
help: move the majority of the help command to the help module
We move the logic for generating the unformatted ReST source to the
help module, in order to eventually avoid calling commands.help_()
from hgweb.
No functionality change.
Dan Villiom Podlaski Christiansen <danchr@gmail.com> [Sat, 09 Feb 2013 21:51:21 +0000] rev 18745
hgweb help: split up long lines (in generated output)
Dan Villiom Podlaski Christiansen <danchr@gmail.com> [Fri, 01 Mar 2013 19:42:42 +0100] rev 18744
hgweb help: add tests
Kevin Bullock <kbullock@ringworld.org> [Fri, 01 Mar 2013 10:05:37 -0600] rev 18743
merge with stable
Matt Mackall <mpm@selenic.com> [Thu, 28 Feb 2013 21:58:37 -0600] rev 18742
merge with crew
Matt Mackall <mpm@selenic.com> [Thu, 28 Feb 2013 21:53:13 -0600] rev 18741
Added signature for changeset
5b7175377bab
Matt Mackall <mpm@selenic.com> [Thu, 28 Feb 2013 21:53:04 -0600] rev 18740
Added tag 2.5.2 for changeset
5b7175377bab
Matt Mackall <mpm@selenic.com> [Thu, 28 Feb 2013 21:29:31 -0600] rev 18739
setparents: drop copies from dropped p2 (
issue3843)
Matt Mackall <mpm@selenic.com> [Sun, 17 Feb 2013 14:41:31 -0600] rev 18738
httppeer: avoid large dumps when we don't see an hgweb repo
When we don't get an hgweb protocol response, we dump the response to
the user for diagnostic purposes (it might be a cgitb message, for
instance).
But if we try to clone a bundle, we don't want to show the
entire bundle in the error message. Also, we don't want fetch the
full bundle multiple times during fallback. So we only fetch 1k here.
Matt Mackall <mpm@selenic.com> [Sun, 17 Feb 2013 14:34:53 -0600] rev 18737
httppeer: improve protocol check
Pre-0.6c hgweb used text/plain for protocol responses. This meant
that a web server could serve a static file and confuse a client into
generating a nasty traceback.
Now we insist that text/plain protocol responses not include a
Content-Length, which older hgweb didn't generate but will typically
be produced for static files.
Bryan O'Sullivan <bryano@fb.com> [Thu, 28 Feb 2013 13:11:42 -0800] rev 18736
util: add a timed function for use during development
I often want to measure the cost of a function call before/after
an optimization, where using top level "hg --time" timing introduces
enough other noise that I can't tell if my efforts are having an
effect.
This decorator allows a developer to measure a function's cost with
finer granularity.
Bryan O'Sullivan <bryano@fb.com> [Thu, 28 Feb 2013 12:51:18 -0800] rev 18735
util: generalize bytecount to unitcountfn
This gives us a function we can reuse to count units of other kinds.
Thomas Arendsen Hein <thomas@intevation.de> [Thu, 28 Feb 2013 21:34:44 +0100] rev 18734
help: new SHA-1 fingerprint of hg.intevation.org in hostfingerprints example
The certificate was updated in March 2012.
You can verify the certificate by using the Root CA certificate downloadable
from https://ssl.intevation.de/
The intermediate CA is sent by https://hg.intevation.org/
Mads Kiilerich <madski@unity3d.com> [Tue, 26 Feb 2013 21:04:50 +0100] rev 18733
tests: work around msys bash mangling of paths in test-mq.t
Mads Kiilerich <madski@unity3d.com> [Thu, 28 Feb 2013 14:05:15 +0100] rev 18732
largefiles: remove wrong comment on standin matcher and code for creating dirs
The existence of these directories could not be relied on anyway and all
dependencies on them should have been removed.
Mads Kiilerich <madski@unity3d.com> [Thu, 28 Feb 2013 14:51:59 +0100] rev 18731
merge with stable
Mads Kiilerich <madski@unity3d.com> [Thu, 28 Feb 2013 13:55:00 +0100] rev 18730
templatefilters: add missing import of _
Mads Kiilerich <madski@unity3d.com> [Thu, 28 Feb 2013 13:45:18 +0100] rev 18729
largefiles: updatelfiles should use working dir standins, not standins from p1
This makes a difference when working directory is dirty, especially when
merging with a revision for which we don't have largefiles.
Mads Kiilerich <madski@unity3d.com> [Thu, 28 Feb 2013 13:45:18 +0100] rev 18728
largefiles: simplify cachelfiles - don't spend a lot of time checking hashes
cachelfiles jumped through loops to handle merges and modified files ... but it
did apparently no longer have a valid reason to do so. It should just always
make sure that the largefiles referenced from the standins are present - no
matter which actual largefile is stored in the working directory. If there is
no standin then there is nothing to fetch.
The old code usually verified the hash of all largefiles every time this
function was invoked - for examply by 'update'.
This change makes a trivial noop update 5-10 seconds faster on our repo (with
the other 50% spent doing another unnecessary hashing of all largefiles).
Mads Kiilerich <madski@unity3d.com> [Thu, 28 Feb 2013 13:45:18 +0100] rev 18727
largefiles: don't let update leave wrong largefiles in wd if fetch fails
Situations where a largefile for some reason wasn't available sometimes caused
wrong largefile content and state. It has mostly been seen when interrupting
download of largefiles ... and when introducing programming errors.
Instead we now make sure to delete the old and wrong largefile. A missing file
is a well-known error condition and much more reasonable way to handle the
situation.
Mads Kiilerich <madski@unity3d.com> [Thu, 28 Feb 2013 13:45:18 +0100] rev 18726
largefiles: missing largefiles should not be committed as removed
Largefiles can easily become missing - for example if it simply isn't available
or the download fail. It might even be convenient to be able to work that way
in some cases.
But commiting missing largefiles as if they had been 'hg remove'd is plain wrong.
Mads Kiilerich <madski@unity3d.com> [Thu, 28 Feb 2013 13:45:18 +0100] rev 18725
largefiles: don't assume that .hg/largefiles/ still exists
It might not have been created and it might have been removed.