Mercurial > hg
annotate tests/test-pull-update.t @ 18969:257afe5489d4
largefiles: improve repo wrapping detection
Before this patch, repo wrapping detection in "reposetup()" of
largefiles can detect only limited repo wrapping: replacing target
functions by another one named as "wrap".
So, it can't detect repo wrapping even in recommended style: replacing
"__class__" of repo by derived class.
This patch can detect repo wrapping in both styles below:
- replacing "__class__" of repo by derived class (recommended style):
class derived(repo.__class__):
def push(self, *args, **kwargs):
return super(derived, self).push(*args, **kwargs)
repo.__class__ = derived
- replacing function of repo by another one (not recommended style):
orgpush = repo.push
def push(*args, **kwargs):
return orgpush(*args, **kwargs)
repo.push = push
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 10 Apr 2013 02:27:35 +0900 |
parents | f2719b387380 |
children | 76df01e56e7f |
rev | line source |
---|---|
12279 | 1 $ hg init t |
2 $ cd t | |
3 $ echo 1 > foo | |
4 $ hg ci -Am m | |
5 adding foo | |
6 | |
7 $ cd .. | |
8 $ hg clone t tt | |
9 updating to branch default | |
10 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
11 $ cd tt | |
12 $ echo 1.1 > foo | |
13 $ hg ci -Am m | |
5080
73fdc8bd3ed8
Update on pull -u when heads were closed (fixes issue666).
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
14 |
12279 | 15 $ cd ../t |
16 $ echo 1.2 > foo | |
17 $ hg ci -Am m | |
18 | |
19 Should not update: | |
5080
73fdc8bd3ed8
Update on pull -u when heads were closed (fixes issue666).
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
20 |
12279 | 21 $ hg pull -u ../tt |
22 pulling from ../tt | |
23 searching for changes | |
24 adding changesets | |
25 adding manifests | |
26 adding file changes | |
27 added 1 changesets with 1 changes to 1 files (+1 heads) | |
14485
610873cf064a
Make pull -u behave like pull && update
Brendan Cully <brendan@kublai.com>
parents:
12279
diff
changeset
|
28 not updating: crosses branches (merge branches or update --check to force update) |
12279 | 29 |
30 $ cd ../tt | |
5080
73fdc8bd3ed8
Update on pull -u when heads were closed (fixes issue666).
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
31 |
12279 | 32 Should not update: |
33 | |
34 $ hg pull -u ../t | |
35 pulling from ../t | |
36 searching for changes | |
37 adding changesets | |
38 adding manifests | |
39 adding file changes | |
40 added 1 changesets with 1 changes to 1 files (+1 heads) | |
14485
610873cf064a
Make pull -u behave like pull && update
Brendan Cully <brendan@kublai.com>
parents:
12279
diff
changeset
|
41 not updating: crosses branches (merge branches or update --check to force update) |
5080
73fdc8bd3ed8
Update on pull -u when heads were closed (fixes issue666).
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
42 |
12279 | 43 $ HGMERGE=true hg merge |
44 merging foo | |
45 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
46 (branch merge, don't forget to commit) | |
47 $ hg ci -mm | |
48 | |
49 $ cd ../t | |
50 | |
51 Should work: | |
5080
73fdc8bd3ed8
Update on pull -u when heads were closed (fixes issue666).
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
52 |
12279 | 53 $ hg pull -u ../tt |
54 pulling from ../tt | |
55 searching for changes | |
56 adding changesets | |
57 adding manifests | |
58 adding file changes | |
59 added 1 changesets with 1 changes to 1 files (-1 heads) | |
60 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
61 | |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
14485
diff
changeset
|
62 $ cd .. |