Project

General

Profile

Actions

Patch #826

closed

Fix browsing mercurial repositories

Added by Frédéric Moulins over 16 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
Start date:
2008-03-11
Due date:
% Done:

0%

Estimated time:

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
    

Files

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

Updated by Thomas Lecavelier over 16 years ago

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

Actions #2

Updated by Jean-Philippe Lang over 16 years ago

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.

Actions #3

Updated by Jean-Philippe Lang over 16 years ago

  • 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.

Actions #4

Updated by Frédéric Moulins over 16 years ago

Works very well for me.

Thanks for the clarification !

Actions #5

Updated by Jean-Philippe Lang over 16 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF