# HG changeset patch # User Dirkjan Ochtman # Date 1229708942 -3600 # Node ID 9e186bda013d292b27f80548c33d44b6959f0741 # Parent 825631b6d2569a28ab188be39a6214693922e50c# Parent 6a49fa7674c1580775f3e93569c4dc7d72f9d31e merge with crew-stable diff -r 825631b6d256 -r 9e186bda013d mercurial/util.py --- a/mercurial/util.py Fri Dec 19 08:42:41 2008 +0100 +++ b/mercurial/util.py Fri Dec 19 18:49:02 2008 +0100 @@ -1902,13 +1902,12 @@ for root, dirs, files in os.walk(path, topdown=True, onerror=errhandler): if '.hg' in dirs: yield root # found a repository + qroot = os.path.join(root, '.hg', 'patches') + if os.path.isdir(os.path.join(qroot, '.hg')): + yield qroot # we have a patch queue repo here if recurse: # avoid recursing inside the .hg directory - # the mq repository is added in any case dirs.remove('.hg') - qroot = os.path.join(root, '.hg', 'patches') - if os.path.isdir(os.path.join(qroot, '.hg')): - yield qroot # we have a patch queue repo here else: dirs[:] = [] # don't descend further elif followsym: diff -r 825631b6d256 -r 9e186bda013d tests/test-hgwebdir.out --- a/tests/test-hgwebdir.out Fri Dec 19 08:42:41 2008 +0100 +++ b/tests/test-hgwebdir.out Fri Dec 19 18:49:02 2008 +0100 @@ -31,6 +31,7 @@ /b/ /coll/a/ +/coll/a/.hg/patches/ /coll/b/ /coll/c/ /rcoll/a/ @@ -115,6 +116,7 @@ /coll/a/ +/coll/a/.hg/patches/ /coll/b/ /coll/c/ @@ -138,6 +140,7 @@ /a/ +/a/.hg/patches/ /b/ /c/ diff -r 825631b6d256 -r 9e186bda013d tests/test-mq-qclone-http --- a/tests/test-mq-qclone-http Fri Dec 19 08:42:41 2008 +0100 +++ b/tests/test-mq-qclone-http Fri Dec 19 18:49:02 2008 +0100 @@ -22,6 +22,8 @@ cd .. +echo % test with recursive collection + cat > collections.conf < collections1.conf < collections2.conf <> $DAEMON_PIDS + +"$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw' + +hg qclone http://localhost:$HGPORT2/a d +hg --cwd d log --template "{desc}\n" +hg --cwd d qpush -a +hg --cwd d log --template "{desc}\n" diff -r 825631b6d256 -r 9e186bda013d tests/test-mq-qclone-http.out --- a/tests/test-mq-qclone-http.out Fri Dec 19 08:42:41 2008 +0100 +++ b/tests/test-mq-qclone-http.out Fri Dec 19 18:49:02 2008 +0100 @@ -3,6 +3,7 @@ [mq]: b.patch a b.patch +% test with recursive collection 200 Script output follows @@ -27,10 +28,12 @@ Now at: b.patch imported patch b.patch a +% test with normal collection 200 Script output follows /a/ +/a/.hg/patches/ requesting all changes adding changesets @@ -41,10 +44,37 @@ adding changesets adding manifests adding file changes -added 2 changesets with 2 changes to 2 files +added 1 changesets with 3 changes to 3 files updating working directory -2 files updated, 0 files merged, 0 files removed, 0 files unresolved +3 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved a -no patches in series +applying b.patch +Now at: b.patch +imported patch b.patch a +% test with old-style collection +200 Script output follows + + +/a/ +/a/.hg/patches/ + +requesting all changes +adding changesets +adding manifests +adding file changes +added 2 changesets with 2 changes to 2 files +requesting all changes +adding changesets +adding manifests +adding file changes +added 1 changesets with 3 changes to 3 files +updating working directory +3 files updated, 0 files merged, 0 files removed, 0 files unresolved +1 files updated, 0 files merged, 0 files removed, 0 files unresolved +a +applying b.patch +Now at: b.patch +imported patch b.patch +a