Commit Graph

14451 Commits

Author SHA1 Message Date
Adrian Buehlmann
1c143846c7 prepush: print short hash of first new head in abort message
and don't mention the branch if it's the default branch.

OLD:

  $ hg push ../a
  pushing to ../a
  searching for changes
  abort: push creates new remote heads on branch 'default'!
  (you should pull and merge or use push -f to force)

NEW:

  $ hg push ../a
  pushing to ../a
  searching for changes
  abort: push creates new remote head 1e108cc5548c!
  (you should pull and merge or use push -f to force)

This helps to identify which local head is causing troubles.

See also change 914ebeb62db8.
2011-06-03 12:16:17 +02:00
Adrian Buehlmann
a879df5001 prepush: eliminate 'if branch'
branch is always set anyway

No change in program behavior.
2011-06-03 11:26:43 +02:00
Sune Foldager
7db447dd4c revlog: bail out earlier in group when we have no chunks 2011-06-03 20:32:54 +02:00
Sune Foldager
5d8acb706f localrepo: simplify file bundling code and fix progress bug
Progress for files was off by one, and the code was rather hackish.
2011-06-03 20:23:32 +02:00
Sune Foldager
307e81bf40 localrepo: use list comprehension instead of generators
The lists in question are iterated and kept in memory further down the code
path anyway, and this simplifies things.
2011-06-03 20:15:06 +02:00
Sune Foldager
e4e3ee35de localrepo: add total to changeset progress in bundle/push 2011-06-03 20:12:37 +02:00
Martin Geisler
94d9d879d7 statichttprepo: use in-place difference for shorter line 2011-06-03 20:08:26 +02:00
Adrian Buehlmann
7062c2db6e workingctx: eliminate remove function
Inlining it into it's last remaining call place in cmdutil.copy.

Note that cmdutil.copy is called with the wlock already held, so no additional
locking is needed to call util.unlinkpath.

We do not need to wrap the util.unlinkpath call into a try block, because
at that point we already know whether abssrc exists or not -- thanks to the
preceding util.copyfile call. Adding a new local 'srcexists' in cmdutil.copy
for that purpose.
2011-06-02 00:33:33 +02:00
Adrian Buehlmann
b117e44867 test-copy2: add case for moving a missing file 2011-06-02 19:43:17 +02:00
Idan Kamara
2b3f15b0fa color: check if ui is already a subclass of colorui before wrapping it
since it's possible to reuse the ui object (see 6772a32edec7)
between dispatch calls, the ui might have been wrapped already.

we could probably move this test up a bit but leaving it here
allows updates to take effect by extstyles() and configstyles().
2011-06-02 00:43:34 +03:00
Idan Kamara
02f21a70dc util: add helper function isatty(fd) to check for tty-ness 2011-06-02 00:43:34 +03:00
Steven Brown
ef568e7358 web: prevent TypeError thrown when using the diffstat templates
Remove the lambda used to wrap webutil.diffstat because:
- functions passed to the templater must accept keyword arguments
- webutil.diffstat is a generator, so already calculates the diffstat lazily

This reverts the changes made to a4067e29e29d after it was submitted to the
mailing list but before it was queued.
2011-06-02 18:52:31 +08:00
Matt Mackall
6bf6135996 fileset: fix long line 2011-06-02 11:27:40 -05:00
Matt Mackall
eef554a6f1 COPYING: refresh with current address from fsf.org 2011-06-02 11:17:02 -05:00
Matt Mackall
fd0ca6b6e5 filesets: introduce basic fileset expression parser 2011-06-01 19:12:18 -05:00
Idan Kamara
a910ab36b8 dispatch: add repo to the request
allows callers of dispatch.dispatch to pass in
an initialized repo object to be used.

-R/--repository overrides the request repo.
2011-06-02 00:43:34 +03:00
Matt Mackall
477b0a05be merge with stable 2011-06-01 16:42:50 -05:00
Matt Mackall
06a5016ee3 Added signature for changeset 485ee36c62c2 2011-06-01 16:32:48 -05:00
Augie Fackler
8893d3b341 subrepo: make stdin for svn a pipe for non-interactive use (issue2759)
This certainly can't hurt, so go ahead and do it, potentially along
with --non-interactive if that flag is safe for the given subcommand.
2011-05-31 19:49:17 -05:00
Regis Desgroppes
2a89a4fdff subrepo: svn abort now depends on exit code (issue2833) 2011-05-31 16:22:04 -05:00
Peter Arrenbrecht
421dba9540 color: fix --color=always when output is piped
Also restructures the mode determination as discussed on IRC.
I tried to simplify the code too, while keeping the original
semantics except for the case of --color=always.
2011-05-25 18:48:00 +02:00
Martin Geisler
af8a35e078 check-code: flag 0/1 used as constant Boolean expression 2011-06-01 12:38:46 +02:00
Augie Fackler
6f67427a80 run-tests: allow whitelisting tests that should always run
It's desirable to run some tests all the time, for example
test-check-pyflakes.t and test-check-code-hg.py. This allows passing
--whitelist as a path to a file (flag can be specified more than once)
which contains a list of files to whitelist. Whitelisted tests are run
even if they're blacklisted or wouldn't match a --keyword test
run. For example, to do a quick test of usehttp2, one can now do

  $ cat > test-whitelist <<EOF
  > test-check-pyflakes.t
  > test-check-code-hg.py
  > EOF
  $ (cd tests && ./run-tests.py --extra-config-opt 'ui.usehttp2=true'
  >                             -k http -j 8  --whitelist test-whitelist)

and have all http-specific tests run as well as the two code linters.
2011-05-31 20:39:04 -05:00
Augie Fackler
2578f4f9f2 subrepo: make stdin for svn a pipe for non-interactive use (issue2759)
This certainly can't hurt, so go ahead and do it, potentially along
with --non-interactive if that flag is safe for the given subcommand.
2011-05-31 19:49:17 -05:00
Matt Mackall
479dfb8747 tests: glob version number in test-hgrc 2011-05-31 17:18:23 -05:00
Steven Brown
a8c12e93a7 web: provide diffstat to the changeset page
This includes all affected files, so it can be used for an extended view of
the files or as a replacement for the filenodelink and filenolink templates.
2011-05-28 14:44:45 +08:00
Matt Mackall
20e41fa990 tests: update for handling of missing hgrc includes 2011-05-31 16:24:47 -05:00
Regis Desgroppes
422cfa6bde subrepo: svn abort now depends on exit code (issue2833) 2011-05-31 16:22:04 -05:00
Matt Mackall
ebb03b5a77 config: ignore include errors for nonexistent files 2011-05-31 16:00:39 -05:00
Brendan Cully
ea84333a75 Make pull -u behave like pull && update
Previously, pull would not update if new branch heads were received,
whereas pull && update would move to the tipmost branch head.

Also change the "crosses branches" abort in merge.update from
"crosses branches (merge branches or use --check to force update)"
to
"crosses branches (merge branches or update --check to force update)"

since it can no longer assume the user is running hg update.
2011-05-31 11:52:22 -07:00
Matt Mackall
b0048281b5 requires: note apparent corruption 2011-05-31 15:55:23 -05:00
Adrian Buehlmann
cfc4484960 readrequires: provide easier to understand error message
NEW:

  $ hg id
  abort: unknown repository format: requires feature 'foo' (upgrade Mercurial)!

OLD:

  $ hg id
  abort: requirement 'foo' not supported!
2011-05-31 19:16:25 +02:00
Adrian Buehlmann
924c56c606 introduce new function scmutil.readrequires
for reading and parsing the .hg/requires file
2011-05-31 19:16:18 +02:00
Matt Mackall
e5b463de99 merge with stable 2011-05-31 15:28:23 -05:00
Matt Mackall
66ffe5ba1e merge with crew 2011-05-31 15:26:02 -05:00
Matt Mackall
21fbbb6f17 merge with i18n 2011-05-31 15:25:43 -05:00
Idan Kamara
69cc9dd98e mq: no need to make a copy of seriesopts
the command decorator takes care of copying the
options (introduced in a1338167b2ad)
2011-05-30 21:44:03 +03:00
Martin Geisler
774f5abfa7 merge with stable 2011-05-30 12:21:53 +02:00
Martin Geisler
3b1a193cbb merge with hg-i18n 2011-05-30 12:21:08 +02:00
Martin Geisler
1c3f47671a merge with hg-i18n 2011-05-30 12:20:36 +02:00
Martin Geisler
731d787518 test-gendoc: update for new Russian translation 2011-05-30 11:52:17 +02:00
Alexander Sauta
69da0530be i18n-ru: branches-import translated 2011-05-30 01:24:21 +04:00
Alexander Sauta
2d4abd7ab6 i18n-ru:bisect,backout,branch translated 2011-05-29 02:33:36 +04:00
Alexander Sauta
5d03bda354 i18n-ru: translated add, addremove, annotate, archive 2011-05-29 01:42:59 +04:00
Alexander Sauta
2ed10e9b98 i18n-ru:translation started,convert translated 2011-05-29 01:31:12 +04:00
Eric Eisner
55bac452e8 subrepo: don't crash when git .hgsubstate is empty (issue2716) 2011-05-28 11:03:48 -04:00
Adrian Buehlmann
a216345ef2 workingctx.remove: use self.forget 2011-05-27 21:11:44 +02:00
Martin Geisler
e495964784 commands: use repo.branchheads in heads command 2011-05-31 13:18:56 +02:00
Martin Geisler
f365370231 commands: remove unused variable from heads command
The b variable has not been needed since 5333bad7a76b. Renamed ls
variable to bheads for clarity.
2011-05-31 09:59:03 +02:00
Martin Geisler
57e33178d6 mq: print "'foo' 'bar'", not "['foo', 'bar']" when showing guards
The internal list representation of guards was leaking into the
output. The guards were always printed using repr(guard) and that
style was kept.

When "hg qguard -l" prints several guards for a patch, it does so by
joining the names with " " and that style was used for the error
messages too.
2011-05-31 08:47:16 +02:00