* Partial tree export and merging [not found] ` <48D9FACB.20901@mahr.de> @ 2008-09-24 13:58 ` Heiko Voigt 2008-09-24 14:39 ` Shawn O. Pearce 2008-09-24 17:51 ` Nguyen Thai Ngoc Duy 0 siblings, 2 replies; 7+ messages in thread From: Heiko Voigt @ 2008-09-24 13:58 UTC (permalink / raw) To: git; +Cc: Jens Lehmann Hallo, I am currently facing a challenge for adding limited access to a git repository for the i18n and documentation (language) team. Our repository contains *.html and *.loc files which are located along with the code. The language team should not see the code. At the same time a developer using the full tree needs to be able to contribute to the i8n files. To archieve this I would like to extract a repository that only contains the documentation and localization files which can be used by the i8n and doc team. This should be regularly merged into the development (with code) repository. My idea of a solution would be to export patches only for the specific files and import them into a seperate empty repository/branch using git-format-patch and git-am. This seperate repository then itself then could be imported again with a normal merge operation. Has a anyone already solved such a problem or other ideas how to solve this ? cheers Heiko ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Partial tree export and merging 2008-09-24 13:58 ` Partial tree export and merging Heiko Voigt @ 2008-09-24 14:39 ` Shawn O. Pearce 2008-09-24 15:05 ` Heiko Voigt 2008-09-24 17:51 ` Nguyen Thai Ngoc Duy 1 sibling, 1 reply; 7+ messages in thread From: Shawn O. Pearce @ 2008-09-24 14:39 UTC (permalink / raw) To: Heiko Voigt; +Cc: git, Jens Lehmann Heiko Voigt <heiko.voigt@mahr.de> wrote: > > I am currently facing a challenge for adding limited access to a git > repository for the i18n and documentation (language) team. ... > To archieve this I would like to extract a repository that only contains > the documentation and localization files which can be used by the i8n > and doc team. This should be regularly merged into the development (with > code) repository. > > My idea of a solution would be to export patches only for the specific > files and import them into a seperate empty repository/branch using > git-format-patch and git-am. This seperate repository then itself then > could be imported again with a normal merge operation. Has a anyone > already solved such a problem or other ideas how to solve this ? See git-filter-branch. You can use it to slice the history down to only contain these files, but still show the full change history of them (assuming that is what you are trying to get). Once the history is split into a new "doc+html" repository have developers _only_ edit the docs/html in the doc+html repository, don't make more edits in the source code repository. You can use git-submodule or git-merge with the subtree strategy to pull changes from the doc+html repository into the main source repository. -- Shawn. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Partial tree export and merging 2008-09-24 14:39 ` Shawn O. Pearce @ 2008-09-24 15:05 ` Heiko Voigt 2008-09-24 15:13 ` Shawn O. Pearce 0 siblings, 1 reply; 7+ messages in thread From: Heiko Voigt @ 2008-09-24 15:05 UTC (permalink / raw) To: Shawn O. Pearce; +Cc: git, Jens Lehmann Shawn O. Pearce schrieb: > Once the history is split into a new "doc+html" repository have > developers _only_ edit the docs/html in the doc+html repository, > don't make more edits in the source code repository. The problem with committing into 2 repositories (only merging from one side) is that the docs/html also contain localization files which make it hard to work/test the code because localization strings are initially added by the developers. They would then have to change in the 2nd repo and pull for testing. > You can use git-submodule or git-merge with the subtree strategy > to pull changes from the doc+html repository into the main source > repository. Would git submodule work with this kind of layout? Same folders containing different files. I thought submodules only work with subdirectories which are itself a git repo. cheers Heiko ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Partial tree export and merging 2008-09-24 15:05 ` Heiko Voigt @ 2008-09-24 15:13 ` Shawn O. Pearce 0 siblings, 0 replies; 7+ messages in thread From: Shawn O. Pearce @ 2008-09-24 15:13 UTC (permalink / raw) To: Heiko Voigt; +Cc: git, Jens Lehmann Heiko Voigt <heiko.voigt@mahr.de> wrote: > Shawn O. Pearce schrieb: >> Once the history is split into a new "doc+html" repository have >> developers _only_ edit the docs/html in the doc+html repository, >> don't make more edits in the source code repository. > > The problem with committing into 2 repositories (only merging from one > side) is that the docs/html also contain localization files which make > it hard to work/test the code because localization strings are initially > added by the developers. They would then have to change in the 2nd repo > and pull for testing. I can see how that would be difficult. In think you are faced with either restructuring your tree so that the docs/html/localization files are all under a single subdirectory, or you have to keep splitting down the repository with something like filter-branch (or your own tools) to update the localization tree. Doing the latter risks more merge conflicts for developers when they pull changes back from the localization team. Usually a developer doesn't want to d3eal with merge conflicts from doc writers, and they really don't want to deal with them in localized files if they can't read/write that language. >> You can use git-submodule or git-merge with the subtree strategy >> to pull changes from the doc+html repository into the main source >> repository. > > Would git submodule work with this kind of layout? Same folders > containing different files. I thought submodules only work with > subdirectories which are itself a git repo. You are correct, a submodule requires that everything in that directory be part of that submodule. If your source tree has the "submodule files" spread all over, intermingled with sources, you can't use submodule to manage them. Typically the recommendation is to organize your source tree more by functional responsibility, so you can delegate all files under a single directory to the docs team. The project scales better to more staff, and its easier to avoid merge conflicts. -- Shawn. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Partial tree export and merging 2008-09-24 13:58 ` Partial tree export and merging Heiko Voigt 2008-09-24 14:39 ` Shawn O. Pearce @ 2008-09-24 17:51 ` Nguyen Thai Ngoc Duy 2008-09-25 14:36 ` Heiko Voigt 1 sibling, 1 reply; 7+ messages in thread From: Nguyen Thai Ngoc Duy @ 2008-09-24 17:51 UTC (permalink / raw) To: Heiko Voigt; +Cc: git, Jens Lehmann On 9/24/08, Heiko Voigt <heiko.voigt@mahr.de> wrote: > Hallo, > > I am currently facing a challenge for adding limited access to a git > repository for the i18n and documentation (language) team. Our repository > contains *.html and *.loc files which are located along with the code. The > language team should not see the code. At the same time a developer using > the full tree needs to be able to contribute to the i8n files. That could be done with (under-developing) sparse checkout. Basically language team's people do "git clone --sparse-checkout='*.loc:*.html' your-repo.git". Then they only have *.loc and *.html files in working directory. When they commit, all other files are unchanged. Developers merge to have updated *.log/html as usual. I have a question though: is language team allowed to checkout/modify files other than *.loc and *.html? -- Duy ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Partial tree export and merging 2008-09-24 17:51 ` Nguyen Thai Ngoc Duy @ 2008-09-25 14:36 ` Heiko Voigt 2008-09-25 14:51 ` Nguyen Thai Ngoc Duy 0 siblings, 1 reply; 7+ messages in thread From: Heiko Voigt @ 2008-09-25 14:36 UTC (permalink / raw) To: Nguyen Thai Ngoc Duy; +Cc: git, Jens Lehmann Nguyen Thai Ngoc Duy schrieb: > That could be done with (under-developing) sparse checkout. Basically > language team's people do "git clone --sparse-checkout='*.loc:*.html' > your-repo.git". Then they only have *.loc and *.html files in working > directory. When they commit, all other files are unchanged. Developers > merge to have updated *.log/html as usual. Where is that option ? Or are you suggesting me to implement it ? > I have a question though: is language team allowed to checkout/modify > files other than *.loc and *.html? Well in an ideal world they should only have access to the "language" files. But it is not crucial for us if they get access to the source. Its more an issue of user friendlyness. The revision control which is in place at the moment does allow them to selectively check out those files. Heiko ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Partial tree export and merging 2008-09-25 14:36 ` Heiko Voigt @ 2008-09-25 14:51 ` Nguyen Thai Ngoc Duy 0 siblings, 0 replies; 7+ messages in thread From: Nguyen Thai Ngoc Duy @ 2008-09-25 14:51 UTC (permalink / raw) To: Heiko Voigt; +Cc: git, Jens Lehmann On 9/25/08, Heiko Voigt <heiko.voigt@mahr.de> wrote: > Nguyen Thai Ngoc Duy schrieb: > > > That could be done with (under-developing) sparse checkout. Basically > > language team's people do "git clone > --sparse-checkout='*.loc:*.html' > > your-repo.git". Then they only have *.loc and *.html files in working > > directory. When they commit, all other files are unchanged. Developers > > merge to have updated *.log/html as usual. > > > > Where is that option ? Or are you suggesting me to implement it ? As I said, it is being developed. It should not be used in production environment yet but if you want to try, you can get it from here http://repo.or.cz/w/git/pclouds.git in branch sparse-checkout > > I have a question though: is language team allowed to checkout/modify > > files other than *.loc and *.html? > > > > Well in an ideal world they should only have access to the "language" > files. But it is not crucial for us if they get access to the source. Its > more an issue of user friendlyness. The revision control which is in place > at the moment does allow them to selectively check out those files. Thanks. Just wanted to know the scenario that sparse checkout could be used. -- Duy ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-09-25 14:52 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <ACF330629DFB034AB290061C320F43460836E082@GOEMAILBE02.europe.mahr.lan> [not found] ` <48D9FACB.20901@mahr.de> 2008-09-24 13:58 ` Partial tree export and merging Heiko Voigt 2008-09-24 14:39 ` Shawn O. Pearce 2008-09-24 15:05 ` Heiko Voigt 2008-09-24 15:13 ` Shawn O. Pearce 2008-09-24 17:51 ` Nguyen Thai Ngoc Duy 2008-09-25 14:36 ` Heiko Voigt 2008-09-25 14:51 ` Nguyen Thai Ngoc Duy
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).