Show More
@@ -1031,10 +1031,10 b' class queue:' | |||
|
1031 | 1031 | m = util.unique(mm) |
|
1032 | 1032 | r = util.unique(dd) |
|
1033 | 1033 | a = util.unique(aa) |
|
1034 |
|
|
|
1034 | c = [filter(matchfn, l) for l in (m, a, r, [], u)] | |
|
1035 | filelist = util.unique(c[0] + c[1] + c[2]) | |
|
1035 | 1036 | patch.diff(repo, patchparent, files=filelist, match=matchfn, |
|
1036 |
fp=patchf, changes= |
|
|
1037 | opts=self.diffopts()) | |
|
1037 | fp=patchf, changes=c, opts=self.diffopts()) | |
|
1038 | 1038 | patchf.close() |
|
1039 | 1039 | |
|
1040 | 1040 | repo.dirstate.setparents(*cparents) |
@@ -1082,7 +1082,8 b' class queue:' | |||
|
1082 | 1082 | message = msg |
|
1083 | 1083 | |
|
1084 | 1084 | self.strip(repo, top, update=False, backup='strip', wlock=wlock) |
|
1085 |
n = repo.commit(filelist, message, changes[1], |
|
|
1085 | n = repo.commit(filelist, message, changes[1], match=matchfn, | |
|
1086 | force=1, wlock=wlock) | |
|
1086 | 1087 | self.applied[-1] = statusentry(revlog.hex(n), patchfn) |
|
1087 | 1088 | self.applied_dirty = 1 |
|
1088 | 1089 | else: |
@@ -1527,7 +1528,11 b' def clone(ui, source, dest=None, **opts)' | |||
|
1527 | 1528 | if sr.mq.applied: |
|
1528 | 1529 | qbase = revlog.bin(sr.mq.applied[0].rev) |
|
1529 | 1530 | if not hg.islocal(dest): |
|
1530 | destrev = sr.parents(qbase)[0] | |
|
1531 | heads = dict.fromkeys(sr.heads()) | |
|
1532 | for h in sr.heads(qbase): | |
|
1533 | del heads[h] | |
|
1534 | destrev = heads.keys() | |
|
1535 | destrev.append(sr.changelog.parents(qbase)[0]) | |
|
1531 | 1536 | ui.note(_('cloning main repo\n')) |
|
1532 | 1537 | sr, dr = hg.clone(ui, sr, dest, |
|
1533 | 1538 | pull=opts['pull'], |
@@ -375,7 +375,7 b' class dirstate(object):' | |||
|
375 | 375 | |
|
376 | 376 | # walk all files by default |
|
377 | 377 | if not files: |
|
378 |
files = [ |
|
|
378 | files = ['.'] | |
|
379 | 379 | dc = self.map.copy() |
|
380 | 380 | else: |
|
381 | 381 | files = util.unique(files) |
@@ -31,8 +31,8 b' class localrepository(repo.repository):' | |||
|
31 | 31 | " here (.hg not found)")) |
|
32 | 32 | path = p |
|
33 | 33 | |
|
34 | self.path = os.path.join(path, ".hg") | |
|
35 | 34 | self.root = os.path.realpath(path) |
|
35 | self.path = os.path.join(self.root, ".hg") | |
|
36 | 36 | self.origroot = path |
|
37 | 37 | self.opener = util.opener(self.path) |
|
38 | 38 | self.wopener = util.opener(self.root) |
@@ -444,15 +444,15 b' def update(repo, node, branchmerge, forc' | |||
|
444 | 444 | wlock = working dir lock, if already held |
|
445 | 445 | """ |
|
446 | 446 | |
|
447 | if node is None: | |
|
448 | node = "tip" | |
|
449 | ||
|
450 | 447 | if not wlock: |
|
451 | 448 | wlock = repo.wlock() |
|
452 | 449 | |
|
450 | wc = repo.workingctx() | |
|
451 | if node is None: | |
|
452 | # tip of current branch | |
|
453 | node = repo.branchtags()[wc.branch()] | |
|
453 | 454 | overwrite = force and not branchmerge |
|
454 | 455 | forcemerge = force and branchmerge |
|
455 | wc = repo.workingctx() | |
|
456 | 456 | pl = wc.parents() |
|
457 | 457 | p1, p2 = pl[0], repo.changectx(node) |
|
458 | 458 | pa = p1.ancestor(p2) |
@@ -89,6 +89,18 b' sed -e "s/^\\(diff -r \\)\\([a-f0-9]* \\)/\\1' | |||
|
89 | 89 | -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
|
90 | 90 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/test.patch |
|
91 | 91 | |
|
92 | echo % empty qrefresh | |
|
93 | ||
|
94 | hg qrefresh -X a | |
|
95 | echo 'revision:' | |
|
96 | hg diff -r -2 -r -1 | |
|
97 | echo 'patch:' | |
|
98 | cat .hg/patches/test.patch | |
|
99 | echo 'working dir diff:' | |
|
100 | hg diff --nodates -q | |
|
101 | # restore things | |
|
102 | hg qrefresh | |
|
103 | ||
|
92 | 104 | echo % qpop |
|
93 | 105 | |
|
94 | 106 | hg qpop |
@@ -91,6 +91,17 b' diff -r xa' | |||
|
91 | 91 | @@ -1,1 +1,2 @@ a |
|
92 | 92 | a |
|
93 | 93 | +a |
|
94 | % empty qrefresh | |
|
95 | revision: | |
|
96 | patch: | |
|
97 | foo bar | |
|
98 | ||
|
99 | working dir diff: | |
|
100 | --- a/a | |
|
101 | +++ b/a | |
|
102 | @@ -1,1 +1,2 @@ a | |
|
103 | a | |
|
104 | +a | |
|
94 | 105 | % qpop |
|
95 | 106 | Patch queue now empty |
|
96 | 107 | % qpush |
General Comments 0
You need to be logged in to leave comments.
Login now