hbons / SparkleShare

Share and collaborate by syncing with any Git repository instantly. Linux, macOS, and Windows.
https://sparkleshare.org
Other
4.89k stars 576 forks source link

chage log git hub repo error #217

Closed lgordon closed 13 years ago

lgordon commented 13 years ago

lgordon/sparkle

error:

Unhandled Exception: System.ArgumentOutOfRangeException: Cannot be negative. Parameter name: length at System.String.Substring (Int32 startIndex, Int32 length) [0x00000] in :0 at SparkleLib.SparkleRepoGit.GetChangeSets (Int32 count) [0x003ed] in /home/lyle/Programs/lyle/SparkleShare/SparkleLib/Git/SparkleRepoGit.cs:456 at SparkleShare.SparkleController.GetLog () [0x0001f] in /home/lyle/Programs/lyle/SparkleShare/SparkleShare/SparkleController.cs:252 at SparkleShare.SparkleController.GetLog (System.String name) [0x00006] in /home/lyle/Programs/lyle/SparkleShare/SparkleShare/SparkleController.cs:267 at SparkleShare.SparkleEventLog+cAnonStorey5.<>m19 () [0x0000c] in /home/lyle/Programs/lyle/SparkleShare/SparkleShare/SparkleEventLog.cs:181

wimh commented 13 years ago

Do you see in the log window just before this exception a line like:

git log -? --raw -M --date=iso

(with a number instead of the question mark)

Maybe you can manually run the same command in your data folder, and paste the output here (use 4 spaces in front of each line). It looks like 4 spaces (" ") are expected somewhere in the output, but are not there. If you cant post the log, I can try to find a different way to see what is wrong.

(link to source: https://github.com/lgordon/SparkleShare/blob/master/SparkleLib/Git/SparkleRepoGit.cs#L456)

lgordon commented 13 years ago

yup: 10:08:10 [Cmd] /usr/bin/git log -50 --raw -M --date=iso

commit ba356db64b10941bd4e8e17e6ea2371dca9296d2 Author: Lyle Gordon lgordon@gmail.com Date: 2011-06-03 14:02:54 -0500

- unison.txt

:100644 000000 0227a6b... 0000000... D unison.txt

commit e1ef2dae9404b920b3b08b1af4bd8e4419c275ab Author: Lyle Gordon lgordon@gmail.com Date: 2011-05-30 20:45:26 -0500

/ unison.txt

:100644 100644 e69de29... 0227a6b... M unison.txt

commit 45101a7fb505d7ebce30f1a225cce863dfa5e866 Author: Lyle Gordon lgordon@gmail.com Date: 2011-05-30 20:45:16 -0500

+ unison.txt
- new file

:100644 100644 e69de29... e69de29... R100 new file unison.txt

commit f627bd0cffbac409973a39fea90627a253674c32 Author: Lyle Gordon lgordon@gmail.com Date: 2011-05-30 20:45:12 -0500

+ new file

:000000 100644 0000000... e69de29... A new file

commit 5382d90a8f8573eaa24a6bc7586fd82f65e80e11 Author: Lyle Gordon lgordon@gmail.com Date: 2011-05-23 15:27:31 -0500

+ Screenshot.png

:000000 100644 0000000... 1849d19... A Screenshot.png

commit 2cec561fb5ba7eba8a5cc92900c39cc0f2d2d735 Author: Lyle lgordon@gmail.com Date: 2011-03-03 16:43:41 -0600

- cv_updating_2010.pdf

:100644 000000 cae6ba9... 0000000... D cv_updating_2010.pdf

commit e7523c61016e6ed3f7665d020a00df1d03db7364 Author: Lyle lgordon@gmail.com Date: 2011-03-03 16:42:20 -0600

+ cv_updating_2010.pdf

:000000 100644 0000000... cae6ba9... A cv_updating_2010.pdf

commit 1df2c7a5c80b7d3aadfb4489c3f9afb302a8a467 Author: Lyle lgordon@gmail.com Date: 2011-03-03 16:41:10 -0600

+ SparkleShare.txt

:000000 100644 0000000... f944b38... A SparkleShare.txt

Lyle Gordon Department of Materials Science and Engineering Northwestern University

2220 Campus Drive Evanston, IL 60208

Tel: (847) 491-3584 Mobile: (847) 400-4071 lgordon@u.northwestern.edu

On Sun, Jun 12, 2011 at 9:34 AM, wimh < reply@reply.github.com>wrote:

Do you see in the log window just before this exception a line like:

git log -? --raw -M --date=iso

(with a number instead of the question mark)

Maybe you can manually run the same command in your data folder, and paste the output here (use 4 spaces in front of each line). It looks like 4 spaces (" ") are expected somewhere in the output, but are not there. If you cant post the log, I can try to find a different way to see what is wrong.

(link to source: https://github.com/lgordon/SparkleShare/blob/master/SparkleLib/Git/SparkleRepoGit.cs#L456 )

Reply to this email directly or view it on GitHub: https://github.com/hbons/SparkleShare/issues/217#issuecomment-1354980

wimh commented 13 years ago

When I compare https://github.com/hbons/SparkleShare/blob/master/SparkleLib/Git/SparkleRepoGit.cs#L455

int tab_pos  = entry_line.LastIndexOf ("\t");

with https://github.com/lgordon/SparkleShare/blob/master/SparkleLib/Git/SparkleRepoGit.cs#L455

int tab_pos  = entry_line.LastIndexOf ("    ");

I see "\t" is replaced by " ". Why?

wimh commented 13 years ago

It seems like this was the commit: 76ee9a8ec54d64168b0c8d665ae1b99f07984781 where it was replaced.

hbons commented 13 years ago

@wimh probably because i told @lgordon to replace all tabs with spaces. these should have bee skipped ofcourse :)

lgordon commented 13 years ago

Haha I replaced all the tabs with 4 spaces so the code was readable on git hub. I guess it switched something important. On Jun 12, 2011 11:18 AM, "wimh" < reply@reply.github.com> wrote:

When I compare https://github.com/hbons/SparkleShare/blob/master/SparkleLib/Git/SparkleRepoGit.cs#L455

int tab_pos = entry_line.LastIndexOf ("\t");

with https://github.com/lgordon/SparkleShare/blob/master/SparkleLib/Git/SparkleRepoGit.cs#L455

int tab_pos = entry_line.LastIndexOf (" ");

I see "\t" is replaced by " ". Why?

Reply to this email directly or view it on GitHub: https://github.com/hbons/SparkleShare/issues/217#issuecomment-1355271

wimh commented 13 years ago

yes, you have to revert the change in SparkleRepoGit.cs and SparkleRepoHg.cs. There they are needed...

lgordon commented 13 years ago

this was my mistake, I'll fix my fork, closing.

Thanks!