Matt Mackall
169bd362a1
Merge with -stable
2007-07-26 12:02:55 -05:00
Matt Mackall
0ac116e475
merge: don't forget to update the dirstate for exec bit changes
2007-07-26 11:19:53 -05:00
Matt Mackall
3a3bd8ec5b
Make repo locks recursive, eliminate all passing of lock/wlock
2007-07-21 16:02:10 -05:00
Matt Mackall
3e13c68628
Use try/finally pattern to cleanup locks and transactions
2007-07-21 16:02:10 -05:00
Matt Mackall
cf691df912
dirstate: break update into separate functions
2007-07-21 16:02:09 -05:00
Matt Mackall
1e9e9e4cdd
merge: fix unnecessary rename merges on linear update (issue631)
...
If one side's revision is identical to the ancestor, we skip the rest
of the copy detection logic.
2007-07-15 14:43:38 -05:00
Matt Mackall
d00f8a1d6c
merge: fix adding untracked files on directory rename (issue612)
...
Fix from Brendan
Added test case
2007-07-05 16:01:07 -05:00
Matt Mackall
cfe7a0a522
merge: make test for fast-forward merge stricter (issue619)
...
don't allow merging with an ancestor
fix != on contexts
add a test
2007-07-05 13:34:18 -05:00
Alexis S. L. Carvalho
cc6e60f60e
merge: fix small bug with a failed merge across a rename
...
If $HGMERGE wasn't able to fix the conflicts, we wouldn't copy
f to fd, and util.set_exec wouldn't find the file.
2007-06-22 20:44:40 -03:00
Matt Mackall
a38809cf9e
merge: warn user about divergent renames
2007-06-21 18:02:03 -05:00
Thomas Arendsen Hein
4d29c6dc8e
Updated copyright notices and add "and others" to "hg version"
2007-06-19 08:51:34 +02:00
Thomas Arendsen Hein
483231d996
Cleanup of whitespace, indentation and line continuation.
2007-06-19 08:06:37 +02:00
Brendan Cully
b969d388db
Make fast-forward merges full merges
2007-06-18 12:38:54 -07:00
Matt Mackall
5fa7270b2d
Merge with stable
2007-05-08 11:42:48 -05:00
Matt Mackall
6bf7f7256d
merge: fix spurious merges for copies in linear updates
...
We make better use of contexts to accurately identify copies that
don't need merges.
Add a simple test and update other tests.
2007-05-08 02:59:13 -05:00
Brendan Cully
fb4b5549c3
Add fast-forward branch merging
2007-05-06 20:27:45 -07:00
Matt Mackall
5290628c48
Merge with stable
2007-05-03 17:27:21 -05:00
Matt Mackall
32c298df8a
merge: reorganize some hunks in findcopies
2007-05-03 17:24:43 -05:00
Matt Mackall
e05a1595b6
merge: simplify a check in checkcopies
2007-05-03 17:24:43 -05:00
Matt Mackall
b3ab26f105
merge: expand and simplify the invalid handling for directory moves
2007-05-03 17:24:43 -05:00
Matt Mackall
691e10a07c
merge: fix a bug detecting directory moves
...
When all the files in a directory are moved, it may be incorrectly marked as moved even if it contains subdirectories.
2007-05-03 17:24:43 -05:00
Matt Mackall
47ec1c2825
merge: clarify the findcopies code
2007-05-03 17:24:43 -05:00
Matt Mackall
e2dfe968ea
Merge with stable
2007-04-16 12:37:30 -05:00
Matt Mackall
f63e728c54
merge: fix quadratic behavior in find-copies
2007-04-16 12:24:52 -05:00
Matt Mackall
1e8fed06d8
merge: fix a bug where copies were getting ignored
2007-04-05 16:25:47 -05:00
Alexis S. L. Carvalho
47cb22b5a2
Merge with crew-stable
2007-03-16 00:45:18 -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
Brendan Cully
5641becd5a
Merge with crew-stable
2007-03-10 17:45:32 -08:00
Matt Mackall
4458a1780a
merge: fix renaming of subdirectories under renamed directories
2007-02-27 16:20:06 -06:00
Matt Mackall
53a83c6c22
Merge with stable
2007-02-27 16:47:16 -06:00
Matt Mackall
de434078f7
symlinks: minimal support for symlinks in merge/update
...
This will get angry, confused, and sad if you try to merge a symlink
with a regular file.
2006-12-29 20:04:31 -06:00
Matt Mackall
9a533e02cb
symlinks: add flags param to wwrite
...
Now wwrite can set symlink and exec for files
2006-12-29 20:04:31 -06:00
Matt Mackall
8ed93098b6
replace filehandle version of wwrite with wwritedata
2006-12-29 20:04:31 -06:00
Matt Mackall
ebc2b5ccc8
merge: fix a bug where copies were ignored
2007-04-05 16:43:18 -05:00
Matt Mackall
296d6a7cb8
Simplify i18n imports
2006-12-14 20:25:19 -06:00
Matt Mackall
f17a4e1934
Replace demandload with new demandimport
2006-12-13 13:27:09 -06:00
Matt Mackall
2623870448
Remove deprecated old-style branch support
2006-12-12 18:16:23 -06:00
Matt Mackall
d9f0b69ae5
Fix copy detection corner case
...
We were aborting if the copied from rev was before the cut-off limit,
rather than the copied _to_ rev. The copied from rev can be
arbitrarily old.
2006-12-12 17:52:33 -06:00
Alexis S. L. Carvalho
63ae667098
Use UTF-8 in .hg/branch
2006-12-10 20:35:28 -02:00
Matt Mackall
a8fff7f220
imported patch collision
2006-12-04 17:10:31 -06:00
Matt Mackall
aaf36f881a
Handle transcoding of branch names
2006-12-03 16:16:33 -06:00
Matt Mackall
05748f203d
merge: handle directory renames
...
commit: handle new copy dirstate case correctly
findcopies:
keep a map of all copies found for directory logic
add dirs filter
check for merge:followdirs config option
generate a directory move map
find files that match directory move map
manifestmerge:
add directory rename cases
applyupdates:
skip actions with None file
add "d" action
recordupdates:
add "d" action
add simple directory rename test
2006-11-30 17:36:33 -06:00
Matt Mackall
452ab5fc24
merge: pull findcopies helpers inside, refactor checkpair to checkcopies
2006-11-30 17:36:33 -06:00
Matt Mackall
f8e4088f12
merge: move check for empty ancestor into findcopies
2006-11-30 17:36:33 -06:00
Matt Mackall
f9ab52977a
merge: only store one direction of copies in the copy map
...
simplify checkpair
generate copied hash from copy map
make copy cases more symmetrical
2006-11-30 17:36:33 -06:00
Matt Mackall
224d8a5d1f
merge: add copied hash to simplify copy logic
2006-11-30 17:36:33 -06:00
Matt Mackall
1c0e2e44bd
merge: remove unused match logic from findcopies
2006-11-30 17:36:33 -06:00
Matt Mackall
8732a61bab
merge: report destinations of moves in merge action messages
2006-11-30 17:36:33 -06:00
Brendan Cully
261404dfe1
Make context __eq__ handle arbitrary RHS values
2006-11-27 15:27:09 -08:00
Brendan Cully
791078de93
merge: Don't search for copies across unrelated manifests
2006-11-23 22:45:00 -08:00
Matt Mackall
f9f3aa2d91
avoid unnecessary copy merges
2006-11-18 11:34:19 -06:00
Thomas Arendsen Hein
411d64ce3e
white space and line break cleanups
2006-11-17 08:06:54 +01:00
Matt Mackall
6239f7b678
Clarify untracked file merge message
2006-11-01 21:47:55 -06:00
Benoit Boissinot
83a68d580f
merge with backout
2006-10-31 13:03:23 +01:00
Benoit Boissinot
3f2046d235
Backed out changeset 0fc94973be4ffeb0b5ace8a920dec676a9a51130
2006-10-31 13:02:49 +01:00
Benoit Boissinot
b8176cb795
use workingcontext.files() to detect if the repo is unclean
2006-10-29 14:18:55 +01:00
Benoit Boissinot
58322272ec
allow update to switch to a different branch if the repo is clean
2006-10-29 13:08:10 +01:00
Thomas Arendsen Hein
687e4a7111
Define and use nullrev (revision of nullid) instead of -1.
2006-10-29 10:53:51 +01:00
Matt Mackall
785d7f44cb
merge: fix branch setting
...
(and remove debugging message)
2006-10-17 22:59:01 -05:00
Matt Mackall
8c602e592a
imported patch foo
2006-10-17 22:34:43 -05:00
Matt Mackall
384f4460ac
merge: if filemerge skips merge, report as updated
2006-10-15 16:18:09 -05:00
Matt Mackall
492924b1a5
merge: update dirstate correctly for non-branchmerge updates
...
- we don't actually need the context in recordupdates
- use -1 for filesize to force check on normal update
- only record copy for branchmerges
- forget moved files on update
2006-10-13 17:58:04 -05:00
Matt Mackall
4d37ff4a92
merge: turn followcopies on by default
2006-10-12 14:49:19 -05:00
Matt Mackall
fef0705ae8
merge: pull user messages out to hg.py
...
- add _update for shadowing in clone
- add _showstats helper
- remove update parameter defaults
- move stats message and merge help messages
2006-10-10 03:39:44 -05:00
Matt Mackall
47200ceb34
merge: update some docstrings
2006-10-10 02:31:02 -05:00
Matt Mackall
2e860ba70d
merge: various tidying
...
update tests to handle corrected output and new workingctx display
2006-10-10 02:15:20 -05:00
Matt Mackall
285d3e6b86
merge: use contexts in checkunknown and forgetremoved
2006-10-10 01:43:58 -05:00
Matt Mackall
41f0942fa0
merge: shortcircuit filemerge for identical files
...
- use filectx.cmp to compare files
- move merge messages into filemerge
- kill the redundant resolving message
- update tests
2006-10-10 01:16:06 -05:00
Matt Mackall
d2113ca490
merge: pull file copy/move out of filemerge
2006-10-10 00:54:00 -05:00
Matt Mackall
8df16edc62
merge: unify merge and copy actions
2006-10-10 00:41:55 -05:00
Matt Mackall
03952b0c2d
merge: swap file and mode args for act()
2006-10-10 00:32:30 -05:00
Matt Mackall
12fd359e4a
merge: finish removing nodes from action list
2006-10-10 00:22:03 -05:00
Matt Mackall
642329c803
merge: eliminate nodes from action list
...
- eliminate my and other from merge and copy
- eliminate node from get
- use mctx for get
- fix bug flag = a[2:]
- pass mctx to recordupdates
- use new filectx.size in recordupdates
2006-10-09 23:23:25 -05:00
Matt Mackall
3acfbeaf4c
filemerge: use contexts rather than my and other
2006-10-09 21:27:04 -05:00
Matt Mackall
598b522a75
merge: pass contexts to applyupdates
2006-10-09 20:32:03 -05:00
Matt Mackall
3ad18f34e2
merge: don't call hooks for revert
...
- don't call hooks for revert
- use extra variables to avoid swapping contexts
2006-10-09 18:13:38 -05:00
Matt Mackall
83b47aba30
merge: use contexts for manifestmerge
...
- take ma, backwards, and copy out of update
- move findcopies call inside manifestmerge
- pass repo rather than ui
2006-10-09 16:07:19 -05:00
Matt Mackall
ddd540c49d
merge: remember rename copies and parents properly on commit
...
record copies in dirstate even if rename was remote
this lets us record it properly at commit
teach checkfilemerge about copies, including merge cases
pull old copy code out of commit
extend rename-merge1 test to show file index
2006-10-08 19:57:45 -05:00
Matt Mackall
718de207ba
merge: copy fixes and tests
...
Fix up "already seen" logic
Fix merge action in remote copy case
Add status message
Add lots of merge+copy/move test cases
2006-10-06 16:55:11 -05:00
Matt Mackall
81e539f559
merge: fixes for merge+rename
...
findcopies: ignore files renamed on both branches
applyupdates: change remove flag to move
recordupdates: record copy actions, including local moves and deletions
2006-10-04 19:08:04 -05:00
Matt Mackall
1ceaacc1cf
merge: add rename following
...
Currently disabled by default, enable with
[merge]
followcopies = 1
2006-10-04 15:43:27 -05:00
Matt Mackall
88fc6d0497
merge: reduce manifest copying
2006-10-04 14:33:22 -05:00
Matt Mackall
246beb812d
merge: reorder dirstate update slightly for correctness
2006-10-04 14:09:26 -05:00
Matt Mackall
93a98b345e
merge: use new working context object in update
2006-10-03 01:21:46 -05:00
Matt Mackall
3fb2b33be7
merge: remove old merge function
2006-10-02 12:06:33 -05:00
Matt Mackall
a9124fdfed
merge: extend file merge function for renames
2006-10-02 12:04:48 -05:00
Matt Mackall
450d02d6e1
merge: minor nullid cleanup
2006-09-29 17:50:59 -05:00
Matt Mackall
72659a3964
merge: use repo.parents and parent contexts in update
2006-09-29 16:39:38 -05:00
Matt Mackall
4f4a6b4d59
merge: move partial filtering out of manifest merge
2006-09-26 16:21:52 -05:00
Matt Mackall
366e05ddd4
merge: move findcopies after workingmanifest
2006-09-26 16:04:07 -05:00
Matt Mackall
a8304d2a61
findcopies: shortcut for empty working dir
2006-09-26 15:58:51 -05:00
Matt Mackall
ef4a93bd92
findcopies: use dirstate rename information
2006-09-25 20:31:05 -05:00
Matt Mackall
235ebaa809
Add core copy detection algorithm
...
This adds findcopies, which detects merge-relevant copies between
files in a pair of manifests back to the merge ancestor.
While the merge code invokes the copy detection routine, it does not
yet use the result.
2006-09-25 16:45:31 -05:00
Matt Mackall
885b6f1a23
merge: simplify actions with helper function
2006-09-17 21:27:30 -05:00
Matt Mackall
56ee773f9b
merge: simplify local created logic
2006-09-17 21:11:26 -05:00
Matt Mackall
3fb7ecf4fc
merge: simplify prompt code
2006-09-17 20:43:06 -05:00
Matt Mackall
55f5616f63
merge: simplify exec flag handling
2006-09-17 20:38:02 -05:00
Matt Mackall
e626757894
merge: simplify tests for local changed/remote deleted
2006-09-17 20:18:27 -05:00
Matt Mackall
130870e3b4
merge: more simplification of m2 manifest scanning
2006-09-17 20:10:54 -05:00
Matt Mackall
7b613a7651
merge: reorder tests on m2 items in manifestmerge
2006-09-17 20:00:14 -05:00
Matt Mackall
35d8b2766b
merge: eliminate redundant security check
...
duplicated in applyupdates
2006-09-17 19:54:01 -05:00
Matt Mackall
dbfce7afdf
merge: eliminate confusing queued variable
2006-09-17 19:53:19 -05:00
Matt Mackall
57a97bbee9
merge: remove no longer possible clause
2006-09-17 18:28:50 -05:00
Matt Mackall
f974d70a70
merge: move apply and dirstate code into separate functions
2006-09-17 17:39:19 -05:00
Matt Mackall
769045bfdc
merge: remove linear variable
2006-09-17 17:13:02 -05:00
Matt Mackall
7a90b4f86c
merge: simplify hook code
2006-09-17 17:07:44 -05:00
Matt Mackall
0ef93234ad
merge: linear_path -> linear
2006-09-17 16:50:17 -05:00
Matt Mackall
e892404453
merge: pull manifest checks and updates into separate functions
2006-09-17 16:47:33 -05:00
Matt Mackall
404e69c300
merge: remove now unused umap dict
2006-09-17 16:13:34 -05:00
Matt Mackall
d9a7957055
merge: pull manifest comparison out into separate function
2006-09-17 16:13:03 -05:00
Matt Mackall
abd544b718
Merge with mainline
2006-09-17 16:02:09 -05:00
Matt Mackall
c8ac19165e
merge: move set_exec to actions
2006-09-17 15:59:59 -05:00
Matt Mackall
1b67b22515
merge: add forget to action list
2006-09-17 15:54:51 -05:00
Matt Mackall
79c61d8eaf
merge: add codes to action list, eliminate None elements
2006-09-17 15:24:00 -05:00
Matt Mackall
57ca71b692
merge: convert actions to list
2006-09-17 15:10:56 -05:00
Matt Mackall
3f3298dd8d
Merge with crew
2006-09-15 15:22:45 -05:00
Matt Mackall
074aff45fa
merge: fold umap and added into m1 manifest
2006-08-22 21:02:25 -05:00
Matt Mackall
7da2e9f3e6
merge: make unresolved a counter
2006-08-22 19:39:54 -05:00
Matt Mackall
9ee666d233
merge: use context code to retrieve manifests
2006-08-22 19:32:16 -05:00
Matt Mackall
877cbe24e7
merge: add remove to the action hash
2006-08-22 19:12:09 -05:00
Matt Mackall
b3f3e7896e
merge: combine merge and get lists
2006-08-22 18:06:17 -05:00
Matt Mackall
97bb8b2e5a
merge: remove redundant if
2006-08-22 17:42:55 -05:00
Matt Mackall
849cf59e94
merge: eliminate mw manifestdict, do everything with m1
2006-08-22 17:26:44 -05:00
Matt Mackall
8ae551b4fc
merge: eliminate usage of m1 after working manifest creation
2006-08-22 17:20:09 -05:00
Matt Mackall
656a5f8eb1
merge: simplify working dir manifest generation
2006-08-22 17:08:38 -05:00
Matt Mackall
ccb62f0c64
merge: simplify some update logic
2006-08-22 16:47:27 -05:00
Matt Mackall
d4f0a394a2
merge: hoist partial code out of manifest loops
2006-08-22 16:23:29 -05:00
Matt Mackall
df3ced818f
merge: minor simplification
2006-08-22 16:12:54 -05:00
Matt Mackall
d746d64e0e
merge: rename mysterious variable
2006-08-21 14:25:56 -05:00
Matt Mackall
6d080c6780
merge: add backwards variable
2006-08-21 14:21:42 -05:00
Matt Mackall
975492a5a4
merge: consolidate dirstate updates
2006-08-15 23:17:06 -05:00
Matt Mackall
11dee4259d
merge: use file size stored in revlog index
...
Add size method to filelog to handle nodes with renames
2006-08-15 22:46:35 -05:00
Matt Mackall
6f3c141b47
merge: move forgets to the apply stage
2006-08-15 18:30:21 -05:00
Matt Mackall
69d93c90a9
trivial bool() cleanup
2006-08-15 18:12:36 -05:00
Matt Mackall
61c48232d9
merge: hoist some working manifest logic out of merge loop
2006-08-15 16:27:19 -05:00
Matt Mackall
dd967a0972
merge: working manifest new/changed
...
To remove dependence on m1 during manifest comparison, we distinguish between
new and changed states in mw.
2006-08-15 16:12:51 -05:00
Matt Mackall
86a0d1f25a
merge: factor out exec bit merge function
2006-08-15 15:58:10 -05:00
Matt Mackall
4483b407fd
Use revlog hash comparison technique in merge
2006-08-15 15:45:45 -05:00
Matt Mackall
e6c07820a7
Merge with crew
2006-08-14 14:42:15 -05:00
Matt Mackall
d492a3834e
merge: minor simplification
2006-08-14 14:14:08 -05:00
Vadim Gelfer
80d6f2f7c7
remove localrepository.changes.
...
use localrepository.status instead.
2006-08-12 16:40:12 -07:00
Matt Mackall
c676e5167a
Merge: use single objects for tracking manifests
2006-08-09 22:07:13 -05:00
Matt Mackall
f048c758d8
Merge: save away mode bit so that we don't need manifest later
2006-08-09 17:11:01 -05:00
Matt Mackall
7c0506a4f5
Merge manifest refactor work
2006-08-09 15:03:46 -05:00
Matt Mackall
55b6f733d9
Merge: combine force and forcemerge arguments
2006-08-08 10:56:48 -05:00
Matt Mackall
94db72708b
Merge: move most tests to the beginning
2006-08-08 10:35:19 -05:00
Matt Mackall
f8ef0497f7
Merge: refactor err and failedmerge -> unresolved
2006-08-08 09:26:00 -05:00
Matt Mackall
0b0ee1ba50
Refactor update locking slightly
2006-08-08 09:19:20 -05:00
Matt Mackall
60a6e68764
Merge: combine choose and moddirstate to partial
2006-08-08 09:11:16 -05:00
Matt Mackall
26928ff9de
Rename merge.allow -> merge.branchmerge
2006-08-07 23:53:04 -05:00
Matt Mackall
3dcc28a29a
Merge with crew
2006-08-07 16:47:06 -05:00
Matt Mackall
65b6faa1aa
Move merge code to its own module
...
Pull update and merge3 out of localrepo into merge.py
s/self/repo/
Add temporary API function in hg.py
Convert all users
2006-08-03 15:24:41 -05:00
Benoit Boissinot
36b97cfba0
fix errors reported by pychecker
...
mercurial/merge.py:174: No global (mode) found
mercurial/merge.py:253: No global (errno) found
2006-08-26 11:19:00 +02:00