Patch #826

Fix browsing mercurial repositories

Added by Frédéric Moulins 149 days ago. Updated 142 days ago.

Status:Closed Start:2008-03-11
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:SCM
Target version:0.7

Description

Running redmine on linux, I wasn't able to browse a mercurial repository.

Listing entries using hg locate : * should use '/' to split entries path, not '\' ('\\'). * should filter files with glob:**. Restricting paths to a depth of 2 does not work for deep repository trees like :
README
images/delete.png
images/edit.png
sources/deep/tree/few/files.txt
sources/watchers_controller.rb

fix-mercurial-repo-browsing.patch - fix mercurial repo browsing, patch against #1224 (1 KB) Frédéric Moulins, 2008-03-11 00:46

Associated revisions

Revision 1228
Added by jplang 149 days ago

Fixes Mercurial browsing under unix-like os and for directory depth > 2 and (patch #826 by Frederic Moulins, slightly edited to preserve win32 compatibility).

History

2008-03-11 16:07 - Thomas Lecavelier

Patch successfully used by a user: http://www.redmine.org/boards/2/topics/show/26

2008-03-11 21:10 - Jean-Philippe Lang

Thanks for pointing out this problem.
I made slight changes to your patch to preserve win32 compatibility and committed it in r1228.

Here are the changes:

cmd << " 'glob:**'"

=> (makes it work under win32, but not sure for *nix)

cmd << " glob:**"

and

e = line.chomp.split('/')

=>

e = line.chomp.split(%r{[\/\\]})

Please, let me know if the first change is not ok.

2008-03-11 21:15 - Jean-Philippe Lang

  • Status changed from New to Resolved

In r1229, glob:** is quoted properly depending on the os.
It should work fine on both *nix and win32 os.

2008-03-12 10:18 - Frédéric Moulins

Works very well for me.

Thanks for the clarification !

2008-03-18 18:57 - Jean-Philippe Lang

  • Status changed from Resolved to Closed

Also available in: Atom PDF