Commit Graph

24 Commits

Author SHA1 Message Date
John Mulligan
9e580fc6f7 store all heads of a branch in the branch cache
All heads of branches will be stored in a new cache file 'branchheads.cache'
within the .hg directory. The old 'branch.cache' file from older versions
will be ignored.

The new cache contents are formatted line-by-line as '{node} {branchtag}\n'.
This is the same as the previous format. Now, every head is recorded in
an oldest -> tipmost order.

The localrepo.branchheads function is reworked to use the data from the cache.
2009-01-14 21:47:38 -05:00
Dirkjan Ochtman
bf8b01e844 merge: only in-branch merges can be implicit 2008-06-23 15:02:52 +02:00
Dirkjan Ochtman
3e3b0d62eb warn about new heads on commit (issue842) 2008-03-21 11:06:02 +01:00
Thomas Arendsen Hein
4c531a9dd1 Print less scary warning when invalidating the branch cache. 2008-02-09 18:58:31 +01:00
Alexis S. L. Carvalho
e61b27b1b7 update the branch cache at the end of addchangegroup
This should avoid a bad performance problem when the branch cache is
not up-to-date, and hgweb can't write an updated version because it
lacks permissions.
2008-02-03 21:03:46 -02:00
Eric Hopper
964ff0a5e3 Change branches to sort 'active' branches first, and add an option to show only active branches. 2007-06-21 10:40:09 -07:00
Brendan Cully
b969d388db Make fast-forward merges full merges 2007-06-18 12:38:54 -07:00
Brendan Cully
988e3fb1da Fix up tests for new branch message 2007-06-18 11:13:16 -07:00
Brendan Cully
fb4b5549c3 Add fast-forward branch merging 2007-05-06 20:27:45 -07:00
Alexis S. L. Carvalho
47cb22b5a2 Merge with crew-stable 2007-03-16 00:45:18 -03:00
Alexis S. L. Carvalho
beebce1bec avoid a traceback with hg branch newbranch; hg up 2007-03-16 00:22:59 -03:00
Matt Mackall
e896adead6 Merge with -stable, fix small test failure 2007-03-14 01:26:09 -05:00
Matt Mackall
2e188aa5f4 Move branches.cache to branch.cache
Keeps old clients from conflicting with new caches, makes features
logic unnecessary.
2007-03-13 15:18:10 -05:00
Alexis S. L. Carvalho
fd69fe8d91 "default" is the default branch name 2007-03-13 15:02:33 -03:00
Brendan Cully
38ced1ab4c Add test for branch shadowing 2007-03-12 14:50:19 -07:00
Brendan Cully
28541ac316 Test update to branch tip 2007-03-10 17:36:29 -08:00
Thomas Arendsen Hein
5329cb6bed Add tests for .hg/branches.cache feature list. 2007-03-09 19:57:26 +01:00
Thomas Arendsen Hein
71a353f733 Add a features list to branches.cache to detect caches of old hg versions.
The leading space in the written file makes sure that the feature list never
can match an existing version, even if the first feature can be read as hex.
Additionally old hg versions display the id with --debug, too.
2007-03-09 19:12:03 +01:00
Thomas Arendsen Hein
92fa573aed Store empty (default) branch in branch cache, too.
Operations on this branch don't work otherwise.

Reading branches.cache had to be adjusted to allow an empty label.
Adjusted reading of the cache tip for symmetry, no functional change here.
2007-03-09 18:09:02 +01:00
Alexis S. L. Carvalho
e953792af4 Ignore all errors while parsing the branch cache. 2006-12-02 03:38:55 -02:00
Alexis S. L. Carvalho
b23caa6548 small fixes for test-newbranch
- hg tip doesn't use the branch cache; use hg log -r in its place
- commit doesn't use a HG_MERGE environment variable
- change the dates from "0 0" to "1000000 0"
2006-12-02 03:16:17 -02:00
Matt Mackall
afebc36749 add branch and branches commands 2006-10-24 16:49:36 -05:00
Thomas Arendsen Hein
15bba38f6c Add test for invalid branch cache (fixed by 7f2cd09b4f33) 2006-10-18 10:35:14 +02:00
Matt Mackall
e8b51baf29 Add some basic branch name tests 2006-10-17 18:48:41 -05:00