Commit Graph

6905 Commits

Author SHA1 Message Date
Adrian Buehlmann
5a005c60c3 eliminate win32.user_rcpath_win32() 2011-02-14 11:13:05 +01:00
Adrian Buehlmann
c0a4dc75ea windows: eliminate system_rcpath_win32() 2011-02-14 11:12:57 +01:00
Adrian Buehlmann
2f13e93b12 win32: move system_rcpath_win32() to windows.py
no code change in system_rcpath_win32

This breaks the dependency from the win32 module on osutil
2011-02-14 11:12:35 +01:00
Adrian Buehlmann
a264a23ffa win32: new function executable_path 2011-02-14 11:12:31 +01:00
Adrian Buehlmann
77ab03f101 port win32.py to using the Python ctypes library
The pywin32 package is no longer needed.

ctypes is now required for running Mercurial on Windows.

ctypes is included in Python since version 2.5. For Python 2.4, ctypes is
available as an extra installer package for Windows.

Moved spawndetached() from windows.py to win32.py and fixed it, using
ctypes as well. spawndetached was defunct with Python 2.6.6 because Python
removed their undocumented subprocess.CreateProcess. This fixes
'hg serve -d' on Windows.
2011-02-14 11:12:26 +01:00
Adrian Buehlmann
9669b3b2bc win32: optimize parameters for the CreateFile call in _getfileinfo
Set dwDesiredAccess to 0 instead of GENERIC_READ.
Zero is  enough for querying the file metadata. We don't even need to
access the -contents- of the file.

Set dwShareMode to FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE
instead of the overly restrictive FILE_SHARE_READ.
There is no need to cause write or delete accesses by other processes to
fail while we are querying file metadata.

See http://msdn.microsoft.com/en-us/library/aa363858(v=vs.85).aspx
2011-02-14 11:12:22 +01:00
Matt Mackall
d27d1fae16 bookmarks: move push/pull command features to core 2011-02-10 13:46:28 -06:00
Matt Mackall
75941859fe bookmarks: merge current tracking on update into core 2011-02-10 13:46:28 -06:00
Matt Mackall
7f7e9f2814 bookmarks: merge incoming/outgoing into core 2011-02-10 13:46:28 -06:00
Matt Mackall
50f1b0a0aa bookmarks: merge suspect addchangegroup into core
This is marked with FIXME because it's not clear that it makes any sense.
2011-02-10 13:46:28 -06:00
Matt Mackall
fea21bd858 bookmarks: merge low-level push/pull support into core 2011-02-10 13:46:28 -06:00
Matt Mackall
20e7dee431 bookmarks: merge lookup into localrepo 2011-02-10 13:46:28 -06:00
Matt Mackall
d3d3054cf5 bookmarks: move strip support to repair 2011-02-10 13:46:28 -06:00
Matt Mackall
ca3d079172 bookmarks: merge _findtags method into core 2011-02-10 13:46:28 -06:00
Matt Mackall
018d171646 bookmarks: move revset support to core 2011-02-10 13:46:28 -06:00
Matt Mackall
89896dbd54 bookmarks: merge invalidation into core 2011-02-10 13:46:27 -06:00
Matt Mackall
0dfef4c009 bookmarks: move commit action into core 2011-02-10 13:46:27 -06:00
Matt Mackall
77f373813e bookmarks: merge rollback support into localrepo 2011-02-10 13:46:27 -06:00
Matt Mackall
6e122bd621 bookmarks: move property methods into localrepo 2011-02-10 13:46:27 -06:00
Matt Mackall
1b243d934f bookmarks: move diff to core 2011-02-10 13:46:27 -06:00
Matt Mackall
3d6c8e8713 bookmarks: move pushkey functions into core 2011-02-10 13:46:27 -06:00
Matt Mackall
2580f39614 bookmarks: move update into core 2011-02-10 13:46:27 -06:00
Matt Mackall
7b71e510e5 bookmarks: move read methods to core 2011-02-10 13:46:27 -06:00
Matt Mackall
0506b0dd9c bookmarks: move basic io to core 2011-02-10 13:46:27 -06:00
Matt Mackall
906534053e extensions: add an ignore list for old extensions 2011-02-10 13:46:27 -06:00
Javi Merino
5ca27e6961 doc: Add back quotes around filenames
Filenames starting with a dot (.hg and .hgignore) confuse man when
creating the ps documentation with "man -t hg >hg.ps" if they are not
enclosed in back quotes.
2011-02-05 13:59:34 +00:00
Martin Geisler
6090144a5b merge with stable 2011-02-04 09:17:07 +01:00
Jonathan Nieder
59cebab2ef backout: make help more explicit about what backout does
The help for backout explains:

   The backout command merges the reverse effect of the reverted
   changeset into the working directory.

Unfortunately, that does not make it obvious to a newcomer what the
backout command does.  Since it performs a 3-way merge, what is the
common ancestor?  Will the result be automatically committed?  What is
this reverted changeset --- is it the rev passed with -r on the
command line or its inverse?

So try to clarify the description, avoiding jargon and being
explicit about what happens from the user's perspective.

Thanks to Gilles Moris, Steve Borho, Kevin Bullock, and timeless for
help.
2011-02-03 00:27:44 -06:00
trbs
2b860c833d subrepo: fix pruning of subrepo filenames in dirstate (issue2619) 2011-02-04 09:05:23 +01:00
Adrian Buehlmann
573f584562 opener: use posixfile to hold file open when calling nlinks()
Mercurial's posixfile is less intrusive on Windows than Python's open
2011-02-02 13:51:22 +01:00
Patrick Mezard
339c6194d0 subrepo: fix update -C with svn subrepos when cwd != repo.root 2011-02-01 21:39:28 +01:00
Yuya Nishihara
da93c3bd0b url: add --insecure option to bypass verification of ssl certificates
If --insecure specified, it behaves in the same way as no web.cacerts
configured.

Also shows hint for --insecure option when _verifycert() failed. But currently
the hint isn't displayed on SSLError, because it needs a certain level of
changes.
2011-01-29 23:23:24 +09:00
Erik Zielke
bf9e13d063 subrepo: make update -C clean the working directory for svn subrepos
This makes 'hg update --clean' behave the same way for both kinds of
subrepositories. Before Subversion subrepos did not take the clean
parameter into account, but just updated to the given revision and
merged uncommitted changes into that.
2011-01-31 13:33:41 +01:00
Mads Kiilerich
e10e504454 url: 'ssh known host'-like checking of fingerprints of HTTPS certificates
Known fingerprints of HTTPS servers can now be configured in the
hostfingerprints section. That makes it possible to verify the identify of web
servers without configuring and trusting the CA chain.

Limitations:
* Portnumbers are ignored, just like with ordinary certificates.
* Host name matching is case sensitive.
2011-01-28 02:57:59 +01:00
Adrian Buehlmann
f645c6e6fb opener: force copy on 'a'ppend if nlinks() returns 0 (issue1922)
If pywin32 is not installed, 'os.lstat(pathname).st_nlink' is used for
nlinks(), which is always zero for all files on Windows.

To make sure we break up hardlinks if pywin32 is missing, we force
nlink = 2 if nlinks() returns < 1.

(this completely fixes issue1922)
2011-01-26 19:14:30 +01:00
Patrick Mezard
afb494e2e2 subrepo: compare svn subrepo state to last committed revision
A subversion project revisions are a subset of the repository revisions, you
can ask subversion to update a working directory from one revision to another
without changing anything. Unfortunately, Mercurial will think the
subrepository has changed and will commit it again. To avoid useless commits,
we compare the subrepository state to its actual "parent" revision. To ensure
ascending compatibility with existing subrepositories which might reference
fake revisions, we also keep comparing with the subrepo working directory
revision.

NOTE: not sure if this should go in stable or not.
2011-01-22 16:15:40 +01:00
Steve Borho
f5cf898232 win32: win32console.GetStdHandle() can return None
When the Mercurial Python libraries are used within a Windows application with
no console, there is no stderr file handle.
2011-01-21 14:42:15 -06:00
Adrian Buehlmann
aef38e3838 remove pointless os.path.join calls when opening files in .hg/cache
Windows deals just fine with '/' in paths and Mercurial on Windows
already does file accesses elsewhere with mixed \ and / in file
paths anyway.

This patch also makes the static-http repo case use proper URLs of the
form

  http://example.com/repo/.hg/cache/branchheads
  http://example.com/repo/.hg/cache/tags

instead of the entirely pointless

  http://example.com/repo/.hg/cache%5Cbranchheads
  http://example.com/repo/.hg/cache%5tags

(as introduced by 5243ae377617)
2011-01-17 09:37:20 +01:00
Matt Mackall
286ea9ce04 merge with self 2011-02-01 17:53:50 -06:00
Patrick Mezard
15ac0306ee Merge with stable 2011-02-01 21:59:07 +01:00
Mads Kiilerich
0c2d4a2e7e merge with stable 2011-02-01 01:55:45 +01:00
Patrick Mezard
7700d1350b mq: factor out push conditions checks
Some extensions (e.g. hgsubversion) completely override push command. Because
extensions load order is unspecified, if hgsubversion loads before mq, mq
checks about not pushing applied patches will be bypassed. Short of finding a
way to fix load order, extracting the checking logic will allow
hgsubversion-like extensions to run the check themselves.
2011-01-31 22:16:33 +01:00
Matt Mackall
fa4133e7aa util: delay loading of textwrap 2011-01-28 17:02:29 -06:00
Mads Kiilerich
adb37b3b39 merge with stable 2011-01-28 03:09:22 +01:00
Matt Mackall
38d53c9ddd merge with stable 2011-01-27 17:22:37 -06:00
Matt Mackall
b4143e379a help: ssh urls don't allow passwords 2011-01-27 13:29:21 -06:00
Adrian Buehlmann
18144d9b0d commit: use the term SCM instead of RCS
for consistency.

see also da931fd0b5b6
2011-01-18 14:16:27 +01:00
Martin Geisler
a76e121863 backout of e4cb9628354c
Matt and a majority of crew did not like this approach.
2011-01-27 11:15:08 +01:00
Martin Geisler
d23e1973c2 specify C indention style using Emacs file local variables 2011-01-26 12:05:01 +01:00
Patrick Mezard
276b88543c Merge with stable 2011-01-22 16:29:10 +01:00