Commit Graph

19 Commits

Author SHA1 Message Date
Brendan Cully
e55703261f Branch heads should not include "heads" that are ancestors of other heads.
For example, given 1 (branch a) -> 2 (branch b) -> 3 (branch a)
I expect "hg heads a" to show only 3.
Discovered by running hg heads HEAD on the mutt repo, where older clients
committed default on top of HEAD.
2009-06-29 00:54:23 -07:00
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
Alexis S. L. Carvalho
5cae264d5a tests: hide the name of the branch cache file 2008-02-21 16:22:31 -03: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
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
c2bb73121f Move branch read/write to dirstate where it belongs 2007-03-13 18:50:02 -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
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
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