--- a/hgext/histedit.py Sun Apr 26 13:43:01 2015 -0400
+++ b/hgext/histedit.py Tue May 05 12:33:26 2015 -0500
@@ -747,7 +747,8 @@
elif goal == 'edit-plan':
state.read()
if not rules:
- comment = editcomment % (state.parentctx, node.short(state.topmost))
+ comment = editcomment % (node.short(state.parentctxnode),
+ node.short(state.topmost))
rules = ruleeditor(repo, ui, state.rules, comment)
else:
if rules == '-':
--- a/mercurial/subrepo.py Sun Apr 26 13:43:01 2015 -0400
+++ b/mercurial/subrepo.py Tue May 05 12:33:26 2015 -0500
@@ -517,7 +517,7 @@
flags = self.fileflags(name)
mode = 'x' in flags and 0755 or 0644
symlink = 'l' in flags
- archiver.addfile(self.wvfs.reljoin(prefix, self._path, name),
+ archiver.addfile(prefix + self._path + '/' + name,
mode, symlink, self.filedata(name))
self.ui.progress(_('archiving (%s)') % relpath, i + 1,
unit=_('files'), total=total)
@@ -731,8 +731,7 @@
for subpath in ctx.substate:
s = subrepo(ctx, subpath)
submatch = matchmod.narrowmatcher(subpath, match)
- total += s.archive(
- archiver, self.wvfs.reljoin(prefix, self._path), submatch)
+ total += s.archive(archiver, prefix + self._path + '/', submatch)
return total
@annotatesubrepoerror
@@ -1675,7 +1674,7 @@
data = info.linkname
else:
data = tar.extractfile(info).read()
- archiver.addfile(self.wvfs.reljoin(prefix, self._path, info.name),
+ archiver.addfile(prefix + self._path + '/' + info.name,
info.mode, info.issym(), data)
total += 1
self.ui.progress(_('archiving (%s)') % relpath, i + 1,
--- a/tests/test-histedit-edit.t Sun Apr 26 13:43:01 2015 -0400
+++ b/tests/test-histedit-edit.t Tue May 05 12:33:26 2015 -0500
@@ -70,12 +70,51 @@
Make changes as needed, you may commit or record as needed now.
When you are finished, run hg histedit --continue to resume.
-edit the plan
+edit the plan via the editor
+ $ cat >> ../editplan.sh <<EOF
+ > cat > \$1 <<EOF2
+ > drop e860deea161a e
+ > drop 652413bf663e f
+ > drop 3c6a8ed2ebe8 g
+ > EOF2
+ > EOF
+ $ chmod a+x ../editplan.sh
+ $ HGEDITOR=../editplan.sh hg histedit --edit-plan
+ $ cat .hg/histedit-state
+ v1
+ 055a42cdd88768532f9cf79daa407fc8d138de9b
+ 3c6a8ed2ebe862cc949d2caa30775dd6f16fb799
+ False
+ 3
+ drop
+ e860deea161a2f77de56603b340ebbb4536308ae
+ drop
+ 652413bf663ef2a641cab26574e46d5f5a64a55a
+ drop
+ 3c6a8ed2ebe862cc949d2caa30775dd6f16fb799
+ 0
+ strip-backup/177f92b77385-0ebe6a8f-histedit.hg
+
+edit the plan via --commands
$ hg histedit --edit-plan --commands - 2>&1 << EOF
> edit e860deea161a e
> pick 652413bf663e f
> drop 3c6a8ed2ebe8 g
> EOF
+ $ cat .hg/histedit-state
+ v1
+ 055a42cdd88768532f9cf79daa407fc8d138de9b
+ 3c6a8ed2ebe862cc949d2caa30775dd6f16fb799
+ False
+ 3
+ edit
+ e860deea161a2f77de56603b340ebbb4536308ae
+ pick
+ 652413bf663ef2a641cab26574e46d5f5a64a55a
+ drop
+ 3c6a8ed2ebe862cc949d2caa30775dd6f16fb799
+ 0
+ strip-backup/177f92b77385-0ebe6a8f-histedit.hg
Go at a random point and try to continue
--- a/tests/test-subrepo-deep-nested-change.t Sun Apr 26 13:43:01 2015 -0400
+++ b/tests/test-subrepo-deep-nested-change.t Tue May 05 12:33:26 2015 -0500
@@ -309,21 +309,17 @@
Exclude normal files from main and sub-sub repo
- $ hg --config extensions.largefiles= archive -S -X '**.txt' ../archive_lf
- $ find ../archive_lf | sort
- ../archive_lf
- ../archive_lf/.hgsub
- ../archive_lf/.hgsubstate
- ../archive_lf/large.bin
- ../archive_lf/main
- ../archive_lf/sub1
- ../archive_lf/sub1/.hgsub
- ../archive_lf/sub1/.hgsubstate
- ../archive_lf/sub1/sub1
- ../archive_lf/sub1/sub2
- ../archive_lf/sub1/sub2/large.bin
- ../archive_lf/sub1/sub2/sub2
- $ rm -rf ../archive_lf
+ $ hg --config extensions.largefiles= archive -S -X '**.txt' ../archive_lf.tgz
+ $ tar -tzf ../archive_lf.tgz | sort
+ archive_lf/.hgsub
+ archive_lf/.hgsubstate
+ archive_lf/large.bin
+ archive_lf/main
+ archive_lf/sub1/.hgsub
+ archive_lf/sub1/.hgsubstate
+ archive_lf/sub1/sub1
+ archive_lf/sub1/sub2/large.bin
+ archive_lf/sub1/sub2/sub2
Include normal files from within a largefiles subrepo
--- a/tests/test-subrepo-git.t Sun Apr 26 13:43:01 2015 -0400
+++ b/tests/test-subrepo-git.t Tue May 05 12:33:26 2015 -0500
@@ -325,6 +325,14 @@
../archive_x/s
../archive_x/s/g
+ $ hg -R ../tc archive -S ../archive.tgz 2>/dev/null
+ $ tar -tzf ../archive.tgz | sort
+ archive/.hg_archival.txt
+ archive/.hgsub
+ archive/.hgsubstate
+ archive/a
+ archive/s/g
+
create nested repo
$ cd ..
--- a/tests/test-subrepo-recursion.t Sun Apr 26 13:43:01 2015 -0400
+++ b/tests/test-subrepo-recursion.t Tue May 05 12:33:26 2015 -0500
@@ -434,6 +434,18 @@
cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob)
#endif
+Archive + subrepos uses '/' for all component separators
+
+ $ tar -tzf ../archive.tar.gz | sort
+ archive/.hg_archival.txt
+ archive/.hgsub
+ archive/.hgsubstate
+ archive/foo/.hgsub
+ archive/foo/.hgsubstate
+ archive/foo/bar/z.txt
+ archive/foo/y.txt
+ archive/x.txt
+
The newly cloned subrepos contain no working copy:
$ hg -R foo summary