Commit Graph

2167 Commits

Author SHA1 Message Date
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
Vadim Gelfer
d35c28164f make indentation of coverage code in run-tests.py nicer. 2006-04-27 22:01:28 -07:00
Stephen Darnell
4c0fdc2a17 Add code coverage to the python version of run-tests (inc. annotation)
Also include a minor work-around to coverage.py to avoid errors about /<string>
2006-04-27 21:59:44 -07:00
Thomas Arendsen Hein
f48347c44f Show repo's revlog format on verify. Warn if some files use a different format. 2006-04-27 21:58:47 +02:00
Thomas Arendsen Hein
c9a89940a1 Replaced 0 with REVLOGV0 where this meaning is used. 2006-04-27 21:16:46 +02:00
Thomas Arendsen Hein
4b95cebb2d Corrected error message for incompatible revision flags. 2006-04-27 21:03:07 +02:00
Thomas Arendsen Hein
995ddadce4 Make the deprecated forget an alias of debugforget.
This way it doesn't show up in the non-debug help.
2006-04-27 13:11:23 +02:00
Thomas Arendsen Hein
6274feab61 Fixed test output for not using the deprecated 'hg forget'. 2006-04-27 13:05:02 +02:00
Alexis S. L. Carvalho
1b54526c23 Fix revlog-ng interaction with old-http.
revlog.py wasn't trying to detect the version of a revlog file that
doesn't exist on the filesystem (as is the case with old-http).

Additionally, there was an off-by-one error in httprangereader.read
(ranges in HTTP Range headers are inclusive), making it get more data
than what was asked for.  This made a struct.unpack complain that
"unpack str size does not match format".

Finally, with the two fixes above, test-static-http fails, since
BaseHTTPServer doesn't understand ranges and returns too much data.
Work around that by reading only the specified amount.
2006-04-26 22:42:07 -07:00
Alexis S. L. Carvalho
8babef5ceb Fix timezone check.
According to http://en.wikipedia.org/wiki/List_of_time_zones
timezones go from UTC-12 to UTC+14.
2006-04-26 22:15:01 -07:00
Vadim Gelfer
f90efb1f0f mke test-nested-repo use "revert" instead of "forget" 2006-04-26 12:06:21 -07:00
Vadim Gelfer
184aae8b48 mark forget command as deprecated.
will be removed after 0.9 released.
2006-04-26 12:05:16 -07:00
Benoit Boissinot
07657b2ac7 write to stderr with a single write call.
this works around issue88.
2006-04-26 10:57:40 -07:00
Stephen Darnell
004f510106 Tidyups for run-tests.py inc. try/finally cleanup and allow tests to be specified on command line 2006-04-26 16:54:07 +02:00
Thomas Arendsen Hein
ca22e16860 hgweb: Synchronised filelogentry to changelogentry. 2006-04-26 07:31:04 +02:00
Thomas Arendsen Hein
3fadcea9f6 Try harder to display node hashes in tags view in monospaced font.
Used to work around Firefox's behaviour if "Allow pages to choose their
own fonts" is disabled.
2006-04-26 07:03:10 +02:00
Thomas Arendsen Hein
cb026fadc5 hgweb templates: Don't word wrap "foo bar ago" (e.g. "3 months\nago")
This made log entries or hgwebdir index look ugly with certain browser widths.
2006-04-26 06:12:42 +02:00
Benoit Boissinot
b5423b8015 cached data was wrong: rev is different from self.rev(node) in bundlerepo.py 2006-04-25 23:28:40 +02:00
Thomas Arendsen Hein
c520714baf Merge with crew 2006-04-25 19:38:45 +02:00
Thomas Arendsen Hein
7c76509082 Allow 'hg serve --webdir-conf foo' to be run outside a repository. 2006-04-25 19:38:19 +02:00
Thomas Arendsen Hein
2b2d4fd5fe Use <link> tag instead if CDATA import for CSS stylesheets. Fixes issue200. 2006-04-25 18:50:40 +02:00