#10709 closed defect (duplicate)
Zip Download in TracMercurial is wrong
Reported by: | anonymous | Owned by: | Christian Boos |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | version control | Version: | 0.12.3 |
Severity: | normal | Keywords: | zip |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
A downloaded zip archive from the browser includes only the files which were modified in the current changeset and not all files representing the current changeset.
Attachments (0)
Change History (15)
comment:1 by , 13 years ago
Keywords: | zip added |
---|
comment:2 by , 13 years ago
comment:4 by , 12 years ago
Priority: | normal → high |
---|
Verified. Would be nice to fix this so that we can enable the download for the plugin itself.
follow-up: 8 comment:5 by , 12 years ago
same thing happen for git repo I don't know how about svn, does it only work on svn? It seems in the implementation, it implemented /trunk, /branches/*,/tags/* doesn't seems included the git file structures
follow-up: 9 comment:6 by , 12 years ago
Here is the issue. The SVN backend is ignoring old_rev
if new_node.isdir
: http://trac.edgewall.org/browser/trunk/tracopt/versioncontrol/svn/svn_fs.py?rev=11493#L672
comment:7 by , 12 years ago
Placing old_node = self.get_node(old_path, 0)
at this line solves this issue.
However, there might be a better way because it seems really slow.
comment:8 by , 12 years ago
Replying to huang:
same thing happen for git repo I don't know how about svn, does it only work on svn?
Yes
It seems in the implementation, it implemented /trunk, /branches/*,/tags/* doesn't seems included the git file structures
Just set downloadable_paths = *
in trac.ini if using git/hg.
comment:9 by , 12 years ago
Replying to schlamar:
Here is the issue. The SVN backend is ignoring
old_rev
ifnew_node.isdir
: http://trac.edgewall.org/browser/trunk/tracopt/versioncontrol/svn/svn_fs.py?rev=11493#L672
Ah, not really… :-) The difference is actually old_path=%2F
. If this is in the request, the SVN backend will download every file which is present in the selected changeset. If not, it will download only the files which were changed in the selected changeset.
See http://trac.edgewall.org/changeset/11711/?format=zip vs. http://trac.edgewall.org/changeset/11711/trunk?old_path=%2F&format=zip.
Here is the deal:
SVN is triggering the "special case for download" while hg is not, see
comment:10 by , 12 years ago
Ahh, normalize_path
is transforming '/'
to an empty string which triggers then the case "revert to Changeset" in the next few lines:
http://trac.edgewall.org/browser/trunk/trac/versioncontrol/web_ui/changeset.py?rev=11711#L258
comment:11 by , 12 years ago
IMO triggering the "special case for download" if old_path == '/'
was a bad design decision back in #238. I would introduce a special request argument like download=1
to trigger this case.
comment:12 by , 12 years ago
Cc: | added |
---|---|
Component: | plugin/mercurial → timeline |
Milestone: | plugin - mercurial |
Changed the component as this should be fixed in Trac itself.
comment:13 by , 12 years ago
Component: | timeline → version control |
---|
comment:14 by , 12 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
If this is only about the "download .zip from TracBrowser" feature, this should be fixed now by the changes related to #8919.
There are still a few glitches for downloading .zip corresponding to changesets.
I too ran into this problem. I discovered you can work around this by diffing current revision with revision 0 and then downloading changeset though it seems like this should be unnecessary