Commit Graph

2237 Commits

Author SHA1 Message Date
Vadim Gelfer
9d02d49bf7 merge with crew. 2006-05-03 22:47:57 -07:00
Vadim Gelfer
47101ddc97 add util.samestat function for windows.
windows does not have os.path.samestat, and stat().st_ino is always zero,
so util.samestat always returns false on windows.
2006-05-03 22:47:08 -07:00
Vadim Gelfer
de8fc55e1f only import mysql module if hook used. 2006-05-03 14:56:07 -07:00
Vadim Gelfer
747e07d661 add bugzilla integration hook. example of writing hook in python.
hook updates bugzilla bugs when it sees commit comments that mention
bug id, such as "i fixed bug 77".

only bugzilla 2.16 supported yet, but easy to extend. bugzilla versions
have different schema, i have not used later than 2.16.
2006-05-03 14:40:39 -07:00
Vadim Gelfer
b30de1431a make templater bit more flexible and efficient for external users. 2006-05-03 14:35:17 -07:00
Vadim Gelfer
991036f426 fix minor bugs in localrepo.hook. 2006-05-03 11:00:24 -07:00
Vadim Gelfer
f6f81d8d37 move changeset_templater into templater module. 2006-05-03 10:25:28 -07:00
Benoit Boissinot
1878f5fe71 merge with crew 2006-05-03 13:12:34 +02:00
Thomas Arendsen Hein
412719cc68 Better help for mq: Corrected synopses, get qcommit options from commands.py. 2006-05-03 11:57:14 +02:00
TK Soh
c82e4c7ed7 tests: support older version of bunzip2 and, possibly, gunzip too 2006-05-03 11:25:36 +02:00
TK Soh
fbc7092173 tests: fix compatibility on Solaris 2006-05-03 11:25:25 +02:00
Thomas Arendsen Hein
dc3e204fa1 Add debugaddremove alias to addremove, so it doesn't show up in 'hg help'.
Add an explicit description of 'hg commit --addremove'.
2006-05-03 10:53:51 +02:00
Thomas Arendsen Hein
6db6f6dbbc Always clean the build directory before installing for running the tests.
Otherwise tests might run an old version, when e.g. commands.py.orig is
moved back after a revert (old timestamp).
2006-05-03 10:45:20 +02:00
Thomas Arendsen Hein
26b0a124c3 Corrected test output for deprecated addremove command. 2006-05-03 10:18:52 +02:00
Vadim Gelfer
6e0d4ab1da deprecate addremove command. 2006-05-02 21:50:53 -07:00
Vadim Gelfer
fe13882a8a make test-remove check some more cases. 2006-05-02 21:45:53 -07:00
Vadim Gelfer
b8271cf884 add --after option to remove command. 2006-05-02 21:44:24 -07:00
Vadim Gelfer
e23536fd9e merge with crew. 2006-05-02 14:38:32 -07:00
Vadim Gelfer
75ddc9a984 merge with crew. 2006-05-02 14:37:55 -07:00
Vadim Gelfer
fad839fb0b fix file handling bugs on windows.
add util.posixfile class that has posix semantics on windows.
fix util.rename so it works with stupid windows delete semantics.
2006-05-02 14:30:00 -07:00
Thomas Arendsen Hein
46d0753ec7 Make hg update more verbose by default (issue12)
(including small changes to revert and backout to not show these stats
 with the exception of backout --merge)

Show update stats (unless -q), e.g.:
K files updated, L files merged, M files removed, N files unresolved

Inform the user what to do after a merge:
(branch merge, don't forget to commit)

Inform the user what to do if a branch merge failed:
There are unresolved merges, you can redo the full merge using:
  hg update -C X
  hg merge Y

Inform the user what to do if a working directory merge failed:
There are unresolved merges with locally modified files.
2006-05-02 18:44:02 +02:00
Thomas Arendsen Hein
17b60b17d4 If default sorting is name, offer name-descending with one click.
Additionally no longer ignore case when sorting by name to match default
sorting. This makes e.g. a repository "FOO" being listed before "bar".
2006-05-01 19:17:34 +02:00
Thomas Arendsen Hein
76df0ed346 Make hgwebdir columns sortable. 2006-05-01 18:38:25 +02:00
Thomas Arendsen Hein
8ca893378d Merge with crew 2006-05-01 10:04:25 +02:00
Thomas Arendsen Hein
3c27b42f55 Add download links to hgwebdir index page for allowed archive types.
Based on a patch by Colin McMillen <mcmillen@cs.cmu.edu>
2006-05-01 10:02:17 +02:00
Colin McMillen
710e4fc2b4 Add archive download links to tip on main changeset list page 2006-05-01 09:01:59 +02:00
Vadim Gelfer
e68d5a8805 merge with crew. 2006-04-30 16:30:57 -07:00
Vadim Gelfer
b5e4f14fb3 do not check sys.argv from localrepo when running hooks.
instead add traceback field to ui class.
2006-04-30 16:30:39 -07:00
Thomas Arendsen Hein
7afa65a340 Combine catching exceptions added in ef4567e4fb9c in one except statement. 2006-04-30 22:46:54 +02:00
Colin McMillen
d99c64cd65 Proper check to see if zip dest needs to be wrapped in tellable
From hgweb, calling archival.zipit fails with the error message
"Illegal seek". This happens because sys.stdout.tell() throws an
exception:

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/mercurial/archival.py", line 99, in addfile
    self.z.writestr(i, data)
  File "/usr/lib/python2.4/zipfile.py", line 468, in writestr
    zinfo.header_offset = self.fp.tell()    # Start of header bytes

Checking whether hasattr(dest, 'tell') is insufficient, because
sys.stdout has a tell() method; you just can't call it.

This patch instead determines whether a fileobj is tellable by trying
to tell(), wrapping the fileobj if an exception is generated.
2006-04-30 22:43:41 +02:00
Thomas Arendsen Hein
092be2daa9 Use better names (hg-{usage}-{random}.{suffix}) for temporary files. 2006-04-30 21:11:22 +02:00
Thomas Arendsen Hein
cdfafa43cf Applied $PWD fix (changeset bf1fa3097e92) to tests/test-hook, too. 2006-04-30 19:30:59 +02:00
Sascha Wilde
4877d2aad6 SunOS fix: Replaced $PWD with pwd
under certain conditioins $PWD isn't up to date,
observed on SunOS 5.8
2006-04-30 19:29:57 +02:00
Colin McMillen
f00c3835b7 Add self to CONTRIBUTORS 2006-04-30 18:52:34 +02:00
Alexis S. L. Carvalho
fc7f3bb592 Fix just introduced possible old-http bug
My last patch changed httprangereader.read to read only the specified
amount of data from the connection, to prevent it from returning more
than what was asked.

I just realized that this could lead to the connection not being closed.
In practice, it looks like the connection is closed just fine, but it's
probably safer to read everything and then return only what's necessary.
2006-04-30 18:50:53 +02:00
Thomas Arendsen Hein
8d59892e51 Cleanup archive command: Don't overwrite gettext, quoting in cmd table entry. 2006-04-30 18:46:49 +02:00
Thomas Arendsen Hein
2fa8d7c1ef Small cleanups to backout command:
- Accept -m for --message (like commit and similar commands), too.
- Don't ignore --logfile option.
- Fix command table entry (synopsis, group commit related option)
2006-04-30 18:40:30 +02:00
Vadim Gelfer
1975d41da8 add backout command.
command undoes effect of an earlier commit, commits new changeset
as result.
2006-04-29 20:56:46 -07:00
Vadim Gelfer
f04cb6342b make test-revert check executable bit. 2006-04-29 20:39:28 -07:00
Vadim Gelfer
3459035f6b merge with crew. 2006-04-28 15:50:56 -07:00
Vadim Gelfer
2607813e53 support hooks written in python.
to write hook in python, create module with hook function inside.
make sure mercurial can import module (put it in $PYTHONPATH or load it
as extension).  hook function should look like this:

def myhook(ui, repo, hooktype, **kwargs):
   if hook_passes:
      return True
   elif hook_explicitly_fails:
      return False
   elif some_other_failure:
      import util
      raise util.Abort('helpful failure message')
   else:
      return
      # implicit return of None makes hook fail!

then in .hgrc, add hook with "python:" prefix:

[hooks]
commit = python:mymodule.myhook
2006-04-28 15:50:22 -07:00
Vadim Gelfer
981e0240b8 merge with crew. 2006-04-28 14:51:36 -07:00
Vadim Gelfer
3f5f35a23b move SignalInterrupt class into util module. 2006-04-28 14:50:23 -07:00
Thomas Arendsen Hein
cc2267150a Show repo's revlog format on verify only if it doesn't match the default format.
This makes it easier to run the tests with different revlog formats.
2006-04-28 21:52:08 +02:00
Thomas Arendsen Hein
ad417300c3 Ignore annotated coverage output of run-tests.py -C 2006-04-28 12:38:11 +02:00
Benoit Boissinot
8e35361260 fix a NameError in changegroupsubset 2006-04-28 11:36:33 +02:00
Vincent Danjean
707a0004ce allow to pull from an empty repo without getting a backtrace 2006-04-27 22:29:02 -07:00
Colin McMillen
d23819428b Add MOTD display to hgweb and hgwebdir.
The hgweb "footer" template now has space for an optional message of
the day (MOTD). This is used in two contexts:

1) On the hgwebdir index page
2) On various pages of each individual repo

For both cases, the MOTD is read out of an entry named "motd" in the
[web] section of a config file -- the only difference is which file is
used. For #1, you need to add the section to hgweb.config; for #2, you
need to add to the repo's .hgrc file.

I suggest something like this:

[web]
motd = <p>To download these repositories, <a href="http://www.selenic.com/mercurial">get Mercurial</a> and then type something like:</p><p><pre>hg clone http://gs3080.sp.cs.cmu.edu/hg.cgi/cpmpy</pre></p>You can also click the Download links to get an archive of the latest revision.

An online sample is available here:
http://gs3080.sp.cs.cmu.edu/hg.cgi
2006-04-27 22:11:13 -07:00
Vadim Gelfer
edbe962e76 merge with crew. 2006-04-27 22:10:45 -07:00
Vadim Gelfer
e92eac82af run-tests.py: remove trailing white space 2006-04-27 22:01:57 -07:00