[issue2153] Exception encountered when commiting sub repo

Richard Crawley bugs at mercurial.selenic.com
Fri Apr 23 13:55:08 UTC 2010


New submission from Richard Crawley <rich.crawley at googlemail.com>:

An error was encountered when attempting to commit a sub repository:

** unknown exception encountered, details follow
** report bug details to http://mercurial.selenic.com/bts/
** or mercurial at selenic.com
** Mercurial Distributed SCM (version 1.5.1)
** Extensions loaded:
Traceback (most recent call last):
  File "hg", line 36, in <module>
  File "mercurial\dispatch.pyo", line 16, in run
  File "mercurial\dispatch.pyo", line 30, in dispatch
  File "mercurial\dispatch.pyo", line 47, in _runcatch
  File "mercurial\dispatch.pyo", line 467, in _dispatch
  File "mercurial\dispatch.pyo", line 337, in runcommand
  File "mercurial\dispatch.pyo", line 518, in _runcommand
  File "mercurial\dispatch.pyo", line 472, in checkargs
  File "mercurial\dispatch.pyo", line 466, in <lambda>
  File "mercurial\util.pyo", line 401, in check
  File "mercurial\commands.pyo", line 712, in commit
  File "mercurial\cmdutil.pyo", line 1150, in commit
  File "mercurial\commands.pyo", line 710, in commitfunc
  File "mercurial\localrepo.pyo", line 798, in commit
  File "mercurial\context.pyo", line 205, in sub
  File "mercurial\subrepo.pyo", line 157, in subrepo
  File "mercurial\subrepo.pyo", line 181, in __init__
  File "genericpath.pyo", line 18, in exists
TypeError: stat() argument 1 must be encoded string without NULL bytes, not 
str

My commands to get to this state:

PS C:\wco> md experimental


    Directory: C:\wco


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----        23/04/2010     14:32            experimental


PS C:\wco> cd experimental
PS C:\wco\experimental> md hg_sub_repo


    Directory: C:\wco\experimental


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----        23/04/2010     14:33            hg_sub_repo


PS C:\wco\experimental> cd hg*
PS C:\wco\experimental\hg_sub_repo> hg init
PS C:\wco\experimental\hg_sub_repo> md nest


    Directory: C:\wco\experimental\hg_sub_repo


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----        23/04/2010     14:33            nest


PS C:\wco\experimental\hg_sub_repo> cd next
Set-Location : Cannot find path 'C:\wco\experimental\hg_sub_repo\next' 
because it
At line:1 char:3
+ cd <<<<  next
    + CategoryInfo          : ObjectNotFound: 
(C:\wco\experimental\hg_sub_repo\nex
    + FullyQualifiedErrorId : 
PathNotFound,Microsoft.PowerShell.Commands.SetLocati

PS C:\wco\experimental\hg_sub_repo> cd nest
PS C:\wco\experimental\hg_sub_repo\nest> hg init
PS C:\wco\experimental\hg_sub_repo\nest> cd..
PS C:\wco\experimental\hg_sub_repo> echo test nest/foo
test
nest/foo
PS C:\wco\experimental\hg_sub_repo> echo test > nest/foo
PS C:\wco\experimental\hg_sub_repo> hg -r nest add nest/foo
hg: option -r not recognized
Mercurial Distributed SCM

basic commands:

 add        add the specified files on the next commit
 annotate   show changeset information by line for each file
 clone      make a copy of an existing repository
 commit     commit the specified files or all outstanding changes
 diff       diff repository (or selected files)
 export     dump the header and diffs for one or more changesets
 forget     forget the specified files on the next commit
 init       create a new repository in the given directory
 log        show revision history of entire repository or files
 merge      merge working directory with another revision
 pull       pull changes from the specified source
 push       push changes to the specified destination
 remove     remove the specified files on the next commit
 serve      export the repository via HTTP
 status     show changed files in the working directory
 summary    summarize working directory state
 update     update working directory

use "hg help" for the full list of commands or "hg -v" for details
PS C:\wco\experimental\hg_sub_repo> hg -R nest add nest/foo
PS C:\wco\experimental\hg_sub_repo> echo nest = nest > .hgsub
PS C:\wco\experimental\hg_sub_repo> hg add .hgsub
PS C:\wco\experimental\hg_sub_repo> hg ci -mtest
hg: config error at .hgsub:1: ' ■n e s t '
PS C:\wco\experimental\hg_sub_repo> hg ci -mtest
hg: config error at .hgsub:2: ' '
PS C:\wco\experimental\hg_sub_repo> hg ci -mtest
** unknown exception encountered, details follow
** report bug details to http://mercurial.selenic.com/bts/
** or mercurial at selenic.com
** Mercurial Distributed SCM (version 1.5.1)
** Extensions loaded:
Traceback (most recent call last):
  File "hg", line 36, in <module>
  File "mercurial\dispatch.pyo", line 16, in run
  File "mercurial\dispatch.pyo", line 30, in dispatch
  File "mercurial\dispatch.pyo", line 47, in _runcatch
  File "mercurial\dispatch.pyo", line 467, in _dispatch
  File "mercurial\dispatch.pyo", line 337, in runcommand
  File "mercurial\dispatch.pyo", line 518, in _runcommand
  File "mercurial\dispatch.pyo", line 472, in checkargs
  File "mercurial\dispatch.pyo", line 466, in <lambda>
  File "mercurial\util.pyo", line 401, in check
  File "mercurial\commands.pyo", line 712, in commit
  File "mercurial\cmdutil.pyo", line 1150, in commit
  File "mercurial\commands.pyo", line 710, in commitfunc
  File "mercurial\localrepo.pyo", line 798, in commit
  File "mercurial\context.pyo", line 205, in sub
  File "mercurial\subrepo.pyo", line 157, in subrepo
  File "mercurial\subrepo.pyo", line 181, in __init__
  File "genericpath.pyo", line 18, in exists
TypeError: stat() argument 1 must be encoded string without NULL bytes, not 
str
PS C:\wco\experimental\hg_sub_repo>

Ive attached my .hgsub file for reference.

----------
files: .hgsub
messages: 12356
nosy: richzilla
priority: bug
status: unread
title: Exception encountered when commiting sub repo

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2153>
____________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .hgsub
Type: application/octet-stream
Size: 24 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20100423/be1aaffc/attachment.obj>


More information about the Mercurial-devel mailing list