Commit Graph

3067 Commits

Author SHA1 Message Date
Ingo Bressler
215b100937 notify: send changesets on 'outgoing' hook, updated doc 2011-06-14 13:29:25 +02:00
Matt Mackall
f0bc90519a hg: move peerschemes back to schemes
This will avoid breaking things with extensions until peers are fully
separated from repos.
2011-06-13 16:25:18 -05:00
Matt Mackall
f241322d80 hg: rearrange peer scheme lookup
There is now only peer scheme lookup. Repository lookup goes through
peer scheme lookup. When peer and repo types are finally separated,
repo lookup will use peer.local() to get a repository object.

The underbar is dropped so that extensions can patch the table.
2011-06-13 14:53:23 -05:00
Idan Kamara
68a8ad822b mq: catch correct exception when calling changelog.rev() 2011-06-12 23:30:39 +03:00
Idan Kamara
f092316574 rebase: preserve mq series order after rebasing (issue2849) 2011-06-12 17:26:58 +03:00
Ingo Proetel
bef424c7fa record: add white space diff options 2011-06-10 10:58:10 +02:00
Adrian Buehlmann
78057a0d0f mq: rename abort_if_wdir_patched to abortifwdirpatched 2011-06-13 13:53:58 +02:00
Adrian Buehlmann
d3203ca1e7 mq: rename partial_name to partialname 2011-06-13 13:48:47 +02:00
Adrian Buehlmann
49d1864937 mq: rename write_list to writelist 2011-06-13 13:47:21 +02:00
Adrian Buehlmann
2e1cbd3d6d mq: rename series_dirty to seriesdirty 2011-06-13 13:45:48 +02:00
Adrian Buehlmann
15894cb481 mq: rename applied_dirty to applieddirty 2011-06-13 13:44:34 +02:00
Adrian Buehlmann
fc52238182 mq: rename guards_dirty to guardsdirty 2011-06-13 13:43:03 +02:00
Adrian Buehlmann
a91ab088dd mq: rename active_guards to activeguards 2011-06-13 13:41:58 +02:00
Adrian Buehlmann
c2841bd2c6 mq: rename guards_path to guardspath 2011-06-13 13:40:35 +02:00
Adrian Buehlmann
7830664889 mq: rename status_path to statuspath 2011-06-13 13:39:14 +02:00
Adrian Buehlmann
f6a797789d mq: rename series_path to seriespath 2011-06-13 13:38:04 +02:00
Adrian Buehlmann
75d2af97af mq: rename series_end to seriesend 2011-06-13 12:11:49 +02:00
Adrian Buehlmann
65422d1bc9 mq: rename full_series_end to fullseriesend 2011-06-13 12:09:29 +02:00
Adrian Buehlmann
9ac1360c75 mq: rename check_reserved_name to checkreservedname 2011-06-13 12:07:46 +02:00
Adrian Buehlmann
a7057a1a42 mq: rename check_localchanges to checklocalchanges 2011-06-13 12:06:32 +02:00
Adrian Buehlmann
87dca9fb58 mq: rename check_substate to checksubstate 2011-06-13 12:05:20 +02:00
Adrian Buehlmann
ea872e336a mq: rename check_toppatch to checktoppatch 2011-06-13 12:03:38 +02:00
Adrian Buehlmann
24dfc6dc4d mq: rename save_dirty to savedirty 2011-06-13 12:02:14 +02:00
Adrian Buehlmann
00a5574158 mq: rename explain_pushable to explainpushable 2011-06-13 12:00:56 +02:00
Adrian Buehlmann
4dce24691d mq: rename set_active to setactive 2011-06-13 11:59:35 +02:00
Adrian Buehlmann
ceb9dac69c mq: rename set_guards to setguards 2011-06-13 11:58:16 +02:00
Adrian Buehlmann
ac8c95ba7d mq: rename check_guard to checkguard 2011-06-13 11:57:21 +02:00
Adrian Buehlmann
2689b8a7ea mq: rename parse_series to parseseries 2011-06-13 11:55:46 +02:00
Adrian Buehlmann
323edaf5bd mq: rename find_series to findseries 2011-06-13 11:54:25 +02:00
Adrian Buehlmann
7ec3827482 mq: rename series_guards to seriesguards 2011-06-13 11:40:27 +02:00
Adrian Buehlmann
6eb8082b17 mq: rename full_series to fullseries 2011-06-13 11:06:11 +02:00
Matt Mackall
aa85ea1250 hg: split peer and repo lookup tables 2011-06-11 14:14:52 -05:00
Patrick Mezard
3680e66462 patch: generalize the use of patchmeta in applydiff()
- Add patchmeta.copy() and emit copies from iterhunks. Modifying patchmeta
  instances in applydiff() makes things simpler.
- Rename selectfile() into makepatchmeta(). It is responsible for creating
  patchmeta for regular patches.
- Pass patchmeta objects to patchfile() directly

patchmeta instances were associated with git patches, for regular patches we
had to pass additional variables to tell the patch intent to patchfile().
Instead, we generate patchmeta for regular patches and pass them. This will
also help with patch filtering by matcher objects.
2011-06-11 14:17:25 +02:00
Patrick Mezard
6aaca90508 patch: turn patch() touched files dict into a set 2011-06-11 14:14:11 +02:00
Matt Mackall
efecb99535 hg: change various repository() users to use peer() where appropriate
This gets all the easy cases (peers that aren't also used as repositories).
2011-06-10 11:43:38 -05:00
Peter Arrenbrecht
d836ee3cea hg: add opts argument to clone for internal remoteui 2011-06-08 18:24:33 +02:00
Patrick Mezard
f99a853422 localrepo: add savecommitmessage() to write last-message.txt 2011-06-04 15:56:48 +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
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
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
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
Patrick Mezard
d4b7db6294 patch: use temporary files to handle intermediate copies
git patches may require copies to be handled out-of-order. For instance, take
the following sequence:

  * modify a
  * copy a into b

Here, we have to generate b from a before its modification. To do so,
applydiff() was scanning for copy metadata and performing the copies before
processing the other changes in-order. While smart and efficient, this approach
complicates things by handling file copies and file creations at different
places and times. While a new file must not exist before being patched a copied
file already exists before applying the first hunk.

Instead of copying the files at their final destination before patching, we
store them in a temporary file location and retrieve them when patching. The
filestore always stores file content in real files but nothing prevents adding
a cache layer. The filestore class was kept separate from fsbackend for at
least two reasons:

- This class is likely to be reused as a temporary result store for a future
  repository patching call (entries just have to be extended to contain copy
  sources).

- Delegating this role to backends might be more efficient in a repository
  backend case: the source files are already available in the repository itself
  and do not need to be copied again. It also means that third-parties backend
  would have to implement two other methods. If we ever decide to merge the
  filestore feature into backend, a minimalistic approach would be to compose
  with filestore directly. Keep in mind this copy overhead only applies for
  copy/rename sources, and may even be reduced to copy sources which have to
  handled ahead of time.
2011-05-27 21:50:10 +02:00
Patrick Mezard
e6f284be06 patch: refactor file creation/removal detection
The patcher has to know if a file is being created or removed to check if the
target already exists, or to actually unlink the file when a hunk emptying it
is applied. This was done by embedding the creation/removal information in the
first (and only) hunk attached to the file.

There are two problems with this approach:

- creation/removal is really a property of the file being patched and not its
  hunk.

- for regular patches, file creation cannot be deduced at parsing time: there
  are case where the *stripped* file paths must be compared. Modifying hunks
  after their creation is clumsy and prevent further refactorings related to
  copies handling.

Instead, we delegate this job to selectfile() which has all the relevant
information, and remove the hunk createfile() and rmfile() methods.
2011-05-27 21:50:09 +02:00
Idan Kamara
1c58f33fac mq: allow --mq for qrecord 2011-05-27 17:49:54 +03:00
Adrian Buehlmann
63c4bf2469 rebase: add option --tool/-t for 'pull --rebase'
This makes 'pull --rebase' consistent with the merge command, which already
provides that option to control the merges
2011-05-27 10:03:29 +02:00
Idan Kamara
a7eca9ebe7 record: fix options placeholder 2011-05-26 19:00:47 +03:00
Matt Mackall
c6e850b04b context: make forget work like commands.forget
Switch users of wctx.delete(..., False) to forget.
2011-05-26 17:15:35 -05:00
Matt Mackall
97c6e7b48d dirstate: rename forget to drop
It has substantially different semantics from forget at the command
layer, so change it to avoid confusion.

We can't simply combine it with remove because we need to explicitly
drop non-added files in some cases like commit.
2011-05-26 17:15:35 -05:00