Commit Graph

5825 Commits

Author SHA1 Message Date
Matt Mackall
88e99c1e5f posixfile_nt: set closed early
Exceptions in __init__ may leave us with close undefined in __del__
2008-01-11 14:06:05 -06:00
Will Maier
213ea70ab4 Don't use the -i option with sed
This patch fixes test-keyword on platforms without GNU sed (like
OpenBSD).
2008-01-09 10:00:18 -06:00
Edouard Gomez
2d7c3fefd7 convert: respect hg.tagsbranch setting 2008-01-09 00:27:33 +01:00
Jesse Glick
500b64344a Issue #880: Simple misspelling ('occured') in web error message. 2008-01-05 15:35:46 -05:00
mark.williamson@cl.cam.ac.uk
75ee62ea88 Tweak finddate to pass date directly.
Previous implementation was passing (date + "to" + date), which fails
when "<" and friends are prepended to the date specifier.

Signed-off-by: Mark Williamson <mark.williamson@cl.cam.ac.uk>
2008-01-11 01:36:20 +00:00
Michele Cella
0e20a92c0f adding "prefix" option to "hg serve" (command line and [web] section)
allows "hg serve" to serve from a different path than '/' (server root)
2008-01-09 11:15:00 +01:00
Kevin Christen
07b2b0a32c Fix XHTML validation error on file diff page.
Replaces <div>, a block level element, with <span>, it's inline
counterpart, in <pre>, which is also an inline element.
2008-01-08 21:12:30 -06:00
Matt Mackall
f277b2676b hook: redirect stdout to stderr for ssh and http servers 2008-01-11 13:06:38 -06:00
Maxim Dounin
fc8b71e851 convert: add commandline.xargs(), use it in svn_sink class
Introduce commandline.xargs() to limit argument list with respect
to ARG_MAX bytes. If no ARG_MAX information available - use POSIX
required minimum of 4096 bytes.

Under Windows, while actual argument list length is limited to 32k,
shells impose their own limits on command line length, down to 2047 bytes
for cmd.exe under Windows NT/2k and about 2500 bytes for older 4nt.exe.
See http://support.microsoft.com/kb/830473 for details about cmd.exe
limitations.

Since ARG_MAX is limit for argument list and environment, we reserve half
of it and one byte for environment variables. This way with default ARG_MAX
(4096 bytes) we get value 2047 bytes which is OK for Windows too.
2008-01-11 06:07:43 +03:00
Christian Ebert
29e2a0cd0d keyword: fix some doc strings; update copyright 2008-01-11 15:01:29 +01:00
Kirill Smelkov
73c5fc4e17 hg qrecord -- like record, but for mq
I'm a former Darcs user, and I've discovered that it is very convenient to
actually perform development using MQ first, and only when the patches are
'ready' move them to project's history in stone.


Usually I work on some topic, temporarily forgetting about any version control,
and just do coding, experimenting, debugging, etc.

After some time, I approach a moment, where my work should actually go to
patches/commits, and here is the problem::

    As it is now, there is no way to put part of the changes into one patch,
    and another part of the changes into second patch.

    This works, but only when changes are touching separate files, and for
    semantically different changes touching the same file(s) there is now
    pretty way to put them into separate patches.

For some time, I've tolerated the pain to run vim patches/... and move hunks
between files by hand, but I think this affects my productivity badly.


So, here is the first step towards untiing the problem:

    Let's use 'hg qrecord' for mq, like we use 'hg record' for usual commits!
2008-01-10 12:07:18 +03:00
Kirill Smelkov
c35576c935 cmdutil.commit: extract 'addremove' from opts carefully
we are going to use cmdutil.commit for qrecord, and it's brother
qrefresh does not support addremove.
2008-01-10 12:07:18 +03:00
Kirill Smelkov
e928c8fcaf dispatch: allow extensions to provide setup code
we'll need this soon, when record extension will optionally depend
on mq early -- when preparing cmdtable.

Also, if accepted, ExtensionHowto wiki should be updated as well.
2008-01-10 12:07:18 +03:00
Kirill Smelkov
e0f2ac6b4f record: refactor record into generic record driver
rationale
---------

I'd like to make MQ version of record -- qrecord.

>From the first glance it seemed to be easy -- the task in essence would be to
change call to cmdutil.commit() to something like mq.qrefresh().

As it turned out queue.refresh() and cmdutil.commit() have different semantics
-- cmdutil.commit() first scans for changes and then delegate the actual commit
to lowlevel func. On the other hand queue.refresh() do it all in once, and I am
a bit scary to change it.

Maybe the right way would be to first refactor queue.refresh() to use
cmdutil.commit() machinery, and then trivially adjust record, but I feel I'm
not competent for the task right now.

Instead, I propose we refactor record to be some sort of high-level driver, or
like a high-level decorator one can say, which will first interactively filter
changes, and then delegate commit job to high-level commiter, e.g. 'commit' or
'qrefresh'


So, this patch does just that -- refactor record to be generic driver, and
update 'hg record' code to use the driver.

'hg qrecord' will follow.
2008-01-10 12:07:13 +03:00
Kirill Smelkov
0b7c59b420 record: some docs
While studing record, I've written some docstrings and comments.
Hope they are useful.
2008-01-10 11:43:30 +03:00
Christian Ebert
fec93c5dc5 keyword: clean up quiet setting in kwdemo and adding of untracked kwfiles 2008-01-09 05:24:33 +01:00
Christian Ebert
4598383878 keyword: suppress keyword expansion for log commands
With previous bugfix "hg log -p" expanded keywords.
Turn off again by making log, tip nokwcommands.
2008-01-09 11:21:40 +01:00
Christian Ebert
c6bef17710 keyword: (bugfix) only set changenode for kwtemplater when committing
kwexpand must always obtain changenode from filectx,
otherwise current changenode is expanded in every file.

Also fixes "hg cat <more than 1 file>".
2008-01-09 05:18:50 +01:00
Maxim Dounin
690088d7ef test-mq-header: don't fail with different patch(1)
At least under FreeBSD patch(1) won't fail on empty patch and will print
'Hmm...' warning instead. Sanitize output so tests won't fail unexpectedly.
2008-01-08 06:56:21 +03:00
Matt Mackall
e834530a71 Fix up tests for XHTML validation bits 2008-01-08 15:56:12 -06:00
Kevin Christen
9e1cd09310 Fixed numerous XHTML problems that caused validation errors and warnings.
Link elements for Atom and RSS feeds had no end tag.  <div> block element
inside <a> in-line element isn't right and caused rendering problems on
Safari.  Spurious </div> tag in search forms.  Branch entry missing closing
</a> tag.
2008-01-07 21:29:40 -06:00
Dennis Schoen
1fadcc26a2 patchbomb: attachment options changed
'-a/--attach' send patches as attachment
'-i/--inline' sends patches as inline attachment (old behavior of -a/--attach)
2007-12-31 16:18:17 +01:00
Christian Ebert
ad70a015b8 patchbomb: consistently use opts.get 2008-01-04 16:11:01 +01:00
Christian Ebert
6444443fc3 patchbomb: fix more line continuations (coding style) 2008-01-04 15:58:22 +01:00
Christian Ebert
459ae2dd85 keyword: add test 2008-01-04 18:22:39 +01:00
Christian Ebert
f697d00339 Add extension for filewise RCS-keyword expansion in working dir
- keywords are only expanded working dir, not in change history
- completely customizable keywords/expansions based on hg templates
- intrusiveness/slowdown can be reduced by specifying precise [keyword]
  file patterns
- can be turned off/on anytime
- changesets can be exchanged regardless of remote/local keyword settings
2008-01-04 18:22:09 +01:00
Alexandre Vassalotti
60c2f6f43d restore branch after rollback (issue 902) 2008-01-07 15:26:12 -06:00
Patrick Mezard
4b9a547de4 context: fix filectx.parents() bug introduced when editing 3fb82bcfc6e3 2008-01-06 15:40:32 +01:00
Thomas Arendsen Hein
0aa25c8759 merge with crew-stable 2008-01-06 13:17:10 +01:00
Maxim Dounin
4d9877b4eb Fix copies reporting in log and convert.
If copy logged in file revision, we report copy for changeset only
if file revisions linkrev points back to the changeset in question
or both changeset parents contain different file revisions.

This fixes extra copies reported when executable bit was changed for
previously copied file.
2007-12-29 17:11:48 +03:00
Maxim Dounin
940a0afd31 context: preserve changeset in filectx if we have one
If we know original changeset we are working with - try hard to
preserve it. Fallback to filelog.linkrev() only if we have no way
to get original changeset, since linkrev() may point to other
changeset.
2007-12-29 16:57:43 +03:00
Patrick Mezard
d6fbb24257 test-convert-hg-svn: make it more windows friendly 2008-01-05 17:36:16 +01:00
Patrick Mezard
7bfa89c3df test-convert-svn-sink: wrap repetitive svn checks in a function 2008-01-05 17:36:16 +01:00
Patrick Mezard
336268093f Merge with crew-stable 2008-01-05 22:52:28 +01:00
Patrick Mezard
47378bdecc Make run-tests.py --interactive work on Windows 2008-01-05 17:55:16 +01:00
Shun-ichi GOTO
df3f37e771 convert: Fix bug of limit_arglist() loosing file on limit boundary. 2008-01-05 11:46:00 +09:00
Patrick Mezard
4200777a7b test-convert: test before() and after() conversion actions 2008-01-04 23:43:55 +01:00
Patrick Mezard
afdb5ad6e2 test-convert-svn-source: test convert/multiple extra fields 2008-01-04 23:43:55 +01:00
Patrick Mezard
980dbe2c9e Merge with crew-stable 2008-01-04 23:43:49 +01:00
Patrick Mezard
8fdc85530f convert: filemap must call base converter before()/after() actions 2008-01-04 23:23:47 +01:00
Bryan O'Sullivan
5b8903b6d7 util: drop params added during experimentation 2008-01-04 13:56:31 -08:00
Bryan O'Sullivan
497bf2ca7a fetch: hide authentication details 2008-01-04 11:58:27 -08:00
Bryan O'Sullivan
a3e3ece3f7 serve: Don't change directory in the child if invoked with -d and --cwd 2008-01-04 11:52:24 -08:00
Thomas Arendsen Hein
47ae80ebb9 Fix status char in color extension for deleted (missing) files. 2008-01-04 14:25:04 +01:00
Thomas Arendsen Hein
60daf69b49 merge with main 2008-01-04 07:44:07 +01:00
Kevin Christen
61f976c787 color extension: change from GPL3 to 2 2008-01-03 20:27:32 -06:00
Matt Mackall
40a16e2ab7 changelog: fix decoding of extra
(spotted by pmezard)
2008-01-03 13:46:39 -06:00
Shun-ichi GOTO
aff737b390 convert: print commit log message with local encoding correctly. 2008-01-03 06:25:30 +09:00
Shun-ichi GOTO
41dab6891f convert: svn_sink: workaround of command line size limitation on win32.
On win32, the command line arguments seems to be limited about 2400
bytes.  So 'add', 'delete', 'propget' and 'propdel' operations are
called several times within this limitation.  And also 'commit'
operation is changed to be called without passing target files not to
exceeds this limitation because it cannot be a separated like other
operations above.
2008-01-03 06:25:30 +09:00
Shun-ichi GOTO
05e81b7348 convert: Accept local path on win32. 2008-01-03 06:25:30 +09:00