git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/4] remote-hg: fix 'shared path' path

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 17, 2013, 22:25 UTC
Message-ID
<xmqqzjnzktdr.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CALWbr2wkSNDh2VTz05sndymUe=fOsApMrg6Jjp0a6mbEfhru=g@mail.gmail.com>
Antoine Pelisse <apelisse@gmail.com> writes:
Show 27 quoted lines
> On Sat, Dec 7, 2013 at 2:09 PM, Felipe Contreras
> <felipe.contreras@gmail.com> wrote:
>> If the repository is moved, the absolute path of the shared repository
>> would fail.
>>
>> Make sure it's always up-to-date.
>>
>> Reported-by: Michael Davis <mjmdavis@gmail.com>
>> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>> ---
>>  contrib/remote-helpers/git-remote-hg | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
>> index aa1d230..718ef95 100755
>> --- a/contrib/remote-helpers/git-remote-hg
>> +++ b/contrib/remote-helpers/git-remote-hg
>> @@ -416,6 +416,9 @@ def get_repo(url, alias):
>>          local_path = os.path.join(dirname, 'clone')
>>          if not os.path.exists(local_path):
>>              hg.share(myui, shared_path, local_path, update=False)
>> +        else:
>> +            # make sure the shared path is always up-to-date
>> +            util.writefile(os.path.join(local_path, '.hg', 'sharedpath'), hg_path)
>
> Considering this is modifying a "private mercurial file", would it
> make sense to include a test like I did in my equivalent patch ?

Hmph. I was planning to merge the topic to 'next' today; perhaps the necessary tests can come as a follow-up patch on top of the topic before it graduates to 'master'?

Previous: Antoine PelisseNext: Antoine Pelisse
Message 6 of 8 in “remote-helpers: fixes”
  1. 0/4 remote-helpers: fixesFelipe Contreras, Dec 7, 2013
  2. 1/4 remote-hg: avoid buggy strftime()Felipe Contreras, Dec 7, 2013
  3. 2/4 remote-helpers: add extra safety checksFelipe Contreras, Dec 7, 2013
  4. 3/4 remote-hg: fix 'shared path' pathFelipe Contreras, Dec 7, 2013
  5. Antoine PelisseDec 13, 2013
  6. Junio C HamanoDec 17, 2013
  7. remote-hg: test 'shared_path' in a moved cloneAntoine Pelisse, Dec 23, 2013
  8. 4/4 remote-hg: add tests for special filenamesFelipe Contreras, Dec 7, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.