Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep history, diff, etc. #4

Open
mightyiam opened this issue Sep 24, 2014 · 5 comments
Open

Keep history, diff, etc. #4

mightyiam opened this issue Sep 24, 2014 · 5 comments
Assignees

Comments

@mightyiam
Copy link
Contributor

How would you keep a history of changes in a minidom?

  • Make minidom manipulations (appendChild, etc.)
  • Register current minidom as a point in history (a history array of diffs?)
  • Revert to the last point in history (thus able to revert back to any point in history) (apply last diff?)
@mightyiam
Copy link
Contributor Author

Do you think that minidoms can be successfully cloned using https://github.com/imbcmdth/UltraDeepClone , for example?

@mightyiam
Copy link
Contributor Author

It seems that minidoms can be successfully cloned using ultradeepclone.

I'm looking for a diff/patch solution that can handle the circular references in minidom objects.

All of these go into infinite recursion:

flitbit/diff#24 doesn't go into infinite recursion but I didn't quite get my head around it, yet.

@flitbit
Copy link

flitbit commented Oct 6, 2014

Saw the comment "didn't quite get my head around it", so: see flitbit/diff lines 102-104. A stack is passed along during descent and consulted at every point in a path in order to detect/avoid circular reference problems such as an infinite loop.

@mightyiam
Copy link
Contributor Author

Thank you @flitbit .

@kriskowal
Copy link
Member

The stack approach is sloppy. Should use a Map or some such. See: https://github.com/kriskowal/pop-clone

If this discussion does not require any action, please close. cc @Stuk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants