Show More
@@ -949,7 +949,6 b' class localrepository(repo.repository):' | |||
|
949 | 949 | |
|
950 | 950 | # commit subs |
|
951 | 951 | if subs or removedsubs: |
|
952 | pstate = subrepo.substate(self['.']) | |
|
953 | 952 | state = wctx.substate.copy() |
|
954 | 953 | for s in sorted(subs): |
|
955 | 954 | sub = wctx.sub(s) |
@@ -957,19 +956,7 b' class localrepository(repo.repository):' | |||
|
957 | 956 | subrepo.subrelpath(sub)) |
|
958 | 957 | sr = sub.commit(cctx._text, user, date) |
|
959 | 958 | state[s] = (state[s][0], sr) |
|
960 | ||
|
961 | changed = False | |
|
962 | if len(pstate) != len(state): | |
|
963 | changed = True | |
|
964 | if not changed: | |
|
965 | for newstate in state: | |
|
966 | if state[newstate][1] != pstate[newstate]: | |
|
967 | changed = True | |
|
968 | if changed: | |
|
969 | 959 |
|
|
970 | elif (changes[0] == ['.hgsubstate'] and changes[1] == [] and | |
|
971 | changes[2] == []): | |
|
972 | return None | |
|
973 | 960 | |
|
974 | 961 | # Save commit message in case this transaction gets rolled back |
|
975 | 962 | # (e.g. by a pretxncommit hook). Leave the content alone on |
@@ -13,19 +13,6 b' hg = None' | |||
|
13 | 13 | |
|
14 | 14 | nullstate = ('', '', 'empty') |
|
15 | 15 | |
|
16 | ||
|
17 | def substate(ctx): | |
|
18 | rev = {} | |
|
19 | if '.hgsubstate' in ctx: | |
|
20 | try: | |
|
21 | for l in ctx['.hgsubstate'].data().splitlines(): | |
|
22 | revision, path = l.split(" ", 1) | |
|
23 | rev[path] = revision | |
|
24 | except IOError, err: | |
|
25 | if err.errno != errno.ENOENT: | |
|
26 | raise | |
|
27 | return rev | |
|
28 | ||
|
29 | 16 | def state(ctx, ui): |
|
30 | 17 | """return a state dict, mapping subrepo paths configured in .hgsub |
|
31 | 18 | to tuple: (source from .hgsub, revision from .hgsubstate, kind |
@@ -52,7 +39,15 b' def state(ctx, ui):' | |||
|
52 | 39 | for path, src in ui.configitems('subpaths'): |
|
53 | 40 | p.set('subpaths', path, src, ui.configsource('subpaths', path)) |
|
54 | 41 | |
|
55 | rev = substate(ctx) | |
|
42 | rev = {} | |
|
43 | if '.hgsubstate' in ctx: | |
|
44 | try: | |
|
45 | for l in ctx['.hgsubstate'].data().splitlines(): | |
|
46 | revision, path = l.split(" ", 1) | |
|
47 | rev[path] = revision | |
|
48 | except IOError, err: | |
|
49 | if err.errno != errno.ENOENT: | |
|
50 | raise | |
|
56 | 51 | |
|
57 | 52 | state = {} |
|
58 | 53 | for path, src in p[''].items(): |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now