Compare commits
45 Commits
feature.be
...
feature.do
Author | SHA1 | Date | |
---|---|---|---|
|
d7857c5126 | ||
|
06c57f7da6 | ||
|
4d5418a601 | ||
|
95cc7f627f | ||
|
b9407f6aee | ||
|
d079838818 | ||
|
81ce4688df | ||
|
ee33cc1832 | ||
|
82bb18fe10 | ||
|
8987ca7db6 | ||
|
8066fd8982 | ||
|
a96d8c05a7 | ||
|
4238a5dd50 | ||
|
94da55d15e | ||
|
09979b8551 | ||
|
5b82efa0be | ||
|
8502a36481 | ||
|
be4774c95c | ||
|
bbf1a1882a | ||
|
9644784a79 | ||
|
1940d5c0b5 | ||
|
7c7e3cd1f1 | ||
|
3e2f95a152 | ||
|
92de88ba13 | ||
|
5322cdf609 | ||
|
02d0f0923e | ||
|
765a86ba90 | ||
|
34309e34c3 | ||
|
2176d1cde2 | ||
|
45d53e8d21 | ||
|
801af66a4e | ||
|
df6ffdf420 | ||
|
b3368071ac | ||
|
67b80ee11c | ||
|
0afa07b2bd | ||
|
4ee3d471fe | ||
|
29c7fed81b | ||
|
fb62061e5a | ||
|
9b92b7139f | ||
|
5ea4b02205 | ||
|
12d3eef3d1 | ||
|
ecef510f78 | ||
|
4976c20935 | ||
|
5553c37ccd | ||
|
346b2c6cf8 |
20
NEWS.mdtext
20
NEWS.mdtext
@@ -2,15 +2,35 @@
|
|||||||
|
|
||||||
## New Features
|
## New Features
|
||||||
|
|
||||||
|
- Mercurial source views now show parent revisions (if any) and detailed change information
|
||||||
|
- File download URLs now contain the file name rather than the upload id; old links still work though (issue 686)
|
||||||
|
|
||||||
## Bugfixes
|
## Bugfixes
|
||||||
|
|
||||||
- monotone zip archive entries now all carry the revision date as mtime (issue 645)
|
- monotone zip archive entries now all carry the revision date as mtime (issue 645)
|
||||||
- Timeline only displays filter options for items a user has actually access to (issue 655)
|
- Timeline only displays filter options for items a user has actually access to (issue 655)
|
||||||
|
- The log, tags and branches parsers for Mercurial are more robust now (issue 663)
|
||||||
|
- Fix SSH public key parsing issues and improve the check for existing, uploaded keys (issue 679)
|
||||||
|
- Let the SVN command line client not store the login credentials we give him as arguments
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
## Translations
|
## Translations
|
||||||
|
|
||||||
|
# InDefero 1.1.2 - Thu May 26 07:42:25 2011 UTC
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
- Fix tags extraction from git repository (issue 675)
|
||||||
|
- Fix SSH validation method (issue 671)
|
||||||
|
- Fix malformed URL in the RSS (issue 666)
|
||||||
|
- Fix validateRevision call for Mercurial Scm (issue 657)
|
||||||
|
|
||||||
|
## Translations
|
||||||
|
|
||||||
|
- Missing word in French translation (issue 672)
|
||||||
|
- Update Spanish translation
|
||||||
|
|
||||||
# InDefero 1.1.1 - Mon Mar 28 15:52 2011 UTC
|
# InDefero 1.1.1 - Mon Mar 28 15:52 2011 UTC
|
||||||
|
|
||||||
## Bugfixes
|
## Bugfixes
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008-2010 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008-2010 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008-2010 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008-2010 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008-2010 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2010 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,19 +3,19 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2010 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# Plume Framework is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Lesser General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation; either version 2.1 of the License, or
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
#
|
#
|
||||||
# Plume Framework is distributed in the hope that it will be useful,
|
# InDefero is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU Lesser General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU Lesser General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#
|
#
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -51,68 +51,68 @@ class IDF_Form_ProjectConf extends Pluf_Form
|
|||||||
),
|
),
|
||||||
'widget' => 'Pluf_Form_Widget_TextareaInput',
|
'widget' => 'Pluf_Form_Widget_TextareaInput',
|
||||||
));
|
));
|
||||||
|
|
||||||
// Logo part
|
// Logo part
|
||||||
$upload_path = Pluf::f('upload_path', false);
|
$upload_path = Pluf::f('upload_path', false);
|
||||||
if (false === $upload_path) {
|
if (false === $upload_path) {
|
||||||
throw new Pluf_Exception_SettingError(__('The "upload_path" configuration variable was not set.'));
|
throw new Pluf_Exception_SettingError(__('The "upload_path" configuration variable was not set.'));
|
||||||
}
|
}
|
||||||
$upload_path .= '/' . $this->project->shortname;
|
$upload_path .= '/' . $this->project->shortname;
|
||||||
$filename = '/%s';
|
$filename = '/%s';
|
||||||
$this->fields['logo'] = new Pluf_Form_Field_File(array('required' => false,
|
$this->fields['logo'] = new Pluf_Form_Field_File(array('required' => false,
|
||||||
'label' => __('Update the logo'),
|
'label' => __('Update the logo'),
|
||||||
'initial' => '',
|
'initial' => '',
|
||||||
'help_text' => __('The logo must be a picture with a size of 32 by 32.'),
|
'help_text' => __('The logo must be a picture with a size of 32 by 32.'),
|
||||||
'max_size' => Pluf::f('max_upload_size', 5 * 1024),
|
'max_size' => Pluf::f('max_upload_size', 5 * 1024),
|
||||||
'move_function_params' =>
|
'move_function_params' =>
|
||||||
array('upload_path' => $upload_path,
|
array('upload_path' => $upload_path,
|
||||||
'upload_path_create' => true,
|
'upload_path_create' => true,
|
||||||
'file_name' => $filename,
|
'file_name' => $filename,
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->fields['logo_remove'] = new Pluf_Form_Field_Boolean(array('required' => false,
|
$this->fields['logo_remove'] = new Pluf_Form_Field_Boolean(array('required' => false,
|
||||||
'label' => __('Remove the current logo'),
|
'label' => __('Remove the current logo'),
|
||||||
'initial' => false,
|
'initial' => false,
|
||||||
'widget' => 'Pluf_Form_Widget_CheckboxInput',
|
'widget' => 'Pluf_Form_Widget_CheckboxInput',
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If we have uploaded a file, but the form failed remove it.
|
* If we have uploaded a file, but the form failed remove it.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function failed()
|
function failed()
|
||||||
{
|
{
|
||||||
if (!empty($this->cleaned_data['logo'])
|
if (!empty($this->cleaned_data['logo'])
|
||||||
&& file_exists(Pluf::f('upload_path').'/'.$this->cleaned_data['logo'])) {
|
&& file_exists(Pluf::f('upload_path').'/'.$this->cleaned_data['logo'])) {
|
||||||
unlink(Pluf::f('upload_path').'/'.$this->cleaned_data['logo']);
|
unlink(Pluf::f('upload_path').'/'.$this->cleaned_data['logo']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function clean()
|
public function clean()
|
||||||
{
|
{
|
||||||
if (!isset($this->cleaned_data['logo_remove'])) {
|
if (!isset($this->cleaned_data['logo_remove'])) {
|
||||||
$this->cleaned_data['logo_remove'] = false;
|
$this->cleaned_data['logo_remove'] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->cleaned_data;
|
return $this->cleaned_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function clean_logo()
|
public function clean_logo()
|
||||||
{
|
{
|
||||||
if (empty($this->cleaned_data['logo'])) {
|
if (empty($this->cleaned_data['logo'])) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$meta = getimagesize(Pluf::f('upload_path') . '/' . $this->project->shortname . $this->cleaned_data['logo']);
|
$meta = getimagesize(Pluf::f('upload_path') . '/' . $this->project->shortname . $this->cleaned_data['logo']);
|
||||||
|
|
||||||
if ($meta === false) {
|
if ($meta === false) {
|
||||||
throw new Pluf_Form_Invalid("Could not determine the size of the uploaded picture.");
|
throw new Pluf_Form_Invalid(__('Could not determine the size of the uploaded picture.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($meta[0] !== 32 || $meta[1] !== 32) {
|
if ($meta[0] !== 32 || $meta[1] !== 32) {
|
||||||
throw new Pluf_Form_Invalid("The picture must have a size of 32 by 32.");
|
throw new Pluf_Form_Invalid(__('The picture must have a size of 32 by 32.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->cleaned_data['logo'];
|
return $this->cleaned_data['logo'];
|
||||||
@@ -121,13 +121,13 @@ class IDF_Form_ProjectConf extends Pluf_Form
|
|||||||
public function save($commit=true)
|
public function save($commit=true)
|
||||||
{
|
{
|
||||||
$conf = $this->project->getConf();
|
$conf = $this->project->getConf();
|
||||||
|
|
||||||
// Basic part
|
// Basic part
|
||||||
$this->project->name = $this->cleaned_data['name'];
|
$this->project->name = $this->cleaned_data['name'];
|
||||||
$this->project->shortdesc = $this->cleaned_data['shortdesc'];
|
$this->project->shortdesc = $this->cleaned_data['shortdesc'];
|
||||||
$this->project->description = $this->cleaned_data['description'];
|
$this->project->description = $this->cleaned_data['description'];
|
||||||
$this->project->update();
|
$this->project->update();
|
||||||
|
|
||||||
// Logo part
|
// Logo part
|
||||||
if ($this->cleaned_data['logo'] !== "") {
|
if ($this->cleaned_data['logo'] !== "") {
|
||||||
$conf->setVal('logo', $this->cleaned_data['logo']);
|
$conf->setVal('logo', $this->cleaned_data['logo']);
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -52,7 +52,7 @@ class IDF_Form_ReviewFileComment extends Pluf_Form
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
$this->fields['content'] = new Pluf_Form_Field_Varchar(
|
$this->fields['content'] = new Pluf_Form_Field_Varchar(
|
||||||
array('required' => true,
|
array('required' => false,
|
||||||
'label' => __('General comment'),
|
'label' => __('General comment'),
|
||||||
'initial' => '',
|
'initial' => '',
|
||||||
'widget' => 'Pluf_Form_Widget_TextareaInput',
|
'widget' => 'Pluf_Form_Widget_TextareaInput',
|
||||||
@@ -96,24 +96,40 @@ class IDF_Form_ReviewFileComment extends Pluf_Form
|
|||||||
*/
|
*/
|
||||||
public function clean()
|
public function clean()
|
||||||
{
|
{
|
||||||
foreach ($this->files as $filename => $def) {
|
$isOk = false;
|
||||||
if (!empty($this->cleaned_data[md5($filename)])) {
|
|
||||||
return $this->cleaned_data;
|
foreach($this->files as $filename => $def) {
|
||||||
|
$this->cleaned_data[md5($filename)] = trim($this->cleaned_data[md5($filename)]);
|
||||||
|
if(!empty($this->cleaned_data[md5($filename)])) {
|
||||||
|
$isOk = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new Pluf_Form_Invalid(__('You need to provide comments on at least one file.'));
|
|
||||||
|
if(!empty($this->cleaned_data['content'])) {
|
||||||
|
$isOk = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$isOk) {
|
||||||
|
throw new Pluf_Form_Invalid(__('You need to provide your general comment about the proposal, or comments on at least one file.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->cleaned_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
function clean_content()
|
function clean_content()
|
||||||
{
|
{
|
||||||
$content = trim($this->cleaned_data['content']);
|
$content = trim($this->cleaned_data['content']);
|
||||||
if (!$this->show_full and strlen($content) == 0) {
|
if(empty($content)) {
|
||||||
throw new Pluf_Form_Invalid(__('You need to provide your general comment about the proposal.'));
|
if ($this->fields['status']->initial != $this->fields['status']->value) {
|
||||||
|
return __('The status have been updated.');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return $content;
|
||||||
}
|
}
|
||||||
return $content;
|
|
||||||
|
throw new Pluf_Form_Invalid(__('This field is required.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save the model in the database.
|
* Save the model in the database.
|
||||||
*
|
*
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -317,8 +317,15 @@ class IDF_Form_UserAccount extends Pluf_Form
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preg_match('#^ssh\-[a-z]{3}\s\S+(\s\S+)?$#', $key)) {
|
$keysearch = '';
|
||||||
$key = str_replace(array("\n", "\r"), '', $key);
|
if (preg_match('#^(ssh\-(?:dss|rsa)\s+\S+)(.*)#', $key, $m)) {
|
||||||
|
$basekey = preg_replace('/\s+/', ' ', $m[1]);
|
||||||
|
$comment = trim(preg_replace('/[\r\n]/', ' ', $m[2]));
|
||||||
|
|
||||||
|
$keysearch = $basekey.'%';
|
||||||
|
$key = $basekey;
|
||||||
|
if (!empty($comment))
|
||||||
|
$key .= ' '.$comment;
|
||||||
|
|
||||||
if (Pluf::f('idf_strong_key_check', false)) {
|
if (Pluf::f('idf_strong_key_check', false)) {
|
||||||
|
|
||||||
@@ -337,7 +344,9 @@ class IDF_Form_UserAccount extends Pluf_Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (preg_match('#^\[pubkey [^\]]+\]\s*\S+\s*\[end\]$#', $key)) {
|
else if (preg_match('#^\[pubkey [^\]]+\]\s*(\S+)\s*\[end\]$#', $key, $m)) {
|
||||||
|
$keysearch = '%'.$m[1].'%';
|
||||||
|
|
||||||
if (Pluf::f('idf_strong_key_check', false)) {
|
if (Pluf::f('idf_strong_key_check', false)) {
|
||||||
|
|
||||||
// if monotone can read it, it should be valid
|
// if monotone can read it, it should be valid
|
||||||
@@ -367,7 +376,7 @@ class IDF_Form_UserAccount extends Pluf_Form
|
|||||||
if ($user) {
|
if ($user) {
|
||||||
$ruser = Pluf::factory('Pluf_User', $user);
|
$ruser = Pluf::factory('Pluf_User', $user);
|
||||||
if ($ruser->id > 0) {
|
if ($ruser->id > 0) {
|
||||||
$sql = new Pluf_SQL('content=%s', array($key));
|
$sql = new Pluf_SQL('content LIKE %s AND user=%s', array($keysearch, $ruser->id));
|
||||||
$keys = Pluf::factory('IDF_Key')->getList(array('filter' => $sql->gen()));
|
$keys = Pluf::factory('IDF_Key')->getList(array('filter' => $sql->gen()));
|
||||||
if (count($keys) > 0) {
|
if (count($keys) > 0) {
|
||||||
throw new Pluf_Form_Invalid(
|
throw new Pluf_Form_Invalid(
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -80,7 +80,10 @@ class IDF_Key extends Pluf_Model
|
|||||||
if (preg_match('#^\[pubkey ([^\]]+)\]\s*(\S+)\s*\[end\]$#', $this->content, $m)) {
|
if (preg_match('#^\[pubkey ([^\]]+)\]\s*(\S+)\s*\[end\]$#', $this->content, $m)) {
|
||||||
return array('mtn', $m[1], $m[2]);
|
return array('mtn', $m[1], $m[2]);
|
||||||
}
|
}
|
||||||
else if (preg_match('#^ssh\-[a-z]{3}\s(\S+)(?:\s(\S+))?$#', $this->content, $m)) {
|
else if (preg_match('#^ssh\-(?:dss|rsa)\s(\S+)(?:\s(.*))?$#', $this->content, $m)) {
|
||||||
|
if (!isset($m[2])) {
|
||||||
|
$m[2] = "";
|
||||||
|
}
|
||||||
return array('ssh', $m[2], $m[1]);
|
return array('ssh', $m[2], $m[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
63
src/IDF/Migrations/18DownloadMD5.php
Normal file
63
src/IDF/Migrations/18DownloadMD5.php
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
/* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||||
|
/*
|
||||||
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
|
# This file is part of InDefero, an open source project management application.
|
||||||
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
|
#
|
||||||
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# InDefero is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
#
|
||||||
|
# ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add the md5 column for the download model.
|
||||||
|
*/
|
||||||
|
|
||||||
|
function IDF_Migrations_18DownloadMD5_up($params=null)
|
||||||
|
{
|
||||||
|
// Add the row
|
||||||
|
$table = Pluf::factory('IDF_Upload')->getSqlTable();
|
||||||
|
$sql = array();
|
||||||
|
$sql['PostgreSQL'] = 'ALTER TABLE '.$table.' ADD COLUMN "md5" VARCHAR(32) DEFAULT \'\'';
|
||||||
|
$sql['MySQL'] = 'ALTER TABLE '.$table.' ADD COLUMN `md5` VARCHAR(32) DEFAULT \'\'';
|
||||||
|
$db = Pluf::db();
|
||||||
|
$engine = Pluf::f('db_engine');
|
||||||
|
if (!isset($sql[$engine])) {
|
||||||
|
throw new Exception('SQLite complex migration not supported.');
|
||||||
|
}
|
||||||
|
$db->execute($sql[$engine]);
|
||||||
|
|
||||||
|
// Process md5 of already uploaded file
|
||||||
|
$files = Pluf::factory('IDF_Upload')->getList();
|
||||||
|
foreach ($files as $f) {
|
||||||
|
$f->md5 = md5_file (Pluf::f('upload_path') . '/' . $f->get_project()->shortname . '/files/' . $f->file);
|
||||||
|
$f->update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function IDF_Migrations_18DownloadMD5_down($params=null)
|
||||||
|
{
|
||||||
|
// Remove the row
|
||||||
|
$table = Pluf::factory('IDF_Upload')->getSqlTable();
|
||||||
|
$sql = array();
|
||||||
|
$sql['PostgreSQL'] = 'ALTER TABLE '.$table.' DROP COLUMN "md5"';
|
||||||
|
$sql['MySQL'] = 'ALTER TABLE '.$table.' DROP COLUMN `md5`';
|
||||||
|
$db = Pluf::db();
|
||||||
|
$engine = Pluf::f('db_engine');
|
||||||
|
if (!isset($sql[$engine])) {
|
||||||
|
throw new Exception('SQLite complex migration not supported.');
|
||||||
|
}
|
||||||
|
$db->execute($sql[$engine]);
|
||||||
|
}
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2010 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
-- ***** BEGIN LICENSE BLOCK *****
|
-- ***** BEGIN LICENSE BLOCK *****
|
||||||
-- This file is part of InDefero, an open source project management application.
|
-- This file is part of InDefero, an open source project management application.
|
||||||
-- Copyright (C) 2011 Céondo Ltd and contributors.
|
-- Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
-- Copyright (C) 2010 Thomas Keller <me@thomaskeller.biz>
|
-- Copyright (C) 2010 Thomas Keller <me@thomaskeller.biz>
|
||||||
-- Richard Levitte <richard@levitte.org>
|
-- Richard Levitte <richard@levitte.org>
|
||||||
--
|
--
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
-- ***** BEGIN LICENSE BLOCK *****
|
-- ***** BEGIN LICENSE BLOCK *****
|
||||||
-- This file is part of InDefero, an open source project management application.
|
-- This file is part of InDefero, an open source project management application.
|
||||||
-- Copyright (C) 2011 Céondo Ltd and contributors.
|
-- Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
--
|
--
|
||||||
-- InDefero is free software; you can redistribute it and/or modify
|
-- InDefero is free software; you can redistribute it and/or modify
|
||||||
-- it under the terms of the GNU General Public License as published by
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
-- ***** BEGIN LICENSE BLOCK *****
|
-- ***** BEGIN LICENSE BLOCK *****
|
||||||
-- This file is part of InDefero, an open source project management application.
|
-- This file is part of InDefero, an open source project management application.
|
||||||
-- Copyright (C) 2011 Céondo Ltd and contributors.
|
-- Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
--
|
--
|
||||||
-- InDefero is free software; you can redistribute it and/or modify
|
-- InDefero is free software; you can redistribute it and/or modify
|
||||||
-- it under the terms of the GNU General Public License as published by
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -209,7 +209,7 @@ class IDF_Scm_Git extends IDF_Scm
|
|||||||
return $this->cache['tags'];
|
return $this->cache['tags'];
|
||||||
}
|
}
|
||||||
$cmd = Pluf::f('idf_exec_cmd_prefix', '')
|
$cmd = Pluf::f('idf_exec_cmd_prefix', '')
|
||||||
.sprintf('GIT_DIR=%s %s for-each-ref --format="%%(taggerdate:iso)%%(committerdate:iso) %%(objectname) %%(refname)" refs/tags',
|
.sprintf('GIT_DIR=%s %s for-each-ref --format="%%(objectname) %%(refname)" refs/tags',
|
||||||
escapeshellarg($this->repo),
|
escapeshellarg($this->repo),
|
||||||
Pluf::f('git_path', 'git'));
|
Pluf::f('git_path', 'git'));
|
||||||
self::exec('IDF_Scm_Git::getTags', $cmd, $out, $return);
|
self::exec('IDF_Scm_Git::getTags', $cmd, $out, $return);
|
||||||
@@ -221,15 +221,12 @@ class IDF_Scm_Git extends IDF_Scm
|
|||||||
rsort($out);
|
rsort($out);
|
||||||
$res = array();
|
$res = array();
|
||||||
foreach ($out as $b) {
|
foreach ($out as $b) {
|
||||||
$elts = explode(' ', $b, 5);
|
$elts = explode(' ', $b, 2);
|
||||||
$tag = substr(trim($elts[4]), 10);
|
$tag = substr(trim($elts[1]), 10); // Remove refs/tags/ prefix
|
||||||
if (false !== strpos($tag, '/')) {
|
$res[$tag] = '';
|
||||||
$res[$elts[3]] = $b;
|
|
||||||
} else {
|
|
||||||
$res[$tag] = '';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$this->cache['tags'] = $res;
|
$this->cache['tags'] = $res;
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -22,19 +22,77 @@
|
|||||||
# ***** END LICENSE BLOCK ***** */
|
# ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mercurial utils.
|
* A simple RAII helper that manages style files to format hg's log output
|
||||||
|
*/
|
||||||
|
class IDF_Scm_Mercurial_LogStyle
|
||||||
|
{
|
||||||
|
const FULL_LOG = 1;
|
||||||
|
const CHANGES = 2;
|
||||||
|
|
||||||
|
public function __construct($type)
|
||||||
|
{
|
||||||
|
$this->file = tempnam(Pluf::f('tmp_folder'), 'hg-log-style-');
|
||||||
|
|
||||||
|
if ($type == self::FULL_LOG) {
|
||||||
|
$style = 'changeset = "'
|
||||||
|
. 'changeset: {node|short}\n'
|
||||||
|
. 'branch: {branch}\n'
|
||||||
|
. 'author: {author}\n'
|
||||||
|
. 'date: {date|isodate}\n'
|
||||||
|
. 'parents: {parents}\n\n'
|
||||||
|
. '{desc}\n'
|
||||||
|
. '\0\n"'
|
||||||
|
. "\n"
|
||||||
|
. 'parent = "{node|short} "'
|
||||||
|
. "\n";
|
||||||
|
} elseif ($type == self::CHANGES) {
|
||||||
|
$style = 'changeset = "'
|
||||||
|
. 'file_mods: {file_mods}\n'
|
||||||
|
. 'file_adds: {file_adds}\n'
|
||||||
|
. 'file_dels: {file_dels}\n'
|
||||||
|
. 'file_copies: {file_copies}\n\n'
|
||||||
|
. '\0\n"'
|
||||||
|
. "\n"
|
||||||
|
. 'file_mod = "{file_mod}\0"'
|
||||||
|
. "\n"
|
||||||
|
. 'file_add = "{file_add}\0"'
|
||||||
|
. "\n"
|
||||||
|
. 'file_del = "{file_del}\0"'
|
||||||
|
. "\n"
|
||||||
|
. 'file_copy = "{name}\0{source}\0"'
|
||||||
|
. "\n";
|
||||||
|
} else {
|
||||||
|
throw new IDF_Scm_Exception('invalid type ' . $type);
|
||||||
|
}
|
||||||
|
|
||||||
|
file_put_contents($this->file, $style);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __destruct()
|
||||||
|
{
|
||||||
|
@unlink($this->file);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get()
|
||||||
|
{
|
||||||
|
return $this->file;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Main SCM class for Mercurial
|
||||||
*
|
*
|
||||||
|
* Note: Some commands take a --debug option, this is not lousy coding, but
|
||||||
|
* totally wanted, as hg returns additional / different data in this
|
||||||
|
* mode on which this largely depends.
|
||||||
*/
|
*/
|
||||||
class IDF_Scm_Mercurial extends IDF_Scm
|
class IDF_Scm_Mercurial extends IDF_Scm
|
||||||
{
|
{
|
||||||
protected $hg_log_template;
|
|
||||||
|
|
||||||
public function __construct($repo, $project=null)
|
public function __construct($repo, $project=null)
|
||||||
{
|
{
|
||||||
$this->repo = $repo;
|
$this->repo = $repo;
|
||||||
$this->project = $project;
|
$this->project = $project;
|
||||||
$this->hg_log_template = "'".'changeset: {rev}:{node|short}\nauthor: {author}\ndate: {date|isodate}\nfiles: {files}\n{desc}\n'."'";
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public function getRepositorySize()
|
public function getRepositorySize()
|
||||||
{
|
{
|
||||||
@@ -94,7 +152,7 @@ class IDF_Scm_Mercurial extends IDF_Scm
|
|||||||
escapeshellarg($this->repo),
|
escapeshellarg($this->repo),
|
||||||
escapeshellarg($rev));
|
escapeshellarg($rev));
|
||||||
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
|
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
|
||||||
self::exec('IDF_Scm_Mercurial::isValidRevision', $cmd, $out, $ret);
|
self::exec('IDF_Scm_Mercurial::validateRevision', $cmd, $out, $ret);
|
||||||
|
|
||||||
// FIXME: apparently a given hg revision can also be ambigious -
|
// FIXME: apparently a given hg revision can also be ambigious -
|
||||||
// handle this case here sometime
|
// handle this case here sometime
|
||||||
@@ -158,7 +216,8 @@ class IDF_Scm_Mercurial extends IDF_Scm
|
|||||||
throw new Exception(sprintf(__('Not a valid tree: %s.'), $tree));
|
throw new Exception(sprintf(__('Not a valid tree: %s.'), $tree));
|
||||||
}
|
}
|
||||||
$cmd_tmpl = Pluf::f('hg_path', 'hg').' manifest -R %s --debug -r %s';
|
$cmd_tmpl = Pluf::f('hg_path', 'hg').' manifest -R %s --debug -r %s';
|
||||||
$cmd = sprintf($cmd_tmpl, escapeshellarg($this->repo), $tree, ($recurse) ? '' : '');
|
$cmd = sprintf($cmd_tmpl, escapeshellarg($this->repo),
|
||||||
|
escapeshellarg($tree));
|
||||||
$out = array();
|
$out = array();
|
||||||
$res = array();
|
$res = array();
|
||||||
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
|
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
|
||||||
@@ -208,7 +267,8 @@ class IDF_Scm_Mercurial extends IDF_Scm
|
|||||||
public function getPathInfo($totest, $commit='tip')
|
public function getPathInfo($totest, $commit='tip')
|
||||||
{
|
{
|
||||||
$cmd_tmpl = Pluf::f('hg_path', 'hg').' manifest -R %s --debug -r %s';
|
$cmd_tmpl = Pluf::f('hg_path', 'hg').' manifest -R %s --debug -r %s';
|
||||||
$cmd = sprintf($cmd_tmpl, escapeshellarg($this->repo), $commit);
|
$cmd = sprintf($cmd_tmpl, escapeshellarg($this->repo),
|
||||||
|
escapeshellarg($commit));
|
||||||
$out = array();
|
$out = array();
|
||||||
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
|
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
|
||||||
self::exec('IDF_Scm_Mercurial::getPathInfo', $cmd, $out);
|
self::exec('IDF_Scm_Mercurial::getPathInfo', $cmd, $out);
|
||||||
@@ -284,7 +344,7 @@ class IDF_Scm_Mercurial extends IDF_Scm
|
|||||||
self::exec('IDF_Scm_Mercurial::getBranches', $cmd, $out);
|
self::exec('IDF_Scm_Mercurial::getBranches', $cmd, $out);
|
||||||
$res = array();
|
$res = array();
|
||||||
foreach ($out as $b) {
|
foreach ($out as $b) {
|
||||||
preg_match('/(\S+).*\S+:(\S+)/', $b, $match);
|
preg_match('/(.+?)\s+\S+:(\S+)/', $b, $match);
|
||||||
$res[$match[1]] = '';
|
$res[$match[1]] = '';
|
||||||
}
|
}
|
||||||
$this->cache['branches'] = $res;
|
$this->cache['branches'] = $res;
|
||||||
@@ -308,7 +368,7 @@ class IDF_Scm_Mercurial extends IDF_Scm
|
|||||||
self::exec('IDF_Scm_Mercurial::getTags', $cmd, $out);
|
self::exec('IDF_Scm_Mercurial::getTags', $cmd, $out);
|
||||||
$res = array();
|
$res = array();
|
||||||
foreach ($out as $b) {
|
foreach ($out as $b) {
|
||||||
preg_match('/(\S+).*\S+:(\S+)/', $b, $match);
|
preg_match('/(.+?)\s+\S+:(\S+)/', $b, $match);
|
||||||
$res[$match[1]] = '';
|
$res[$match[1]] = '';
|
||||||
}
|
}
|
||||||
$this->cache['tags'] = $res;
|
$this->cache['tags'] = $res;
|
||||||
@@ -336,17 +396,18 @@ class IDF_Scm_Mercurial extends IDF_Scm
|
|||||||
*/
|
*/
|
||||||
public function getCommit($commit, $getdiff=false)
|
public function getCommit($commit, $getdiff=false)
|
||||||
{
|
{
|
||||||
if (!$this->isValidRevision($commit)) {
|
if ($this->validateRevision($commit) != IDF_Scm::REVISION_VALID) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$logStyle = new IDF_Scm_Mercurial_LogStyle(IDF_Scm_Mercurial_LogStyle::FULL_LOG);
|
||||||
$tmpl = ($getdiff)
|
$tmpl = ($getdiff)
|
||||||
? Pluf::f('hg_path', 'hg').' log -p -r %s -R %s --template %s'
|
? Pluf::f('hg_path', 'hg').' log --debug -p -r %s -R %s --style %s'
|
||||||
: Pluf::f('hg_path', 'hg').' log -r %s -R %s --template %s';
|
: Pluf::f('hg_path', 'hg').' log --debug -r %s -R %s --style %s';
|
||||||
$cmd = sprintf($tmpl,
|
$cmd = sprintf($tmpl,
|
||||||
escapeshellarg($commit),
|
escapeshellarg($commit),
|
||||||
escapeshellarg($this->repo),
|
escapeshellarg($this->repo),
|
||||||
$this->hg_log_template);
|
escapeshellarg($logStyle->get()));
|
||||||
|
|
||||||
$out = array();
|
$out = array();
|
||||||
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
|
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
|
||||||
self::exec('IDF_Scm_Mercurial::getCommit', $cmd, $out);
|
self::exec('IDF_Scm_Mercurial::getCommit', $cmd, $out);
|
||||||
@@ -363,11 +424,62 @@ class IDF_Scm_Mercurial extends IDF_Scm
|
|||||||
$log[] = $line;
|
$log[] = $line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$out = self::parseLog($log, 4);
|
$out = self::parseLog($log);
|
||||||
$out[0]->diff = implode("\n", $change);
|
$out[0]->diff = implode("\n", $change);
|
||||||
return $out[0];
|
return $out[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see IDF_Scm::getChanges()
|
||||||
|
*/
|
||||||
|
public function getChanges($commit)
|
||||||
|
{
|
||||||
|
if ($this->validateRevision($commit) != IDF_Scm::REVISION_VALID) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$logStyle = new IDF_Scm_Mercurial_LogStyle(IDF_Scm_Mercurial_LogStyle::CHANGES);
|
||||||
|
$tmpl = Pluf::f('hg_path', 'hg').' log --debug -r %s -R %s --style %s';
|
||||||
|
$cmd = sprintf($tmpl,
|
||||||
|
escapeshellarg($commit),
|
||||||
|
escapeshellarg($this->repo),
|
||||||
|
escapeshellarg($logStyle->get()));
|
||||||
|
$out = array();
|
||||||
|
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
|
||||||
|
self::exec('IDF_Scm_Mercurial::getChanges', $cmd, $out);
|
||||||
|
$log = self::parseLog($out);
|
||||||
|
// we expect only one log entry that contains all the needed information
|
||||||
|
$log = $log[0];
|
||||||
|
|
||||||
|
$return = (object) array(
|
||||||
|
'additions' => preg_split('/\0/', $log->file_adds, -1, PREG_SPLIT_NO_EMPTY),
|
||||||
|
'deletions' => preg_split('/\0/', $log->file_dels, -1, PREG_SPLIT_NO_EMPTY),
|
||||||
|
'patches' => preg_split('/\0/', $log->file_mods, -1, PREG_SPLIT_NO_EMPTY),
|
||||||
|
// hg has no support for built-in attributes, so this keeps empty
|
||||||
|
'properties' => array(),
|
||||||
|
// this is filled below
|
||||||
|
'renames' => array(),
|
||||||
|
);
|
||||||
|
|
||||||
|
$file_copies = preg_split('/\0/', $log->file_copies, -1, PREG_SPLIT_NO_EMPTY);
|
||||||
|
|
||||||
|
// FIXME: copies are only treated as renames if they have an add _and_
|
||||||
|
// an drop, otherwise they're just treated as adds
|
||||||
|
for ($i=0; $i<count($file_copies); $i+=2) {
|
||||||
|
$new = $file_copies[$i];
|
||||||
|
$old = $file_copies[$i+1];
|
||||||
|
$newidx = array_search($new, $return->additions);
|
||||||
|
$oldidx = array_search($old, $return->deletions);
|
||||||
|
if ($newidx !== false && $oldidx !== false) {
|
||||||
|
$return->renames[$old] = $new;
|
||||||
|
unset($return->additions[$newidx]);
|
||||||
|
unset($return->deletions[$oldidx]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a commit is big.
|
* Check if a commit is big.
|
||||||
*
|
*
|
||||||
@@ -388,54 +500,66 @@ class IDF_Scm_Mercurial extends IDF_Scm
|
|||||||
*/
|
*/
|
||||||
public function getChangeLog($commit='tip', $n=10)
|
public function getChangeLog($commit='tip', $n=10)
|
||||||
{
|
{
|
||||||
$cmd = sprintf(Pluf::f('hg_path', 'hg').' log -R %s -l%s --template %s', escapeshellarg($this->repo), $n, $this->hg_log_template, $commit);
|
$logStyle = new IDF_Scm_Mercurial_LogStyle(IDF_Scm_Mercurial_LogStyle::FULL_LOG);
|
||||||
|
|
||||||
|
// hg accepts revision IDs as arguments to --branch / -b as well and
|
||||||
|
// uses the branch of the revision in question to filter the other
|
||||||
|
// revisions
|
||||||
|
$cmd = sprintf(Pluf::f('hg_path', 'hg').' log --debug -R %s -l%s --style %s -b %s',
|
||||||
|
escapeshellarg($this->repo),
|
||||||
|
$n,
|
||||||
|
escapeshellarg($logStyle->get()),
|
||||||
|
escapeshellarg($commit));
|
||||||
$out = array();
|
$out = array();
|
||||||
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
|
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
|
||||||
self::exec('IDF_Scm_Mercurial::getChangeLog', $cmd, $out);
|
self::exec('IDF_Scm_Mercurial::getChangeLog', $cmd, $out);
|
||||||
return self::parseLog($out, 4);
|
return self::parseLog($out);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse the log lines of a --pretty=medium log output.
|
* Parse the log lines of our custom style format.
|
||||||
*
|
*
|
||||||
* @param array Lines.
|
* @param array Lines.
|
||||||
* @param int Number of lines in the headers (3)
|
|
||||||
* @return array Change log.
|
* @return array Change log.
|
||||||
*/
|
*/
|
||||||
|
public static function parseLog($lines)
|
||||||
public static function parseLog($lines, $hdrs=3)
|
|
||||||
{
|
{
|
||||||
$res = array();
|
$res = array();
|
||||||
$c = array();
|
$c = array();
|
||||||
$i = 0;
|
$headers_processed = false;
|
||||||
$hdrs += 1;
|
|
||||||
foreach ($lines as $line) {
|
foreach ($lines as $line) {
|
||||||
$i++;
|
if ($line == "\0") {
|
||||||
if (0 === strpos($line, 'changeset:')) {
|
$headers_processed = false;
|
||||||
if (count($c) > 0) {
|
if (count($c) > 0) {
|
||||||
$c['full_message'] = trim($c['full_message']);
|
$c['full_message'] = trim($c['full_message']);
|
||||||
$res[] = (object) $c;
|
$res[] = (object) $c;
|
||||||
}
|
}
|
||||||
$c = array();
|
|
||||||
$c['commit'] = substr(strrchr($line, ':'), 1);
|
|
||||||
$c['full_message'] = '';
|
|
||||||
$i=1;
|
|
||||||
continue;
|
|
||||||
|
|
||||||
}
|
|
||||||
if ($i == $hdrs) {
|
|
||||||
$c['title'] = trim($line);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$match = array();
|
if (!$headers_processed && empty($line)) {
|
||||||
if (preg_match('/^(\S+):\s*(.*)/', $line, $match)) {
|
$headers_processed = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!$headers_processed && preg_match('/^(\S+):\s*(.*)/', $line, $match)) {
|
||||||
$match[1] = strtolower($match[1]);
|
$match[1] = strtolower($match[1]);
|
||||||
if ($match[1] == 'user') {
|
if ($match[1] == 'changeset') {
|
||||||
|
$c = array();
|
||||||
|
$c['commit'] = $match[2];
|
||||||
|
$c['tree'] = $c['commit'];
|
||||||
|
$c['full_message'] = '';
|
||||||
|
} elseif ($match[1] == 'user') {
|
||||||
$c['author'] = $match[2];
|
$c['author'] = $match[2];
|
||||||
} elseif ($match[1] == 'summary') {
|
} elseif ($match[1] == 'summary') {
|
||||||
$c['title'] = $match[2];
|
$c['title'] = $match[2];
|
||||||
} elseif ($match[1] == 'branch') {
|
} elseif ($match[1] == 'branch') {
|
||||||
$c['branch'] = $match[2];
|
$c['branch'] = empty($match[2]) ? 'default' : $match[2];
|
||||||
|
} elseif ($match[1] == 'parents') {
|
||||||
|
$parents = preg_split('/\s+/', $match[2], -1, PREG_SPLIT_NO_EMPTY);
|
||||||
|
for ($i=0, $j=count($parents); $i<$j; ++$i) {
|
||||||
|
if ($parents[$i] == '000000000000')
|
||||||
|
unset($parents[$i]);
|
||||||
|
}
|
||||||
|
$c['parents'] = $parents;
|
||||||
} else {
|
} else {
|
||||||
$c[$match[1]] = trim($match[2]);
|
$c[$match[1]] = trim($match[2]);
|
||||||
}
|
}
|
||||||
@@ -444,15 +568,14 @@ class IDF_Scm_Mercurial extends IDF_Scm
|
|||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ($i > ($hdrs+1)) {
|
if ($headers_processed) {
|
||||||
$c['full_message'] .= trim($line)."\n";
|
if (empty($c['title']))
|
||||||
|
$c['title'] = trim($line);
|
||||||
|
else
|
||||||
|
$c['full_message'] .= trim($line)."\n";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$c['tree'] = !empty($c['commit']) ? trim($c['commit']) : '';
|
|
||||||
$c['branch'] = empty($c['branch']) ? 'default' : $c['branch'];
|
|
||||||
$c['full_message'] = !empty($c['full_message']) ? trim($c['full_message']) : '';
|
|
||||||
$res[] = (object) $c;
|
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2010 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
class IDF_Scm_Monotone extends IDF_Scm
|
class IDF_Scm_Monotone extends IDF_Scm
|
||||||
{
|
{
|
||||||
/** the minimum supported interface version */
|
/** the minimum supported interface version */
|
||||||
public static $MIN_INTERFACE_VERSION = 12.0;
|
public static $MIN_INTERFACE_VERSION = 13.0;
|
||||||
|
|
||||||
private $stdio;
|
private $stdio;
|
||||||
|
|
||||||
@@ -135,13 +135,13 @@ class IDF_Scm_Monotone extends IDF_Scm
|
|||||||
/**
|
/**
|
||||||
* @see IDF_Scm::getArchiveStream
|
* @see IDF_Scm::getArchiveStream
|
||||||
*/
|
*/
|
||||||
public function getArchiveStream($commit, $prefix='repository/')
|
public function getArchiveStream($commit, $prefix = null)
|
||||||
{
|
{
|
||||||
$revs = $this->_resolveSelector($commit);
|
$revs = $this->_resolveSelector($commit);
|
||||||
// sanity: this should actually not happen, because the
|
// sanity: this should actually not happen, because the
|
||||||
// revision is validated before already
|
// revision is validated before already
|
||||||
if (count($revs) == 0) {
|
if (count($revs) == 0) {
|
||||||
return new Pluf_HTTP_Response_NotFound();
|
throw new IDF_Scm_Exception("$commit is not a valid revision");
|
||||||
}
|
}
|
||||||
return new IDF_Scm_Monotone_ZipRender($this->stdio, $revs[0]);
|
return new IDF_Scm_Monotone_ZipRender($this->stdio, $revs[0]);
|
||||||
}
|
}
|
||||||
@@ -536,9 +536,6 @@ class IDF_Scm_Monotone extends IDF_Scm
|
|||||||
$stanzas = IDF_Scm_Monotone_BasicIO::parse($out);
|
$stanzas = IDF_Scm_Monotone_BasicIO::parse($out);
|
||||||
|
|
||||||
foreach ($stanzas as $stanza) {
|
foreach ($stanzas as $stanza) {
|
||||||
if ($stanza[0]['key'] == 'format_version')
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if ($stanza[0]['values'][0] != $file)
|
if ($stanza[0]['values'][0] != $file)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -602,7 +599,7 @@ class IDF_Scm_Monotone extends IDF_Scm
|
|||||||
{
|
{
|
||||||
$revs = $this->_resolveSelector($commit);
|
$revs = $this->_resolveSelector($commit);
|
||||||
if (count($revs) == 0)
|
if (count($revs) == 0)
|
||||||
return null;
|
return false;
|
||||||
|
|
||||||
$revision = $revs[0];
|
$revision = $revs[0];
|
||||||
$out = $this->stdio->exec(array('get_revision', $revision));
|
$out = $this->stdio->exec(array('get_revision', $revision));
|
||||||
@@ -671,7 +668,7 @@ class IDF_Scm_Monotone extends IDF_Scm
|
|||||||
{
|
{
|
||||||
$revs = $this->_resolveSelector($commit);
|
$revs = $this->_resolveSelector($commit);
|
||||||
if (count($revs) == 0)
|
if (count($revs) == 0)
|
||||||
return array();
|
return false;
|
||||||
|
|
||||||
$res = array();
|
$res = array();
|
||||||
|
|
||||||
@@ -679,6 +676,7 @@ class IDF_Scm_Monotone extends IDF_Scm
|
|||||||
$res['parents'] = preg_split("/\n/", $parents, -1, PREG_SPLIT_NO_EMPTY);
|
$res['parents'] = preg_split("/\n/", $parents, -1, PREG_SPLIT_NO_EMPTY);
|
||||||
|
|
||||||
$certs = $this->_getCerts($revs[0]);
|
$certs = $this->_getCerts($revs[0]);
|
||||||
|
|
||||||
// FIXME: this assumes that author, date and changelog are always given
|
// FIXME: this assumes that author, date and changelog are always given
|
||||||
$res['author'] = implode(', ', $certs['author']);
|
$res['author'] = implode(', ', $certs['author']);
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2010 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2011 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2010 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2010 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -3,19 +3,19 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2010 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# Plume Framework is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Lesser General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation; either version 2.1 of the License, or
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
#
|
#
|
||||||
# Plume Framework is distributed in the hope that it will be useful,
|
# InDefero is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU Lesser General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU Lesser General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#
|
#
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -48,7 +48,7 @@ class IDF_Scm_Svn extends IDF_Scm
|
|||||||
|
|
||||||
public function isAvailable()
|
public function isAvailable()
|
||||||
{
|
{
|
||||||
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --xml --username=%s --password=%s %s',
|
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --no-auth-cache --xml --username=%s --password=%s %s',
|
||||||
escapeshellarg($this->username),
|
escapeshellarg($this->username),
|
||||||
escapeshellarg($this->password),
|
escapeshellarg($this->password),
|
||||||
escapeshellarg($this->repo));
|
escapeshellarg($this->repo));
|
||||||
@@ -163,7 +163,7 @@ class IDF_Scm_Svn extends IDF_Scm
|
|||||||
return IDF_Scm::REVISION_VALID;
|
return IDF_Scm::REVISION_VALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --username=%s --password=%s %s@%s',
|
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --no-auth-cache --username=%s --password=%s %s@%s',
|
||||||
escapeshellarg($this->username),
|
escapeshellarg($this->username),
|
||||||
escapeshellarg($this->password),
|
escapeshellarg($this->password),
|
||||||
escapeshellarg($this->repo),
|
escapeshellarg($this->repo),
|
||||||
@@ -191,7 +191,7 @@ class IDF_Scm_Svn extends IDF_Scm
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Else, test the path on revision
|
// Else, test the path on revision
|
||||||
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --xml --username=%s --password=%s %s@%s',
|
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --no-auth-cache --xml --username=%s --password=%s %s@%s',
|
||||||
escapeshellarg($this->username),
|
escapeshellarg($this->username),
|
||||||
escapeshellarg($this->password),
|
escapeshellarg($this->password),
|
||||||
escapeshellarg($this->repo.'/'.self::smartEncode($path)),
|
escapeshellarg($this->repo.'/'.self::smartEncode($path)),
|
||||||
@@ -218,7 +218,7 @@ class IDF_Scm_Svn extends IDF_Scm
|
|||||||
|
|
||||||
public function getTree($commit, $folder='/', $branch=null)
|
public function getTree($commit, $folder='/', $branch=null)
|
||||||
{
|
{
|
||||||
$cmd = sprintf(Pluf::f('svn_path', 'svn').' ls --xml --username=%s --password=%s %s@%s',
|
$cmd = sprintf(Pluf::f('svn_path', 'svn').' ls --no-auth-cache --xml --username=%s --password=%s %s@%s',
|
||||||
escapeshellarg($this->username),
|
escapeshellarg($this->username),
|
||||||
escapeshellarg($this->password),
|
escapeshellarg($this->password),
|
||||||
escapeshellarg($this->repo.'/'.self::smartEncode($folder)),
|
escapeshellarg($this->repo.'/'.self::smartEncode($folder)),
|
||||||
@@ -260,7 +260,7 @@ class IDF_Scm_Svn extends IDF_Scm
|
|||||||
if (isset($this->cache['commitmess'][$rev])) {
|
if (isset($this->cache['commitmess'][$rev])) {
|
||||||
return $this->cache['commitmess'][$rev];
|
return $this->cache['commitmess'][$rev];
|
||||||
}
|
}
|
||||||
$cmd = sprintf(Pluf::f('svn_path', 'svn').' log --xml --limit 1 --username=%s --password=%s %s@%s',
|
$cmd = sprintf(Pluf::f('svn_path', 'svn').' log --no-auth-cache --xml --limit 1 --username=%s --password=%s %s@%s',
|
||||||
escapeshellarg($this->username),
|
escapeshellarg($this->username),
|
||||||
escapeshellarg($this->password),
|
escapeshellarg($this->password),
|
||||||
escapeshellarg($this->repo),
|
escapeshellarg($this->repo),
|
||||||
@@ -281,7 +281,7 @@ class IDF_Scm_Svn extends IDF_Scm
|
|||||||
if ($rev == null) {
|
if ($rev == null) {
|
||||||
$rev = 'HEAD';
|
$rev = 'HEAD';
|
||||||
}
|
}
|
||||||
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --xml --username=%s --password=%s %s@%s',
|
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --no-auth-cache --xml --username=%s --password=%s %s@%s',
|
||||||
escapeshellarg($this->username),
|
escapeshellarg($this->username),
|
||||||
escapeshellarg($this->password),
|
escapeshellarg($this->password),
|
||||||
escapeshellarg($this->repo.'/'.self::smartEncode($filename)),
|
escapeshellarg($this->repo.'/'.self::smartEncode($filename)),
|
||||||
@@ -308,7 +308,7 @@ class IDF_Scm_Svn extends IDF_Scm
|
|||||||
|
|
||||||
public function getFile($def, $cmd_only=false)
|
public function getFile($def, $cmd_only=false)
|
||||||
{
|
{
|
||||||
$cmd = sprintf(Pluf::f('svn_path', 'svn').' cat --username=%s --password=%s %s@%s',
|
$cmd = sprintf(Pluf::f('svn_path', 'svn').' cat --no-auth-cache --username=%s --password=%s %s@%s',
|
||||||
escapeshellarg($this->username),
|
escapeshellarg($this->username),
|
||||||
escapeshellarg($this->password),
|
escapeshellarg($this->password),
|
||||||
escapeshellarg($this->repo.'/'.self::smartEncode($def->fullpath)),
|
escapeshellarg($this->repo.'/'.self::smartEncode($def->fullpath)),
|
||||||
@@ -329,7 +329,7 @@ class IDF_Scm_Svn extends IDF_Scm
|
|||||||
return $this->cache['branches'];
|
return $this->cache['branches'];
|
||||||
}
|
}
|
||||||
$res = array();
|
$res = array();
|
||||||
$cmd = sprintf(Pluf::f('svn_path', 'svn').' ls --username=%s --password=%s %s@HEAD',
|
$cmd = sprintf(Pluf::f('svn_path', 'svn').' ls --no-auth-cache --username=%s --password=%s %s@HEAD',
|
||||||
escapeshellarg($this->username),
|
escapeshellarg($this->username),
|
||||||
escapeshellarg($this->password),
|
escapeshellarg($this->password),
|
||||||
escapeshellarg($this->repo.'/branches'));
|
escapeshellarg($this->repo.'/branches'));
|
||||||
@@ -344,7 +344,7 @@ class IDF_Scm_Svn extends IDF_Scm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ksort($res);
|
ksort($res);
|
||||||
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --username=%s --password=%s %s@HEAD',
|
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --no-auth-cache --username=%s --password=%s %s@HEAD',
|
||||||
escapeshellarg($this->username),
|
escapeshellarg($this->username),
|
||||||
escapeshellarg($this->password),
|
escapeshellarg($this->password),
|
||||||
escapeshellarg($this->repo.'/trunk'));
|
escapeshellarg($this->repo.'/trunk'));
|
||||||
@@ -368,7 +368,7 @@ class IDF_Scm_Svn extends IDF_Scm
|
|||||||
return $this->cache['tags'];
|
return $this->cache['tags'];
|
||||||
}
|
}
|
||||||
$res = array();
|
$res = array();
|
||||||
$cmd = sprintf(Pluf::f('svn_path', 'svn').' ls --username=%s --password=%s %s@HEAD',
|
$cmd = sprintf(Pluf::f('svn_path', 'svn').' ls --no-auth-cache --username=%s --password=%s %s@HEAD',
|
||||||
escapeshellarg($this->username),
|
escapeshellarg($this->username),
|
||||||
escapeshellarg($this->password),
|
escapeshellarg($this->password),
|
||||||
escapeshellarg($this->repo.'/tags'));
|
escapeshellarg($this->repo.'/tags'));
|
||||||
@@ -426,7 +426,7 @@ class IDF_Scm_Svn extends IDF_Scm
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$res = array();
|
$res = array();
|
||||||
$cmd = sprintf(Pluf::f('svn_path', 'svn').' log --xml --limit 1 -v --username=%s --password=%s %s@%s',
|
$cmd = sprintf(Pluf::f('svn_path', 'svn').' log --no-auth-cache --xml --limit 1 -v --username=%s --password=%s %s@%s',
|
||||||
escapeshellarg($this->username),
|
escapeshellarg($this->username),
|
||||||
escapeshellarg($this->password),
|
escapeshellarg($this->password),
|
||||||
escapeshellarg($this->repo),
|
escapeshellarg($this->repo),
|
||||||
@@ -473,7 +473,7 @@ class IDF_Scm_Svn extends IDF_Scm
|
|||||||
private function getDiff($rev='HEAD')
|
private function getDiff($rev='HEAD')
|
||||||
{
|
{
|
||||||
$res = array();
|
$res = array();
|
||||||
$cmd = sprintf(Pluf::f('svn_path', 'svn').' diff -c %s --username=%s --password=%s %s',
|
$cmd = sprintf(Pluf::f('svn_path', 'svn').' diff --no-auth-cache -c %s --username=%s --password=%s %s',
|
||||||
escapeshellarg($rev),
|
escapeshellarg($rev),
|
||||||
escapeshellarg($this->username),
|
escapeshellarg($this->username),
|
||||||
escapeshellarg($this->password),
|
escapeshellarg($this->password),
|
||||||
@@ -498,7 +498,7 @@ class IDF_Scm_Svn extends IDF_Scm
|
|||||||
$branch = 'HEAD';
|
$branch = 'HEAD';
|
||||||
}
|
}
|
||||||
$res = array();
|
$res = array();
|
||||||
$cmd = sprintf(Pluf::f('svn_path', 'svn').' log --xml -v --limit %s --username=%s --password=%s %s@%s',
|
$cmd = sprintf(Pluf::f('svn_path', 'svn').' log --no-auth-cache --xml -v --limit %s --username=%s --password=%s %s@%s',
|
||||||
escapeshellarg($n),
|
escapeshellarg($n),
|
||||||
escapeshellarg($this->username),
|
escapeshellarg($this->username),
|
||||||
escapeshellarg($this->password),
|
escapeshellarg($this->password),
|
||||||
@@ -531,7 +531,7 @@ class IDF_Scm_Svn extends IDF_Scm
|
|||||||
public function getProperties($rev, $path='')
|
public function getProperties($rev, $path='')
|
||||||
{
|
{
|
||||||
$res = array();
|
$res = array();
|
||||||
$cmd = sprintf(Pluf::f('svn_path', 'svn').' proplist --xml --username=%s --password=%s %s@%s',
|
$cmd = sprintf(Pluf::f('svn_path', 'svn').' proplist --no-auth-cache --xml --username=%s --password=%s %s@%s',
|
||||||
escapeshellarg($this->username),
|
escapeshellarg($this->username),
|
||||||
escapeshellarg($this->password),
|
escapeshellarg($this->password),
|
||||||
escapeshellarg($this->repo.'/'.self::smartEncode($path)),
|
escapeshellarg($this->repo.'/'.self::smartEncode($path)),
|
||||||
@@ -566,7 +566,7 @@ class IDF_Scm_Svn extends IDF_Scm
|
|||||||
private function getProperty($property, $rev, $path='')
|
private function getProperty($property, $rev, $path='')
|
||||||
{
|
{
|
||||||
$res = array();
|
$res = array();
|
||||||
$cmd = sprintf(Pluf::f('svn_path', 'svn').' propget --xml %s --username=%s --password=%s %s@%s',
|
$cmd = sprintf(Pluf::f('svn_path', 'svn').' propget --no-auth-cache --xml %s --username=%s --password=%s %s@%s',
|
||||||
escapeshellarg($property),
|
escapeshellarg($property),
|
||||||
escapeshellarg($this->username),
|
escapeshellarg($this->username),
|
||||||
escapeshellarg($this->password),
|
escapeshellarg($this->password),
|
||||||
@@ -590,7 +590,7 @@ class IDF_Scm_Svn extends IDF_Scm
|
|||||||
public function getLastCommit($rev='HEAD')
|
public function getLastCommit($rev='HEAD')
|
||||||
{
|
{
|
||||||
$xmlInfo = '';
|
$xmlInfo = '';
|
||||||
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --xml --username=%s --password=%s %s@%s',
|
$cmd = sprintf(Pluf::f('svn_path', 'svn').' info --no-auth-cache --xml --username=%s --password=%s %s@%s',
|
||||||
escapeshellarg($this->username),
|
escapeshellarg($this->username),
|
||||||
escapeshellarg($this->password),
|
escapeshellarg($this->password),
|
||||||
escapeshellarg($this->repo),
|
escapeshellarg($this->repo),
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# This file is part of InDefero, an open source project management application.
|
# This file is part of InDefero, an open source project management application.
|
||||||
# Copyright (C) 2008 Céondo Ltd and contributors.
|
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||||
#
|
#
|
||||||
# InDefero is free software; you can redistribute it and/or modify
|
# InDefero is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user